@hmcts/opal-frontend-common 0.0.14 → 0.0.16

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.
Files changed (74) hide show
  1. package/components/abstract/abstract-tab-data/abstract-tab-data.d.ts +83 -0
  2. package/components/abstract/abstract-tab-data/index.d.ts +5 -0
  3. package/components/abstract/abstract-tab-data/public-api.d.ts +1 -0
  4. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
  5. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
  6. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
  7. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +3 -3
  8. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
  9. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
  10. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs +122 -0
  11. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map +1 -0
  12. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
  13. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
  14. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
  15. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
  16. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
  17. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
  18. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
  19. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
  20. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
  21. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
  22. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
  23. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
  24. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
  25. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
  26. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
  27. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
  28. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
  29. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
  30. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
  31. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
  32. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
  33. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +9 -9
  34. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
  35. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
  36. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
  37. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
  38. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
  39. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
  40. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-banner.mjs +3 -3
  41. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +6 -6
  42. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
  43. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
  44. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
  45. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
  46. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +12 -12
  47. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
  48. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
  49. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
  50. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
  51. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
  52. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
  53. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-ZkhlgRu3.mjs → hmcts-opal-frontend-common-pages-access-denied.component-hjYG8Hhi.mjs} +4 -4
  54. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-ZkhlgRu3.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-hjYG8Hhi.mjs.map} +1 -1
  55. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-DJHx_NdT.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-CMgQc0uF.mjs} +4 -4
  56. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-DJHx_NdT.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-CMgQc0uF.mjs.map} +1 -1
  57. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-B6sVdhPh.mjs → hmcts-opal-frontend-common-pages-sign-in.component-UHSDf5ya.mjs} +4 -4
  58. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-B6sVdhPh.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-UHSDf5ya.mjs.map} +1 -1
  59. package/fesm2022/hmcts-opal-frontend-common-pages.mjs +2 -2
  60. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
  61. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
  62. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
  63. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
  64. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
  65. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
  66. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
  67. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
  68. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +3 -3
  69. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +3 -3
  70. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
  71. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
  72. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
  73. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
  74. package/package.json +6 -1
@@ -0,0 +1,83 @@
1
+ import { ActivatedRoute } from '@angular/router';
2
+ import { Observable } from 'rxjs';
3
+ export declare abstract class AbstractTabData {
4
+ private readonly router;
5
+ readonly activatedRoute: ActivatedRoute;
6
+ activeTab: string;
7
+ /**
8
+ * Creates an observable stream that fetches and transforms data based on the current tab.
9
+ *
10
+ * 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 fragment$ - An observable emitting the current tab identifier.
16
+ * @param getParams - A function that returns parameters for data fetching based on the tab.
17
+ * @param fetchData - A function that fetches data as an observable, given the parameters.
18
+ * @param transform - A function to transform the fetched data before emission.
19
+ * @returns An observable emitting the transformed fetched data, depending on the current tab.
20
+ */
21
+ private createConditionalStream;
22
+ /**
23
+ * Returns an observable stream of the current URL fragment, starting with the initial fragment or a default tab.
24
+ *
25
+ * This method listens to changes in the route fragment and emits the fragment value as a string.
26
+ * It starts with the current fragment (or the provided default tab if none exists), filters out falsy values,
27
+ * ensures only distinct values are emitted, and completes when the provided `destroy$` observable emits.
28
+ *
29
+ * @param defaultTab - The default tab to use if no fragment is present in the route snapshot.
30
+ * @param destroy$ - An observable that signals when to complete the fragment stream.
31
+ * @returns An observable emitting the current fragment string, updating on changes, and completing on destroy.
32
+ */
33
+ protected getFragmentStream(defaultTab: string, destroy$: Observable<void>): Observable<string>;
34
+ /**
35
+ * Wraps a fragment stream and executes the provided callback on each tab change.
36
+ *
37
+ * @param fragment$ - The fragment observable stream.
38
+ * @param clearFn - A function to execute when the tab changes.
39
+ * @returns The fragment stream with a side-effect to run `clearFn` on each emission.
40
+ */
41
+ protected clearCacheOnTabChange(fragment$: Observable<string>, clearFn: () => void): Observable<string>;
42
+ /**
43
+ * Creates an observable data stream for a tab, transforming the fetched data as needed.
44
+ *
45
+ * @template T The type of the data fetched.
46
+ * @template R The type of the transformed data.
47
+ * @param fragment$ An observable emitting the current tab fragment.
48
+ * @param getParams A function that returns fetch parameters based on the tab.
49
+ * @param fetchData A function that fetches data given the parameters.
50
+ * @param transform A function to transform the fetched data.
51
+ * @returns An observable emitting the transformed data for the current tab.
52
+ */
53
+ createTabDataStream<T, R>(fragment$: Observable<string>, getParams: (tab?: string) => any, fetchData: (params: any) => Observable<T>, transform: (data: T) => R): Observable<R>;
54
+ /**
55
+ * Creates an observable stream that emits a formatted count string based on the current tab and fragment.
56
+ *
57
+ * @template T - The type of the data returned by the fetchCount observable.
58
+ * @param fragment$ - An observable emitting the current fragment or tab identifier.
59
+ * @param getParams - A function that returns the parameters required for fetching the count.
60
+ * @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.
61
+ * @param extractCount - A function that extracts the numeric count from the fetched data.
62
+ * @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.
63
+ * @returns An observable that emits the formatted count string whenever the fragment or parameters change.
64
+ */
65
+ createCountStream<T>(fragment$: Observable<string>, getParams: (tab?: string) => any, fetchCount: (params: any) => Observable<T>, extractCount: (data: T) => number, formatFn?: (count: number) => string): Observable<string>;
66
+ /**
67
+ * Handles the tab switch by updating the active tab and triggering a router fragment update.
68
+ *
69
+ * @param fragment - The identifier of the tab to activate.
70
+ */
71
+ handleTabSwitch(fragment: string): void;
72
+ /**
73
+ * Formats a count value, capping it at a specified maximum.
74
+ *
75
+ * If the count exceeds the cap, returns a string in the format "{cap}+".
76
+ * Otherwise, returns the count as a string.
77
+ *
78
+ * @param count - The number to format.
79
+ * @param cap - The maximum value to display before capping.
80
+ * @returns A string representing the count, capped if necessary.
81
+ */
82
+ formatCountWithCap(count: number, cap: number): string;
83
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@hmcts/opal-frontend-common/components/abstract/abstract-tab-data" />
5
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ export * from './abstract-tab-data';
@@ -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.11", ngImport: i0, type: AbstractFormAliasBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
194
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractFormAliasBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormAliasBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
194
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractFormAliasBaseComponent, decorators: [{
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormAliasBaseComponent, decorators: [{
197
197
  type: Component,
198
198
  args: [{
199
199
  template: '',
@@ -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.11", ngImport: i0, type: AbstractFormArrayBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
238
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractFormArrayBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
237
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormArrayBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
238
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractFormArrayBaseComponent, decorators: [{
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormArrayBaseComponent, decorators: [{
241
241
  type: Component,
242
242
  args: [{
243
243
  template: '',
@@ -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.11", ngImport: i0, type: AbstractFormArrayRemovalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractFormArrayRemovalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormArrayRemovalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AbstractFormArrayRemovalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
82
82
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AbstractFormArrayRemovalComponent, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractFormBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
475
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractFormBaseComponent, isStandalone: true, selector: "ng-component", outputs: { unsavedChanges: "unsavedChanges", formSubmit: "formSubmit" }, ngImport: i0, template: '', isInline: true });
474
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractFormBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
475
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractFormBaseComponent, decorators: [{
477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
49
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
49
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractSortableTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, ngImport: i0, template: '', isInline: true });
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractSortableTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
132
132
  type: Component,
133
133
  args: [{
134
134
  template: '',
@@ -0,0 +1,122 @@
1
+ import { inject } from '@angular/core';
2
+ import { Router, ActivatedRoute } from '@angular/router';
3
+ import { switchMap, map, shareReplay, startWith, filter, distinctUntilChanged, takeUntil, tap } from 'rxjs';
4
+
5
+ class AbstractTabData {
6
+ router = inject(Router);
7
+ activatedRoute = inject(ActivatedRoute);
8
+ activeTab;
9
+ /**
10
+ * Creates an observable stream that fetches and transforms data based on the current tab.
11
+ *
12
+ * It fetches data using the `fetchData` function with parameters obtained from `getParams`,
13
+ * transforms the result using the `transform` function, and shares the result among subscribers.
14
+ *
15
+ * @template T The type of data returned by the fetchData observable.
16
+ * @template U The type of the value emitted by the resulting observable.
17
+ * @param fragment$ - An observable emitting the current tab identifier.
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 the transformed fetched data, depending on the current tab.
22
+ */
23
+ createConditionalStream(fragment$,
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ getParams,
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ fetchData, transform) {
28
+ return fragment$.pipe(switchMap((tab) => fetchData(getParams(tab)).pipe(map(transform), shareReplay(1))));
29
+ }
30
+ /**
31
+ * Returns an observable stream of the current URL fragment, starting with the initial fragment or a default tab.
32
+ *
33
+ * This method listens to changes in the route fragment and emits the fragment value as a string.
34
+ * It starts with the current fragment (or the provided default tab if none exists), filters out falsy values,
35
+ * ensures only distinct values are emitted, and completes when the provided `destroy$` observable emits.
36
+ *
37
+ * @param defaultTab - The default tab to use if no fragment is present in the route snapshot.
38
+ * @param destroy$ - An observable that signals when to complete the fragment stream.
39
+ * @returns An observable emitting the current fragment string, updating on changes, and completing on destroy.
40
+ */
41
+ getFragmentStream(defaultTab, destroy$) {
42
+ return this.activatedRoute.fragment.pipe(startWith(this.activatedRoute.snapshot.fragment ?? defaultTab), filter((frag) => !!frag), map((tab) => tab), distinctUntilChanged(), takeUntil(destroy$));
43
+ }
44
+ /**
45
+ * Wraps a fragment stream and executes the provided callback on each tab change.
46
+ *
47
+ * @param fragment$ - The fragment observable stream.
48
+ * @param clearFn - A function to execute when the tab changes.
49
+ * @returns The fragment stream with a side-effect to run `clearFn` on each emission.
50
+ */
51
+ clearCacheOnTabChange(fragment$, clearFn) {
52
+ return fragment$.pipe(tap(() => clearFn()));
53
+ }
54
+ /**
55
+ * Creates an observable data stream for a tab, transforming the fetched data as needed.
56
+ *
57
+ * @template T The type of the data fetched.
58
+ * @template R The type of the transformed data.
59
+ * @param fragment$ An observable emitting the current tab fragment.
60
+ * @param getParams A function that returns fetch parameters based on the tab.
61
+ * @param fetchData A function that fetches data given the parameters.
62
+ * @param transform A function to transform the fetched data.
63
+ * @returns An observable emitting the transformed data for the current tab.
64
+ */
65
+ createTabDataStream(fragment$,
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ getParams,
68
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
69
+ fetchData, transform) {
70
+ return this.createConditionalStream(fragment$, getParams, fetchData, transform);
71
+ }
72
+ /**
73
+ * Creates an observable stream that emits a formatted count string based on the current tab and fragment.
74
+ *
75
+ * @template T - The type of the data returned by the fetchCount observable.
76
+ * @param fragment$ - An observable emitting the current fragment or tab identifier.
77
+ * @param getParams - A function that returns the parameters required for fetching the count.
78
+ * @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.
79
+ * @param extractCount - A function that extracts the numeric count from the fetched data.
80
+ * @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.
81
+ * @returns An observable that emits the formatted count string whenever the fragment or parameters change.
82
+ */
83
+ createCountStream(fragment$,
84
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
+ getParams,
86
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
+ fetchCount, extractCount, formatFn = (c) => `${c}`) {
88
+ return fragment$.pipe(switchMap((tab) => fetchCount(getParams(tab)).pipe(map((data) => formatFn(extractCount(data))), shareReplay(1))));
89
+ }
90
+ /**
91
+ * Handles the tab switch by updating the active tab and triggering a router fragment update.
92
+ *
93
+ * @param fragment - The identifier of the tab to activate.
94
+ */
95
+ handleTabSwitch(fragment) {
96
+ this.activeTab = fragment;
97
+ this.router.navigate([], {
98
+ relativeTo: this.activatedRoute.parent,
99
+ fragment,
100
+ });
101
+ }
102
+ /**
103
+ * Formats a count value, capping it at a specified maximum.
104
+ *
105
+ * If the count exceeds the cap, returns a string in the format "{cap}+".
106
+ * Otherwise, returns the count as a string.
107
+ *
108
+ * @param count - The number to format.
109
+ * @param cap - The maximum value to display before capping.
110
+ * @returns A string representing the count, capped if necessary.
111
+ */
112
+ formatCountWithCap(count, cap) {
113
+ return count > cap ? `${cap}+` : `${count}`;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Generated bundle index. Do not edit.
119
+ */
120
+
121
+ export { AbstractTabData };
122
+ //# 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, switchMap, map, shareReplay, distinctUntilChanged, filter, startWith, takeUntil, tap } from 'rxjs';\n\nexport abstract class AbstractTabData {\n private readonly router = inject(Router);\n public readonly activatedRoute = inject(ActivatedRoute);\n public activeTab!: string;\n\n /**\n * Creates an observable stream that fetches and transforms data based on the current tab.\n *\n * 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 fragment$ - An observable emitting the current tab identifier.\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 the transformed fetched data, depending on the current tab.\n */\n private createConditionalStream<T, U>(\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) => U,\n ): Observable<U> {\n return fragment$.pipe(switchMap((tab) => fetchData(getParams(tab)).pipe(map(transform), shareReplay(1))));\n }\n\n /**\n * Returns an observable stream of the current URL fragment, starting with the initial fragment or a default tab.\n *\n * This method listens to changes in the route fragment and emits the fragment value as a string.\n * It starts with the current fragment (or the provided default tab if none exists), filters out falsy values,\n * ensures only distinct values are emitted, and completes when the provided `destroy$` observable emits.\n *\n * @param defaultTab - The default tab to use if no fragment is present in the route snapshot.\n * @param destroy$ - An observable that signals when to complete the fragment stream.\n * @returns An observable emitting the current fragment string, updating on changes, and completing on destroy.\n */\n protected getFragmentStream(defaultTab: string, destroy$: Observable<void>): Observable<string> {\n return this.activatedRoute.fragment.pipe(\n startWith(this.activatedRoute.snapshot.fragment ?? defaultTab),\n filter((frag): frag is string => !!frag),\n map((tab) => tab),\n distinctUntilChanged(),\n takeUntil(destroy$),\n );\n }\n\n /**\n * Wraps a fragment stream and executes the provided callback on each tab change.\n *\n * @param fragment$ - The fragment observable stream.\n * @param clearFn - A function to execute when the tab changes.\n * @returns The fragment stream with a side-effect to run `clearFn` on each emission.\n */\n protected clearCacheOnTabChange(fragment$: Observable<string>, clearFn: () => void): Observable<string> {\n return fragment$.pipe(tap(() => clearFn()));\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 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 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>(fragment$, getParams, fetchData, transform);\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 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 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 fetchCount: (params: any) => Observable<T>,\n extractCount: (data: T) => number,\n formatFn: (count: number) => string = (c) => `${c}`,\n ): Observable<string> {\n return fragment$.pipe(\n switchMap((tab) =>\n fetchCount(getParams(tab)).pipe(\n map((data) => formatFn(extractCount(data))),\n shareReplay(1),\n ),\n ),\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;AACxB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,IAAA,SAAS;AAEhB;;;;;;;;;;;;;AAaG;AACK,IAAA,uBAAuB,CAC7B,SAA6B;;IAE7B,SAAgC;;AAEhC,IAAA,SAAyC,EACzC,SAAyB,EAAA;AAEzB,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;AAG3G;;;;;;;;;;AAUG;IACO,iBAAiB,CAAC,UAAkB,EAAE,QAA0B,EAAA;QACxE,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CACtC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,IAAI,UAAU,CAAC,EAC9D,MAAM,CAAC,CAAC,IAAI,KAAqB,CAAC,CAAC,IAAI,CAAC,EACxC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EACjB,oBAAoB,EAAE,EACtB,SAAS,CAAC,QAAQ,CAAC,CACpB;;AAGH;;;;;;AAMG;IACO,qBAAqB,CAAC,SAA6B,EAAE,OAAmB,EAAA;AAChF,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;;AAG7C;;;;;;;;;;AAUG;AACI,IAAA,mBAAmB,CACxB,SAA6B;;IAE7B,SAAgC;;AAEhC,IAAA,SAAyC,EACzC,SAAyB,EAAA;AAEzB,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAO,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;;AAGvF;;;;;;;;;;AAUG;AACI,IAAA,iBAAiB,CACtB,SAA6B;;IAE7B,SAAgC;;IAEhC,UAA0C,EAC1C,YAAiC,EACjC,QAAsC,GAAA,CAAC,CAAC,KAAK,CAAG,EAAA,CAAC,CAAE,CAAA,EAAA;QAEnD,OAAO,SAAS,CAAC,IAAI,CACnB,SAAS,CAAC,CAAC,GAAG,KACZ,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAC7B,GAAG,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAC3C,WAAW,CAAC,CAAC,CAAC,CACf,CACF,CACF;;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;;AChJD;;AAEG;;;;"}
@@ -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.11", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", 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 });
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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.11", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukAccordionComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukBackLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukBackLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukBackLinkComponent, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukButtonComponent, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCancelLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukCancelLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCancelLinkComponent, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesConditionalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukCheckboxesConditionalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesConditionalComponent, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukCheckboxesDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesDividerComponent, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
56
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukCheckboxesItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesItemComponent, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
95
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", 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 });
94
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukCheckboxesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
95
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukCheckboxesComponent, decorators: [{
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukDateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", 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 });
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukDateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukDateInputComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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 });
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GovukDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.11", ngImport: i0, type: GovukDetailsComponent, decorators: [{
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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: [{