@dyedurham/search-and-file-widget 2.0.21 → 2.0.22

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 +62 -83
  2. package/package.json +1 -1
@@ -83622,7 +83622,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
83622
83622
  return [
83623
83623
  {
83624
83624
  type: FormType.Text,
83625
- dynamicLabel: (form) => getAddressPreview(form.getRawValue()),
83625
+ dynamicLabel: (form) => getAddressPreview(form),
83626
83626
  formControlName: "",
83627
83627
  required: false,
83628
83628
  class: "span-12"
@@ -83677,7 +83677,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
83677
83677
  },
83678
83678
  {
83679
83679
  type: FormType.Text,
83680
- dynamicLabel: (form, t) => `${t("Residential Address")}: ${getAddressPreview(form.getRawValue())}`,
83680
+ dynamicLabel: (form, t) => `${t("Residential Address")}: ${getAddressPreview(form)}`,
83681
83681
  formControlName: FederalFormationFormControl.DateOfBirth,
83682
83682
  class: "span-12"
83683
83683
  },
@@ -87738,20 +87738,17 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87738
87738
  function federalFormationTaskToECore(task, deltaData) {
87739
87739
  const corporateNameDelta = deltaData.corporateName;
87740
87740
  const significantControl = deltaData.individualsWithSignificantControl;
87741
- const minDirectors = task.entity._articles?.min_directors;
87742
- const maxDirectors = task.entity._articles?.max_directors;
87743
- const isFixedDirectors = !!minDirectors && minDirectors === maxDirectors;
87744
87741
  const isNumbered = task._ext._numbered_company === true;
87745
87742
  const englishName = !isNumbered ? {
87746
87743
  CorporationName: task.entity._profile.name || "",
87747
87744
  ReservationDate: corporateNameDelta?.primaryNameReservationDate || "",
87748
87745
  ReservationNumber: corporateNameDelta?.primaryNameReservationNumber || ""
87749
- } : { CorporationName: "", ReservationDate: "", ReservationNumber: "" };
87746
+ } : void 0;
87750
87747
  const frenchName = !isNumbered && task.entity._profile.secondary_name ? {
87751
87748
  CorporationName: task.entity._profile.secondary_name || "",
87752
87749
  ReservationDate: corporateNameDelta?.secondaryNameReservationDate || "",
87753
87750
  ReservationNumber: corporateNameDelta?.secondaryNameReservationNumber || ""
87754
- } : { CorporationName: "", ReservationDate: "", ReservationNumber: "" };
87751
+ } : void 0;
87755
87752
  const legalEnding = corporateNameDelta?.legalElement;
87756
87753
  const useDifferentMailingAddress = deltaData.registeredOfficeAddress?.useDifferentAddressForCorrespondence;
87757
87754
  const mailingAddressUid = deltaData.registeredOfficeAddress?.mailingAddressForCorrespondenceUid;
@@ -87767,74 +87764,66 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87767
87764
  const directorsDelta = deltaData.directors;
87768
87765
  const individualsWithSignificantControlDelta = deltaData.individualsWithSignificantControl;
87769
87766
  const consentToProvideEmails = deltaData.consentToProvideDirectorEmailAddressesForFullAccessManager;
87770
- const isListIsc = Number(significantControl?.type) === ISCOptions.ListISC;
87767
+ const isListIsc = Number(significantControl.type) === ISCOptions.ListISC;
87771
87768
  const isNonPreapproved = corporateNameDelta?.nameType === NameType2.NonPreapproved;
87772
87769
  const payload = __spreadProps(__spreadValues({
87773
87770
  IncorporationType: corporateNameDelta?.nameType,
87774
87771
  LegalEnding: isNumbered ? legalEnding : "",
87775
87772
  EnglishName: englishName,
87776
87773
  FrenchName: frenchName,
87777
- PreappClientNumber: corporateNameDelta?.preapprovalConfirmationNumber || void 0,
87778
- PreappRequestNumber: corporateNameDelta?.preapprovalRequestId || void 0,
87779
- RegisteredOffice: registeredOfficeAddress ? mapAddress(registeredOfficeAddress) : void 0,
87774
+ PreappClientNumber: corporateNameDelta?.preapprovalConfirmationNumber,
87775
+ PreappRequestNumber: corporateNameDelta?.preapprovalRequestId,
87776
+ RegisteredOffice: registeredOfficeAddress ? __spreadProps(__spreadValues({}, mapAddress(registeredOfficeAddress)), {
87777
+ MailingAddressSameAsOffice: !useDifferentMailingAddress
87778
+ }) : void 0,
87780
87779
  MailingAddress: mailingAddress ? __spreadProps(__spreadValues({}, mapAddress(mailingAddress)), {
87781
- MailingAddressSameAsOffice: 0
87780
+ MailingAddressSameAsOffice: false
87782
87781
  }) : registeredOfficeAddress ? __spreadProps(__spreadValues({}, mapAddress(registeredOfficeAddress)), {
87783
- MailingAddressSameAsOffice: 1
87782
+ MailingAddressSameAsOffice: true
87784
87783
  }) : void 0,
87785
87784
  Directors: directors.map((d) => transformDirector(d, directorsDelta[d.participant._id], consentToProvideEmails)),
87786
87785
  Incorporators: incorporators.map((i) => transformIncorporator(i)),
87787
87786
  CoverLetter: createCoverLetter2(officialBusinessEmail, contact?.participant),
87788
- DirectorNumberType: isFixedDirectors ? ECoreDirectorNumberType.Fixed : ECoreDirectorNumberType.Range
87789
- }, isFixedDirectors ? { FixedNumberOfDirectors: minDirectors } : {
87790
- MinimumNumberOfDirectors: minDirectors || 1,
87791
- MaximumNumberOfDirectors: maxDirectors || 10
87787
+ DirectorNumberType: task.entity._articles?.min_directors === task.entity._articles?.max_directors ? ECoreDirectorNumberType.Fixed : ECoreDirectorNumberType.Range
87788
+ }, task.entity._articles?.min_directors === task.entity._articles?.max_directors ? { FixedNumberOfDirectors: task.entity._articles?.min_directors } : {
87789
+ MinimumNumberOfDirectors: task.entity._articles?.min_directors,
87790
+ MaximumNumberOfDirectors: task.entity._articles?.max_directors
87792
87791
  }), {
87793
87792
  SignificantControlType: significantControl?.type,
87794
87793
  ExclusionReason: significantControl?.exclusionReason ?? 0,
87795
87794
  RestrictionsOnBusiness: task.entity._articles?.restrictions || "None",
87796
- RestrictionsOnShareClasses: task.entity._articles?.share_terms || "",
87795
+ RestrictionsOnShareClasses: task.entity._articles?.share_restrictions_text || "",
87797
87796
  RestrictionsOnShareTransfers: task.entity._articles?.transfer_restrictions_text || "None",
87798
87797
  OtherProvisions: task.entity._articles?.other_provisions || "None",
87799
87798
  EffectiveType: determineEffectiveType(requestedDate),
87800
87799
  EffectiveDate: requestedDate,
87801
- SignatureFirstName: contact?.participant?._profile?.firstName || incorporators[0]?.firstName || incorporators[0]?.signatory_first_name || "",
87802
- SignatureLastName: contact?.participant?._profile?.lastName || incorporators[0]?.lastName || incorporators[0]?.signatory_last_name || "",
87803
- OfficerPhoneNumber: formatPhone(contact?.participant?.communicationPhone),
87800
+ SignatureFirstName: "",
87801
+ SignatureLastName: "",
87802
+ OfficerPhoneNumber: "",
87804
87803
  HasEPL: epl.length > 0 ? 1 : 0,
87805
- ExtraProvincialLicences: epl.length ? epl.map((reg) => transformEPL(reg, eplDelta[reg.uid], requestedDate, task.entity._profile.entity_language, contact?.participant)) : void 0,
87804
+ ExtraProvincialLicences: epl.length ? epl.map((reg) => transformEPL(reg, eplDelta[reg.uid])) : void 0,
87806
87805
  IndividualsWithSignificantControl: isListIsc ? (() => {
87807
- const deltaMap = new Map((individualsWithSignificantControlDelta?.individuals ?? []).map((d) => [
87806
+ const deltaMap = new Map((individualsWithSignificantControlDelta.individuals ?? []).map((d) => [
87808
87807
  d.affiliationId,
87809
87808
  d
87810
87809
  ]));
87811
87810
  return task.entity.affiliations.filter((aff) => deltaMap.has(aff._id)).map((aff) => transformIndividualWithSignificantControl(aff, deltaMap.get(aff._id)));
87812
87811
  })() : void 0,
87813
- // Shape and field names follow the spec's AdditionalInformation sample.
87814
87812
  AdditionalInformation: isNonPreapproved ? [
87815
- {
87816
- FieldSection: "Proposed business name",
87817
- Sections: [
87818
- {
87819
- FieldName: "Business Name",
87820
- FieldValue: task.entity._profile.name || ""
87821
- }
87822
- ]
87823
- },
87824
87813
  {
87825
87814
  FieldSection: "Additional information on business activities",
87826
87815
  Sections: [
87827
87816
  {
87828
- FieldName: "What does you business do? Provide a brief description.",
87817
+ FieldName: "Describe the type of business/activities that the corporation intends to carry on",
87829
87818
  FieldValue: corporateNameDelta?.businessActivity ?? ""
87830
87819
  },
87831
87820
  {
87832
- FieldName: "Who are your clients? Provide a brief description.",
87833
- FieldValue: corporateNameDelta?.typeOfClientele ?? ""
87821
+ FieldName: "Specify the geographic area in which the corporation is likely to operate (e.g., province, territory, state or other)",
87822
+ FieldValue: corporateNameDelta?.locationOfOperations ?? ""
87834
87823
  },
87835
87824
  {
87836
- FieldName: "Where will your business operate? (City, town, province etc.) Be specific.",
87837
- FieldValue: corporateNameDelta?.locationOfOperations ?? ""
87825
+ FieldName: "Describe the type of clientele the corporation intends to have",
87826
+ FieldValue: corporateNameDelta?.typeOfClientele ?? ""
87838
87827
  },
87839
87828
  {
87840
87829
  FieldName: "If the proposed name contains a family name belonging to someone other than the incorporator, state the person's relationship to the corporation.",
@@ -87844,7 +87833,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87844
87833
  FieldName: "Similar names or trademarks you've registered or searches you conducted.",
87845
87834
  FieldValue: corporateNameDelta?.similarNamesSearchedOrRegistered ?? ""
87846
87835
  }
87847
- ].filter((section) => section.FieldValue)
87836
+ ]
87848
87837
  }
87849
87838
  ] : void 0
87850
87839
  // NOTE: Spec does not include these; kept commented for reference.
@@ -87863,17 +87852,16 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87863
87852
  }
87864
87853
  function transformDirector(affiliation, deltaData, consentToProvideEmails) {
87865
87854
  const address = affiliation.addresses[0] || affiliation.parent_affiliation?.addresses?.[0];
87866
- return __spreadValues({
87855
+ return {
87867
87856
  FirstName: affiliation.participant._profile.firstName,
87868
87857
  MiddleName: affiliation.participant._profile.middleName,
87869
87858
  LastName: affiliation.participant._profile.lastName,
87870
87859
  IsResident: deltaData.residentCanadian ? 1 : 2,
87871
87860
  Address: address ? mapAddress(address) : void 0,
87872
- RequiresFullAccessManagerInvitation: !!deltaData.inviteForFullAccessManager
87873
- }, deltaData.inviteForFullAccessManager ? {
87861
+ RequiresFullAccessManagerInvitation: deltaData.inviteForFullAccessManager,
87874
87862
  FullAccessManagerInvitationEmail: affiliation.participant.communicationEmail,
87875
87863
  FullAccessManagerEmailConsent: consentToProvideEmails
87876
- } : {});
87864
+ };
87877
87865
  }
87878
87866
  function transformIndividualWithSignificantControl(affiliation, deltaData) {
87879
87867
  const address = affiliation.addresses[0] || affiliation.parent_affiliation?.addresses?.[0];
@@ -87888,9 +87876,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87888
87876
  LastName: affiliation.participant._profile.lastName,
87889
87877
  DateOfBirth: affiliation.participant._profile.date_of_birth,
87890
87878
  CountriesOfCitizenship: (affiliation.participant?._profile?.["citizenships"] ?? []).map((c) => normalizeCountryCode(c)),
87891
- CountriesOfResidence: [
87892
- normalizeCountryCode(affiliation.participant?._profile?.tax_residency?.country)
87893
- ],
87879
+ CountriesOfResidence: normalizeCountryCode(affiliation.participant?._profile?.tax_residency?.country),
87894
87880
  Address: address ? mapAddress(address) : void 0,
87895
87881
  ServiceAddress: serviceAddress ? mapAddress(serviceAddress) : void 0,
87896
87882
  TypeOfInterest: deltaData.typeOfInterest,
@@ -87907,12 +87893,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87907
87893
  FirstName: isIndividual ? incorporator.firstName : void 0,
87908
87894
  MiddleName: isIndividual ? incorporator.middleName : void 0,
87909
87895
  LastName: isIndividual ? incorporator.lastName : void 0,
87910
- // Spec: BodyCorporate and Signature apply only to body-corporate incorporators.
87911
- BodyCorporate: !isIndividual ? incorporator.incorporator_name : void 0,
87912
- Signature: !isIndividual && (incorporator.signatory_first_name || incorporator.signatory_last_name) ? [
87913
- `${incorporator.signatory_first_name ?? ""} ${incorporator.signatory_last_name ?? ""}`.trim(),
87914
- incorporator.signatory_title
87915
- ].filter(Boolean).join(", ") : void 0,
87896
+ CompanyName: !isIndividual ? incorporator.incorporator_name : void 0,
87897
+ Signature: `${incorporator.signatory_first_name ?? ""} ${incorporator.signatory_last_name ?? ""}, ${incorporator.signatory_title ?? ""}`,
87916
87898
  Address: mapAddress(incorporator)
87917
87899
  };
87918
87900
  }
@@ -87921,19 +87903,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87921
87903
  const provinceState = country === "CA" ? CANCodeToProvince(address?.province_state) : country === "US" ? USCodeToState(address?.province_state) : address?.province_state ?? "";
87922
87904
  const addressRegion = country === "CA" ? CANProvinceToCode(provinceState) : country === "US" ? USStateToCode(provinceState) : provinceState;
87923
87905
  return {
87924
- // Spec: CareOf min length 4 and UnitNumber/AddressLine2 min length 3 when present, so omit blanks.
87925
- CareOf: address?.components?.find((c) => c.name === "Attention")?.value || void 0,
87906
+ CareOf: address?.components?.find((c) => c.name === "Attention")?.value || "",
87926
87907
  StreetNumber: address?.components?.find((c) => c.name === "Street Number Only")?.value || "",
87927
87908
  StreetName: address?.components?.find((c) => c.name === "Street Only")?.value || "",
87928
- UnitNumber: address?.components?.find((c) => c.name === "Suite/Apartment")?.value || void 0,
87929
- DeliveryCode: "None",
87909
+ UnitNumber: address?.components?.find((c) => c.name === "Suite/Apartment")?.value || "",
87910
+ AddressLine2: "",
87911
+ DeliveryCode: "",
87930
87912
  City: address?.city ?? "",
87931
87913
  ProvinceState: addressRegion,
87932
87914
  Code: address?.postal_zip ?? "",
87933
87915
  Country: normalizeCountryCode(address?.country)
87934
87916
  };
87935
87917
  }
87936
- function transformEPL(registration, deltaData, incorporationEffectiveDate, entityLanguage, filingContact) {
87918
+ function transformEPL(registration, deltaData) {
87937
87919
  const registeredOffice = [...registration.affiliations ?? []].find((aff) => aff.role.role_name === "Shared Address" && aff.role.static_title === "Registered Office");
87938
87920
  const registeredOfficeAddress = registeredOffice?.addresses?.[0] || registeredOffice?.parent_affiliation?.addresses?.[0];
87939
87921
  let operatingAddress;
@@ -87963,43 +87945,43 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87963
87945
  }
87964
87946
  }
87965
87947
  return {
87966
- Jurisdiction: CANProvinceToCode(registration._compliance.home_jurisdiction),
87948
+ Jurisdiction: registration._compliance.home_jurisdiction,
87967
87949
  epFiling: {
87968
- EffectiveDate: incorporationEffectiveDate,
87969
- // Spec: "English" or "French".
87970
- Language: entityLanguage?.toLowerCase().startsWith("fr") ? "French" : "English",
87950
+ EffectiveDate: registration.registration_date,
87951
+ Language: '""',
87971
87952
  RegOffice: {
87972
- Jurisdiction: CANProvinceToCode(registration._compliance.home_jurisdiction),
87973
87953
  Address: registeredOfficeAddress ? mapAddress(registeredOfficeAddress) : {}
87974
87954
  },
87975
- OperatingAddress: operatingAddress ? { Address: mapAddress(operatingAddress) } : void 0,
87955
+ OperatingAddress: {
87956
+ Address: operatingAddress ? mapAddress(operatingAddress) : {}
87957
+ },
87976
87958
  DeliveryAddress: contactAffiliation ? {
87977
87959
  FirstName: contactAffiliation.participant._profile.firstName,
87978
87960
  LastName: contactAffiliation.participant._profile.lastName,
87979
- PhoneNumber: formatPhone(contactAffiliation.participant.communicationPhone),
87961
+ PhoneNumber: contactAffiliation.participant.communicationPhone,
87980
87962
  Email: contactAffiliation.participant.communicationEmail,
87981
- Office: serviceAddress ? mapAddress(serviceAddress) : void 0
87963
+ Office: serviceAddress ? __spreadProps(__spreadValues({}, mapAddress(serviceAddress)), {
87964
+ MailingAddressSameAsOffice: registeredOfficeAddress?.uid === deltaData.serviceAddressUid
87965
+ }) : {},
87966
+ PickupNumber: ""
87982
87967
  } : void 0,
87983
- ChiefManager: chiefManager ? {
87984
- FirstName: chiefManager.participant._profile.firstName,
87985
- MiddleName: chiefManager.participant._profile.middleName,
87986
- LastName: chiefManager.participant._profile.lastName,
87987
- Office: chiefManagerAddress ? mapAddress(chiefManagerAddress) : void 0,
87968
+ ChiefManager: {
87969
+ FirstName: chiefManager?.participant._profile.firstName,
87970
+ MiddleName: chiefManager?.participant._profile.middleName,
87971
+ LastName: chiefManager?.participant._profile.lastName,
87972
+ Office: chiefManagerAddress ? mapAddress(chiefManagerAddress) : {},
87988
87973
  AddressEffectiveDate: chiefManagerAddress?.effective_date,
87989
- // Spec: must equal Incorporation.EffectiveDate.
87990
- EffectiveDate: incorporationEffectiveDate,
87991
- Email: chiefManager.participant.communicationEmail,
87992
- PhoneNumber: formatPhone(chiefManager.participant.communicationPhone)
87993
- } : void 0,
87974
+ EffectiveDate: chiefManager?.start_date,
87975
+ PhoneNumber: chiefManager?.participant.communicationPhone
87976
+ },
87994
87977
  Signatory: {
87995
87978
  FirstName: signatoryManager?.participant._profile.firstName,
87996
87979
  MiddleName: signatoryManager?.participant._profile.middleName,
87997
87980
  LastName: signatoryManager?.participant._profile.lastName,
87998
87981
  SigningTitle: deltaData.signatoryRole
87999
87982
  },
88000
- // Spec: required. Fall back to the filing contact's email when the office has no Business Email.
88001
- OfficialEmail: registeredOfficeAddress?.communications?.find((c) => c.type === "Business Email")?.value || filingContact?.communicationEmail,
88002
- NAICSCode: deltaData.businessActivity?.toString(),
87983
+ OfficialEmail: registeredOfficeAddress?.communications?.find((c) => c.type === "Business Email")?.value,
87984
+ NAICSCode: deltaData.businessActivity,
88003
87985
  PrimaryActivity: NAICS_CODE_DESCRIPTIONS[deltaData.businessActivity?.toString()]
88004
87986
  }
88005
87987
  };
@@ -88010,13 +87992,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
88010
87992
  LastName: contact?._profile?.lastName || "",
88011
87993
  MiddleName: contact?._profile?.middleName || "",
88012
87994
  Email: contact?.communicationEmail || officialBusinessEmail || "",
88013
- Phone: formatPhone(contact?.communicationPhone)
87995
+ Phone: contact?.communicationPhone || "",
87996
+ Fax: '""'
88014
87997
  };
88015
87998
  }
88016
- function formatPhone(phone) {
88017
- const digits = (phone ?? "").replace(/\D/g, "").slice(-10);
88018
- return digits.length === 10 ? `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6)}` : phone ?? "";
88019
- }
88020
87999
  var init_federal_formation_mapper = __esm({
88021
88000
  "src/app/helpers/mappers/federal-formation.mapper.ts"() {
88022
88001
  init_ECoreInterfaces();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {