@hmcts/opal-frontend-common 0.0.33 → 0.0.35
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-nested-form-base/README.md +89 -0
- package/components/abstract/abstract-nested-form-base/index.d.ts +78 -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-nested-form-base.mjs +141 -0
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map +1 -0
- 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-table-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +4 -4
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +4 -4
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-DE61xF9w.mjs → hmcts-opal-frontend-common-pages-access-denied.component-CGl13lxV.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-DE61xF9w.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-CGl13lxV.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-CGigL_1F.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-BqKx-kQk.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-CGigL_1F.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-BqKx-kQk.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-cs_m2MgL.mjs → hmcts-opal-frontend-common-pages-sign-in.component-gSWZ7kxd.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-cs_m2MgL.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-gSWZ7kxd.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-pipes-national-insurance.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Abstract Nested Form Base Component
|
|
2
|
+
|
|
3
|
+
This Angular component extends the `AbstractFormBaseComponent` and is designed for **nested sub-form components** that contribute their own controls and field-error messages into a parent form. It provides helpers for installing/removing nested controls, managing conditional validation, and spreading error definitions into the parent’s error maps.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Usage](#usage)
|
|
9
|
+
- [Responsibilities](#responsibilities)
|
|
10
|
+
- [Methods](#methods)
|
|
11
|
+
- [Error Handling](#error-handling)
|
|
12
|
+
- [Testing](#testing)
|
|
13
|
+
- [Contributing](#contributing)
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
To use the `AbstractNestedFormBaseComponent`, extend it in a nested sub-form component (e.g. Individuals, Companies, Creditors):
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { AbstractNestedFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-nested-form-base/abstract-nested-form-base.component';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
This component is intended to be extended by **child sub-forms** that plug into a parent form component. It ensures consistent handling of control installation, conditional validation, and error-message registration.
|
|
26
|
+
|
|
27
|
+
### Example Usage
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
@Component({
|
|
31
|
+
selector: 'app-child-sub-form',
|
|
32
|
+
templateUrl: './child-sub-form.component.html',
|
|
33
|
+
})
|
|
34
|
+
export class ChildSubFormComponent extends AbstractNestedFormBaseComponent implements OnInit, OnDestroy {
|
|
35
|
+
@Input({ required: true }) override form!: FormGroup;
|
|
36
|
+
|
|
37
|
+
public override ngOnInit(): void {
|
|
38
|
+
this.setupChildForm();
|
|
39
|
+
super.ngOnInit();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private setupChildForm(): void {
|
|
43
|
+
const controlsGroup = this.buildChildControls();
|
|
44
|
+
this.addControlsToNestedFormGroup(controlsGroup);
|
|
45
|
+
this.setupConditionalValidation();
|
|
46
|
+
this.rePopulateForm(/* values from store */);
|
|
47
|
+
this.handleConditionalValidation();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Responsibilities
|
|
53
|
+
|
|
54
|
+
- Install (and later remove) sub-form controls into an existing parent FormGroup.
|
|
55
|
+
- Provide ergonomic helpers for common validation flows:
|
|
56
|
+
- Toggle `required` validators.
|
|
57
|
+
- Reset and revalidate controls/groups.
|
|
58
|
+
- Subscribe to conditional validation with automatic teardown.
|
|
59
|
+
- Ensure proper cleanup on destroy (removes its own controls).
|
|
60
|
+
|
|
61
|
+
## Methods
|
|
62
|
+
|
|
63
|
+
| Method | Parameters | Description |
|
|
64
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `addControlsToNestedFormGroup` | `source: FormGroup, target?: FormGroup` | Installs detached controls into target form (defaults to `this.form`). |
|
|
66
|
+
| `removeControlsFromNestedFormGroup` | `source: FormGroup, target?: FormGroup` | Removes controls from target whose names are in `source`. |
|
|
67
|
+
| `setValidatorPresence` | `control: AbstractControl, validators: ValidatorFn \| ValidatorFn[], present: boolean` | Adds or removes one or more validators and updates validity. |
|
|
68
|
+
| `hasValue` | `v: unknown` | Utility to check if a value is considered present (non-null; non-empty string; all non-strings are true). |
|
|
69
|
+
| `resetAndValidateControls` | `controls: (AbstractControl \| null)[]` | Resets given controls, clears errors, reapplies validators. |
|
|
70
|
+
| `resetAndValidateFormGroup` | `group: FormGroup` | Resets entire group, marks pristine/untouched, updates validity. |
|
|
71
|
+
| `subscribeValidation` | `handler: () => void, ...controls` | Subscribes a handler to `valueChanges` of controls with auto-unsubscribe. |
|
|
72
|
+
|
|
73
|
+
## Error Handling
|
|
74
|
+
|
|
75
|
+
- Each sub-form is responsible only for its own validators and error state.
|
|
76
|
+
- The parent remains the single source of truth for fieldErrors and merges child error templates as needed.
|
|
77
|
+
- The abstract ensures cleanup by removing its own controls on destroy.
|
|
78
|
+
|
|
79
|
+
## Testing
|
|
80
|
+
|
|
81
|
+
Unit tests should verify:
|
|
82
|
+
|
|
83
|
+
- Controls are installed and removed correctly.
|
|
84
|
+
- Conditional validators are toggled and errors appear/disappear as expected.
|
|
85
|
+
- Lifecycle (`ngOnInit`, `ngOnDestroy`) ensures no leaks.
|
|
86
|
+
|
|
87
|
+
## Contributing
|
|
88
|
+
|
|
89
|
+
Contributions should maintain consistency with the base form component and Angular best practices. Add unit tests for any new helpers or changes to validation/error-handling logic.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { FormGroup, AbstractControl, ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare abstract class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {
|
|
6
|
+
/**
|
|
7
|
+
* Installs all controls from a **detached** builder group into a target FormGroup (defaults to `this.form`).
|
|
8
|
+
*
|
|
9
|
+
* @param source A FormGroup created locally (its controls must not already belong to another parent).
|
|
10
|
+
* @param target The FormGroup to install the controls into. Defaults to `this.form`.
|
|
11
|
+
*
|
|
12
|
+
* Notes:
|
|
13
|
+
* - This method **moves** the control instances from `source` into `target` (no cloning).
|
|
14
|
+
* - If a control already has a parent, Angular will throw when adding it to `target`.
|
|
15
|
+
*/
|
|
16
|
+
protected addControlsToNestedFormGroup(source: FormGroup, target?: FormGroup): void;
|
|
17
|
+
/**
|
|
18
|
+
* Removes controls from `target` whose names are present in `source` (defaults to `this.form`).
|
|
19
|
+
*
|
|
20
|
+
* @param source A FormGroup whose control names identify which controls to remove.
|
|
21
|
+
* @param target The FormGroup to remove controls from. Defaults to `this.form`.
|
|
22
|
+
*
|
|
23
|
+
* Use this with the same builder group you used to add controls so you only remove what you added.
|
|
24
|
+
*/
|
|
25
|
+
protected removeControlsFromNestedFormGroup(source: FormGroup, target?: FormGroup): void;
|
|
26
|
+
/**
|
|
27
|
+
* Adds or removes one or more validators on a control and updates validity without emitting events.
|
|
28
|
+
*
|
|
29
|
+
* @param control The control to modify. If null/undefined, the method no-ops and returns `false`.
|
|
30
|
+
* @param validators A single `ValidatorFn` or an array of `ValidatorFn`s to add/remove.
|
|
31
|
+
* @param present When `true`, validators are added; when `false`, the same validators are removed.
|
|
32
|
+
* @returns The `present` flag (for convenient inline use in conditionals).
|
|
33
|
+
*/
|
|
34
|
+
protected setValidatorPresence(control: AbstractControl | null, validators: ValidatorFn | ValidatorFn[], present: boolean): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Truthy-value helper used by multiple sub-forms.
|
|
37
|
+
*
|
|
38
|
+
* Returns `false` for `null`/`undefined`. For strings, trims whitespace and checks for non-zero length.
|
|
39
|
+
* For all other types, returns `true` (treat non-string values as present).
|
|
40
|
+
*/
|
|
41
|
+
protected hasValue(v: unknown): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Resets a list of controls and re-computes validity without emitting value-change events.
|
|
44
|
+
*
|
|
45
|
+
* For each control: clears errors, resets the value to `null`, and calls `updateValueAndValidity`.
|
|
46
|
+
* This means built-in validators (e.g. `required`) will be re-applied after reset.
|
|
47
|
+
*/
|
|
48
|
+
protected resetAndValidateControls(controls: (AbstractControl | null)[]): void;
|
|
49
|
+
/**
|
|
50
|
+
* Resets a FormGroup’s value/state and re-computes validity without emitting value-change events.
|
|
51
|
+
*
|
|
52
|
+
* Performs: `group.reset(undefined)`, marks pristine/untouched, then `updateValueAndValidity`.
|
|
53
|
+
*/
|
|
54
|
+
protected resetAndValidateFormGroup(group: FormGroup): void;
|
|
55
|
+
/**
|
|
56
|
+
* Subscribes a handler to the `valueChanges` of multiple controls, with auto-unsubscribe on destroy.
|
|
57
|
+
*
|
|
58
|
+
* @param handler Function invoked whenever **any** provided control emits a value change.
|
|
59
|
+
* @param controls One or more controls to observe; falsy entries are ignored.
|
|
60
|
+
*
|
|
61
|
+
* Implementation detail: merges the streams and unsubscribes via `takeUntil(this.ngUnsubscribe)`.
|
|
62
|
+
*/
|
|
63
|
+
protected subscribeValidation(handler: () => void, ...controls: (AbstractControl | null)[]): void;
|
|
64
|
+
/**
|
|
65
|
+
* @inheritdoc
|
|
66
|
+
*
|
|
67
|
+
* Handles cleanup logic when the component is destroyed.
|
|
68
|
+
*
|
|
69
|
+
* - Clears local child error definitions and emits an empty map to the parent.
|
|
70
|
+
* - Removes all controls added by this sub-form from the parent form, if nested.
|
|
71
|
+
* - Calls the base class's `ngOnDestroy` for additional teardown.
|
|
72
|
+
*/
|
|
73
|
+
ngOnDestroy(): void;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNestedFormBaseComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractNestedFormBaseComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { AbstractNestedFormBaseComponent };
|
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: "20.1.
|
|
194
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
193
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormAliasBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractFormAliasBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
195
195
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", 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: "20.1.
|
|
238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormArrayBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractFormArrayBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
239
239
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", 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: "20.1.
|
|
81
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormArrayRemovalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractFormArrayRemovalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormArrayRemovalComponent, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{
|
|
86
86
|
template: '',
|
|
@@ -483,10 +483,10 @@ class AbstractFormBaseComponent {
|
|
|
483
483
|
this.ngUnsubscribe.next();
|
|
484
484
|
this.ngUnsubscribe.complete();
|
|
485
485
|
}
|
|
486
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
487
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractFormBaseComponent, isStandalone: true, selector: "ng-component", outputs: { unsavedChanges: "unsavedChanges", formSubmit: "formSubmit" }, ngImport: i0, template: '', isInline: true });
|
|
488
488
|
}
|
|
489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractFormBaseComponent, decorators: [{
|
|
490
490
|
type: Component,
|
|
491
491
|
args: [{
|
|
492
492
|
template: '',
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';
|
|
4
|
+
import { merge } from 'rxjs';
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
|
+
|
|
7
|
+
class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {
|
|
8
|
+
/**
|
|
9
|
+
* Installs all controls from a **detached** builder group into a target FormGroup (defaults to `this.form`).
|
|
10
|
+
*
|
|
11
|
+
* @param source A FormGroup created locally (its controls must not already belong to another parent).
|
|
12
|
+
* @param target The FormGroup to install the controls into. Defaults to `this.form`.
|
|
13
|
+
*
|
|
14
|
+
* Notes:
|
|
15
|
+
* - This method **moves** the control instances from `source` into `target` (no cloning).
|
|
16
|
+
* - If a control already has a parent, Angular will throw when adding it to `target`.
|
|
17
|
+
*/
|
|
18
|
+
addControlsToNestedFormGroup(source, target = this.form) {
|
|
19
|
+
Object.entries(source.controls).forEach(([name, ctrl]) => {
|
|
20
|
+
target.addControl(name, ctrl);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Removes controls from `target` whose names are present in `source` (defaults to `this.form`).
|
|
25
|
+
*
|
|
26
|
+
* @param source A FormGroup whose control names identify which controls to remove.
|
|
27
|
+
* @param target The FormGroup to remove controls from. Defaults to `this.form`.
|
|
28
|
+
*
|
|
29
|
+
* Use this with the same builder group you used to add controls so you only remove what you added.
|
|
30
|
+
*/
|
|
31
|
+
removeControlsFromNestedFormGroup(source, target = this.form) {
|
|
32
|
+
Object.keys(source.controls).forEach((name) => {
|
|
33
|
+
target.removeControl(name);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Adds or removes one or more validators on a control and updates validity without emitting events.
|
|
38
|
+
*
|
|
39
|
+
* @param control The control to modify. If null/undefined, the method no-ops and returns `false`.
|
|
40
|
+
* @param validators A single `ValidatorFn` or an array of `ValidatorFn`s to add/remove.
|
|
41
|
+
* @param present When `true`, validators are added; when `false`, the same validators are removed.
|
|
42
|
+
* @returns The `present` flag (for convenient inline use in conditionals).
|
|
43
|
+
*/
|
|
44
|
+
setValidatorPresence(control, validators, present) {
|
|
45
|
+
if (!control)
|
|
46
|
+
return false;
|
|
47
|
+
const list = Array.isArray(validators) ? validators : [validators];
|
|
48
|
+
if (present) {
|
|
49
|
+
control.addValidators(list);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
control.removeValidators(list);
|
|
53
|
+
}
|
|
54
|
+
control.updateValueAndValidity({ emitEvent: false, onlySelf: true });
|
|
55
|
+
return present;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Truthy-value helper used by multiple sub-forms.
|
|
59
|
+
*
|
|
60
|
+
* Returns `false` for `null`/`undefined`. For strings, trims whitespace and checks for non-zero length.
|
|
61
|
+
* For all other types, returns `true` (treat non-string values as present).
|
|
62
|
+
*/
|
|
63
|
+
hasValue(v) {
|
|
64
|
+
if (v == null)
|
|
65
|
+
return false;
|
|
66
|
+
return typeof v === 'string' ? v.trim().length > 0 : true;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Resets a list of controls and re-computes validity without emitting value-change events.
|
|
70
|
+
*
|
|
71
|
+
* For each control: clears errors, resets the value to `null`, and calls `updateValueAndValidity`.
|
|
72
|
+
* This means built-in validators (e.g. `required`) will be re-applied after reset.
|
|
73
|
+
*/
|
|
74
|
+
resetAndValidateControls(controls) {
|
|
75
|
+
controls.forEach((c) => {
|
|
76
|
+
if (!c)
|
|
77
|
+
return;
|
|
78
|
+
c.setErrors(null);
|
|
79
|
+
c.reset(null, { emitEvent: false });
|
|
80
|
+
c.updateValueAndValidity({ emitEvent: false, onlySelf: true });
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Resets a FormGroup’s value/state and re-computes validity without emitting value-change events.
|
|
85
|
+
*
|
|
86
|
+
* Performs: `group.reset(undefined)`, marks pristine/untouched, then `updateValueAndValidity`.
|
|
87
|
+
*/
|
|
88
|
+
resetAndValidateFormGroup(group) {
|
|
89
|
+
group.reset(undefined, { emitEvent: false });
|
|
90
|
+
group.markAsPristine();
|
|
91
|
+
group.markAsUntouched();
|
|
92
|
+
group.updateValueAndValidity({ emitEvent: false, onlySelf: true });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Subscribes a handler to the `valueChanges` of multiple controls, with auto-unsubscribe on destroy.
|
|
96
|
+
*
|
|
97
|
+
* @param handler Function invoked whenever **any** provided control emits a value change.
|
|
98
|
+
* @param controls One or more controls to observe; falsy entries are ignored.
|
|
99
|
+
*
|
|
100
|
+
* Implementation detail: merges the streams and unsubscribes via `takeUntil(this.ngUnsubscribe)`.
|
|
101
|
+
*/
|
|
102
|
+
subscribeValidation(handler, ...controls) {
|
|
103
|
+
const streams = controls.filter(Boolean).map((c) => c.valueChanges);
|
|
104
|
+
if (!streams.length)
|
|
105
|
+
return;
|
|
106
|
+
merge(...streams)
|
|
107
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
108
|
+
.subscribe(handler);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @inheritdoc
|
|
112
|
+
*
|
|
113
|
+
* Handles cleanup logic when the component is destroyed.
|
|
114
|
+
*
|
|
115
|
+
* - Clears local child error definitions and emits an empty map to the parent.
|
|
116
|
+
* - Removes all controls added by this sub-form from the parent form, if nested.
|
|
117
|
+
* - Calls the base class's `ngOnDestroy` for additional teardown.
|
|
118
|
+
*/
|
|
119
|
+
ngOnDestroy() {
|
|
120
|
+
// Remove controls this sub-form added to the parent (if nested)
|
|
121
|
+
if (this.form?.parent) {
|
|
122
|
+
Object.keys(this.form.controls).forEach((name) => this.form.removeControl(name));
|
|
123
|
+
}
|
|
124
|
+
super.ngOnDestroy();
|
|
125
|
+
}
|
|
126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractNestedFormBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractNestedFormBaseComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
128
|
+
}
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractNestedFormBaseComponent, decorators: [{
|
|
130
|
+
type: Component,
|
|
131
|
+
args: [{
|
|
132
|
+
template: '',
|
|
133
|
+
}]
|
|
134
|
+
}] });
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Generated bundle index. Do not edit.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
export { AbstractNestedFormBaseComponent };
|
|
141
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map
|
package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/abstract-nested-form-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { AbstractControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';\nimport { merge } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {\n /**\n * Installs all controls from a **detached** builder group into a target FormGroup (defaults to `this.form`).\n *\n * @param source A FormGroup created locally (its controls must not already belong to another parent).\n * @param target The FormGroup to install the controls into. Defaults to `this.form`.\n *\n * Notes:\n * - This method **moves** the control instances from `source` into `target` (no cloning).\n * - If a control already has a parent, Angular will throw when adding it to `target`.\n */\n protected addControlsToNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n Object.entries(source.controls).forEach(([name, ctrl]) => {\n target.addControl(name, ctrl);\n });\n }\n\n /**\n * Removes controls from `target` whose names are present in `source` (defaults to `this.form`).\n *\n * @param source A FormGroup whose control names identify which controls to remove.\n * @param target The FormGroup to remove controls from. Defaults to `this.form`.\n *\n * Use this with the same builder group you used to add controls so you only remove what you added.\n */\n protected removeControlsFromNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n Object.keys(source.controls).forEach((name) => {\n target.removeControl(name);\n });\n }\n\n /**\n * Adds or removes one or more validators on a control and updates validity without emitting events.\n *\n * @param control The control to modify. If null/undefined, the method no-ops and returns `false`.\n * @param validators A single `ValidatorFn` or an array of `ValidatorFn`s to add/remove.\n * @param present When `true`, validators are added; when `false`, the same validators are removed.\n * @returns The `present` flag (for convenient inline use in conditionals).\n */\n protected setValidatorPresence(\n control: AbstractControl | null,\n validators: ValidatorFn | ValidatorFn[],\n present: boolean,\n ): boolean {\n if (!control) return false;\n const list = Array.isArray(validators) ? validators : [validators];\n if (present) {\n control.addValidators(list);\n } else {\n control.removeValidators(list);\n }\n control.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n return present;\n }\n\n /**\n * Truthy-value helper used by multiple sub-forms.\n *\n * Returns `false` for `null`/`undefined`. For strings, trims whitespace and checks for non-zero length.\n * For all other types, returns `true` (treat non-string values as present).\n */\n protected hasValue(v: unknown): boolean {\n if (v == null) return false;\n return typeof v === 'string' ? v.trim().length > 0 : true;\n }\n\n /**\n * Resets a list of controls and re-computes validity without emitting value-change events.\n *\n * For each control: clears errors, resets the value to `null`, and calls `updateValueAndValidity`.\n * This means built-in validators (e.g. `required`) will be re-applied after reset.\n */\n protected resetAndValidateControls(controls: (AbstractControl | null)[]): void {\n controls.forEach((c) => {\n if (!c) return;\n c.setErrors(null);\n c.reset(null, { emitEvent: false });\n c.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n });\n }\n\n /**\n * Resets a FormGroup’s value/state and re-computes validity without emitting value-change events.\n *\n * Performs: `group.reset(undefined)`, marks pristine/untouched, then `updateValueAndValidity`.\n */\n protected resetAndValidateFormGroup(group: FormGroup): void {\n group.reset(undefined, { emitEvent: false });\n group.markAsPristine();\n group.markAsUntouched();\n group.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n }\n\n /**\n * Subscribes a handler to the `valueChanges` of multiple controls, with auto-unsubscribe on destroy.\n *\n * @param handler Function invoked whenever **any** provided control emits a value change.\n * @param controls One or more controls to observe; falsy entries are ignored.\n *\n * Implementation detail: merges the streams and unsubscribes via `takeUntil(this.ngUnsubscribe)`.\n */\n protected subscribeValidation(handler: () => void, ...controls: (AbstractControl | null)[]): void {\n const streams = controls.filter(Boolean).map((c) => c!.valueChanges);\n if (!streams.length) return;\n merge(...streams)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(handler);\n }\n\n /**\n * @inheritdoc\n *\n * Handles cleanup logic when the component is destroyed.\n *\n * - Clears local child error definitions and emits an empty map to the parent.\n * - Removes all controls added by this sub-form from the parent form, if nested.\n * - Calls the base class's `ngOnDestroy` for additional teardown.\n */\n public override ngOnDestroy(): void {\n // Remove controls this sub-form added to the parent (if nested)\n if (this.form?.parent) {\n Object.keys(this.form.controls).forEach((name) => this.form.removeControl(name));\n }\n\n super.ngOnDestroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
|
|
@@ -61,10 +61,10 @@ class AbstractSortableTablePaginationComponent extends AbstractSortableTableComp
|
|
|
61
61
|
const totalPages = Math.ceil(this.displayTableDataSignal().length / this.itemsPerPageSignal());
|
|
62
62
|
this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));
|
|
63
63
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
69
|
args: [{
|
|
70
70
|
template: '',
|
|
@@ -185,10 +185,10 @@ class AbstractSortableTableComponent extends AbstractTableFilterComponent {
|
|
|
185
185
|
this.onSortChange({ key, sortType });
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractSortableTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
190
190
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
|
|
192
192
|
type: Component,
|
|
193
193
|
args: [{
|
|
194
194
|
template: '',
|
|
@@ -168,10 +168,10 @@ class AbstractTableFilterComponent {
|
|
|
168
168
|
this.appliedKeyword.set(keyword);
|
|
169
169
|
this.applyFilterState();
|
|
170
170
|
}
|
|
171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
172
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractTableFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: AbstractTableFilterComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
173
173
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AbstractTableFilterComponent, decorators: [{
|
|
175
175
|
type: Component,
|
|
176
176
|
args: [{ template: '' }]
|
|
177
177
|
}] });
|
package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs
CHANGED
|
@@ -134,10 +134,10 @@ class AlphagovAccessibleAutocompleteComponent {
|
|
|
134
134
|
this.ngUnsubscribe.next();
|
|
135
135
|
this.ngUnsubscribe.complete();
|
|
136
136
|
}
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
|
|
141
141
|
type: Component,
|
|
142
142
|
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}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"] }]
|
|
143
143
|
}], ctorParameters: () => [], propDecorators: { labelText: [{
|
|
@@ -3,10 +3,10 @@ import { HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
class CustomAccountInformationItemLabelComponent {
|
|
5
5
|
hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-font-weight-bold govuk-!-margin-0';
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomAccountInformationItemLabelComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemLabelComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
12
12
|
}], propDecorators: { hostClass: [{
|
|
@@ -3,10 +3,10 @@ import { HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
class CustomAccountInformationItemValueComponent {
|
|
5
5
|
hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-margin-0';
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomAccountInformationItemValueComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemValueComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
12
12
|
}], propDecorators: { hostClass: [{
|
|
@@ -6,10 +6,10 @@ class CustomAccountInformationItemComponent {
|
|
|
6
6
|
get hostClass() {
|
|
7
7
|
return this.itemClasses;
|
|
8
8
|
}
|
|
9
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
10
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomAccountInformationItemComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item", inputs: { itemClasses: "itemClasses" }, host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationItemComponent, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{ selector: 'opal-lib-custom-account-information-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
15
15
|
}], propDecorators: { itemClasses: [{
|
package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class CustomAccountInformationComponent {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomAccountInformationComponent, isStandalone: true, selector: "opal-lib-custom-account-information, [opal-lib-custom-account-information]", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomAccountInformationComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'opal-lib-custom-account-information, [opal-lib-custom-account-information]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -10,10 +10,10 @@ class CustomActionLinksComponent {
|
|
|
10
10
|
get hostClass() {
|
|
11
11
|
return this.classSize;
|
|
12
12
|
}
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
14
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomActionLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomActionLinksComponent, isStandalone: true, selector: "opal-lib-custom-action-links", inputs: { id: "id", classSize: "classSize" }, host: { properties: { "attr.id": "this.hostId", "class": "this.hostClass" } }, ngImport: i0, template: "<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n" });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomActionLinksComponent, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: 'opal-lib-custom-action-links', template: "<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n" }]
|
|
19
19
|
}], propDecorators: { id: [{
|
package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class CustomHorizontalScrollPaneComponent {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomHorizontalScrollPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomHorizontalScrollPaneComponent, isStandalone: true, selector: "opal-lib-custom-horizontal-scroll-pane", ngImport: i0, template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomHorizontalScrollPaneComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'opal-lib-custom-horizontal-scroll-pane', template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] }]
|
|
11
11
|
}] });
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class CustomPageHeaderComponent {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CustomPageHeaderComponent, isStandalone: true, selector: "opal-lib-custom-page-header", ngImport: i0, template: "<div class=\"govuk-grid-row custom-grid-class\">\n <div class=\"govuk-grid-column-one-half\">\n <ng-content select=\"[pageHeaderHeading]\"></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-half custom-column-class\">\n <div class=\"moj-button-group moj-button-group--inline custom-button-group-class\">\n <ng-content select=\"[pageHeaderButtons]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".custom-grid-class{display:flex}.custom-column-class{display:flex;flex-direction:column;justify-content:end}.custom-button-group-class{justify-content:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomPageHeaderComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'opal-lib-custom-page-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row custom-grid-class\">\n <div class=\"govuk-grid-column-one-half\">\n <ng-content select=\"[pageHeaderHeading]\"></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-half custom-column-class\">\n <div class=\"moj-button-group moj-button-group--inline custom-button-group-class\">\n <ng-content select=\"[pageHeaderButtons]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".custom-grid-class{display:flex}.custom-column-class{display:flex;flex-direction:column;justify-content:end}.custom-button-group-class{justify-content:right}\n"] }]
|
|
11
11
|
}] });
|