@dyedurham/search-and-file-widget 2.1.2 → 2.1.4

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.
Files changed (2) hide show
  1. package/dnd-filing-shell.js +18 -17
  2. package/package.json +11 -11
@@ -84607,19 +84607,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84607
84607
  config2[BCFormationFormGroups.CorporationDetails] = this.generateCorporationDetailsFormGroup(task, delta?.entityDetails, companyEmail);
84608
84608
  config2[BCFormationFormGroups.RegisteredOfficeAddress] = new FormGroup({
84609
84609
  [BCFormationFormControls.MailingAddress]: new FormControl({
84610
- value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Mailing", true)),
84610
+ value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Mailing")),
84611
84611
  disabled: true
84612
84612
  }),
84613
84613
  [BCFormationFormControls.DeliveryAddress]: new FormControl({
84614
- value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Delivery", true)),
84614
+ value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Delivery")),
84615
84615
  disabled: true
84616
84616
  }),
84617
84617
  [BCFormationFormControls.RecordsOfficeMailingAddress]: new FormControl({
84618
- value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Mailing", true)),
84618
+ value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Mailing")),
84619
84619
  disabled: true
84620
84620
  }),
84621
84621
  [BCFormationFormControls.RecordsOfficeDeliveryAddress]: new FormControl({
84622
- value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Delivery", true)),
84622
+ value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Delivery")),
84623
84623
  disabled: true
84624
84624
  })
84625
84625
  });
@@ -84763,10 +84763,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84763
84763
  // Not shown on screen: taken from the registry ID when it satisfies the BC password rule
84764
84764
  // (otherwise empty). No validators here, as the user cannot fix it; the payload pre-flight
84765
84765
  // check (`findBCRequestIssues`) reports an unusable value.
84766
- [BCFormationFormControls.CompanyPassword]: new FormControl(
84767
- // `||`, not `??`: a delta saved while the registry ID was invalid holds '' and must not mask the corrected ID.
84768
- deltaData?.password || this.suggestPassword(task.entity._profile.registry_id)
84769
- ),
84766
+ [BCFormationFormControls.CompanyPassword]: new FormControl(deltaData?.password ?? this.suggestPassword(task.entity._profile.registry_id)),
84770
84767
  [BCFormationFormControls.UsesNameTranslation]: new FormControl(usesNameTranslation),
84771
84768
  [BCFormationFormControls.NameTranslations]: new FormArray(translationRows)
84772
84769
  });
@@ -84846,11 +84843,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84846
84843
  disabled: true
84847
84844
  }),
84848
84845
  [BCFormationFormControls.MailingAddress]: new FormControl({
84849
- value: this.formatFullAddress(this.pickAddress(addresses, "Mailing", true)),
84846
+ value: this.formatFullAddress(this.pickAddress(addresses, "Mailing")),
84850
84847
  disabled: true
84851
84848
  }),
84852
84849
  [BCFormationFormControls.DeliveryAddress]: new FormControl({
84853
- value: this.formatFullAddress(this.pickAddress(addresses, "Delivery", true)),
84850
+ value: this.formatFullAddress(this.pickAddress(addresses, "Delivery")),
84854
84851
  disabled: true
84855
84852
  })
84856
84853
  });
@@ -84883,15 +84880,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84883
84880
  }
84884
84881
  /**
84885
84882
  * Athennian stores one address per `location_type` ("Mailing", "Delivery", …).
84886
- * Falls back to the first address so both lines render when only one exists, unless
84887
- * `exact` is set: then only an address of that exact type is returned.
84883
+ * Falls back to the first address so both lines render when only one exists.
84888
84884
  */
84889
- static pickAddress(addresses, locationType, exact = false) {
84885
+ static pickAddress(addresses, locationType) {
84890
84886
  if (!addresses?.length) {
84891
84887
  return void 0;
84892
84888
  }
84893
- const match = addresses.find((a) => (a.computed_location_type ?? a.location_type)?.toLowerCase() === locationType.toLowerCase());
84894
- return match ?? (exact ? void 0 : addresses[0]);
84889
+ return addresses.find((a) => (a.computed_location_type ?? a.location_type)?.toLowerCase() === locationType.toLowerCase()) ?? addresses[0];
84895
84890
  }
84896
84891
  };
84897
84892
  }
@@ -86363,7 +86358,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
86363
86358
  init_BritishColumbiaConstants();
86364
86359
  init_british_columbia_formation_form_helper();
86365
86360
  BC_NAME_TYPE_OPTIONS = Object.values(BCNameType).filter((v) => typeof v === "number").map((v) => ({ label: BCNameTypeLabel[v], value: v }));
86366
- labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("None")}`;
86361
+ labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("Not specified")}`;
86367
86362
  isNamed = (form) => form.get(BCFormationFormControls.CorporationNameType)?.value === BCNameType.Named;
86368
86363
  BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS = [
86369
86364
  {
@@ -96694,13 +96689,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96694
96689
  }
96695
96690
  /**
96696
96691
  * 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.
96697
96694
  */
96698
96695
  onBritishColumbiaChangeOfOfficeAddressesSave(deltaData) {
96699
96696
  const oldDeltaData = this.task()?.deltaData;
96697
+ const draftLink = oldDeltaData?.serviceOrderId && oldDeltaData?.validatedData ? {
96698
+ serviceOrderId: oldDeltaData.serviceOrderId,
96699
+ validatedData: oldDeltaData.validatedData
96700
+ } : {};
96700
96701
  if (oldDeltaData) {
96701
96702
  delete this.task()?.deltaData;
96702
96703
  }
96703
- this.deltaDataChange.emit(deltaData);
96704
+ this.deltaDataChange.emit(__spreadValues(__spreadValues({}, deltaData), draftLink));
96704
96705
  }
96705
96706
  /**
96706
96707
  * 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.2",
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.4",
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
+ }