@dyedurham/search-and-file-widget 2.0.64 → 2.0.65
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 +132 -6
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -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
|
-
|
|
84915
|
-
|
|
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:
|
|
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%] .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[_nghost-%COMP%] .email-field[_ngcontent-%COMP%] .mat-mdc-input-element {\n align-self: center;\n height: 20px;\n line-height: 20px;\n padding: 0 !important;\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 });
|
|
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:
|
|
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 .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:host .email-field ::ng-deep .mat-mdc-input-element {\n align-self: center;\n height: 20px;\n line-height: 20px;\n padding: 0 !important;\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"] }]
|
|
85906
85959
|
}], null, null);
|
|
85907
85960
|
})();
|
|
85908
85961
|
(() => {
|
|
@@ -94194,6 +94247,58 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
94194
94247
|
throw err;
|
|
94195
94248
|
});
|
|
94196
94249
|
}
|
|
94250
|
+
getFilingResult(_0, _1) {
|
|
94251
|
+
return __async(this, arguments, function* (signature, serviceOrderId, opts = {}) {
|
|
94252
|
+
ensureAuthInputs(signature);
|
|
94253
|
+
if (!serviceOrderId) {
|
|
94254
|
+
throw new Error("Missing serviceOrderId.");
|
|
94255
|
+
}
|
|
94256
|
+
const fetchFn = opts.fetchImpl ?? fetch;
|
|
94257
|
+
const url = signature.proxyApiUrl;
|
|
94258
|
+
const targetUrl = opts.endpointPath ?? `${this.getOnbisOrigin()}/filings/ca/bc/maintenance-filing/${encodeURIComponent(serviceOrderId)}`;
|
|
94259
|
+
const resp = yield fetchWithJwtRetry(signature, () => fetchFn(url, {
|
|
94260
|
+
method: "GET",
|
|
94261
|
+
headers: __spreadValues({
|
|
94262
|
+
Authorization: `Bearer ${signature.jwtToken}`,
|
|
94263
|
+
"x-target-url": targetUrl
|
|
94264
|
+
}, opts.headers ?? {})
|
|
94265
|
+
}));
|
|
94266
|
+
const raw = yield resp.text();
|
|
94267
|
+
const parsed = tryParseJson(raw);
|
|
94268
|
+
const payload = parsed.ok ? unwrapRequestResults(parsed.value) : { raw };
|
|
94269
|
+
if (resp.ok && !payload.Errors?.length) {
|
|
94270
|
+
return payload;
|
|
94271
|
+
}
|
|
94272
|
+
const err = buildGenericError(resp.status, "BC change of directors filing result failed", payload);
|
|
94273
|
+
err.submitResult = payload;
|
|
94274
|
+
err.httpStatus = resp.status;
|
|
94275
|
+
throw err;
|
|
94276
|
+
});
|
|
94277
|
+
}
|
|
94278
|
+
submitFiling(_0, _1) {
|
|
94279
|
+
return __async(this, arguments, function* (signature, serviceOrderId, opts = {}) {
|
|
94280
|
+
ensureAuthInputs(signature);
|
|
94281
|
+
if (!serviceOrderId) {
|
|
94282
|
+
throw new Error("Missing serviceOrderId.");
|
|
94283
|
+
}
|
|
94284
|
+
const fetchFn = opts.fetchImpl ?? fetch;
|
|
94285
|
+
const url = signature.proxyApiUrl;
|
|
94286
|
+
const targetUrl = opts.endpointPath ?? `${this.getOnbisOrigin()}/filings/ca/bc/maintenance-filing/${encodeURIComponent(serviceOrderId)}/submit`;
|
|
94287
|
+
const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, {}, __spreadValues({
|
|
94288
|
+
"x-target-url": targetUrl
|
|
94289
|
+
}, opts.headers ?? {})));
|
|
94290
|
+
const raw = yield resp.text();
|
|
94291
|
+
const parsed = tryParseJson(raw);
|
|
94292
|
+
const payload = parsed.ok ? unwrapRequestResults(parsed.value) : { raw };
|
|
94293
|
+
if (resp.ok && !payload.Errors?.length) {
|
|
94294
|
+
return payload;
|
|
94295
|
+
}
|
|
94296
|
+
const err = buildGenericError(resp.status, "BC change of directors submit failed", payload);
|
|
94297
|
+
err.submitResult = payload;
|
|
94298
|
+
err.httpStatus = resp.status;
|
|
94299
|
+
throw err;
|
|
94300
|
+
});
|
|
94301
|
+
}
|
|
94197
94302
|
getOnbisOrigin() {
|
|
94198
94303
|
const filingUrl = this.config?.ONFiling;
|
|
94199
94304
|
if (!filingUrl) {
|
|
@@ -94784,8 +94889,29 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
94784
94889
|
this.deltaDataChange.emit(deltaData);
|
|
94785
94890
|
}
|
|
94786
94891
|
onBritishColumbiaChangeOfDirectorsSubmit() {
|
|
94787
|
-
|
|
94788
|
-
|
|
94892
|
+
return __async(this, null, function* () {
|
|
94893
|
+
try {
|
|
94894
|
+
this.isLoading.set(true);
|
|
94895
|
+
this.errors.set([]);
|
|
94896
|
+
const signature = this._signature();
|
|
94897
|
+
const serviceOrderId = this.task()?.deltaData?.serviceOrderId;
|
|
94898
|
+
if (!signature || !serviceOrderId) {
|
|
94899
|
+
throw new Error("Missing serviceOrderId.");
|
|
94900
|
+
}
|
|
94901
|
+
const response = yield this.britishColumbiaChangeOfDirectorsService.submitFiling(signature, serviceOrderId, this.validateOptions() ?? {});
|
|
94902
|
+
if (this.hasResponseErrors(response))
|
|
94903
|
+
return;
|
|
94904
|
+
this.filingSubmitSuccess.emit({
|
|
94905
|
+
serviceOrderId: response.ServiceOrderId ?? serviceOrderId,
|
|
94906
|
+
filedOn: /* @__PURE__ */ new Date()
|
|
94907
|
+
});
|
|
94908
|
+
this.close.emit();
|
|
94909
|
+
} catch (response) {
|
|
94910
|
+
this.handleCatchError(response);
|
|
94911
|
+
} finally {
|
|
94912
|
+
this.isLoading.set(false);
|
|
94913
|
+
}
|
|
94914
|
+
});
|
|
94789
94915
|
}
|
|
94790
94916
|
/**
|
|
94791
94917
|
* British Columbia Formation validate (AC8 / AC9): sends the payload to the BC Filing API,
|