@dyedurham/search-and-file-widget 2.0.55 → 2.0.57
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.
- package/dnd-filing-shell.js +22 -7
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -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
|
|
84482
|
-
[FederalFormationFormControl.ExclusionReason]: new FormControl(delta?.individualsWithSignificantControl?.exclusionReason
|
|
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) => {
|
|
@@ -84541,18 +84548,26 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84541
84548
|
const countriesOfCitizenship = citizenships?.map((c) => normalizeCountryCode(c)).join(", ") ?? "";
|
|
84542
84549
|
const countriesOfResidence = normalizeCountryCode(isc.participant?._profile?.tax_residency?.country ?? "");
|
|
84543
84550
|
const address = isc.addresses?.[0] || isc.parent_affiliation?.addresses?.[0];
|
|
84544
|
-
|
|
84551
|
+
const form = new FormGroup(__spreadValues({
|
|
84545
84552
|
[FormationFormControls.AffiliationName]: new FormControl({ value: name, disabled: true }),
|
|
84546
84553
|
[FormationFormControls.Id]: new FormControl({ value: id, disabled: true }),
|
|
84547
84554
|
[FederalFormationFormControl.AddressForService]: new FormControl(deltaData?.addressForService ?? "", Validators.required),
|
|
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
|
|
84552
|
-
[FederalFormationFormControl.ISCShareHoldingMethod]: new FormControl(deltaData?.shareHoldingMethod
|
|
84553
|
-
[FederalFormationFormControl.ISCJointHoldingType]: new FormControl(deltaData?.jointHoldingType
|
|
84554
|
-
[FederalFormationFormControl.ISCPercentageInterest]: new FormControl(deltaData?.percentageInterest
|
|
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)));
|
|
84563
|
+
[
|
|
84564
|
+
FederalFormationFormControl.ISCShareHoldingMethod,
|
|
84565
|
+
FederalFormationFormControl.ISCJointHoldingType,
|
|
84566
|
+
FederalFormationFormControl.ISCPercentageInterest
|
|
84567
|
+
].forEach((controlName) => {
|
|
84568
|
+
form.get(controlName)?.updateValueAndValidity({ emitEvent: false });
|
|
84569
|
+
});
|
|
84570
|
+
return form;
|
|
84556
84571
|
}
|
|
84557
84572
|
static generateAddressFormGroup(address) {
|
|
84558
84573
|
const config2 = {};
|