@dyedurham/search-and-file-widget 2.0.55 → 2.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84421,6 +84421,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84421
84421
  init_app_enums();
84422
84422
  init_ontario_formation_form_constants();
84423
84423
  FederalFormHelper = class _FederalFormHelper {
84424
+ static toNullableNumber(value) {
84425
+ if (value === null || value === void 0 || value === "") {
84426
+ return null;
84427
+ }
84428
+ const numericValue = Number(value);
84429
+ return Number.isNaN(numericValue) ? null : numericValue;
84430
+ }
84424
84431
  static generateConfig(task) {
84425
84432
  const delta = task.deltaData;
84426
84433
  const ext = task._ext;
@@ -84478,8 +84485,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84478
84485
  }
84479
84486
  config2[FederalFormationFormGroups.CorporateName] = new FormGroup(incorporationConfig);
84480
84487
  config2[FederalFormationFormGroups.SignificantControl] = new FormGroup({
84481
- [FederalFormationFormControl.SignificantControlType]: new FormControl(delta?.individualsWithSignificantControl?.type ?? null, Validators.required),
84482
- [FederalFormationFormControl.ExclusionReason]: new FormControl(delta?.individualsWithSignificantControl?.exclusionReason ?? null, requiredIfValue(FederalFormationFormControl.SignificantControlType, ISCOptions.Excluded))
84488
+ [FederalFormationFormControl.SignificantControlType]: new FormControl(this.toNullableNumber(delta?.individualsWithSignificantControl?.type), Validators.required),
84489
+ [FederalFormationFormControl.ExclusionReason]: new FormControl(this.toNullableNumber(delta?.individualsWithSignificantControl?.exclusionReason), requiredIfValue(FederalFormationFormControl.SignificantControlType, ISCOptions.Excluded))
84483
84490
  });
84484
84491
  const eplList = getEPRegistrations(task);
84485
84492
  const eplGroups = eplList.map((epl, index) => {
@@ -84548,10 +84555,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84548
84555
  [FederalFormationFormControl.DateOfBirth]: new FormControl(isc.participant._profile.date_of_birth),
84549
84556
  [FederalFormationFormControl.CountriesOfCitizenship]: new FormControl(countriesOfCitizenship),
84550
84557
  [FederalFormationFormControl.CountriesOfResidence]: new FormControl(countriesOfResidence),
84551
- [FederalFormationFormControl.ISCTypeOfInterest]: new FormControl(deltaData?.typeOfInterest ?? null, Validators.required),
84552
- [FederalFormationFormControl.ISCShareHoldingMethod]: new FormControl(deltaData?.shareHoldingMethod ?? null, requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares)),
84553
- [FederalFormationFormControl.ISCJointHoldingType]: new FormControl(deltaData?.jointHoldingType ?? null, requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares)),
84554
- [FederalFormationFormControl.ISCPercentageInterest]: new FormControl(deltaData?.percentageInterest ?? null, requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares))
84558
+ [FederalFormationFormControl.ISCTypeOfInterest]: new FormControl(this.toNullableNumber(deltaData?.typeOfInterest), Validators.required),
84559
+ [FederalFormationFormControl.ISCShareHoldingMethod]: new FormControl(this.toNullableNumber(deltaData?.shareHoldingMethod), requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares)),
84560
+ [FederalFormationFormControl.ISCJointHoldingType]: new FormControl(this.toNullableNumber(deltaData?.jointHoldingType), requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares)),
84561
+ [FederalFormationFormControl.ISCPercentageInterest]: new FormControl(this.toNullableNumber(deltaData?.percentageInterest), requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares))
84555
84562
  }, this.generateAddressFormGroup(address)));
84556
84563
  }
84557
84564
  static generateAddressFormGroup(address) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "2.0.55",
3
+ "version": "2.0.56",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {