@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
package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.d.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { DateService } from '@hmcts/opal-frontend-common/services/date-service';
|
|
3
|
+
import { IAbstractFormBaseFormErrorSummaryMessage } from '@hmcts/opal-frontend-common/components/abstract/interfaces';
|
|
4
|
+
import { AbstractReportSummaryListDateFilter as AbstractReportSummaryListDateFilter$1 } from '@hmcts/opal-frontend-common/components/abstract/abstract-report-summary-list-base/types';
|
|
5
|
+
|
|
6
|
+
interface IAbstractReportSummaryListDateFieldIds {
|
|
7
|
+
days: string;
|
|
8
|
+
dateFrom: string;
|
|
9
|
+
dateTo: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IAbstractReportSummaryListDateFormats {
|
|
13
|
+
input: string;
|
|
14
|
+
output: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface IAbstractReportSummaryListDateValidationMessages {
|
|
18
|
+
customDaysRequired: string;
|
|
19
|
+
dateRangeRequired: string;
|
|
20
|
+
invalidDate: string;
|
|
21
|
+
futureDate: string;
|
|
22
|
+
dateFromAfterDateTo: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface IAbstractReportSummaryListFilterState {
|
|
26
|
+
dateFilter: AbstractReportSummaryListDateFilter$1;
|
|
27
|
+
days: string;
|
|
28
|
+
dateFrom: string;
|
|
29
|
+
dateTo: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface IAbstractReportSummaryListQueryState {
|
|
33
|
+
fromDate: string | null;
|
|
34
|
+
toDate: string | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type AbstractReportSummaryListDateFilter = 'last7Days' | 'customDays' | 'dateRange';
|
|
38
|
+
|
|
39
|
+
declare abstract class AbstractReportSummaryListBaseComponent<TFilterForm = unknown> {
|
|
40
|
+
protected readonly dateService: DateService;
|
|
41
|
+
protected readonly fieldErrors: _angular_core.WritableSignal<Record<string, string>>;
|
|
42
|
+
protected abstract readonly dateValidationMessages: IAbstractReportSummaryListDateValidationMessages;
|
|
43
|
+
protected readonly dateFormats: IAbstractReportSummaryListDateFormats;
|
|
44
|
+
readonly dateFilterLast7Days = "last7Days";
|
|
45
|
+
readonly dateFilterCustomDays = "customDays";
|
|
46
|
+
readonly dateFilterDateRange = "dateRange";
|
|
47
|
+
readonly dateFilter: _angular_core.WritableSignal<AbstractReportSummaryListDateFilter>;
|
|
48
|
+
readonly errorSummaryMessages: _angular_core.Signal<IAbstractFormBaseFormErrorSummaryMessage[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Builds the default report query for the last 7 days.
|
|
51
|
+
*
|
|
52
|
+
* @param dateService - The date service used to calculate and format the date range.
|
|
53
|
+
* @param dateFormats - The input and output date formats used by the consuming application.
|
|
54
|
+
* @returns A report query state with a last 7 days date range.
|
|
55
|
+
*/
|
|
56
|
+
static getDefaultReportQuery(dateService: DateService, dateFormats?: IAbstractReportSummaryListDateFormats): IAbstractReportSummaryListQueryState;
|
|
57
|
+
/**
|
|
58
|
+
* Builds a report query from the selected report filter state.
|
|
59
|
+
*
|
|
60
|
+
* @param filters - The selected report filter state.
|
|
61
|
+
* @param dateService - The date service used to calculate and format date values.
|
|
62
|
+
* @param dateFormats - The input and output date formats used by the consuming application.
|
|
63
|
+
* @returns A report query state suitable for report instance API requests.
|
|
64
|
+
*/
|
|
65
|
+
static getReportQueryFromFilters(filters: IAbstractReportSummaryListFilterState, dateService: DateService, dateFormats?: IAbstractReportSummaryListDateFormats): IAbstractReportSummaryListQueryState;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the display status for a report instance.
|
|
68
|
+
*
|
|
69
|
+
* @param status - The report instance status code.
|
|
70
|
+
* @param records - The number of records in the report instance, where available.
|
|
71
|
+
* @param displayName - The API-provided status display name, where available.
|
|
72
|
+
* @returns The display status for the report instance.
|
|
73
|
+
*/
|
|
74
|
+
static getReportInstanceDisplayStatus(status: string, records?: number | null, displayName?: string | null): string;
|
|
75
|
+
/**
|
|
76
|
+
* Converts a report status code into title case display text.
|
|
77
|
+
*
|
|
78
|
+
* @param status - The report status code to convert.
|
|
79
|
+
* @returns A display-friendly status value.
|
|
80
|
+
*/
|
|
81
|
+
static toReportDisplayStatus(status: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* Builds the default report query for the current component instance.
|
|
84
|
+
*
|
|
85
|
+
* @returns A report query state with a last 7 days date range.
|
|
86
|
+
*/
|
|
87
|
+
protected getDefaultReportQuery(): IAbstractReportSummaryListQueryState;
|
|
88
|
+
/**
|
|
89
|
+
* Builds a report query from the selected report filter state for the current component instance.
|
|
90
|
+
*
|
|
91
|
+
* @param filters - The selected report filter state.
|
|
92
|
+
* @returns A report query state suitable for report instance API requests.
|
|
93
|
+
*/
|
|
94
|
+
protected getReportQueryFromFilters(filters: IAbstractReportSummaryListFilterState): IAbstractReportSummaryListQueryState;
|
|
95
|
+
/**
|
|
96
|
+
* Reads the consuming application's report filter form into a normalized filter state object.
|
|
97
|
+
*
|
|
98
|
+
* @param filtersForm - The consuming application's report filter form to read from.
|
|
99
|
+
* @returns A normalized report filter state.
|
|
100
|
+
*/
|
|
101
|
+
protected abstract getFiltersFromForm(filtersForm: TFilterForm): IAbstractReportSummaryListFilterState;
|
|
102
|
+
/**
|
|
103
|
+
* Clears consuming application form fields that do not apply to the selected date filter.
|
|
104
|
+
*
|
|
105
|
+
* @param filtersForm - The consuming application's report filter form to update.
|
|
106
|
+
* @param dateFilter - The selected date filter.
|
|
107
|
+
*/
|
|
108
|
+
protected abstract clearInactiveDateFilterFields(filtersForm: TFilterForm, dateFilter: AbstractReportSummaryListDateFilter | null): void;
|
|
109
|
+
/**
|
|
110
|
+
* Builds validation messages for the active report date filter fields.
|
|
111
|
+
*
|
|
112
|
+
* @param filters - The selected report filter state.
|
|
113
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
114
|
+
* @returns A field error map keyed by field id.
|
|
115
|
+
*/
|
|
116
|
+
protected buildReportDateFieldErrors(filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): Record<string, string>;
|
|
117
|
+
/**
|
|
118
|
+
* Builds validation messages for the custom days report date filter.
|
|
119
|
+
*
|
|
120
|
+
* @param filters - The selected report filter state.
|
|
121
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
122
|
+
* @returns A field error map keyed by field id.
|
|
123
|
+
*/
|
|
124
|
+
protected buildCustomDaysFieldErrors(filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): Record<string, string>;
|
|
125
|
+
/**
|
|
126
|
+
* Builds validation messages for the date range report date filter.
|
|
127
|
+
*
|
|
128
|
+
* @param filters - The selected report filter state.
|
|
129
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
130
|
+
* @returns A field error map keyed by field id.
|
|
131
|
+
*/
|
|
132
|
+
protected buildDateRangeFieldErrors(filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): Record<string, string>;
|
|
133
|
+
/**
|
|
134
|
+
* Adds a validation message when no date range boundary has been entered.
|
|
135
|
+
*
|
|
136
|
+
* @param errors - The field error map to update.
|
|
137
|
+
* @param filters - The selected report filter state.
|
|
138
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
139
|
+
*/
|
|
140
|
+
protected addRequiredDateRangeError(errors: Record<string, string>, filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): void;
|
|
141
|
+
/**
|
|
142
|
+
* Adds validation messages for date values with an invalid format.
|
|
143
|
+
*
|
|
144
|
+
* @param errors - The field error map to update.
|
|
145
|
+
* @param filters - The selected report filter state.
|
|
146
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
147
|
+
*/
|
|
148
|
+
protected addDateFormatErrors(errors: Record<string, string>, filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): void;
|
|
149
|
+
/**
|
|
150
|
+
* Adds validation messages for date values in the future.
|
|
151
|
+
*
|
|
152
|
+
* @param errors - The field error map to update.
|
|
153
|
+
* @param filters - The selected report filter state.
|
|
154
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
155
|
+
*/
|
|
156
|
+
protected addFutureDateErrors(errors: Record<string, string>, filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): void;
|
|
157
|
+
/**
|
|
158
|
+
* Adds a validation message when date from is after date to.
|
|
159
|
+
*
|
|
160
|
+
* @param errors - The field error map to update.
|
|
161
|
+
* @param filters - The selected report filter state.
|
|
162
|
+
* @param fieldIds - The field ids used by the consuming application template.
|
|
163
|
+
*/
|
|
164
|
+
protected addDateOrderError(errors: Record<string, string>, filters: IAbstractReportSummaryListFilterState, fieldIds: IAbstractReportSummaryListDateFieldIds): void;
|
|
165
|
+
/**
|
|
166
|
+
* Checks whether a report date string is invalid.
|
|
167
|
+
*
|
|
168
|
+
* @param value - The date value to validate.
|
|
169
|
+
* @returns True when the date value is invalid, otherwise false.
|
|
170
|
+
*/
|
|
171
|
+
protected isReportDateInvalid(value: string): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Checks whether a report date string is in the future.
|
|
174
|
+
*
|
|
175
|
+
* @param value - The date value to validate.
|
|
176
|
+
* @returns True when the date value is valid and in the future, otherwise false.
|
|
177
|
+
*/
|
|
178
|
+
protected isReportDateInFuture(value: string): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Checks whether the report date from value is after the report date to value.
|
|
181
|
+
*
|
|
182
|
+
* @param dateFrom - The start date value.
|
|
183
|
+
* @param dateTo - The end date value.
|
|
184
|
+
* @returns True when both dates are valid and date from is after date to, otherwise false.
|
|
185
|
+
*/
|
|
186
|
+
protected isReportDateFromAfterDateTo(dateFrom: string, dateTo: string): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Returns the current validation message for a field.
|
|
189
|
+
*
|
|
190
|
+
* @param fieldId - The field id to get an error for.
|
|
191
|
+
* @returns The field error message, or null when there is no error.
|
|
192
|
+
*/
|
|
193
|
+
getFieldError(fieldId: string): string | null;
|
|
194
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AbstractReportSummaryListBaseComponent<any>, never>;
|
|
195
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AbstractReportSummaryListBaseComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { AbstractReportSummaryListBaseComponent };
|
package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ import * as _angular_core from '@angular/core';
|
|
|
4
4
|
import { AbstractSortableTableComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table';
|
|
5
5
|
|
|
6
6
|
declare abstract class AbstractSortableTablePaginationComponent extends AbstractSortableTableComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Keeps the current page within the available range when the data set or page size changes.
|
|
9
|
+
*/
|
|
10
|
+
private readonly clampCurrentPageEffect;
|
|
7
11
|
currentPageSignal: _angular_core.WritableSignal<number>;
|
|
8
12
|
itemsPerPageSignal: _angular_core.WritableSignal<number>;
|
|
9
13
|
startIndexComputed: _angular_core.Signal<number>;
|
|
@@ -26,28 +26,80 @@ interface IOpalUserState {
|
|
|
26
26
|
declare class OpalUserService {
|
|
27
27
|
private readonly http;
|
|
28
28
|
private readonly globalStore;
|
|
29
|
+
private inFlightUserState$?;
|
|
30
|
+
private userStateRequestGeneration;
|
|
31
|
+
private userStateCacheExpiresAtMilliseconds;
|
|
32
|
+
/**
|
|
33
|
+
* Converts the user-state API status into the service domain status.
|
|
34
|
+
*
|
|
35
|
+
* @param status - The status value returned by the user-state API.
|
|
36
|
+
* @returns The mapped domain status, or null when the API status is null.
|
|
37
|
+
*/
|
|
29
38
|
private toOpalUserStatus;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the configured user-state domain from the global store.
|
|
41
|
+
*
|
|
42
|
+
* @returns The trimmed user-state domain.
|
|
43
|
+
* @throws When no non-blank user-state domain has been configured.
|
|
44
|
+
*/
|
|
30
45
|
private getUserStateDomain;
|
|
31
46
|
/**
|
|
32
47
|
* Maps the Redis-backed user state response into the existing domain-specific user state shape.
|
|
48
|
+
*
|
|
49
|
+
* @param userState - The raw user-state API response.
|
|
50
|
+
* @returns The mapped user state for the configured domain.
|
|
51
|
+
* @throws When the response does not include the configured domain.
|
|
33
52
|
*/
|
|
34
53
|
private toOpalUserState;
|
|
54
|
+
/**
|
|
55
|
+
* Extracts the body from the observed user-state HTTP response.
|
|
56
|
+
*
|
|
57
|
+
* @param response - The full HTTP response from the user-state endpoint.
|
|
58
|
+
* @returns The response body.
|
|
59
|
+
* @throws When the response body is empty.
|
|
60
|
+
*/
|
|
61
|
+
private getUserStateResponseBody;
|
|
62
|
+
/**
|
|
63
|
+
* Checks whether a user state can be used as a cached logged-in user.
|
|
64
|
+
*
|
|
65
|
+
* @param userState - The user state currently held in the global store.
|
|
66
|
+
* @returns True when the user state contains a positive numeric user ID.
|
|
67
|
+
*/
|
|
68
|
+
private isValidCachedUserState;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the current cached user state when it is populated and unexpired.
|
|
71
|
+
*
|
|
72
|
+
* @returns The cached user state, or null when the cache is empty or expired.
|
|
73
|
+
*/
|
|
74
|
+
private getCachedUserState;
|
|
75
|
+
/**
|
|
76
|
+
* Calculates the local cache TTL from the response header and configured maximum TTL.
|
|
77
|
+
*
|
|
78
|
+
* @param response - The full HTTP response from the user-state endpoint.
|
|
79
|
+
* @returns The TTL in milliseconds. A zero response header expires the local cache immediately.
|
|
80
|
+
*/
|
|
81
|
+
private getUserStateCacheTtlMilliseconds;
|
|
82
|
+
/**
|
|
83
|
+
* Invalidates local cache controls and marks existing in-flight requests as stale.
|
|
84
|
+
*/
|
|
85
|
+
private clearLocalUserStateCache;
|
|
35
86
|
/**
|
|
36
87
|
* Retrieves the logged-in user's state as an observable.
|
|
37
88
|
*
|
|
38
|
-
*
|
|
89
|
+
* Uses the global store as a local cache until the effective user-state TTL expires, shares concurrent HTTP
|
|
90
|
+
* requests, and ignores stale responses after the local cache has been invalidated.
|
|
39
91
|
*
|
|
40
92
|
* @returns {Observable<IOpalUserState>} An observable that emits the logged-in user's state.
|
|
41
93
|
*/
|
|
42
94
|
getLoggedInUserState(): Observable<IOpalUserState>;
|
|
43
95
|
/**
|
|
44
|
-
*
|
|
96
|
+
* Clears the global store user state and invalidates local user-state cache controls.
|
|
45
97
|
*
|
|
46
|
-
* Useful for logout
|
|
98
|
+
* Useful for logout and identity switches to avoid reusing stale state or accepting stale in-flight responses.
|
|
47
99
|
*/
|
|
48
100
|
clearUserStateCache(): void;
|
|
49
101
|
/**
|
|
50
|
-
* Fetches the latest user state from the Redis-backed frontend endpoint.
|
|
102
|
+
* Fetches the latest user state from the Redis-backed frontend endpoint, bypassing the current local cache.
|
|
51
103
|
*
|
|
52
104
|
* @returns An Observable that emits the current {@link IOpalUserState}.
|
|
53
105
|
*/
|