@dyedurham/search-and-file-widget 2.0.41 → 2.0.43
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 +37 -7
- package/package.json +11 -11
package/dnd-filing-shell.js
CHANGED
|
@@ -84426,7 +84426,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84426
84426
|
const citizenships = isc.participant?._profile?.["citizenships"];
|
|
84427
84427
|
const countriesOfCitizenship = citizenships?.map((c) => normalizeCountryCode(c)).join(", ") ?? "";
|
|
84428
84428
|
const countriesOfResidence = normalizeCountryCode(isc.participant?._profile?.tax_residency?.country ?? "");
|
|
84429
|
-
const address =
|
|
84429
|
+
const address = this.getAffiliationAddress(isc);
|
|
84430
84430
|
return new FormGroup(__spreadValues({
|
|
84431
84431
|
[FormationFormControls.AffiliationName]: new FormControl({ value: name, disabled: true }),
|
|
84432
84432
|
[FormationFormControls.Id]: new FormControl({ value: id, disabled: true }),
|
|
@@ -84440,11 +84440,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84440
84440
|
[FederalFormationFormControl.ISCPercentageInterest]: new FormControl(deltaData?.percentageInterest ?? null, requiredIfNotValue(FederalFormationFormControl.ISCTypeOfInterest, ISCTypeOfInterest.ControlWithoutShares))
|
|
84441
84441
|
}, this.generateAddressFormGroup(address)));
|
|
84442
84442
|
}
|
|
84443
|
+
static getAffiliationAddress(affiliation) {
|
|
84444
|
+
const addresses = affiliation?.addresses?.filter((address) => this.hasAddressValue(address)) ?? [];
|
|
84445
|
+
const parentAddresses = affiliation?.parent_affiliation?.addresses?.filter((address) => this.hasAddressValue(address)) ?? [];
|
|
84446
|
+
const addressReferences = affiliation?._addresses?.filter((address) => this.hasAddressValue(address)) ?? [];
|
|
84447
|
+
return addresses[0] || parentAddresses[0] || addressReferences[0];
|
|
84448
|
+
}
|
|
84443
84449
|
static generateAddressFormGroup(address) {
|
|
84444
84450
|
const config2 = {};
|
|
84445
84451
|
if (address) {
|
|
84446
|
-
const
|
|
84447
|
-
const
|
|
84452
|
+
const street = this.resolveStreet(address);
|
|
84453
|
+
const streetOnly = street.name;
|
|
84454
|
+
const streetNumberOnly = street.number;
|
|
84448
84455
|
const { StreetName, StreetType: StreetType2, StreetDirection: StreetDirection2 } = parseStreetAddress(streetOnly);
|
|
84449
84456
|
const streetType = StreetType2 ? mapStreetType(StreetType2) : "";
|
|
84450
84457
|
const streetDirection = StreetDirection2 ? mapStreetDirection(StreetDirection2) : "";
|
|
@@ -84490,6 +84497,22 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84490
84497
|
}
|
|
84491
84498
|
return config2;
|
|
84492
84499
|
}
|
|
84500
|
+
static resolveStreet(address) {
|
|
84501
|
+
const componentStreetName = getAddressComponent(address, "Street Only");
|
|
84502
|
+
const componentStreetNumber = getAddressComponent(address, "Street Number Only");
|
|
84503
|
+
if (componentStreetName || componentStreetNumber) {
|
|
84504
|
+
return {
|
|
84505
|
+
number: componentStreetNumber,
|
|
84506
|
+
name: componentStreetName
|
|
84507
|
+
};
|
|
84508
|
+
}
|
|
84509
|
+
const line = address.street?.trim() || address.display?.line1?.trim() || "";
|
|
84510
|
+
const match = /^(\d[\w-]*)\s+(.+)$/.exec(line);
|
|
84511
|
+
return match ? { number: match[1], name: match[2] } : { number: "", name: line };
|
|
84512
|
+
}
|
|
84513
|
+
static hasAddressValue(address) {
|
|
84514
|
+
return Boolean(address?.components?.some((component) => component.value?.trim()) || address?.street?.trim() || address?.display?.line1?.trim() || address?.display?.line2?.trim() || address?.city?.trim() || address?.province_state?.trim() || address?.country?.trim() || address?.postal_zip?.trim());
|
|
84515
|
+
}
|
|
84493
84516
|
};
|
|
84494
84517
|
}
|
|
84495
84518
|
});
|
|
@@ -85007,10 +85030,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85007
85030
|
const map2 = /* @__PURE__ */ new Map();
|
|
85008
85031
|
const individualsWithSignificantControl = this.getSelectableIndividualsWithSignificantControl(affiliations);
|
|
85009
85032
|
for (const individual of individualsWithSignificantControl) {
|
|
85010
|
-
const
|
|
85033
|
+
const addresses = [
|
|
85034
|
+
...individual.addresses ?? [],
|
|
85035
|
+
...individual.parent_affiliation?.addresses ?? []
|
|
85036
|
+
];
|
|
85037
|
+
const resolvedAddress = FederalFormHelper.getAffiliationAddress(individual);
|
|
85038
|
+
const addressOptions = (addresses.length ? addresses : resolvedAddress ? [resolvedAddress] : []).map((address) => ({
|
|
85011
85039
|
label: this.formatAddressLabel(address),
|
|
85012
85040
|
value: address.uid
|
|
85013
|
-
}));
|
|
85041
|
+
})).filter((option) => option.label && option.value);
|
|
85014
85042
|
map2.set(individual._id, addressOptions);
|
|
85015
85043
|
}
|
|
85016
85044
|
return map2;
|
|
@@ -87936,7 +87964,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
87936
87964
|
}) : void 0,
|
|
87937
87965
|
Directors: directors.map((d) => transformDirector(d, directorsDelta[d.participant._id], consentToProvideEmails)),
|
|
87938
87966
|
Incorporators: incorporators.map((i) => transformIncorporator(i)),
|
|
87939
|
-
|
|
87967
|
+
// Cover letter is the Contact's: name, email and phone must all come from the same person.
|
|
87968
|
+
// officerPhone is the incorporator/signatory's and is empty for a body corporate.
|
|
87969
|
+
CoverLetter: createCoverLetter2(officialBusinessEmail, contactPerson, formatPhone(pickPhone(contactPerson)) || officerPhone),
|
|
87940
87970
|
DirectorNumberType: isFixedDirectors ? ECoreDirectorNumberType.Fixed : ECoreDirectorNumberType.Range
|
|
87941
87971
|
}, isFixedDirectors ? { FixedNumberOfDirectors: minDirectors } : {
|
|
87942
87972
|
MinimumNumberOfDirectors: minDirectors || 1,
|
|
@@ -89642,7 +89672,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
89642
89672
|
}
|
|
89643
89673
|
const federalPayload = buildFederalFormationValidateRequest(task, deltaData);
|
|
89644
89674
|
const validatedIncorporation = deltaData?.validatedData?.Incorporation;
|
|
89645
|
-
if (!task._ext?._future_filing_date && validatedIncorporation) {
|
|
89675
|
+
if (!task._ext?._future_filing_date && validatedIncorporation?.EffectiveType === federalPayload.Incorporation.EffectiveType) {
|
|
89646
89676
|
federalPayload.Incorporation.EffectiveDate = validatedIncorporation.EffectiveDate;
|
|
89647
89677
|
federalPayload.Incorporation.EffectiveType = validatedIncorporation.EffectiveType;
|
|
89648
89678
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dyedurham/search-and-file-widget",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dnd-filing-shell.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "",
|
|
10
|
-
"license": "ISC"
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dyedurham/search-and-file-widget",
|
|
3
|
+
"version": "2.0.43",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dnd-filing-shell.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC"
|
|
11
|
+
}
|