@dyedurham/search-and-file-widget 2.0.64 → 2.0.66

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.
@@ -84911,8 +84911,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84911
84911
  ...affiliations.filter((a) => isDirector(a) && !incomingIds.has(a._id)).map((a) => this.generateDirectorFormGroup(a, ceasedIds.has(a._id) ? IRAffiliationType.Ceased : IRAffiliationType.Used)),
84912
84912
  ...incoming.filter(isDirector).map((a) => this.generateDirectorFormGroup(a, IRAffiliationType.Add))
84913
84913
  ];
84914
- if (directors.length) {
84915
- config2[BCChangeOfDirectorsFormGroups.Directors] = new FormArray(directors);
84914
+ const fallbackDirectors = directors.length ? [] : this.generateDirectorFormGroupsFromChangeDirectors(task);
84915
+ if (directors.length || fallbackDirectors.length) {
84916
+ config2[BCChangeOfDirectorsFormGroups.Directors] = new FormArray(directors.length ? directors : fallbackDirectors);
84916
84917
  }
84917
84918
  config2[BCChangeOfDirectorsFormGroups.Notification] = new FormGroup({
84918
84919
  [Controls.RegisterAsOfDate]: this.readOnly(today),
@@ -84941,6 +84942,58 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84941
84942
  [Controls.DeliveryAddress]: this.readOnly(BritishColumbiaFormationFormHelper.formatFullAddress(BritishColumbiaFormationFormHelper.pickAddress(addresses, "Delivery")))
84942
84943
  });
84943
84944
  }
84945
+ static generateDirectorFormGroupsFromChangeDirectors(task) {
84946
+ const source = task.changeDirectors ?? task.deltaData?.changeDirectors ?? task.deltaData?.validatedData?.ChangeDirectors;
84947
+ const currentDirectors = source?.Directors ?? source?.directors ?? [];
84948
+ const addedDirectors = [
84949
+ ...source?.AddedDirectors ?? [],
84950
+ ...source?.AddDirector ?? [],
84951
+ ...source?.addDirectors ?? []
84952
+ ];
84953
+ const ceasedDirectors = [
84954
+ ...source?.CeasedDirectors ?? [],
84955
+ ...source?.CeaseDirector ?? [],
84956
+ ...source?.ceaseDirectors ?? []
84957
+ ];
84958
+ const editedDirectors = [
84959
+ ...source?.EditedDirectors ?? [],
84960
+ ...source?.EditDirector ?? [],
84961
+ ...source?.editDirectors ?? []
84962
+ ];
84963
+ return [
84964
+ ...currentDirectors.map((director) => this.generateDirectorFormGroupFromPayload(director, IRAffiliationType.Used)),
84965
+ ...editedDirectors.map((director) => this.generateDirectorFormGroupFromPayload(director, IRAffiliationType.Update)),
84966
+ ...ceasedDirectors.map((director) => this.generateDirectorFormGroupFromPayload(director, IRAffiliationType.Ceased)),
84967
+ ...addedDirectors.map((director) => this.generateDirectorFormGroupFromPayload(director, IRAffiliationType.Add))
84968
+ ];
84969
+ }
84970
+ static generateDirectorFormGroupFromPayload(director, affiliationType) {
84971
+ const name = director?.PersonName ?? director?.personName ?? director;
84972
+ return new FormGroup({
84973
+ [Controls.Id]: new FormControl(director?.Id ?? director?.id ?? ""),
84974
+ [Controls.AffiliationName]: this.readOnly(this.formatDirectorName(name?.FirstName ?? name?.firstName, name?.MiddleName ?? name?.middleName, name?.LastName ?? name?.lastName)),
84975
+ [Controls.AffiliationType]: this.readOnly(affiliationType),
84976
+ [Controls.MailingAddress]: this.readOnly(this.formatPayloadAddress(director)),
84977
+ [Controls.DeliveryAddress]: this.readOnly(this.formatPayloadAddress(director))
84978
+ });
84979
+ }
84980
+ static formatDirectorName(firstName, middleName, lastName) {
84981
+ const givenNames = [firstName, middleName].filter(Boolean).join(" ");
84982
+ return [lastName, givenNames].filter(Boolean).join(", ");
84983
+ }
84984
+ static formatPayloadAddress(director) {
84985
+ const postalAddress = director?.PostalAddress ?? director?.postalAddress;
84986
+ const address = postalAddress?.AddressCA ?? postalAddress?.AddressUS ?? postalAddress?.AddressINTL ?? director?.address ?? {};
84987
+ return [
84988
+ address.Address1 ?? address.address1,
84989
+ address.Address2 ?? address.address2,
84990
+ address.Address3 ?? address.address3,
84991
+ address.CityTown ?? address.city,
84992
+ address.RegionName ?? address.regionName ?? address.provinceState,
84993
+ address.PostCode ?? address.postalZip,
84994
+ address.CountryCodeName ?? address.country
84995
+ ].filter((part) => Boolean(String(part ?? "").trim())).join(", ");
84996
+ }
84944
84997
  static readOnly(value) {
84945
84998
  return new FormControl({ value: value ?? "", disabled: true });
84946
84999
  }
@@ -85649,7 +85702,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85649
85702
  FormGroupDirective,
85650
85703
  FormControlName,
85651
85704
  TranslatePipe
85652
- ], styles: ["\n\n[_nghost-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n color: #2f343b;\n}\n[_nghost-%COMP%] .change-of-directors-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n min-height: 0;\n width: 100%;\n}\n[_nghost-%COMP%] .change-of-directors-form-content[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 24px;\n min-height: 0;\n overflow-y: auto;\n padding-right: 8px;\n}\n[_nghost-%COMP%] .expandable-card {\n border: 1px solid #e1e6ee;\n border-radius: 8px;\n box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;\n margin: 0 !important;\n padding: 32px !important;\n}\n[_nghost-%COMP%] .expandable-card-header-title {\n color: #2f343b !important;\n font-weight: 700 !important;\n line-height: 1.2;\n margin: 0;\n}\n[_nghost-%COMP%] .expandable-card-header mat-icon {\n color: #66717f !important;\n}\n[_nghost-%COMP%] .expandable-card-content {\n padding-top: 24px !important;\n}\n[_nghost-%COMP%] .filling-form-fields {\n column-gap: 42px !important;\n}\n[_nghost-%COMP%] .filling-form-fields-item-label, \n[_nghost-%COMP%] .mat-mdc-radio-button .mdc-label, \n[_nghost-%COMP%] .mat-mdc-checkbox .mdc-label {\n color: #4b5563 !important;\n line-height: 1.45;\n}\n[_nghost-%COMP%] .mat-mdc-form-field {\n width: 100%;\n}\n[_nghost-%COMP%] .mat-mdc-text-field-wrapper {\n min-height: 48px;\n}\n[_nghost-%COMP%] .mat-mdc-form-field-infix {\n align-items: center;\n min-height: 48px;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n[_nghost-%COMP%] .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n[_nghost-%COMP%] .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 18px;\n color: #4b5563;\n line-height: 1.35;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n}\n[_nghost-%COMP%] .filing-details[_ngcontent-%COMP%], \n[_nghost-%COMP%] .notification-section[_ngcontent-%COMP%], \n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n[_nghost-%COMP%] .note-box[_ngcontent-%COMP%] {\n border: 1px solid #f3d27a;\n border-radius: 6px;\n background: #fffaf0;\n color: #84610d;\n line-height: 1.55;\n padding: 22px 28px;\n}\n[_nghost-%COMP%] .note-box[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n font-weight: 700;\n}\n[_nghost-%COMP%] .directors-change-checkbox[_ngcontent-%COMP%] {\n align-self: flex-start;\n}\n[_nghost-%COMP%] .filing-details-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr);\n column-gap: 56px;\n align-items: start;\n max-width: 980px;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n color: #4b5563;\n line-height: 1.35;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n color: #e22222;\n}\n[_nghost-%COMP%] .hint[_ngcontent-%COMP%], \n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] p[_ngcontent-%COMP%], \n[_nghost-%COMP%] .mailing-copy[_ngcontent-%COMP%] {\n color: #6b7280;\n line-height: 1.5;\n margin: 0;\n}\n[_nghost-%COMP%] .filing-fee[_ngcontent-%COMP%] {\n color: #4b5563;\n line-height: 1.35;\n margin: 58px 0 0;\n}\n[_nghost-%COMP%] .filing-fee[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n}\n[_nghost-%COMP%] .directors-table[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.65fr) minmax(280px, 1.65fr);\n margin-top: 28px;\n color: #4b5563;\n line-height: 1.45;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%], \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] {\n display: contents;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n border-bottom: 1px solid #e1e6ee;\n padding: 24px 28px;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(:first-child), \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(:first-child) {\n border-left: 1px solid #e1e6ee;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n padding-top: 0;\n}\n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n display: block;\n font-weight: 700;\n margin-bottom: 14px;\n}\n[_nghost-%COMP%] .status-pill[_ngcontent-%COMP%] {\n border-radius: 999px;\n display: inline-flex;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n padding: 8px 14px;\n}\n[_nghost-%COMP%] .status-pill.new[_ngcontent-%COMP%] {\n background: #eaf7ef;\n border: 1px solid #b8e3c7;\n color: #15803d;\n}\n[_nghost-%COMP%] .status-pill.ceased[_ngcontent-%COMP%] {\n background: #fff1f2;\n border: 1px solid #fecdd3;\n color: #be123c;\n}\n[_nghost-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 48px;\n}\n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n align-items: flex-start;\n flex-direction: column;\n gap: 14px;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] {\n max-width: 760px;\n}\n@media (max-width: 900px) {\n [_nghost-%COMP%] .filing-details-grid[_ngcontent-%COMP%], \n [_nghost-%COMP%] .directors-table[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n [_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] {\n display: none;\n }\n [_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr;\n border-bottom: 1px solid #e1e6ee;\n }\n [_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n border: 0;\n padding: 14px 0;\n }\n [_nghost-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 14px;\n }\n}\n/*# sourceMappingURL=change-of-directors-form.component.css.map */"], changeDetection: 0 });
85705
+ ], styles: ["\n\n[_nghost-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n color: #2f343b;\n}\n[_nghost-%COMP%] .change-of-directors-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n min-height: 0;\n width: 100%;\n}\n[_nghost-%COMP%] .change-of-directors-form-content[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding-right: 8px;\n}\n[_nghost-%COMP%] .expandable-card {\n border: 1px solid #e1e6ee;\n border-radius: 8px;\n box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;\n margin: 0 !important;\n padding: 24px 28px !important;\n}\n[_nghost-%COMP%] .expandable-card-header-title {\n color: #2f343b !important;\n font-weight: 700 !important;\n line-height: 1.2;\n margin: 0;\n}\n[_nghost-%COMP%] .expandable-card-header mat-icon {\n color: #66717f !important;\n}\n[_nghost-%COMP%] .expandable-card-content {\n padding-top: 20px !important;\n}\n[_nghost-%COMP%] .filling-form-fields {\n column-gap: 42px !important;\n}\n[_nghost-%COMP%] .filling-form-fields-item-label, \n[_nghost-%COMP%] .mat-mdc-radio-button .mdc-label, \n[_nghost-%COMP%] .mat-mdc-checkbox .mdc-label {\n color: #4b5563 !important;\n font-size: 14px !important;\n line-height: 1.45;\n}\n[_nghost-%COMP%] .mat-mdc-radio-button, \n[_nghost-%COMP%] .mat-mdc-checkbox {\n --mdc-radio-state-layer-size: 40px;\n --mdc-checkbox-state-layer-size: 40px;\n}\n[_nghost-%COMP%] .mat-mdc-form-field {\n width: 100%;\n}\n[_nghost-%COMP%] .mat-mdc-text-field-wrapper {\n min-height: 46px;\n}\n[_nghost-%COMP%] .mat-mdc-form-field-infix {\n align-items: center;\n display: flex !important;\n min-height: 46px;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n[_nghost-%COMP%] .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n[_nghost-%COMP%] .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 18px;\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n}\n[_nghost-%COMP%] .readonly-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n}\n[_nghost-%COMP%] .filing-details[_ngcontent-%COMP%], \n[_nghost-%COMP%] .notification-section[_ngcontent-%COMP%], \n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n[_nghost-%COMP%] .note-box[_ngcontent-%COMP%] {\n border: 1px solid #f3d27a;\n border-radius: 6px;\n background: #fffaf0;\n color: #84610d;\n font-size: 14px;\n line-height: 1.55;\n padding: 16px 20px;\n}\n[_nghost-%COMP%] .note-box[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n font-weight: 700;\n}\n[_nghost-%COMP%] .directors-change-checkbox[_ngcontent-%COMP%] {\n align-self: flex-start;\n}\n[_nghost-%COMP%] .filing-details-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr);\n column-gap: 56px;\n align-items: start;\n max-width: 980px;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n}\n[_nghost-%COMP%] .date-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%], \n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n color: #e22222;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] {\n width: min(860px, 46%);\n min-width: 360px;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n margin-bottom: 8px;\n font-size: 16px;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper {\n min-height: 84px;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mat-mdc-form-field-infix {\n min-height: 84px;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mat-mdc-input-element {\n align-self: center;\n height: 32px;\n color: #4b5563 !important;\n font-size: 28px !important;\n line-height: 32px;\n padding: 0 24px !important;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n[_nghost-%COMP%] .hint[_ngcontent-%COMP%], \n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] p[_ngcontent-%COMP%], \n[_nghost-%COMP%] .mailing-copy[_ngcontent-%COMP%] {\n color: #6b7280;\n font-size: 14px;\n line-height: 1.5;\n margin: 0;\n}\n[_nghost-%COMP%] .filing-fee[_ngcontent-%COMP%] {\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n margin: 46px 0 0;\n}\n[_nghost-%COMP%] .filing-fee[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n}\n[_nghost-%COMP%] .directors-table[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.65fr) minmax(280px, 1.65fr);\n margin-top: 28px;\n color: #4b5563;\n font-size: 14px;\n line-height: 1.45;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%], \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] {\n display: contents;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n border-bottom: 1px solid #e1e6ee;\n padding: 16px 24px;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(:first-child), \n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(:first-child) {\n border-left: 1px solid #e1e6ee;\n}\n[_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n color: #2f343b;\n font-weight: 700;\n padding-top: 0;\n}\n[_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: #2f343b;\n display: block;\n font-weight: 700;\n margin-bottom: 8px;\n}\n[_nghost-%COMP%] .status-pill[_ngcontent-%COMP%] {\n border-radius: 999px;\n display: inline-flex;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n padding: 6px 12px;\n}\n[_nghost-%COMP%] .status-pill.new[_ngcontent-%COMP%] {\n background: #eaf7ef;\n border: 1px solid #b8e3c7;\n color: #15803d;\n}\n[_nghost-%COMP%] .status-pill.ceased[_ngcontent-%COMP%] {\n background: #fff1f2;\n border: 1px solid #fecdd3;\n color: #be123c;\n}\n[_nghost-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 48px;\n}\n[_nghost-%COMP%] .annual-reminder[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n align-items: flex-start;\n flex-direction: column;\n gap: 14px;\n}\n@media (max-width: 900px) {\n [_nghost-%COMP%] .filing-details-grid[_ngcontent-%COMP%], \n [_nghost-%COMP%] .directors-table[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n [_nghost-%COMP%] .directors-table-header[_ngcontent-%COMP%] {\n display: none;\n }\n [_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr;\n border-bottom: 1px solid #e1e6ee;\n }\n [_nghost-%COMP%] .directors-table-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n border: 0;\n padding: 14px 0;\n }\n [_nghost-%COMP%] mat-radio-group[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 14px;\n }\n [_nghost-%COMP%] .email-field[_ngcontent-%COMP%] {\n width: 100%;\n min-width: 0;\n }\n [_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mat-mdc-input-element {\n font-size: 16px !important;\n line-height: 24px;\n padding: 0 12px !important;\n }\n}\n/*# sourceMappingURL=change-of-directors-form.component.css.map */"], changeDetection: 0 });
85653
85706
  };
85654
85707
  (() => {
85655
85708
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BritishColumbiaChangeOfDirectorsFormComponent, [{
@@ -85902,7 +85955,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85902
85955
  }
85903
85956
  </div>
85904
85957
  </div>
85905
- `, styles: ["/* src/app/components/british-columbia/change-of-directors/change-of-directors-form/change-of-directors-form.component.scss */\n:host {\n display: flex;\n flex: 1;\n min-height: 0;\n color: #2f343b;\n}\n:host .change-of-directors-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n min-height: 0;\n width: 100%;\n}\n:host .change-of-directors-form-content {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 24px;\n min-height: 0;\n overflow-y: auto;\n padding-right: 8px;\n}\n:host ::ng-deep .expandable-card {\n border: 1px solid #e1e6ee;\n border-radius: 8px;\n box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;\n margin: 0 !important;\n padding: 32px !important;\n}\n:host ::ng-deep .expandable-card-header-title {\n color: #2f343b !important;\n font-weight: 700 !important;\n line-height: 1.2;\n margin: 0;\n}\n:host ::ng-deep .expandable-card-header mat-icon {\n color: #66717f !important;\n}\n:host ::ng-deep .expandable-card-content {\n padding-top: 24px !important;\n}\n:host ::ng-deep .filling-form-fields {\n column-gap: 42px !important;\n}\n:host ::ng-deep .filling-form-fields-item-label,\n:host ::ng-deep .mat-mdc-radio-button .mdc-label,\n:host ::ng-deep .mat-mdc-checkbox .mdc-label {\n color: #4b5563 !important;\n line-height: 1.45;\n}\n:host ::ng-deep .mat-mdc-form-field {\n width: 100%;\n}\n:host ::ng-deep .mat-mdc-text-field-wrapper {\n min-height: 48px;\n}\n:host ::ng-deep .mat-mdc-form-field-infix {\n align-items: center;\n min-height: 48px;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n:host ::ng-deep .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n:host ::ng-deep .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n:host .readonly-summary {\n display: flex;\n flex-direction: column;\n gap: 18px;\n color: #4b5563;\n line-height: 1.35;\n}\n:host .readonly-summary p {\n margin: 0;\n}\n:host .readonly-summary strong {\n color: #2f343b;\n font-weight: 700;\n}\n:host .filing-details,\n:host .notification-section,\n:host .annual-reminder {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n:host .note-box {\n border: 1px solid #f3d27a;\n border-radius: 6px;\n background: #fffaf0;\n color: #84610d;\n line-height: 1.55;\n padding: 22px 28px;\n}\n:host .note-box strong {\n font-weight: 700;\n}\n:host .directors-change-checkbox {\n align-self: flex-start;\n}\n:host .filing-details-grid {\n display: grid;\n grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr);\n column-gap: 56px;\n align-items: start;\n max-width: 980px;\n}\n:host .date-field,\n:host .email-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n:host .date-field label,\n:host .email-field label {\n color: #4b5563;\n line-height: 1.35;\n}\n:host .date-field span,\n:host .email-field span {\n color: #e22222;\n}\n:host .hint,\n:host .annual-reminder p,\n:host .mailing-copy {\n color: #6b7280;\n line-height: 1.5;\n margin: 0;\n}\n:host .filing-fee {\n color: #4b5563;\n line-height: 1.35;\n margin: 58px 0 0;\n}\n:host .filing-fee strong {\n color: #2f343b;\n font-weight: 700;\n}\n:host .directors-table {\n display: grid;\n grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.65fr) minmax(280px, 1.65fr);\n margin-top: 28px;\n color: #4b5563;\n line-height: 1.45;\n}\n:host .directors-table-header,\n:host .directors-table-row {\n display: contents;\n}\n:host .directors-table-header > div,\n:host .directors-table-row > div {\n border-bottom: 1px solid #e1e6ee;\n padding: 24px 28px;\n}\n:host .directors-table-header > div:not(:first-child),\n:host .directors-table-row > div:not(:first-child) {\n border-left: 1px solid #e1e6ee;\n}\n:host .directors-table-header > div {\n color: #2f343b;\n font-weight: 700;\n padding-top: 0;\n}\n:host .directors-table-row strong {\n color: #2f343b;\n display: block;\n font-weight: 700;\n margin-bottom: 14px;\n}\n:host .status-pill {\n border-radius: 999px;\n display: inline-flex;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n padding: 8px 14px;\n}\n:host .status-pill.new {\n background: #eaf7ef;\n border: 1px solid #b8e3c7;\n color: #15803d;\n}\n:host .status-pill.ceased {\n background: #fff1f2;\n border: 1px solid #fecdd3;\n color: #be123c;\n}\n:host mat-radio-group {\n display: flex;\n gap: 48px;\n}\n:host .annual-reminder mat-radio-group {\n align-items: flex-start;\n flex-direction: column;\n gap: 14px;\n}\n:host .email-field {\n max-width: 760px;\n}\n@media (max-width: 900px) {\n :host .filing-details-grid,\n :host .directors-table {\n grid-template-columns: 1fr;\n }\n :host .directors-table-header {\n display: none;\n }\n :host .directors-table-row {\n display: grid;\n grid-template-columns: 1fr;\n border-bottom: 1px solid #e1e6ee;\n }\n :host .directors-table-row > div {\n border: 0;\n padding: 14px 0;\n }\n :host mat-radio-group {\n flex-direction: column;\n gap: 14px;\n }\n}\n/*# sourceMappingURL=change-of-directors-form.component.css.map */\n"] }]
85958
+ `, styles: ["/* src/app/components/british-columbia/change-of-directors/change-of-directors-form/change-of-directors-form.component.scss */\n:host {\n display: flex;\n flex: 1;\n min-height: 0;\n color: #2f343b;\n}\n:host .change-of-directors-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n min-height: 0;\n width: 100%;\n}\n:host .change-of-directors-form-content {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding-right: 8px;\n}\n:host ::ng-deep .expandable-card {\n border: 1px solid #e1e6ee;\n border-radius: 8px;\n box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;\n margin: 0 !important;\n padding: 24px 28px !important;\n}\n:host ::ng-deep .expandable-card-header-title {\n color: #2f343b !important;\n font-weight: 700 !important;\n line-height: 1.2;\n margin: 0;\n}\n:host ::ng-deep .expandable-card-header mat-icon {\n color: #66717f !important;\n}\n:host ::ng-deep .expandable-card-content {\n padding-top: 20px !important;\n}\n:host ::ng-deep .filling-form-fields {\n column-gap: 42px !important;\n}\n:host ::ng-deep .filling-form-fields-item-label,\n:host ::ng-deep .mat-mdc-radio-button .mdc-label,\n:host ::ng-deep .mat-mdc-checkbox .mdc-label {\n color: #4b5563 !important;\n font-size: 14px !important;\n line-height: 1.45;\n}\n:host ::ng-deep .mat-mdc-radio-button,\n:host ::ng-deep .mat-mdc-checkbox {\n --mdc-radio-state-layer-size: 40px;\n --mdc-checkbox-state-layer-size: 40px;\n}\n:host ::ng-deep .mat-mdc-form-field {\n width: 100%;\n}\n:host ::ng-deep .mat-mdc-text-field-wrapper {\n min-height: 46px;\n}\n:host ::ng-deep .mat-mdc-form-field-infix {\n align-items: center;\n display: flex !important;\n min-height: 46px;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n:host ::ng-deep .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n:host ::ng-deep .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n:host .readonly-summary {\n display: flex;\n flex-direction: column;\n gap: 18px;\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n}\n:host .readonly-summary p {\n margin: 0;\n}\n:host .readonly-summary strong {\n color: #2f343b;\n font-weight: 700;\n}\n:host .filing-details,\n:host .notification-section,\n:host .annual-reminder {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n:host .note-box {\n border: 1px solid #f3d27a;\n border-radius: 6px;\n background: #fffaf0;\n color: #84610d;\n font-size: 14px;\n line-height: 1.55;\n padding: 16px 20px;\n}\n:host .note-box strong {\n font-weight: 700;\n}\n:host .directors-change-checkbox {\n align-self: flex-start;\n}\n:host .filing-details-grid {\n display: grid;\n grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr);\n column-gap: 56px;\n align-items: start;\n max-width: 980px;\n}\n:host .date-field,\n:host .email-field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n:host .date-field label,\n:host .email-field label {\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n}\n:host .date-field span,\n:host .email-field span {\n color: #e22222;\n}\n:host .email-field {\n width: min(860px, 46%);\n min-width: 360px;\n}\n:host .email-field label {\n margin-bottom: 8px;\n font-size: 16px;\n}\n:host .email-field ::ng-deep .mat-mdc-text-field-wrapper {\n min-height: 84px;\n}\n:host .email-field ::ng-deep .mat-mdc-form-field-infix {\n min-height: 84px;\n}\n:host .email-field ::ng-deep .mat-mdc-input-element {\n align-self: center;\n height: 32px;\n color: #4b5563 !important;\n font-size: 28px !important;\n line-height: 32px;\n padding: 0 24px !important;\n}\n:host .email-field ::ng-deep .mdc-notched-outline__leading {\n border-bottom-left-radius: 6px !important;\n border-top-left-radius: 6px !important;\n}\n:host .email-field ::ng-deep .mdc-notched-outline__trailing {\n border-bottom-right-radius: 6px !important;\n border-top-right-radius: 6px !important;\n}\n:host .hint,\n:host .annual-reminder p,\n:host .mailing-copy {\n color: #6b7280;\n font-size: 14px;\n line-height: 1.5;\n margin: 0;\n}\n:host .filing-fee {\n color: #4b5563;\n font-size: 14px;\n line-height: 1.35;\n margin: 46px 0 0;\n}\n:host .filing-fee strong {\n color: #2f343b;\n font-weight: 700;\n}\n:host .directors-table {\n display: grid;\n grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.65fr) minmax(280px, 1.65fr);\n margin-top: 28px;\n color: #4b5563;\n font-size: 14px;\n line-height: 1.45;\n}\n:host .directors-table-header,\n:host .directors-table-row {\n display: contents;\n}\n:host .directors-table-header > div,\n:host .directors-table-row > div {\n border-bottom: 1px solid #e1e6ee;\n padding: 16px 24px;\n}\n:host .directors-table-header > div:not(:first-child),\n:host .directors-table-row > div:not(:first-child) {\n border-left: 1px solid #e1e6ee;\n}\n:host .directors-table-header > div {\n color: #2f343b;\n font-weight: 700;\n padding-top: 0;\n}\n:host .directors-table-row strong {\n color: #2f343b;\n display: block;\n font-weight: 700;\n margin-bottom: 8px;\n}\n:host .status-pill {\n border-radius: 999px;\n display: inline-flex;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n padding: 6px 12px;\n}\n:host .status-pill.new {\n background: #eaf7ef;\n border: 1px solid #b8e3c7;\n color: #15803d;\n}\n:host .status-pill.ceased {\n background: #fff1f2;\n border: 1px solid #fecdd3;\n color: #be123c;\n}\n:host mat-radio-group {\n display: flex;\n gap: 48px;\n}\n:host .annual-reminder mat-radio-group {\n align-items: flex-start;\n flex-direction: column;\n gap: 14px;\n}\n@media (max-width: 900px) {\n :host .filing-details-grid,\n :host .directors-table {\n grid-template-columns: 1fr;\n }\n :host .directors-table-header {\n display: none;\n }\n :host .directors-table-row {\n display: grid;\n grid-template-columns: 1fr;\n border-bottom: 1px solid #e1e6ee;\n }\n :host .directors-table-row > div {\n border: 0;\n padding: 14px 0;\n }\n :host mat-radio-group {\n flex-direction: column;\n gap: 14px;\n }\n :host .email-field {\n width: 100%;\n min-width: 0;\n }\n :host .email-field ::ng-deep .mat-mdc-input-element {\n font-size: 16px !important;\n line-height: 24px;\n padding: 0 12px !important;\n }\n}\n/*# sourceMappingURL=change-of-directors-form.component.css.map */\n"] }]
85906
85959
  }], null, null);
85907
85960
  })();
85908
85961
  (() => {
@@ -94162,8 +94215,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
94162
94215
  "src/app/services/british-columbia/british-columbia-change-of-directors.service.ts"() {
94163
94216
  init_core();
94164
94217
  init_common_utils();
94218
+ init_common_utils();
94165
94219
  init_core();
94166
94220
  BritishColumbiaChangeOfDirectorsService = class _BritishColumbiaChangeOfDirectorsService {
94221
+ static TEMP_UAT_BC_FILING_URL = "https://uat3-onbis.oncorp.com/eCoreBcApi/";
94167
94222
  config;
94168
94223
  setConfig(config2) {
94169
94224
  this.config = config2;
@@ -94173,7 +94228,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
94173
94228
  ensureAuthInputs(signature);
94174
94229
  const fetchFn = opts.fetchImpl ?? fetch;
94175
94230
  const url = signature.proxyApiUrl;
94176
- const targetUrl = opts.endpointPath ?? `${this.getOnbisOrigin()}/filings/ca/bc/maintenance-filing`;
94231
+ const targetUrl = opts.endpointPath ?? this.targetUrl(signature.env, "filings/ca/bc/maintenance-filing");
94177
94232
  const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, requestBody, __spreadValues({
94178
94233
  "x-target-url": targetUrl
94179
94234
  }, opts.headers ?? {})));
@@ -94194,12 +94249,64 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
94194
94249
  throw err;
94195
94250
  });
94196
94251
  }
94197
- getOnbisOrigin() {
94198
- const filingUrl = this.config?.ONFiling;
94199
- if (!filingUrl) {
94200
- throw new Error("BritishColumbiaChangeOfDirectorsService: missing EnvConfig.ONFiling.");
94252
+ getFilingResult(_0, _1) {
94253
+ return __async(this, arguments, function* (signature, serviceOrderId, opts = {}) {
94254
+ ensureAuthInputs(signature);
94255
+ if (!serviceOrderId) {
94256
+ throw new Error("Missing serviceOrderId.");
94257
+ }
94258
+ const fetchFn = opts.fetchImpl ?? fetch;
94259
+ const url = signature.proxyApiUrl;
94260
+ const targetUrl = opts.endpointPath ?? this.targetUrl(signature.env, `filings/ca/bc/maintenance-filing/${encodeURIComponent(serviceOrderId)}`);
94261
+ const resp = yield fetchWithJwtRetry(signature, () => fetchFn(url, {
94262
+ method: "GET",
94263
+ headers: __spreadValues({
94264
+ Authorization: `Bearer ${signature.jwtToken}`,
94265
+ "x-target-url": targetUrl
94266
+ }, opts.headers ?? {})
94267
+ }));
94268
+ const raw = yield resp.text();
94269
+ const parsed = tryParseJson(raw);
94270
+ const payload = parsed.ok ? unwrapRequestResults(parsed.value) : { raw };
94271
+ if (resp.ok && !payload.Errors?.length) {
94272
+ return payload;
94273
+ }
94274
+ const err = buildGenericError(resp.status, "BC change of directors filing result failed", payload);
94275
+ err.submitResult = payload;
94276
+ err.httpStatus = resp.status;
94277
+ throw err;
94278
+ });
94279
+ }
94280
+ submitFiling(_0, _1) {
94281
+ return __async(this, arguments, function* (signature, serviceOrderId, opts = {}) {
94282
+ ensureAuthInputs(signature);
94283
+ if (!serviceOrderId) {
94284
+ throw new Error("Missing serviceOrderId.");
94285
+ }
94286
+ const fetchFn = opts.fetchImpl ?? fetch;
94287
+ const url = signature.proxyApiUrl;
94288
+ const targetUrl = opts.endpointPath ?? this.targetUrl(signature.env, `filings/ca/bc/maintenance-filing/${encodeURIComponent(serviceOrderId)}/submit`);
94289
+ const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, {}, __spreadValues({
94290
+ "x-target-url": targetUrl
94291
+ }, opts.headers ?? {})));
94292
+ const raw = yield resp.text();
94293
+ const parsed = tryParseJson(raw);
94294
+ const payload = parsed.ok ? unwrapRequestResults(parsed.value) : { raw };
94295
+ if (resp.ok && !payload.Errors?.length) {
94296
+ return payload;
94297
+ }
94298
+ const err = buildGenericError(resp.status, "BC change of directors submit failed", payload);
94299
+ err.submitResult = payload;
94300
+ err.httpStatus = resp.status;
94301
+ throw err;
94302
+ });
94303
+ }
94304
+ targetUrl(env, path) {
94305
+ const base = this.config?.BCFiling || (env === "TEST" ? _BritishColumbiaChangeOfDirectorsService.TEMP_UAT_BC_FILING_URL : void 0);
94306
+ if (!base) {
94307
+ throw new Error("BritishColumbiaChangeOfDirectorsService: missing EnvConfig.BCFiling.");
94201
94308
  }
94202
- return new URL(filingUrl).origin;
94309
+ return joinUrl(base, path);
94203
94310
  }
94204
94311
  static \u0275fac = function BritishColumbiaChangeOfDirectorsService_Factory(__ngFactoryType__) {
94205
94312
  return new (__ngFactoryType__ || _BritishColumbiaChangeOfDirectorsService)();
@@ -94221,7 +94328,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
94221
94328
  function buildBritishColumbiaChangeOfDirectorsValidationRequest(task, deltaData) {
94222
94329
  const incomingDirectors = (task.incomingAffiliations ?? []).filter(isDirectorAffiliation);
94223
94330
  const outgoingDirectors = (task.outgoingAffiliations ?? []).filter(isDirectorAffiliation);
94224
- const companyEmail = findCompanyEmail(task);
94331
+ const companyEmail = deltaData.notification.email ?? findCompanyEmail(task);
94225
94332
  const serviceOrderId = deltaData.serviceOrderId;
94226
94333
  return __spreadValues({
94227
94334
  filingType: "changeOfDirectorsFiling",
@@ -94784,8 +94891,29 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
94784
94891
  this.deltaDataChange.emit(deltaData);
94785
94892
  }
94786
94893
  onBritishColumbiaChangeOfDirectorsSubmit() {
94787
- console.warn("British Columbia change of directors submit is not wired to a backend yet.");
94788
- this.close.emit();
94894
+ return __async(this, null, function* () {
94895
+ try {
94896
+ this.isLoading.set(true);
94897
+ this.errors.set([]);
94898
+ const signature = this._signature();
94899
+ const serviceOrderId = this.task()?.deltaData?.serviceOrderId;
94900
+ if (!signature || !serviceOrderId) {
94901
+ throw new Error("Missing serviceOrderId.");
94902
+ }
94903
+ const response = yield this.britishColumbiaChangeOfDirectorsService.submitFiling(signature, serviceOrderId, this.validateOptions() ?? {});
94904
+ if (this.hasResponseErrors(response))
94905
+ return;
94906
+ this.filingSubmitSuccess.emit({
94907
+ serviceOrderId: response.ServiceOrderId ?? serviceOrderId,
94908
+ filedOn: /* @__PURE__ */ new Date()
94909
+ });
94910
+ this.close.emit();
94911
+ } catch (response) {
94912
+ this.handleCatchError(response);
94913
+ } finally {
94914
+ this.isLoading.set(false);
94915
+ }
94916
+ });
94789
94917
  }
94790
94918
  /**
94791
94919
  * British Columbia Formation validate (AC8 / AC9): sends the payload to the BC Filing API,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "2.0.64",
3
+ "version": "2.0.66",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {