Abortion-rights activists have vowed to challenge the North Dakota legislation in court.