@hmcts/opal-frontend-common 0.0.13 → 0.0.15
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/components/abstract/abstract-tab-data/abstract-tab-data.d.ts +69 -0
- package/components/abstract/abstract-tab-data/index.d.ts +5 -0
- package/components/abstract/abstract-tab-data/public-api.d.ts +1 -0
- 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-sortable-table-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs +105 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.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-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.mjs +9 -9
- 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-moj-moj-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.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-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 +12 -12
- 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-directives-capitalisation.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-ZkhlgRu3.mjs → hmcts-opal-frontend-common-pages-access-denied.component-Ckd_PFCA.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-ZkhlgRu3.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-Ckd_PFCA.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-DJHx_NdT.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-ComYSDt-.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-DJHx_NdT.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-ComYSDt-.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-B6sVdhPh.mjs → hmcts-opal-frontend-common-pages-sign-in.component-Wuv-fOcF.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-B6sVdhPh.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-Wuv-fOcF.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs +2 -2
- 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-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 +21 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
- 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/package.json +6 -1
- package/services/date-service/date.service.d.ts +9 -0
- package/services/date-service/interfaces/date.service.interface.d.ts +4 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare abstract class AbstractTabData {
|
|
3
|
+
private readonly router;
|
|
4
|
+
private readonly activatedRoute;
|
|
5
|
+
activeTab: string;
|
|
6
|
+
/**
|
|
7
|
+
* Creates an observable stream that conditionally fetches and transforms data based on the current tab.
|
|
8
|
+
*
|
|
9
|
+
* If the current tab matches the `initialTab`, the stream emits the provided `initialValue`.
|
|
10
|
+
* Otherwise, it fetches data using the `fetchData` function with parameters obtained from `getParams`,
|
|
11
|
+
* transforms the result using the `transform` function, and shares the result among subscribers.
|
|
12
|
+
*
|
|
13
|
+
* @template T The type of data returned by the fetchData observable.
|
|
14
|
+
* @template U The type of the value emitted by the resulting observable.
|
|
15
|
+
* @param initialTab - The tab identifier that triggers emission of the initial value.
|
|
16
|
+
* @param fragment$ - An observable emitting the current tab identifier.
|
|
17
|
+
* @param initialValue - The value to emit when the current tab matches `initialTab`.
|
|
18
|
+
* @param getParams - A function that returns parameters for data fetching based on the tab.
|
|
19
|
+
* @param fetchData - A function that fetches data as an observable, given the parameters.
|
|
20
|
+
* @param transform - A function to transform the fetched data before emission.
|
|
21
|
+
* @returns An observable emitting either the initial value or the transformed fetched data, depending on the current tab.
|
|
22
|
+
*/
|
|
23
|
+
private createConditionalStream;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an observable data stream for a tab, transforming the fetched data as needed.
|
|
26
|
+
*
|
|
27
|
+
* @template T The type of the data fetched.
|
|
28
|
+
* @template R The type of the transformed data.
|
|
29
|
+
* @param initialData The initial data to use before fetching.
|
|
30
|
+
* @param initialTab The initial tab identifier.
|
|
31
|
+
* @param fragment$ An observable emitting the current tab fragment.
|
|
32
|
+
* @param getParams A function that returns fetch parameters based on the tab.
|
|
33
|
+
* @param fetchData A function that fetches data given the parameters.
|
|
34
|
+
* @param transform A function to transform the fetched data.
|
|
35
|
+
* @returns An observable emitting the transformed data for the current tab.
|
|
36
|
+
*/
|
|
37
|
+
createTabDataStream<T, R>(initialData: T, initialTab: string, fragment$: Observable<string>, getParams: (tab?: string) => any, fetchData: (params: any) => Observable<T>, transform: (data: T) => R): Observable<R>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates an observable stream that emits a formatted count string based on the current tab and fragment.
|
|
40
|
+
*
|
|
41
|
+
* @template T - The type of the data returned by the fetchCount observable.
|
|
42
|
+
* @param initialTab - The initial tab identifier.
|
|
43
|
+
* @param initialCount - The initial count value to display before fetching.
|
|
44
|
+
* @param fragment$ - An observable emitting the current fragment or tab identifier.
|
|
45
|
+
* @param getParams - A function that returns the parameters required for fetching the count.
|
|
46
|
+
* @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.
|
|
47
|
+
* @param extractCount - A function that extracts the numeric count from the fetched data.
|
|
48
|
+
* @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.
|
|
49
|
+
* @returns An observable that emits the formatted count string whenever the fragment or parameters change.
|
|
50
|
+
*/
|
|
51
|
+
createCountStream<T>(initialTab: string, initialCount: number, fragment$: Observable<string>, getParams: () => any, fetchCount: (params: any) => Observable<T>, extractCount: (data: T) => number, formatFn?: (count: number) => string): Observable<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Handles the tab switch by updating the active tab and triggering a router fragment update.
|
|
54
|
+
*
|
|
55
|
+
* @param fragment - The identifier of the tab to activate.
|
|
56
|
+
*/
|
|
57
|
+
handleTabSwitch(fragment: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Formats a count value, capping it at a specified maximum.
|
|
60
|
+
*
|
|
61
|
+
* If the count exceeds the cap, returns a string in the format "{cap}+".
|
|
62
|
+
* Otherwise, returns the count as a string.
|
|
63
|
+
*
|
|
64
|
+
* @param count - The number to format.
|
|
65
|
+
* @param cap - The maximum value to display before capping.
|
|
66
|
+
* @returns A string representing the count, capped if necessary.
|
|
67
|
+
*/
|
|
68
|
+
formatCountWithCap(count: number, cap: number): string;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './abstract-tab-data';
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs
CHANGED
|
@@ -190,10 +190,10 @@ class AbstractFormAliasBaseComponent extends AbstractFormBaseComponent {
|
|
|
190
190
|
this['ngUnsubscribe'].complete();
|
|
191
191
|
super.ngOnDestroy();
|
|
192
192
|
}
|
|
193
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
194
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
193
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormAliasBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractFormAliasBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
195
195
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormAliasBaseComponent, decorators: [{
|
|
197
197
|
type: Component,
|
|
198
198
|
args: [{
|
|
199
199
|
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: "19.2.
|
|
238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormArrayBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractFormArrayBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
239
239
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", 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: "19.2.
|
|
81
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormArrayRemovalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractFormArrayRemovalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormArrayRemovalComponent, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{
|
|
86
86
|
template: '',
|
|
@@ -471,10 +471,10 @@ class AbstractFormBaseComponent {
|
|
|
471
471
|
this.ngUnsubscribe.next();
|
|
472
472
|
this.ngUnsubscribe.complete();
|
|
473
473
|
}
|
|
474
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
475
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
474
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
475
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractFormBaseComponent, isStandalone: true, selector: "ng-component", outputs: { unsavedChanges: "unsavedChanges", formSubmit: "formSubmit" }, ngImport: i0, template: '', isInline: true });
|
|
476
476
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractFormBaseComponent, decorators: [{
|
|
478
478
|
type: Component,
|
|
479
479
|
args: [{
|
|
480
480
|
template: '',
|
|
@@ -45,10 +45,10 @@ class AbstractSortableTablePaginationComponent extends AbstractSortableTableComp
|
|
|
45
45
|
const totalPages = Math.ceil(this.abstractTableDataSignal().length / this.itemsPerPageSignal());
|
|
46
46
|
this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));
|
|
47
47
|
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
49
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{
|
|
54
54
|
template: '',
|
|
@@ -125,10 +125,10 @@ class AbstractSortableTableComponent {
|
|
|
125
125
|
ngOnInit() {
|
|
126
126
|
this.initialiseSortState();
|
|
127
127
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractSortableTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, ngImport: i0, template: '', isInline: true });
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
|
|
132
132
|
type: Component,
|
|
133
133
|
args: [{
|
|
134
134
|
template: '',
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { inject } from '@angular/core';
|
|
2
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { switchMap, of, map, shareReplay } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
class AbstractTabData {
|
|
6
|
+
router = inject(Router);
|
|
7
|
+
activatedRoute = inject(ActivatedRoute);
|
|
8
|
+
activeTab;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an observable stream that conditionally fetches and transforms data based on the current tab.
|
|
11
|
+
*
|
|
12
|
+
* If the current tab matches the `initialTab`, the stream emits the provided `initialValue`.
|
|
13
|
+
* Otherwise, it fetches data using the `fetchData` function with parameters obtained from `getParams`,
|
|
14
|
+
* transforms the result using the `transform` function, and shares the result among subscribers.
|
|
15
|
+
*
|
|
16
|
+
* @template T The type of data returned by the fetchData observable.
|
|
17
|
+
* @template U The type of the value emitted by the resulting observable.
|
|
18
|
+
* @param initialTab - The tab identifier that triggers emission of the initial value.
|
|
19
|
+
* @param fragment$ - An observable emitting the current tab identifier.
|
|
20
|
+
* @param initialValue - The value to emit when the current tab matches `initialTab`.
|
|
21
|
+
* @param getParams - A function that returns parameters for data fetching based on the tab.
|
|
22
|
+
* @param fetchData - A function that fetches data as an observable, given the parameters.
|
|
23
|
+
* @param transform - A function to transform the fetched data before emission.
|
|
24
|
+
* @returns An observable emitting either the initial value or the transformed fetched data, depending on the current tab.
|
|
25
|
+
*/
|
|
26
|
+
createConditionalStream(initialTab, fragment$, initialValue,
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
getParams,
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
fetchData, transform) {
|
|
31
|
+
return fragment$.pipe(switchMap((tab) => tab === initialTab ? of(initialValue) : fetchData(getParams(tab)).pipe(map(transform), shareReplay(1))));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates an observable data stream for a tab, transforming the fetched data as needed.
|
|
35
|
+
*
|
|
36
|
+
* @template T The type of the data fetched.
|
|
37
|
+
* @template R The type of the transformed data.
|
|
38
|
+
* @param initialData The initial data to use before fetching.
|
|
39
|
+
* @param initialTab The initial tab identifier.
|
|
40
|
+
* @param fragment$ An observable emitting the current tab fragment.
|
|
41
|
+
* @param getParams A function that returns fetch parameters based on the tab.
|
|
42
|
+
* @param fetchData A function that fetches data given the parameters.
|
|
43
|
+
* @param transform A function to transform the fetched data.
|
|
44
|
+
* @returns An observable emitting the transformed data for the current tab.
|
|
45
|
+
*/
|
|
46
|
+
createTabDataStream(initialData, initialTab, fragment$,
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
getParams,
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
+
fetchData, transform) {
|
|
51
|
+
return this.createConditionalStream(initialTab, fragment$, transform(initialData), getParams, fetchData, transform);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates an observable stream that emits a formatted count string based on the current tab and fragment.
|
|
55
|
+
*
|
|
56
|
+
* @template T - The type of the data returned by the fetchCount observable.
|
|
57
|
+
* @param initialTab - The initial tab identifier.
|
|
58
|
+
* @param initialCount - The initial count value to display before fetching.
|
|
59
|
+
* @param fragment$ - An observable emitting the current fragment or tab identifier.
|
|
60
|
+
* @param getParams - A function that returns the parameters required for fetching the count.
|
|
61
|
+
* @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.
|
|
62
|
+
* @param extractCount - A function that extracts the numeric count from the fetched data.
|
|
63
|
+
* @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.
|
|
64
|
+
* @returns An observable that emits the formatted count string whenever the fragment or parameters change.
|
|
65
|
+
*/
|
|
66
|
+
createCountStream(initialTab, initialCount, fragment$,
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
+
getParams,
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
fetchCount, extractCount, formatFn = (c) => `${c}`) {
|
|
71
|
+
return this.createConditionalStream(initialTab, fragment$, formatFn(initialCount), () => getParams(), fetchCount, (data) => formatFn(extractCount(data)));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Handles the tab switch by updating the active tab and triggering a router fragment update.
|
|
75
|
+
*
|
|
76
|
+
* @param fragment - The identifier of the tab to activate.
|
|
77
|
+
*/
|
|
78
|
+
handleTabSwitch(fragment) {
|
|
79
|
+
this.activeTab = fragment;
|
|
80
|
+
this.router.navigate([], {
|
|
81
|
+
relativeTo: this.activatedRoute.parent,
|
|
82
|
+
fragment,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Formats a count value, capping it at a specified maximum.
|
|
87
|
+
*
|
|
88
|
+
* If the count exceeds the cap, returns a string in the format "{cap}+".
|
|
89
|
+
* Otherwise, returns the count as a string.
|
|
90
|
+
*
|
|
91
|
+
* @param count - The number to format.
|
|
92
|
+
* @param cap - The maximum value to display before capping.
|
|
93
|
+
* @returns A string representing the count, capped if necessary.
|
|
94
|
+
*/
|
|
95
|
+
formatCountWithCap(count, cap) {
|
|
96
|
+
return count > cap ? `${cap}+` : `${count}`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Generated bundle index. Do not edit.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
export { AbstractTabData };
|
|
105
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/abstract-tab-data.ts","../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Observable, of, switchMap, map, shareReplay } from 'rxjs';\n\nexport abstract class AbstractTabData {\n private readonly router = inject(Router);\n private readonly activatedRoute = inject(ActivatedRoute);\n public activeTab!: string;\n\n /**\n * Creates an observable stream that conditionally fetches and transforms data based on the current tab.\n *\n * If the current tab matches the `initialTab`, the stream emits the provided `initialValue`.\n * Otherwise, it fetches data using the `fetchData` function with parameters obtained from `getParams`,\n * transforms the result using the `transform` function, and shares the result among subscribers.\n *\n * @template T The type of data returned by the fetchData observable.\n * @template U The type of the value emitted by the resulting observable.\n * @param initialTab - The tab identifier that triggers emission of the initial value.\n * @param fragment$ - An observable emitting the current tab identifier.\n * @param initialValue - The value to emit when the current tab matches `initialTab`.\n * @param getParams - A function that returns parameters for data fetching based on the tab.\n * @param fetchData - A function that fetches data as an observable, given the parameters.\n * @param transform - A function to transform the fetched data before emission.\n * @returns An observable emitting either the initial value or the transformed fetched data, depending on the current tab.\n */\n private createConditionalStream<T, U>(\n initialTab: string,\n fragment$: Observable<string>,\n initialValue: U,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => U,\n ): Observable<U> {\n return fragment$.pipe(\n switchMap((tab) =>\n tab === initialTab ? of(initialValue) : fetchData(getParams(tab)).pipe(map(transform), shareReplay(1)),\n ),\n );\n }\n\n /**\n * Creates an observable data stream for a tab, transforming the fetched data as needed.\n *\n * @template T The type of the data fetched.\n * @template R The type of the transformed data.\n * @param initialData The initial data to use before fetching.\n * @param initialTab The initial tab identifier.\n * @param fragment$ An observable emitting the current tab fragment.\n * @param getParams A function that returns fetch parameters based on the tab.\n * @param fetchData A function that fetches data given the parameters.\n * @param transform A function to transform the fetched data.\n * @returns An observable emitting the transformed data for the current tab.\n */\n public createTabDataStream<T, R>(\n initialData: T,\n initialTab: string,\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => R,\n ): Observable<R> {\n return this.createConditionalStream<T, R>(\n initialTab,\n fragment$,\n transform(initialData),\n getParams,\n fetchData,\n transform,\n );\n }\n\n /**\n * Creates an observable stream that emits a formatted count string based on the current tab and fragment.\n *\n * @template T - The type of the data returned by the fetchCount observable.\n * @param initialTab - The initial tab identifier.\n * @param initialCount - The initial count value to display before fetching.\n * @param fragment$ - An observable emitting the current fragment or tab identifier.\n * @param getParams - A function that returns the parameters required for fetching the count.\n * @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.\n * @param extractCount - A function that extracts the numeric count from the fetched data.\n * @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.\n * @returns An observable that emits the formatted count string whenever the fragment or parameters change.\n */\n public createCountStream<T>(\n initialTab: string,\n initialCount: number,\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: () => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchCount: (params: any) => Observable<T>,\n extractCount: (data: T) => number,\n formatFn: (count: number) => string = (c) => `${c}`,\n ): Observable<string> {\n return this.createConditionalStream<T, string>(\n initialTab,\n fragment$,\n formatFn(initialCount),\n () => getParams(),\n fetchCount,\n (data) => formatFn(extractCount(data)),\n );\n }\n\n /**\n * Handles the tab switch by updating the active tab and triggering a router fragment update.\n *\n * @param fragment - The identifier of the tab to activate.\n */\n public handleTabSwitch(fragment: string): void {\n this.activeTab = fragment;\n this.router.navigate([], {\n relativeTo: this.activatedRoute.parent,\n fragment,\n });\n }\n\n /**\n * Formats a count value, capping it at a specified maximum.\n *\n * If the count exceeds the cap, returns a string in the format \"{cap}+\".\n * Otherwise, returns the count as a string.\n *\n * @param count - The number to format.\n * @param cap - The maximum value to display before capping.\n * @returns A string representing the count, capped if necessary.\n */\n public formatCountWithCap(count: number, cap: number): string {\n return count > cap ? `${cap}+` : `${count}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIsB,eAAe,CAAA;AAClB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACjD,IAAA,SAAS;AAEhB;;;;;;;;;;;;;;;;AAgBG;AACK,IAAA,uBAAuB,CAC7B,UAAkB,EAClB,SAA6B,EAC7B,YAAe;;IAEf,SAAgC;;AAEhC,IAAA,SAAyC,EACzC,SAAyB,EAAA;QAEzB,OAAO,SAAS,CAAC,IAAI,CACnB,SAAS,CAAC,CAAC,GAAG,KACZ,GAAG,KAAK,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CACvG,CACF;;AAGH;;;;;;;;;;;;AAYG;AACI,IAAA,mBAAmB,CACxB,WAAc,EACd,UAAkB,EAClB,SAA6B;;IAE7B,SAAgC;;AAEhC,IAAA,SAAyC,EACzC,SAAyB,EAAA;AAEzB,QAAA,OAAO,IAAI,CAAC,uBAAuB,CACjC,UAAU,EACV,SAAS,EACT,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,EACT,SAAS,EACT,SAAS,CACV;;AAGH;;;;;;;;;;;;AAYG;AACI,IAAA,iBAAiB,CACtB,UAAkB,EAClB,YAAoB,EACpB,SAA6B;;IAE7B,SAAoB;;IAEpB,UAA0C,EAC1C,YAAiC,EACjC,QAAsC,GAAA,CAAC,CAAC,KAAK,CAAG,EAAA,CAAC,CAAE,CAAA,EAAA;AAEnD,QAAA,OAAO,IAAI,CAAC,uBAAuB,CACjC,UAAU,EACV,SAAS,EACT,QAAQ,CAAC,YAAY,CAAC,EACtB,MAAM,SAAS,EAAE,EACjB,UAAU,EACV,CAAC,IAAI,KAAK,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CACvC;;AAGH;;;;AAIG;AACI,IAAA,eAAe,CAAC,QAAgB,EAAA;AACrC,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;AACvB,YAAA,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM;YACtC,QAAQ;AACT,SAAA,CAAC;;AAGJ;;;;;;;;;AASG;IACI,kBAAkB,CAAC,KAAa,EAAE,GAAW,EAAA;AAClD,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,CAAA,EAAG,GAAG,CAAA,CAAA,CAAG,GAAG,CAAG,EAAA,KAAK,EAAE;;AAE9C;;ACxID;;AAEG;;;;"}
|
package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs
CHANGED
|
@@ -120,10 +120,10 @@ class AlphagovAccessibleAutocompleteComponent {
|
|
|
120
120
|
this.ngUnsubscribe.next();
|
|
121
121
|
this.ngUnsubscribe.complete();
|
|
122
122
|
}
|
|
123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", 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 }], 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 [id]=\"inputId\" [name]=\"inputName\" type=\"hidden\" [formControl]=\"getControl\" />\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}\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 });
|
|
125
125
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
|
|
127
127
|
type: Component,
|
|
128
128
|
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 [id]=\"inputId\" [name]=\"inputName\" type=\"hidden\" [formControl]=\"getControl\" />\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}\n"] }]
|
|
129
129
|
}], ctorParameters: () => [], propDecorators: { labelText: [{
|
|
@@ -16,10 +16,10 @@ class GovukAccordionComponent {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukAccordionComponent, isStandalone: true, selector: "opal-lib-govuk-accordion", ngImport: i0, template: "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-default\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-1\"> Writing well for the web </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-1\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-1\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for the web.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-2\">\n Writing well for specialists\n </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-2\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-2\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for specialists.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-3\"> Know your audience </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-3\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-3\"\n >\n <p class=\"govuk-body\">This is the content for Know your audience.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-4\"> How people read </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-4\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-4\"\n >\n <p class=\"govuk-body\">This is the content for How people read.</p>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukAccordionComponent, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ selector: 'opal-lib-govuk-accordion', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-default\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-1\"> Writing well for the web </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-1\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-1\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for the web.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-2\">\n Writing well for specialists\n </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-2\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-2\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for specialists.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-3\"> Know your audience </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-3\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-3\"\n >\n <p class=\"govuk-body\">This is the content for Know your audience.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-4\"> How people read </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-4\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-4\"\n >\n <p class=\"govuk-body\">This is the content for How people read.</p>\n </div>\n </div>\n</div>\n" }]
|
|
25
25
|
}] });
|
|
@@ -13,10 +13,10 @@ class GovukBackLinkComponent {
|
|
|
13
13
|
event.preventDefault();
|
|
14
14
|
this.clickEvent.emit(event);
|
|
15
15
|
}
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
17
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukBackLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukBackLinkComponent, isStandalone: true, selector: "opal-lib-govuk-back-link", outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<a href=\"#\" class=\"govuk-back-link\" (click)=\"onBack($event)\">Back</a>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukBackLinkComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
21
|
args: [{ selector: 'opal-lib-govuk-back-link', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a href=\"#\" class=\"govuk-back-link\" (click)=\"onBack($event)\">Back</a>\n" }]
|
|
22
22
|
}], propDecorators: { clickEvent: [{
|
|
@@ -14,10 +14,10 @@ class GovukButtonComponent {
|
|
|
14
14
|
handleButtonClick() {
|
|
15
15
|
this.buttonClickEvent.emit(true);
|
|
16
16
|
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukButtonComponent, isStandalone: true, selector: "opal-lib-govuk-button", inputs: { buttonId: "buttonId", type: "type", buttonClasses: "buttonClasses" }, outputs: { buttonClickEvent: "buttonClickEvent" }, ngImport: i0, template: "<button\n [id]=\"buttonId\"\n [type]=\"type\"\n class=\"govuk-button {{ buttonClasses }}\"\n data-module=\"govuk-button\"\n (click)=\"handleButtonClick()\"\n>\n <ng-content></ng-content>\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukButtonComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'opal-lib-govuk-button', imports: [CommonModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [id]=\"buttonId\"\n [type]=\"type\"\n class=\"govuk-button {{ buttonClasses }}\"\n data-module=\"govuk-button\"\n (click)=\"handleButtonClick()\"\n>\n <ng-content></ng-content>\n</button>\n" }]
|
|
23
23
|
}], propDecorators: { buttonId: [{
|
|
@@ -10,10 +10,10 @@ class GovukCancelLinkComponent {
|
|
|
10
10
|
handleClick() {
|
|
11
11
|
this.linkClickEvent.emit(true);
|
|
12
12
|
}
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
14
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCancelLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukCancelLinkComponent, isStandalone: true, selector: "opal-lib-govuk-cancel-link", inputs: { cancelLinkText: "cancelLinkText" }, outputs: { linkClickEvent: "linkClickEvent" }, ngImport: i0, template: "<a (keyup.enter)=\"handleClick()\" (click)=\"handleClick()\" class=\"govuk-link button-link\" role=\"link\" tabindex=\"0\">{{\n cancelLinkText\n}}</a>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCancelLinkComponent, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: 'opal-lib-govuk-cancel-link', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a (keyup.enter)=\"handleClick()\" (click)=\"handleClick()\" class=\"govuk-link button-link\" role=\"link\" tabindex=\"0\">{{\n cancelLinkText\n}}</a>\n" }]
|
|
19
19
|
}], propDecorators: { cancelLinkText: [{
|
|
@@ -11,10 +11,10 @@ class GovukCheckboxesConditionalComponent {
|
|
|
11
11
|
ngOnInit() {
|
|
12
12
|
this.id = `${this.conditionalId}-conditional`;
|
|
13
13
|
}
|
|
14
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
15
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesConditionalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukCheckboxesConditionalComponent, isStandalone: true, selector: "opal-lib-govuk-checkboxes-conditional, [opal-lib-govuk-checkboxes-conditional]", inputs: { conditionalId: "conditionalId" }, host: { properties: { "class": "this.class", "id": "this.id" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesConditionalComponent, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'opal-lib-govuk-checkboxes-conditional, [opal-lib-govuk-checkboxes-conditional]', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
20
20
|
}], propDecorators: { conditionalId: [{
|
|
@@ -29,10 +29,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
29
29
|
}] } });
|
|
30
30
|
|
|
31
31
|
class GovukCheckboxesDividerComponent {
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
33
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukCheckboxesDividerComponent, isStandalone: true, selector: "opal-lib-govuk-checkboxes-divider", ngImport: i0, template: "<div class=\"govuk-checkboxes__divider\"><ng-content></ng-content></div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesDividerComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{ selector: 'opal-lib-govuk-checkboxes-divider', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-checkboxes__divider\"><ng-content></ng-content></div>\n" }]
|
|
38
38
|
}] });
|
|
@@ -53,10 +53,10 @@ class GovukCheckboxesItemComponent {
|
|
|
53
53
|
get getControl() {
|
|
54
54
|
return this._control;
|
|
55
55
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukCheckboxesItemComponent, isStandalone: true, selector: "opal-lib-govuk-checkboxes-item, [opal-lib-govuk-checkboxes-item]", inputs: { labelText: "labelText", labelClasses: "labelClasses", inputId: "inputId", inputName: "inputName", inputClasses: "inputClasses", ariaControls: "ariaControls", control: "control" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<input\n class=\"govuk-checkboxes__input {{ inputClasses }}\"\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"checkbox\"\n [formControl]=\"getControl\"\n [attr.data-aria-controls]=\"ariaControls\"\n/>\n\n<label class=\"govuk-label govuk-checkboxes__label {{ labelClasses }}\" [for]=\"inputId\"> {{ labelText }} </label>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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 });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesItemComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{ selector: 'opal-lib-govuk-checkboxes-item, [opal-lib-govuk-checkboxes-item]', imports: [CommonModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<input\n class=\"govuk-checkboxes__input {{ inputClasses }}\"\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"checkbox\"\n [formControl]=\"getControl\"\n [attr.data-aria-controls]=\"ariaControls\"\n/>\n\n<label class=\"govuk-label govuk-checkboxes__label {{ labelClasses }}\" [for]=\"inputId\"> {{ labelText }} </label>\n" }]
|
|
62
62
|
}], propDecorators: { labelText: [{
|
|
@@ -91,10 +91,10 @@ class GovukCheckboxesComponent {
|
|
|
91
91
|
legendHint;
|
|
92
92
|
legendClasses;
|
|
93
93
|
checkboxClasses;
|
|
94
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
95
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: GovukCheckboxesComponent, isStandalone: true, selector: "opal-lib-govuk-checkboxes", inputs: { fieldSetId: "fieldSetId", legendText: "legendText", legendHint: "legendHint", legendClasses: "legendClasses", checkboxClasses: "checkboxClasses" }, ngImport: i0, template: "<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" [id]=\"fieldSetId\" [attr.aria-describedby]=\"fieldSetId\">\n <legend class=\"govuk-fieldset__legend {{ legendClasses }}\" [attr.describedby]=\"fieldSetId\">\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n\n <div class=\"govuk-checkboxes {{ checkboxClasses }}\" data-module=\"govuk-checkboxes\">\n <ng-content></ng-content>\n </div>\n </fieldset>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukCheckboxesComponent, decorators: [{
|
|
98
98
|
type: Component,
|
|
99
99
|
args: [{ selector: 'opal-lib-govuk-checkboxes', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" [id]=\"fieldSetId\" [attr.aria-describedby]=\"fieldSetId\">\n <legend class=\"govuk-fieldset__legend {{ legendClasses }}\" [attr.describedby]=\"fieldSetId\">\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n\n <div class=\"govuk-checkboxes {{ checkboxClasses }}\" data-module=\"govuk-checkboxes\">\n <ng-content></ng-content>\n </div>\n </fieldset>\n</div>\n" }]
|
|
100
100
|
}], propDecorators: { fieldSetId: [{
|
|
@@ -20,10 +20,10 @@ class GovukDateInputComponent {
|
|
|
20
20
|
get getGroup() {
|
|
21
21
|
return this._group;
|
|
22
22
|
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
24
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukDateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: GovukDateInputComponent, isStandalone: true, selector: "opal-lib-govuk-date-input", inputs: { fieldSetId: "fieldSetId", legendText: "legendText", legendHint: "legendHint", legendClasses: "legendClasses", errorDay: "errorDay", errorMonth: "errorMonth", errorYear: "errorYear", dateInputs: "dateInputs", group: "group" }, ngImport: i0, template: "<div\n class=\"govuk-form-group\"\n [formGroup]=\"getGroup\"\n [class.govuk-form-group--error]=\"!!errorDay || !!errorMonth || !!errorYear\"\n>\n <fieldset class=\"govuk-fieldset\" role=\"group\" [id]=\"fieldSetId\">\n <legend\n class=\"govuk-fieldset__legend {{ legendClasses }}\"\n [attr.describedby]=\"legendHint ? fieldSetId + 'Hint' : ''\"\n >\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n @if (errorDay || errorMonth || errorYear) {\n <p id=\"{{ this.fieldSetId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errorDay || errorMonth || errorYear }}\n </p>\n }\n <div class=\"govuk-date-input\" id=\"passport-issued\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.day.inputId\">\n {{ dateInputs.day.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.day.inputClasses }}\"\n [class.govuk-input--error]=\"errorDay && errorDay !== null\"\n [id]=\"dateInputs.day.inputId\"\n [name]=\"dateInputs.day.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.day.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.month.inputId\">\n {{ dateInputs.month.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.month.inputClasses }}\"\n [class.govuk-input--error]=\"errorMonth && errorMonth !== null\"\n [id]=\"dateInputs.month.inputId\"\n [name]=\"dateInputs.month.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.month.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.year.inputId\">\n {{ dateInputs.year.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.year.inputClasses }}\"\n [class.govuk-input--error]=\"errorYear && errorYear !== null\"\n [id]=\"dateInputs.year.inputId\"\n [name]=\"dateInputs.year.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.year.inputId }}\"\n />\n </div>\n </div>\n </div>\n </fieldset>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukDateInputComponent, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
28
|
args: [{ selector: 'opal-lib-govuk-date-input', imports: [CommonModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"govuk-form-group\"\n [formGroup]=\"getGroup\"\n [class.govuk-form-group--error]=\"!!errorDay || !!errorMonth || !!errorYear\"\n>\n <fieldset class=\"govuk-fieldset\" role=\"group\" [id]=\"fieldSetId\">\n <legend\n class=\"govuk-fieldset__legend {{ legendClasses }}\"\n [attr.describedby]=\"legendHint ? fieldSetId + 'Hint' : ''\"\n >\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n @if (errorDay || errorMonth || errorYear) {\n <p id=\"{{ this.fieldSetId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errorDay || errorMonth || errorYear }}\n </p>\n }\n <div class=\"govuk-date-input\" id=\"passport-issued\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.day.inputId\">\n {{ dateInputs.day.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.day.inputClasses }}\"\n [class.govuk-input--error]=\"errorDay && errorDay !== null\"\n [id]=\"dateInputs.day.inputId\"\n [name]=\"dateInputs.day.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.day.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.month.inputId\">\n {{ dateInputs.month.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.month.inputClasses }}\"\n [class.govuk-input--error]=\"errorMonth && errorMonth !== null\"\n [id]=\"dateInputs.month.inputId\"\n [name]=\"dateInputs.month.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.month.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.year.inputId\">\n {{ dateInputs.year.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.year.inputClasses }}\"\n [class.govuk-input--error]=\"errorYear && errorYear !== null\"\n [id]=\"dateInputs.year.inputId\"\n [name]=\"dateInputs.year.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.year.inputId }}\"\n />\n </div>\n </div>\n </div>\n </fieldset>\n</div>\n" }]
|
|
29
29
|
}], propDecorators: { fieldSetId: [{
|
|
@@ -3,10 +3,10 @@ import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
class GovukDetailsComponent {
|
|
5
5
|
summaryText;
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: GovukDetailsComponent, isStandalone: true, selector: "opal-lib-govuk-details", inputs: { summaryText: "summaryText" }, ngImport: i0, template: "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\"> {{ summaryText }} </span>\n </summary>\n <div class=\"govuk-details__text\">\n <ng-content></ng-content>\n </div>\n</details>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukDetailsComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'opal-lib-govuk-details', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\"> {{ summaryText }} </span>\n </summary>\n <div class=\"govuk-details__text\">\n <ng-content></ng-content>\n </div>\n</details>\n" }]
|
|
12
12
|
}], propDecorators: { summaryText: [{
|
|
@@ -14,10 +14,10 @@ class GovukErrorSummaryComponent {
|
|
|
14
14
|
event.preventDefault();
|
|
15
15
|
this.errorClick.emit(fieldId);
|
|
16
16
|
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukErrorSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: GovukErrorSummaryComponent, isStandalone: true, selector: "opal-lib-govuk-error-summary", inputs: { errors: "errors" }, outputs: { errorClick: "errorClick" }, ngImport: i0, template: "@if (errors && errors.length > 0) {\n <div class=\"govuk-error-summary\" tabindex=\"-1\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">There is a problem</h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n @for (error of errors; track error.fieldId) {\n <li>\n <a href=\"#\" (click)=\"handleErrorClick($event, error.fieldId)\">{{ error.message }}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n </div>\n}\n" });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GovukErrorSummaryComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'opal-lib-govuk-error-summary', imports: [], template: "@if (errors && errors.length > 0) {\n <div class=\"govuk-error-summary\" tabindex=\"-1\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">There is a problem</h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n @for (error of errors; track error.fieldId) {\n <li>\n <a href=\"#\" (click)=\"handleErrorClick($event, error.fieldId)\">{{ error.message }}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n </div>\n}\n" }]
|
|
23
23
|
}], propDecorators: { errors: [{
|