@dyedurham/search-and-file-widget 2.0.31 → 2.0.33

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 +15 -20
  2. package/package.json +1 -1
@@ -86941,14 +86941,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
86941
86941
  this.deltaDataChange.emit(deltaData);
86942
86942
  }
86943
86943
  onFile() {
86944
- const task = this.task();
86945
- const previewForm = this.previewForm();
86946
- const signatoryUid = previewForm?.get(FederalFormationFormGroups.Signatory)?.get(FederalFormationFormControl.Signatory)?.value;
86947
- if (task?.deltaData && signatoryUid) {
86948
- task.deltaData = __spreadProps(__spreadValues({}, task.deltaData), {
86949
- signatoryUid
86950
- });
86951
- }
86952
86944
  this.file.emit();
86953
86945
  }
86954
86946
  onAddDocuments(documents) {
@@ -87867,7 +87859,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87867
87859
  const officialBusinessEmail = registeredOfficeAddress?.communications?.find((c) => c.type === "Business Email")?.value;
87868
87860
  const contact = task.entity.affiliations.find((a) => a._id === deltaData.contactUid);
87869
87861
  const contactPerson = contact?.participant;
87870
- const signatory = pickSignatory(incorporators, contactPerson, task.entity.affiliations, deltaData.signatoryUid);
87862
+ const signatory = pickSignatory(incorporators, contactPerson, task.entity.affiliations);
87871
87863
  const officerPhone = formatPhone(signatory.phone);
87872
87864
  const epl = getEPRegistrations(task);
87873
87865
  const eplDelta = deltaData.extraProvincialLicenses;
@@ -88019,17 +88011,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
88019
88011
  LastName: isIndividual ? incorporator.lastName : void 0,
88020
88012
  // Spec: BodyCorporate and Signature apply only to body-corporate incorporators.
88021
88013
  BodyCorporate: !isIndividual ? incorporator.incorporator_name : void 0,
88022
- Signature: !isIndividual && (incorporator.signatory_first_name || incorporator.signatory_last_name) ? [
88023
- `${incorporator.signatory_first_name ?? ""} ${incorporator.signatory_last_name ?? ""}`.trim(),
88024
- incorporator.signatory_title
88025
- ].filter(Boolean).join(", ") : void 0,
88014
+ Signature: !isIndividual && (incorporator.signatory_first_name || incorporator.signatory_last_name) ? `${incorporator.signatory_first_name ?? ""} ${incorporator.signatory_last_name ?? ""}`.trim() : void 0,
88026
88015
  Address: mapAddress(incorporator)
88027
88016
  };
88028
88017
  }
88029
88018
  function mapAddress(address) {
88030
88019
  const country = normalizeCountryCode(address?.country ?? "");
88031
- const provinceState = country === "CA" ? CANCodeToProvince(address?.province_state) : country === "US" ? USCodeToState(address?.province_state) : address?.province_state ?? "";
88032
- const addressRegion = country === "CA" ? CANProvinceToCode(provinceState) : country === "US" ? USStateToCode(provinceState) : provinceState;
88020
+ const addressRegion = mapAddressRegion(country, address?.province_state);
88033
88021
  const street = resolveStreet(address);
88034
88022
  return {
88035
88023
  // Spec: CareOf min length 4 and UnitNumber/AddressLine2 min length 3 when present, so omit blanks.
@@ -88044,6 +88032,16 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
88044
88032
  Country: normalizeCountryCode(address?.country)
88045
88033
  };
88046
88034
  }
88035
+ function mapAddressRegion(country, provinceState) {
88036
+ const region = provinceState?.trim() ?? "";
88037
+ if (country === "CA") {
88038
+ return CANProvinceToCode(CANCodeToProvince(region));
88039
+ }
88040
+ if (country === "US") {
88041
+ return USStateToCode(USCodeToState(region) || region);
88042
+ }
88043
+ return region;
88044
+ }
88047
88045
  function transformEPL(registration, deltaData, incorporationEffectiveDate, entityLanguage, filingContact) {
88048
88046
  const registeredOffice = [...registration.affiliations ?? []].find((aff) => aff.role.role_name === "Shared Address" && aff.role.static_title === "Registered Office");
88049
88047
  const registeredOfficeAddress = registeredOffice?.addresses?.[0] || registeredOffice?.parent_affiliation?.addresses?.[0];
@@ -88153,9 +88151,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
88153
88151
  return { number, name: name || line };
88154
88152
  return match ? { number: match[1], name: match[2] } : { number: "", name: line };
88155
88153
  }
88156
- function pickSignatory(incorporators, contact, affiliations, selectedAffiliationId) {
88154
+ function pickSignatory(incorporators, contact, affiliations) {
88157
88155
  const contactId = contact?._id;
88158
- const chosen = incorporators.find((i) => selectedAffiliationId && getIncorporatorAffiliationId(i) === selectedAffiliationId) ?? incorporators.find((i) => i.type === "person" && contactId && i.profileID === contactId) ?? incorporators.find((i) => i.type === "person") ?? incorporators[0];
88156
+ const chosen = incorporators.find((i) => i.type === "person" && contactId && i.profileID === contactId) ?? incorporators.find((i) => i.type === "person") ?? incorporators[0];
88159
88157
  if (!chosen)
88160
88158
  return { firstName: "", lastName: "" };
88161
88159
  const signatoryParticipant = affiliations.find((a) => a.participant?._id === chosen.profileID)?.participant;
@@ -88166,9 +88164,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
88166
88164
  phone
88167
88165
  };
88168
88166
  }
88169
- function getIncorporatorAffiliationId(incorporator) {
88170
- return incorporator.affiliationID;
88171
- }
88172
88167
  var init_federal_formation_mapper = __esm({
88173
88168
  "src/app/helpers/mappers/federal-formation.mapper.ts"() {
88174
88169
  init_ECoreInterfaces();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "2.0.31",
3
+ "version": "2.0.33",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {