@hmcts/opal-frontend-common 0.0.91 → 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-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 +10 -1
- 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
|
@@ -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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmcts/opal-frontend-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@microsoft/applicationinsights-web": "^3.3.6",
|
|
29
|
-
"@ministryofjustice/frontend": "^
|
|
29
|
+
"@ministryofjustice/frontend": "^10.0.0",
|
|
30
30
|
"accessible-autocomplete": "^3.0.1",
|
|
31
31
|
"fast-sort": "^3.4.1",
|
|
32
32
|
"govuk-frontend": "^6.0.0",
|
|
@@ -126,6 +126,31 @@
|
|
|
126
126
|
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.d.ts",
|
|
127
127
|
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs"
|
|
128
128
|
},
|
|
129
|
+
"./components/abstract/abstract-report-instances-table-base": {
|
|
130
|
+
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.mjs",
|
|
131
|
+
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.d.ts",
|
|
132
|
+
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.mjs"
|
|
133
|
+
},
|
|
134
|
+
"./components/abstract/abstract-report-summary-list-base": {
|
|
135
|
+
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.mjs",
|
|
136
|
+
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.d.ts",
|
|
137
|
+
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.mjs"
|
|
138
|
+
},
|
|
139
|
+
"./components/abstract/abstract-report-summary-list-base/constants": {
|
|
140
|
+
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.mjs",
|
|
141
|
+
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.d.ts",
|
|
142
|
+
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.mjs"
|
|
143
|
+
},
|
|
144
|
+
"./components/abstract/abstract-report-summary-list-base/interfaces": {
|
|
145
|
+
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.mjs",
|
|
146
|
+
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.d.ts",
|
|
147
|
+
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.mjs"
|
|
148
|
+
},
|
|
149
|
+
"./components/abstract/abstract-report-summary-list-base/types": {
|
|
150
|
+
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.mjs",
|
|
151
|
+
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.d.ts",
|
|
152
|
+
"default": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.mjs"
|
|
153
|
+
},
|
|
129
154
|
"./components/abstract/abstract-tab-data": {
|
|
130
155
|
"import": "./fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs",
|
|
131
156
|
"types": "./types/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.d.ts",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { IAbstractTableData } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/interfaces';
|
|
3
|
+
import { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';
|
|
4
|
+
import { AbstractSortableTablePaginationComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table-pagination';
|
|
5
|
+
|
|
6
|
+
declare abstract class AbstractReportInstancesTableBaseComponent<TTableData extends IAbstractTableData<SortableValuesType>> extends AbstractSortableTablePaginationComponent {
|
|
7
|
+
set tableData(tableData: TTableData[]);
|
|
8
|
+
paginatedTableDataComputed: i0.Signal<TTableData[]>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractReportInstancesTableBaseComponent<any>, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractReportInstancesTableBaseComponent<any>, "ng-component", never, { "tableData": { "alias": "tableData"; "required": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { AbstractReportInstancesTableBaseComponent };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_LAST_7_DAYS = "last7Days";
|
|
2
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_CUSTOM_DAYS = "customDays";
|
|
3
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_DATE_RANGE = "dateRange";
|
|
4
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_FILTER_STATE: {
|
|
5
|
+
readonly dateFilter: "last7Days";
|
|
6
|
+
readonly days: "";
|
|
7
|
+
readonly dateFrom: "";
|
|
8
|
+
readonly dateTo: "";
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_STATUS: {
|
|
12
|
+
readonly requested: "REQUESTED";
|
|
13
|
+
readonly ready: "READY";
|
|
14
|
+
readonly inProgress: "IN_PROGRESS";
|
|
15
|
+
};
|
|
16
|
+
declare const ABSTRACT_REPORT_SUMMARY_LIST_STATUS_DISPLAY: {
|
|
17
|
+
readonly inProgress: "In progress";
|
|
18
|
+
readonly noContent: "No content";
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
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 };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AbstractReportSummaryListDateFilter } from '@hmcts/opal-frontend-common/components/abstract/abstract-report-summary-list-base/types';
|
|
2
|
+
|
|
3
|
+
interface IAbstractReportSummaryListDateFieldIds {
|
|
4
|
+
days: string;
|
|
5
|
+
dateFrom: string;
|
|
6
|
+
dateTo: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface IAbstractReportSummaryListDateFormats {
|
|
10
|
+
input: string;
|
|
11
|
+
output: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IAbstractReportSummaryListDateValidationMessages {
|
|
15
|
+
customDaysRequired: string;
|
|
16
|
+
dateRangeRequired: string;
|
|
17
|
+
invalidDate: string;
|
|
18
|
+
futureDate: string;
|
|
19
|
+
dateFromAfterDateTo: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IAbstractReportSummaryListFilterState {
|
|
23
|
+
dateFilter: AbstractReportSummaryListDateFilter;
|
|
24
|
+
days: string;
|
|
25
|
+
dateFrom: string;
|
|
26
|
+
dateTo: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface IAbstractReportSummaryListQueryState {
|
|
30
|
+
fromDate: string | null;
|
|
31
|
+
toDate: string | null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type { IAbstractReportSummaryListDateFieldIds, IAbstractReportSummaryListDateFormats, IAbstractReportSummaryListDateValidationMessages, IAbstractReportSummaryListFilterState, IAbstractReportSummaryListQueryState };
|
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>;
|