@dyedurham/search-and-file-widget 2.1.4 → 2.1.5
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 +29 -21
- package/package.json +11 -11
package/dnd-filing-shell.js
CHANGED
|
@@ -84314,9 +84314,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84314
84314
|
const nameTranslations = entityDetails?.usesNameTranslation ? (entityDetails.nameTranslations ?? []).filter(Boolean) : [];
|
|
84315
84315
|
const registeredOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
|
|
84316
84316
|
const recordsOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.RECORDS_OFFICE);
|
|
84317
|
-
const regMailing = pickAddress(registeredOffice?.addresses, "Mailing"
|
|
84317
|
+
const regMailing = pickAddress(registeredOffice?.addresses, "Mailing");
|
|
84318
84318
|
const regDelivery = pickAddress(registeredOffice?.addresses, "Delivery");
|
|
84319
|
-
const recMailing = pickAddress(recordsOffice?.addresses, "Mailing"
|
|
84319
|
+
const recMailing = pickAddress(recordsOffice?.addresses, "Mailing");
|
|
84320
84320
|
const recDelivery = pickAddress(recordsOffice?.addresses, "Delivery");
|
|
84321
84321
|
const regMailingBC = mapAddress(regMailing);
|
|
84322
84322
|
const regDeliveryBC = regDelivery ? mapAddress(regDelivery) : void 0;
|
|
@@ -84366,6 +84366,14 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84366
84366
|
} else if (email.length > 150) {
|
|
84367
84367
|
issues.push("Company Email must be 150 characters or fewer.");
|
|
84368
84368
|
}
|
|
84369
|
+
if (!request.registeredOfficeMailingAddress?.streetAddress?.trim()) {
|
|
84370
|
+
issues.push("The Registered Office has no Mailing address. Add one in Athennian.");
|
|
84371
|
+
}
|
|
84372
|
+
for (const director of request.directors ?? []) {
|
|
84373
|
+
if (!director.mailingAddress?.streetAddress?.trim()) {
|
|
84374
|
+
issues.push(`Director ${`${director.firstName} ${director.lastName}`.trim()} has no Mailing address. Add one in Athennian.`);
|
|
84375
|
+
}
|
|
84376
|
+
}
|
|
84369
84377
|
const password = request.password ?? "";
|
|
84370
84378
|
if (password.length < BC_PASSWORD_MIN_LENGTH || password.length > BC_PASSWORD_MAX_LENGTH || !/^[A-Za-z0-9]+$/.test(password)) {
|
|
84371
84379
|
issues.push(`The company password (taken from the entity's registry ID) must be ${BC_PASSWORD_MIN_LENGTH} to ${BC_PASSWORD_MAX_LENGTH} letters or digits only. Update the registry ID in Athennian.`);
|
|
@@ -84404,7 +84412,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84404
84412
|
}
|
|
84405
84413
|
function mapDirector(affiliation) {
|
|
84406
84414
|
const addresses = affiliation.addresses?.length ? affiliation.addresses : affiliation.parent_affiliation?.addresses ?? [];
|
|
84407
|
-
const mailing = mapAddress(pickAddress(addresses, "Mailing"
|
|
84415
|
+
const mailing = mapAddress(pickAddress(addresses, "Mailing"));
|
|
84408
84416
|
const deliveryAddress = pickAddress(addresses, "Delivery");
|
|
84409
84417
|
const delivery = deliveryAddress ? mapAddress(deliveryAddress) : void 0;
|
|
84410
84418
|
const isSame = !delivery || sameAddress(delivery, mailing);
|
|
@@ -84607,19 +84615,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84607
84615
|
config2[BCFormationFormGroups.CorporationDetails] = this.generateCorporationDetailsFormGroup(task, delta?.entityDetails, companyEmail);
|
|
84608
84616
|
config2[BCFormationFormGroups.RegisteredOfficeAddress] = new FormGroup({
|
|
84609
84617
|
[BCFormationFormControls.MailingAddress]: new FormControl({
|
|
84610
|
-
value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Mailing")),
|
|
84618
|
+
value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Mailing", true)),
|
|
84611
84619
|
disabled: true
|
|
84612
84620
|
}),
|
|
84613
84621
|
[BCFormationFormControls.DeliveryAddress]: new FormControl({
|
|
84614
|
-
value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Delivery")),
|
|
84622
|
+
value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Delivery", true)),
|
|
84615
84623
|
disabled: true
|
|
84616
84624
|
}),
|
|
84617
84625
|
[BCFormationFormControls.RecordsOfficeMailingAddress]: new FormControl({
|
|
84618
|
-
value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Mailing")),
|
|
84626
|
+
value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Mailing", true)),
|
|
84619
84627
|
disabled: true
|
|
84620
84628
|
}),
|
|
84621
84629
|
[BCFormationFormControls.RecordsOfficeDeliveryAddress]: new FormControl({
|
|
84622
|
-
value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Delivery")),
|
|
84630
|
+
value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Delivery", true)),
|
|
84623
84631
|
disabled: true
|
|
84624
84632
|
})
|
|
84625
84633
|
});
|
|
@@ -84763,7 +84771,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84763
84771
|
// Not shown on screen: taken from the registry ID when it satisfies the BC password rule
|
|
84764
84772
|
// (otherwise empty). No validators here, as the user cannot fix it; the payload pre-flight
|
|
84765
84773
|
// check (`findBCRequestIssues`) reports an unusable value.
|
|
84766
|
-
[BCFormationFormControls.CompanyPassword]: new FormControl(
|
|
84774
|
+
[BCFormationFormControls.CompanyPassword]: new FormControl(
|
|
84775
|
+
// `||`, not `??`: a delta saved while the registry ID was invalid holds '' and must not mask the corrected ID.
|
|
84776
|
+
deltaData?.password || this.suggestPassword(task.entity._profile.registry_id)
|
|
84777
|
+
),
|
|
84767
84778
|
[BCFormationFormControls.UsesNameTranslation]: new FormControl(usesNameTranslation),
|
|
84768
84779
|
[BCFormationFormControls.NameTranslations]: new FormArray(translationRows)
|
|
84769
84780
|
});
|
|
@@ -84843,11 +84854,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84843
84854
|
disabled: true
|
|
84844
84855
|
}),
|
|
84845
84856
|
[BCFormationFormControls.MailingAddress]: new FormControl({
|
|
84846
|
-
value: this.formatFullAddress(this.pickAddress(addresses, "Mailing")),
|
|
84857
|
+
value: this.formatFullAddress(this.pickAddress(addresses, "Mailing", true)),
|
|
84847
84858
|
disabled: true
|
|
84848
84859
|
}),
|
|
84849
84860
|
[BCFormationFormControls.DeliveryAddress]: new FormControl({
|
|
84850
|
-
value: this.formatFullAddress(this.pickAddress(addresses, "Delivery")),
|
|
84861
|
+
value: this.formatFullAddress(this.pickAddress(addresses, "Delivery", true)),
|
|
84851
84862
|
disabled: true
|
|
84852
84863
|
})
|
|
84853
84864
|
});
|
|
@@ -84880,13 +84891,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84880
84891
|
}
|
|
84881
84892
|
/**
|
|
84882
84893
|
* Athennian stores one address per `location_type` ("Mailing", "Delivery", …).
|
|
84883
|
-
* Falls back to the first address so both lines render when only one exists
|
|
84894
|
+
* Falls back to the first address so both lines render when only one exists, unless
|
|
84895
|
+
* `exact` is set: then only an address of that exact type is returned.
|
|
84884
84896
|
*/
|
|
84885
|
-
static pickAddress(addresses, locationType) {
|
|
84897
|
+
static pickAddress(addresses, locationType, exact = false) {
|
|
84886
84898
|
if (!addresses?.length) {
|
|
84887
84899
|
return void 0;
|
|
84888
84900
|
}
|
|
84889
|
-
|
|
84901
|
+
const match = addresses.find((a) => (a.computed_location_type ?? a.location_type)?.toLowerCase() === locationType.toLowerCase());
|
|
84902
|
+
return match ?? (exact ? void 0 : addresses[0]);
|
|
84890
84903
|
}
|
|
84891
84904
|
};
|
|
84892
84905
|
}
|
|
@@ -86358,7 +86371,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86358
86371
|
init_BritishColumbiaConstants();
|
|
86359
86372
|
init_british_columbia_formation_form_helper();
|
|
86360
86373
|
BC_NAME_TYPE_OPTIONS = Object.values(BCNameType).filter((v) => typeof v === "number").map((v) => ({ label: BCNameTypeLabel[v], value: v }));
|
|
86361
|
-
labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("
|
|
86374
|
+
labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("None")}`;
|
|
86362
86375
|
isNamed = (form) => form.get(BCFormationFormControls.CorporationNameType)?.value === BCNameType.Named;
|
|
86363
86376
|
BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS = [
|
|
86364
86377
|
{
|
|
@@ -86562,6 +86575,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86562
86575
|
type: FormType.Input,
|
|
86563
86576
|
label: "Province / State",
|
|
86564
86577
|
formControlName: BCFormationFormControls.ProvinceState,
|
|
86578
|
+
required: true,
|
|
86565
86579
|
class: "column-2"
|
|
86566
86580
|
},
|
|
86567
86581
|
{
|
|
@@ -96689,19 +96703,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
96689
96703
|
}
|
|
96690
96704
|
/**
|
|
96691
96705
|
* British Columbia Change of Office Addresses save – propagates delta data to the host.
|
|
96692
|
-
* The draft link (ServiceOrderId and the request it was generated from) is kept, so reopening
|
|
96693
|
-
* can tell whether the saved data still matches the draft and show "Entity changed" if not.
|
|
96694
96706
|
*/
|
|
96695
96707
|
onBritishColumbiaChangeOfOfficeAddressesSave(deltaData) {
|
|
96696
96708
|
const oldDeltaData = this.task()?.deltaData;
|
|
96697
|
-
const draftLink = oldDeltaData?.serviceOrderId && oldDeltaData?.validatedData ? {
|
|
96698
|
-
serviceOrderId: oldDeltaData.serviceOrderId,
|
|
96699
|
-
validatedData: oldDeltaData.validatedData
|
|
96700
|
-
} : {};
|
|
96701
96709
|
if (oldDeltaData) {
|
|
96702
96710
|
delete this.task()?.deltaData;
|
|
96703
96711
|
}
|
|
96704
|
-
this.deltaDataChange.emit(
|
|
96712
|
+
this.deltaDataChange.emit(deltaData);
|
|
96705
96713
|
}
|
|
96706
96714
|
/**
|
|
96707
96715
|
* British Columbia Change of Office Addresses submit/file: submits the filing staged by
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dyedurham/search-and-file-widget",
|
|
3
|
-
"version": "2.1.
|
|
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.1.5",
|
|
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
|
+
}
|