@hmcts/opal-frontend-common 0.0.90 → 0.0.92
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/fesm2022/{hmcts-opal-frontend-common-access-denied.component-DNNxndx-.mjs → hmcts-opal-frontend-common-access-denied.component-BCLRLZqh.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-account-created.component-3MER1dhS.mjs → hmcts-opal-frontend-common-account-created.component-D0g9FjWl.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-creditor-details-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.mjs +30 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.mjs +26 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.mjs +4 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.mjs +4 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.mjs +282 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +13 -4
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
- package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-UnC_Qex5.mjs → hmcts-opal-frontend-common-concurrency-failure.component-CdkYMvv-.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-moj-multi-select.mjs +6 -6
- package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component-Cj-ueGWj.mjs → hmcts-opal-frontend-common-internal-server-error.component-CinCBLVo.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-DNNxndx-.mjs → hmcts-opal-frontend-common-pages-access-denied.component-BCLRLZqh.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-account-created.component-3MER1dhS.mjs → hmcts-opal-frontend-common-pages-account-created.component-D0g9FjWl.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-UnC_Qex5.mjs → hmcts-opal-frontend-common-pages-concurrency-failure.component-CdkYMvv-.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component-Cj-ueGWj.mjs → hmcts-opal-frontend-common-pages-internal-server-error.component-CinCBLVo.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-ClXrjyA5.mjs → hmcts-opal-frontend-common-pages-permission-denied.component-BPb5CZQD.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-Cxvc5NV2.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-Cnlwqv_f.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-dBd0gJTr.mjs → hmcts-opal-frontend-common-pages-sign-in.component-DWLTU9wd.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs +6 -6
- package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-ClXrjyA5.mjs → hmcts-opal-frontend-common-permission-denied.component-BPb5CZQD.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-monetary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-history-transformation-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +119 -10
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-Cxvc5NV2.mjs → hmcts-opal-frontend-common-sign-in-stub.component-Cnlwqv_f.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-jf34_3Vv.mjs → hmcts-opal-frontend-common-sign-in.component-DIZlLA6t.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common.mjs +6 -6
- package/package.json +27 -2
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.d.ts +13 -0
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.d.ts +21 -0
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.d.ts +34 -0
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.d.ts +3 -0
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.d.ts +198 -0
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.d.ts +4 -0
- package/types/hmcts-opal-frontend-common-services-opal-user-service.d.ts +56 -4
|
@@ -9,13 +9,13 @@ class AccessDeniedComponent {
|
|
|
9
9
|
// For now, test page will act as our 'Dashboard' page
|
|
10
10
|
this.router.navigate(['/']);
|
|
11
11
|
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AccessDeniedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AccessDeniedComponent, isStandalone: true, selector: "opal-lib-access-denied", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: GovukButtonComponent, selector: "opal-lib-govuk-button", inputs: ["buttonId", "type", "buttonClasses"], outputs: ["buttonClickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AccessDeniedComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{ selector: 'opal-lib-access-denied', imports: [GovukButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n" }]
|
|
18
18
|
}] });
|
|
19
19
|
|
|
20
20
|
export { AccessDeniedComponent };
|
|
21
|
-
//# sourceMappingURL=hmcts-opal-frontend-common-access-denied.component-
|
|
21
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-access-denied.component-BCLRLZqh.mjs.map
|
|
@@ -3,13 +3,13 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
3
3
|
import { GovukPanelComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-panel';
|
|
4
4
|
|
|
5
5
|
class AccountCreated {
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AccountCreated, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AccountCreated, isStandalone: true, selector: "opal-lib-account-created", ngImport: i0, template: "<div class=\"govuk-grid-column-two-thirds\">\n <opal-lib-govuk-panel panelTitle=\"User account created\"></opal-lib-govuk-panel>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h2 class=\"govuk-fieldset__heading\">Next steps</h2>\n </legend>\n <p class=\"govuk-body\">\n Your Opal account has been created but is not yet live. <br />\n Contact your team lead to activate it fully.\n </p>\n </fieldset>\n</div>\n", dependencies: [{ kind: "component", type: GovukPanelComponent, selector: "opal-lib-govuk-panel", inputs: ["panelTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AccountCreated, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'opal-lib-account-created', imports: [GovukPanelComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-column-two-thirds\">\n <opal-lib-govuk-panel panelTitle=\"User account created\"></opal-lib-govuk-panel>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h2 class=\"govuk-fieldset__heading\">Next steps</h2>\n </legend>\n <p class=\"govuk-body\">\n Your Opal account has been created but is not yet live. <br />\n Contact your team lead to activate it fully.\n </p>\n </fieldset>\n</div>\n" }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
export { AccountCreated };
|
|
15
|
-
//# sourceMappingURL=hmcts-opal-frontend-common-account-created.component-
|
|
15
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-account-created.component-D0g9FjWl.mjs.map
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.mjs
CHANGED
|
@@ -66,10 +66,10 @@ class AbstractAccountSummaryBaseComponent extends AbstractTabData {
|
|
|
66
66
|
this.destroy$.complete();
|
|
67
67
|
this.refreshFragment$.complete();
|
|
68
68
|
}
|
|
69
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractAccountSummaryBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractAccountSummaryBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractAccountSummaryBaseComponent, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
74
|
args: [{ template: '' }]
|
|
75
75
|
}] });
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-creditor-details-base.mjs
CHANGED
|
@@ -76,10 +76,10 @@ class AbstractCreditorDetailsBaseComponent extends AbstractAccountSummaryBaseCom
|
|
|
76
76
|
this.accountStore.setHasVersionMismatch(false);
|
|
77
77
|
super.ngOnDestroy();
|
|
78
78
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractCreditorDetailsBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractCreditorDetailsBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
81
81
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractCreditorDetailsBaseComponent, decorators: [{
|
|
83
83
|
type: Component,
|
|
84
84
|
args: [{
|
|
85
85
|
template: '',
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs
CHANGED
|
@@ -213,10 +213,10 @@ class AbstractFormAliasBaseComponent extends AbstractFormBaseComponent {
|
|
|
213
213
|
this['ngUnsubscribe'].complete();
|
|
214
214
|
super.ngOnDestroy();
|
|
215
215
|
}
|
|
216
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
217
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormAliasBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractFormAliasBaseComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "aliasFirstField", predicate: ["aliasFirstField"], descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
218
218
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormAliasBaseComponent, decorators: [{
|
|
220
220
|
type: Component,
|
|
221
221
|
args: [{
|
|
222
222
|
template: '',
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs
CHANGED
|
@@ -234,10 +234,10 @@ class AbstractFormArrayBaseComponent extends AbstractFormBaseComponent {
|
|
|
234
234
|
this.ngUnsubscribe.complete();
|
|
235
235
|
super.ngOnDestroy();
|
|
236
236
|
}
|
|
237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormArrayBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractFormArrayBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
239
239
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormArrayBaseComponent, decorators: [{
|
|
241
241
|
type: Component,
|
|
242
242
|
args: [{
|
|
243
243
|
template: '',
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs
CHANGED
|
@@ -77,10 +77,10 @@ class AbstractFormArrayRemovalComponent {
|
|
|
77
77
|
this.router.navigate([route], { relativeTo: this.activatedRoute.parent });
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
81
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormArrayRemovalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractFormArrayRemovalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormArrayRemovalComponent, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{
|
|
86
86
|
template: '',
|
|
@@ -595,10 +595,10 @@ class AbstractFormBaseComponent {
|
|
|
595
595
|
this.ngUnsubscribe.next();
|
|
596
596
|
this.ngUnsubscribe.complete();
|
|
597
597
|
}
|
|
598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
599
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
598
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
599
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractFormBaseComponent, isStandalone: true, selector: "ng-component", outputs: { unsavedChanges: "unsavedChanges", formSubmit: "formSubmit" }, ngImport: i0, template: '', isInline: true });
|
|
600
600
|
}
|
|
601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractFormBaseComponent, decorators: [{
|
|
602
602
|
type: Component,
|
|
603
603
|
args: [{
|
|
604
604
|
template: '',
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs
CHANGED
|
@@ -125,10 +125,10 @@ class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {
|
|
|
125
125
|
}
|
|
126
126
|
super.ngOnDestroy();
|
|
127
127
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractNestedFormBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractNestedFormBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractNestedFormBaseComponent, decorators: [{
|
|
132
132
|
type: Component,
|
|
133
133
|
args: [{
|
|
134
134
|
template: '',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { computed, Input, Component } from '@angular/core';
|
|
3
|
+
import { AbstractSortableTablePaginationComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table-pagination';
|
|
4
|
+
|
|
5
|
+
class AbstractReportInstancesTableBaseComponent extends AbstractSortableTablePaginationComponent {
|
|
6
|
+
set tableData(tableData) {
|
|
7
|
+
this.setTableData(tableData);
|
|
8
|
+
this.onApplyFilters();
|
|
9
|
+
}
|
|
10
|
+
paginatedTableDataComputed = computed(() => {
|
|
11
|
+
const data = this.sortedTableDataSignal();
|
|
12
|
+
return data.slice(this.startIndexComputed() - 1, this.endIndexComputed());
|
|
13
|
+
}, ...(ngDevMode ? [{ debugName: "paginatedTableDataComputed" }] : /* istanbul ignore next */ []));
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractReportInstancesTableBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractReportInstancesTableBaseComponent, isStandalone: true, selector: "ng-component", inputs: { tableData: "tableData" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractReportInstancesTableBaseComponent, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ template: '' }]
|
|
20
|
+
}], propDecorators: { tableData: [{
|
|
21
|
+
type: Input,
|
|
22
|
+
args: [{ required: true }]
|
|
23
|
+
}] } });
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated bundle index. Do not edit.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export { AbstractReportInstancesTableBaseComponent };
|
|
30
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.mjs.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS = 'last7Days';
|
|
2
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS = 'customDays';
|
|
3
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE = 'dateRange';
|
|
4
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_FILTER_STATE = {
|
|
5
|
+
dateFilter: ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS,
|
|
6
|
+
days: '',
|
|
7
|
+
dateFrom: '',
|
|
8
|
+
dateTo: '',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_STATUS = {
|
|
12
|
+
requested: 'REQUESTED',
|
|
13
|
+
ready: 'READY',
|
|
14
|
+
inProgress: 'IN_PROGRESS',
|
|
15
|
+
};
|
|
16
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY = {
|
|
17
|
+
inProgress: 'In progress',
|
|
18
|
+
noContent: 'No content',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Generated bundle index. Do not edit.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export { ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS, ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE, ABSTRACT_REPORT_SUMMARY_LIST_FILTER_STATE, ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS, ABSTRACT_REPORT_SUMMARY_LIST_STATUS, ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY };
|
|
26
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.mjs.map
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, signal, computed, Component } from '@angular/core';
|
|
3
|
+
import { DateService } from '@hmcts/opal-frontend-common/services/date-service';
|
|
4
|
+
|
|
5
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS = 'last7Days';
|
|
6
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS = 'customDays';
|
|
7
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE = 'dateRange';
|
|
8
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_FILTER_STATE = {
|
|
9
|
+
dateFilter: ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS,
|
|
10
|
+
days: '',
|
|
11
|
+
dateFrom: '',
|
|
12
|
+
dateTo: '',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_STATUS = {
|
|
16
|
+
requested: 'REQUESTED',
|
|
17
|
+
ready: 'READY',
|
|
18
|
+
inProgress: 'IN_PROGRESS',
|
|
19
|
+
};
|
|
20
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY = {
|
|
21
|
+
inProgress: 'In progress',
|
|
22
|
+
noContent: 'No content',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const ABSTRACT_REPORT_SUMMARY_LIST_DATE_FORMATS = {
|
|
26
|
+
input: 'dd/MM/yyyy',
|
|
27
|
+
output: 'yyyy-MM-dd',
|
|
28
|
+
};
|
|
29
|
+
class AbstractReportSummaryListBaseComponent {
|
|
30
|
+
dateService = inject(DateService);
|
|
31
|
+
fieldErrors = signal({}, ...(ngDevMode ? [{ debugName: "fieldErrors" }] : /* istanbul ignore next */ []));
|
|
32
|
+
dateFormats = ABSTRACT_REPORT_SUMMARY_LIST_DATE_FORMATS;
|
|
33
|
+
dateFilterLast7Days = ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS;
|
|
34
|
+
dateFilterCustomDays = ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS;
|
|
35
|
+
dateFilterDateRange = ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE;
|
|
36
|
+
dateFilter = signal(ABSTRACT_REPORT_SUMMARY_LIST_FILTER_STATE.dateFilter, ...(ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []));
|
|
37
|
+
errorSummaryMessages = computed(() => Object.entries(this.fieldErrors()).map(([fieldId, message]) => ({ fieldId, message })), ...(ngDevMode ? [{ debugName: "errorSummaryMessages" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/**
|
|
39
|
+
* Builds the default report query for the last 7 days.
|
|
40
|
+
*
|
|
41
|
+
* @param dateService - The date service used to calculate and format the date range.
|
|
42
|
+
* @param dateFormats - The input and output date formats used by the consuming application.
|
|
43
|
+
* @returns A report query state with a last 7 days date range.
|
|
44
|
+
*/
|
|
45
|
+
static getDefaultReportQuery(dateService, dateFormats = ABSTRACT_REPORT_SUMMARY_LIST_DATE_FORMATS) {
|
|
46
|
+
const dateRange = dateService.getDateRange(6, 0, dateFormats.output);
|
|
47
|
+
return {
|
|
48
|
+
fromDate: dateRange.from,
|
|
49
|
+
toDate: dateRange.to,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Builds a report query from the selected report filter state.
|
|
54
|
+
*
|
|
55
|
+
* @param filters - The selected report filter state.
|
|
56
|
+
* @param dateService - The date service used to calculate and format date values.
|
|
57
|
+
* @param dateFormats - The input and output date formats used by the consuming application.
|
|
58
|
+
* @returns A report query state suitable for report instance API requests.
|
|
59
|
+
*/
|
|
60
|
+
static getReportQueryFromFilters(filters, dateService, dateFormats = ABSTRACT_REPORT_SUMMARY_LIST_DATE_FORMATS) {
|
|
61
|
+
if (filters.dateFilter === ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS) {
|
|
62
|
+
const days = Number(filters.days);
|
|
63
|
+
const dateRange = dateService.getDateRange(days - 1, 0, dateFormats.output);
|
|
64
|
+
return {
|
|
65
|
+
fromDate: dateRange.from,
|
|
66
|
+
toDate: dateRange.to,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (filters.dateFilter === ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE) {
|
|
70
|
+
return {
|
|
71
|
+
fromDate: filters.dateFrom
|
|
72
|
+
? dateService.getFromFormatToFormat(filters.dateFrom, dateFormats.input, dateFormats.output)
|
|
73
|
+
: null,
|
|
74
|
+
toDate: filters.dateTo
|
|
75
|
+
? dateService.getFromFormatToFormat(filters.dateTo, dateFormats.input, dateFormats.output)
|
|
76
|
+
: null,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return AbstractReportSummaryListBaseComponent.getDefaultReportQuery(dateService, dateFormats);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Gets the display status for a report instance.
|
|
83
|
+
*
|
|
84
|
+
* @param status - The report instance status code.
|
|
85
|
+
* @param records - The number of records in the report instance, where available.
|
|
86
|
+
* @param displayName - The API-provided status display name, where available.
|
|
87
|
+
* @returns The display status for the report instance.
|
|
88
|
+
*/
|
|
89
|
+
static getReportInstanceDisplayStatus(status, records, displayName) {
|
|
90
|
+
if (status === ABSTRACT_REPORT_SUMMARY_LIST_STATUS.requested) {
|
|
91
|
+
return ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY.inProgress;
|
|
92
|
+
}
|
|
93
|
+
if (status === ABSTRACT_REPORT_SUMMARY_LIST_STATUS.ready && records === 0) {
|
|
94
|
+
return ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY.noContent;
|
|
95
|
+
}
|
|
96
|
+
if (status === ABSTRACT_REPORT_SUMMARY_LIST_STATUS.inProgress) {
|
|
97
|
+
return ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY.inProgress;
|
|
98
|
+
}
|
|
99
|
+
return displayName || AbstractReportSummaryListBaseComponent.toReportDisplayStatus(status);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Converts a report status code into title case display text.
|
|
103
|
+
*
|
|
104
|
+
* @param status - The report status code to convert.
|
|
105
|
+
* @returns A display-friendly status value.
|
|
106
|
+
*/
|
|
107
|
+
static toReportDisplayStatus(status) {
|
|
108
|
+
return status ? status.charAt(0).toUpperCase() + status.slice(1).toLowerCase() : '';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Builds the default report query for the current component instance.
|
|
112
|
+
*
|
|
113
|
+
* @returns A report query state with a last 7 days date range.
|
|
114
|
+
*/
|
|
115
|
+
getDefaultReportQuery() {
|
|
116
|
+
return AbstractReportSummaryListBaseComponent.getDefaultReportQuery(this.dateService, this.dateFormats);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Builds a report query from the selected report filter state for the current component instance.
|
|
120
|
+
*
|
|
121
|
+
* @param filters - The selected report filter state.
|
|
122
|
+
* @returns A report query state suitable for report instance API requests.
|
|
123
|
+
*/
|
|
124
|
+
getReportQueryFromFilters(filters) {
|
|
125
|
+
return AbstractReportSummaryListBaseComponent.getReportQueryFromFilters(filters, this.dateService, this.dateFormats);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Builds validation messages for the active report date filter fields.
|
|
129
|
+
*
|
|
130
|
+
* @param filters - The selected report filter state.
|
|
131
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
132
|
+
* @returns A field error map keyed by field id.
|
|
133
|
+
*/
|
|
134
|
+
buildReportDateFieldErrors(filters, fieldIds) {
|
|
135
|
+
if (filters.dateFilter === ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS) {
|
|
136
|
+
return this.buildCustomDaysFieldErrors(filters, fieldIds);
|
|
137
|
+
}
|
|
138
|
+
if (filters.dateFilter === ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE) {
|
|
139
|
+
return this.buildDateRangeFieldErrors(filters, fieldIds);
|
|
140
|
+
}
|
|
141
|
+
return {};
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Builds validation messages for the custom days report date filter.
|
|
145
|
+
*
|
|
146
|
+
* @param filters - The selected report filter state.
|
|
147
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
148
|
+
* @returns A field error map keyed by field id.
|
|
149
|
+
*/
|
|
150
|
+
buildCustomDaysFieldErrors(filters, fieldIds) {
|
|
151
|
+
const days = Number(filters.days);
|
|
152
|
+
if (!filters.days || !Number.isFinite(days) || !Number.isInteger(days) || days < 1) {
|
|
153
|
+
return { [fieldIds.days]: this.dateValidationMessages.customDaysRequired };
|
|
154
|
+
}
|
|
155
|
+
return {};
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Builds validation messages for the date range report date filter.
|
|
159
|
+
*
|
|
160
|
+
* @param filters - The selected report filter state.
|
|
161
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
162
|
+
* @returns A field error map keyed by field id.
|
|
163
|
+
*/
|
|
164
|
+
buildDateRangeFieldErrors(filters, fieldIds) {
|
|
165
|
+
const errors = {};
|
|
166
|
+
this.addRequiredDateRangeError(errors, filters, fieldIds);
|
|
167
|
+
this.addDateFormatErrors(errors, filters, fieldIds);
|
|
168
|
+
this.addFutureDateErrors(errors, filters, fieldIds);
|
|
169
|
+
this.addDateOrderError(errors, filters, fieldIds);
|
|
170
|
+
return errors;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Adds a validation message when no date range boundary has been entered.
|
|
174
|
+
*
|
|
175
|
+
* @param errors - The field error map to update.
|
|
176
|
+
* @param filters - The selected report filter state.
|
|
177
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
178
|
+
*/
|
|
179
|
+
addRequiredDateRangeError(errors, filters, fieldIds) {
|
|
180
|
+
if (!filters.dateFrom && !filters.dateTo) {
|
|
181
|
+
errors[fieldIds.dateFrom] = this.dateValidationMessages.dateRangeRequired;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Adds validation messages for date values with an invalid format.
|
|
186
|
+
*
|
|
187
|
+
* @param errors - The field error map to update.
|
|
188
|
+
* @param filters - The selected report filter state.
|
|
189
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
190
|
+
*/
|
|
191
|
+
addDateFormatErrors(errors, filters, fieldIds) {
|
|
192
|
+
if (filters.dateFrom && this.isReportDateInvalid(filters.dateFrom)) {
|
|
193
|
+
errors[fieldIds.dateFrom] = this.dateValidationMessages.invalidDate;
|
|
194
|
+
}
|
|
195
|
+
if (filters.dateTo && this.isReportDateInvalid(filters.dateTo)) {
|
|
196
|
+
errors[fieldIds.dateTo] = this.dateValidationMessages.invalidDate;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Adds validation messages for date values in the future.
|
|
201
|
+
*
|
|
202
|
+
* @param errors - The field error map to update.
|
|
203
|
+
* @param filters - The selected report filter state.
|
|
204
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
205
|
+
*/
|
|
206
|
+
addFutureDateErrors(errors, filters, fieldIds) {
|
|
207
|
+
if (!errors[fieldIds.dateFrom] && filters.dateFrom && this.isReportDateInFuture(filters.dateFrom)) {
|
|
208
|
+
errors[fieldIds.dateFrom] = this.dateValidationMessages.futureDate;
|
|
209
|
+
}
|
|
210
|
+
if (!errors[fieldIds.dateTo] && filters.dateTo && this.isReportDateInFuture(filters.dateTo)) {
|
|
211
|
+
errors[fieldIds.dateTo] = this.dateValidationMessages.futureDate;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Adds a validation message when date from is after date to.
|
|
216
|
+
*
|
|
217
|
+
* @param errors - The field error map to update.
|
|
218
|
+
* @param filters - The selected report filter state.
|
|
219
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
220
|
+
*/
|
|
221
|
+
addDateOrderError(errors, filters, fieldIds) {
|
|
222
|
+
if (errors[fieldIds.dateFrom] || errors[fieldIds.dateTo] || !filters.dateFrom || !filters.dateTo) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (this.isReportDateFromAfterDateTo(filters.dateFrom, filters.dateTo)) {
|
|
226
|
+
errors[fieldIds.dateFrom] = this.dateValidationMessages.dateFromAfterDateTo;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Checks whether a report date string is invalid.
|
|
231
|
+
*
|
|
232
|
+
* @param value - The date value to validate.
|
|
233
|
+
* @returns True when the date value is invalid, otherwise false.
|
|
234
|
+
*/
|
|
235
|
+
isReportDateInvalid(value) {
|
|
236
|
+
return !this.dateService.isValidDate(value, this.dateFormats.input);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Checks whether a report date string is in the future.
|
|
240
|
+
*
|
|
241
|
+
* @param value - The date value to validate.
|
|
242
|
+
* @returns True when the date value is valid and in the future, otherwise false.
|
|
243
|
+
*/
|
|
244
|
+
isReportDateInFuture(value) {
|
|
245
|
+
return (this.dateService.isValidDate(value, this.dateFormats.input) &&
|
|
246
|
+
this.dateService.isDateInTheFuture(value, undefined, this.dateFormats.input));
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Checks whether the report date from value is after the report date to value.
|
|
250
|
+
*
|
|
251
|
+
* @param dateFrom - The start date value.
|
|
252
|
+
* @param dateTo - The end date value.
|
|
253
|
+
* @returns True when both dates are valid and date from is after date to, otherwise false.
|
|
254
|
+
*/
|
|
255
|
+
isReportDateFromAfterDateTo(dateFrom, dateTo) {
|
|
256
|
+
const from = this.dateService.getFromFormat(dateFrom, this.dateFormats.input).startOf('day');
|
|
257
|
+
const to = this.dateService.getFromFormat(dateTo, this.dateFormats.input).startOf('day');
|
|
258
|
+
return from.isValid && to.isValid && from > to;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Returns the current validation message for a field.
|
|
262
|
+
*
|
|
263
|
+
* @param fieldId - The field id to get an error for.
|
|
264
|
+
* @returns The field error message, or null when there is no error.
|
|
265
|
+
*/
|
|
266
|
+
getFieldError(fieldId) {
|
|
267
|
+
return this.fieldErrors()[fieldId] ?? null;
|
|
268
|
+
}
|
|
269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractReportSummaryListBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractReportSummaryListBaseComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
271
|
+
}
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractReportSummaryListBaseComponent, decorators: [{
|
|
273
|
+
type: Component,
|
|
274
|
+
args: [{ template: '' }]
|
|
275
|
+
}] });
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Generated bundle index. Do not edit.
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
export { AbstractReportSummaryListBaseComponent };
|
|
282
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.mjs.map
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, Component } from '@angular/core';
|
|
2
|
+
import { effect, signal, computed, Component } from '@angular/core';
|
|
3
3
|
import { AbstractSortableTableComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table';
|
|
4
4
|
|
|
5
5
|
class AbstractSortableTablePaginationComponent extends AbstractSortableTableComponent {
|
|
6
|
+
/**
|
|
7
|
+
* Keeps the current page within the available range when the data set or page size changes.
|
|
8
|
+
*/
|
|
9
|
+
clampCurrentPageEffect = effect(() => {
|
|
10
|
+
const totalPages = Math.max(1, Math.ceil(this.sortedTableDataSignal().length / this.itemsPerPageSignal()));
|
|
11
|
+
if (this.currentPageSignal() > totalPages) {
|
|
12
|
+
this.currentPageSignal.set(totalPages);
|
|
13
|
+
}
|
|
14
|
+
}, ...(ngDevMode ? [{ debugName: "clampCurrentPageEffect" }] : /* istanbul ignore next */ []));
|
|
6
15
|
// Signal for the current page. Used to calculate the start and end indices for pagination.
|
|
7
16
|
currentPageSignal = signal(1, ...(ngDevMode ? [{ debugName: "currentPageSignal" }] : /* istanbul ignore next */ []));
|
|
8
17
|
// Signal for the number of items per page. Determines how many items are displayed on each page.
|
|
@@ -61,10 +70,10 @@ class AbstractSortableTablePaginationComponent extends AbstractSortableTableComp
|
|
|
61
70
|
const totalPages = Math.ceil(this.displayTableDataSignal().length / this.itemsPerPageSignal());
|
|
62
71
|
this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));
|
|
63
72
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
73
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
66
75
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
|
|
68
77
|
type: Component,
|
|
69
78
|
args: [{
|
|
70
79
|
template: '',
|
|
@@ -185,10 +185,10 @@ class AbstractSortableTableComponent extends AbstractTableFilterComponent {
|
|
|
185
185
|
this.onSortChange({ key, sortType });
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractSortableTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
190
190
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
|
|
192
192
|
type: Component,
|
|
193
193
|
args: [{
|
|
194
194
|
template: '',
|
|
@@ -168,10 +168,10 @@ class AbstractTableFilterComponent {
|
|
|
168
168
|
this.appliedKeyword.set(keyword);
|
|
169
169
|
this.applyFilterState();
|
|
170
170
|
}
|
|
171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
172
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractTableFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: AbstractTableFilterComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
173
173
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AbstractTableFilterComponent, decorators: [{
|
|
175
175
|
type: Component,
|
|
176
176
|
args: [{ template: '' }]
|
|
177
177
|
}] });
|
package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs
CHANGED
|
@@ -221,10 +221,10 @@ class AlphagovAccessibleAutocompleteComponent {
|
|
|
221
221
|
this.describedByObserver?.disconnect();
|
|
222
222
|
this.containerObserver?.disconnect();
|
|
223
223
|
}
|
|
224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
225
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: AlphagovAccessibleAutocompleteComponent, isStandalone: true, selector: "opal-lib-alphagov-accessible-autocomplete", inputs: { labelText: "labelText", labelClasses: "labelClasses", inputId: "inputId", inputName: "inputName", inputClasses: "inputClasses", hintText: "hintText", autoCompleteItems: "autoCompleteItems", showAllValues: "showAllValues", errors: "errors", control: "control" }, viewQueries: [{ propertyName: "autocompleteContainer", first: true, predicate: ["autocomplete"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n", styles: [":host ::ng-deep .autocomplete__option{font-family:GDS Transport,arial,sans-serif}:host ::ng-deep .govuk-input--error input{border-color:#d4351c}:host ::ng-deep .autocomplete__input{background-color:#fff}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
226
226
|
}
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
|
|
228
228
|
type: Component,
|
|
229
229
|
args: [{ selector: 'opal-lib-alphagov-accessible-autocomplete', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n", styles: [":host ::ng-deep .autocomplete__option{font-family:GDS Transport,arial,sans-serif}:host ::ng-deep .govuk-input--error input{border-color:#d4351c}:host ::ng-deep .autocomplete__input{background-color:#fff}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"] }]
|
|
230
230
|
}], ctorParameters: () => [], propDecorators: { labelText: [{
|