@hmcts/ccd-case-ui-toolkit 7.2.51 → 7.2.52-3504
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/esm2022/lib/shared/components/palette/address/write-address-field.component.mjs +17 -11
- package/esm2022/lib/shared/components/palette/collection/write-collection-field.component.mjs +34 -26
- package/esm2022/lib/shared/components/palette/text/write-text-field.component.mjs +26 -20
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +74 -54
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts +1 -0
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9,18 +9,28 @@ import * as i4 from "../utils/first-error.pipe";
|
|
|
9
9
|
import * as i5 from "rpx-xui-translation";
|
|
10
10
|
const _c0 = a0 => ({ "form-group-error": a0 });
|
|
11
11
|
const _c1 = a0 => ({ "govuk-input--error": a0 });
|
|
12
|
-
function
|
|
13
|
-
i0.ɵɵelementStart(0, "span",
|
|
12
|
+
function WriteTextFieldComponent_label_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
14
14
|
i0.ɵɵtext(1);
|
|
15
15
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
16
16
|
i0.ɵɵelementEnd();
|
|
17
17
|
} if (rf & 2) {
|
|
18
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
18
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
19
19
|
i0.ɵɵadvance();
|
|
20
20
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
21
21
|
} }
|
|
22
|
-
function
|
|
23
|
-
i0.ɵɵelementStart(0, "
|
|
22
|
+
function WriteTextFieldComponent_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
i0.ɵɵelementStart(0, "label", 5);
|
|
24
|
+
i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_span_1_Template, 3, 3, "span", 6);
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
28
|
+
i0.ɵɵproperty("for", ctx_r0.id());
|
|
29
|
+
i0.ɵɵadvance();
|
|
30
|
+
i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
31
|
+
} }
|
|
32
|
+
function WriteTextFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
24
34
|
i0.ɵɵtext(1);
|
|
25
35
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
26
36
|
i0.ɵɵelementEnd();
|
|
@@ -29,8 +39,8 @@ function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
29
39
|
i0.ɵɵadvance();
|
|
30
40
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
31
41
|
} }
|
|
32
|
-
function
|
|
33
|
-
i0.ɵɵelementStart(0, "span",
|
|
42
|
+
function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
34
44
|
i0.ɵɵtext(1);
|
|
35
45
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
36
46
|
i0.ɵɵelementEnd();
|
|
@@ -48,31 +58,27 @@ export class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
|
48
58
|
$event.target.value = $event.target.value.trim();
|
|
49
59
|
}
|
|
50
60
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteTextFieldComponent_BaseFactory; return function WriteTextFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteTextFieldComponent_BaseFactory || (ɵWriteTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteTextFieldComponent)))(__ngFactoryType__ || WriteTextFieldComponent); }; })();
|
|
51
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
52
|
-
i0.ɵɵelementStart(0, "div", 0)
|
|
53
|
-
i0.ɵɵtemplate(2, WriteTextFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
54
|
-
i0.ɵɵ
|
|
55
|
-
i0.ɵɵ
|
|
56
|
-
i0.ɵɵelementStart(5, "input", 5);
|
|
57
|
-
i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_5_listener($event) { return ctx.onBlur($event); });
|
|
61
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-control", "bottom-30", 3, "blur", "ngClass", "id", "type", "formControl"], [3, "for"], ["class", "form-label", 4, "ngIf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteTextFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
63
|
+
i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_Template, 2, 2, "label", 1)(2, WriteTextFieldComponent_span_2_Template, 3, 3, "span", 2)(3, WriteTextFieldComponent_span_3_Template, 3, 4, "span", 3);
|
|
64
|
+
i0.ɵɵelementStart(4, "input", 4);
|
|
65
|
+
i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_4_listener($event) { return ctx.onBlur($event); });
|
|
58
66
|
i0.ɵɵelementEnd()();
|
|
59
67
|
} if (rf & 2) {
|
|
60
68
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
|
|
61
69
|
i0.ɵɵadvance();
|
|
62
|
-
i0.ɵɵproperty("
|
|
63
|
-
i0.ɵɵadvance();
|
|
64
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
70
|
+
i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
|
|
65
71
|
i0.ɵɵadvance();
|
|
66
72
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
67
73
|
i0.ɵɵadvance();
|
|
68
74
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
69
75
|
i0.ɵɵadvance();
|
|
70
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
76
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("type", ctx.caseField.hidden ? "hidden" : "text")("formControl", ctx.textControl);
|
|
71
77
|
} }, dependencies: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i3.FieldLabelPipe, i4.FirstErrorPipe, i5.RpxTranslatePipe], encapsulation: 2 });
|
|
72
78
|
}
|
|
73
79
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
|
|
74
80
|
type: Component,
|
|
75
|
-
args: [{ selector: 'ccd-write-text-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !!textControl && !textControl.valid && (textControl.dirty || textControl.touched)}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"textControl?.errors && (textControl.dirty || textControl.touched)\">\n {{textControl.errors | ccdFirstError:caseField.label}}\n </span>\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': textControl?.errors && (textControl.dirty || textControl.touched)}\"\n
|
|
81
|
+
args: [{ selector: 'ccd-write-text-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !!textControl && !textControl.valid && (textControl.dirty || textControl.touched)}\">\n <label [for]=\"id()\" *ngIf=\"!caseField.hidden\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"textControl?.errors && (textControl.dirty || textControl.touched)\">\n {{textControl.errors | ccdFirstError:caseField.label}}\n </span>\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': textControl?.errors && (textControl.dirty || textControl.touched)}\"\n [id]=\"id()\" [type]=\"caseField.hidden ? 'hidden' : 'text'\" [formControl]=\"textControl\" (blur)=\"onBlur($event)\">\n</div>\n" }]
|
|
76
82
|
}], null, null); })();
|
|
77
83
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteTextFieldComponent, { className: "WriteTextFieldComponent", filePath: "lib/shared/components/palette/text/write-text-field.component.ts", lineNumber: 9 }); })();
|
|
78
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGUtdGV4dC1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi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hbiBjbGFzcz1cImVycm9yLW1lc3NhZ2VcIiAqbmdJZj1cInRleHRDb250cm9sPy5lcnJvcnMgJiYgKHRleHRDb250cm9sLmRpcnR5IHx8IHRleHRDb250cm9sLnRvdWNoZWQpXCI+XG4gICAge3t0ZXh0Q29udHJvbC5lcnJvcnMgfCBjY2RGaXJzdEVycm9yOmNhc2VGaWVsZC5sYWJlbH19XG4gIDwvc3Bhbj5cbiAgPGlucHV0IGNsYXNzPVwiZm9ybS1jb250cm9sIGJvdHRvbS0zMFwiIFtuZ0NsYXNzXT1cInsnZ292dWstaW5wdXQtLWVycm9yJzogdGV4dENvbnRyb2w/LmVycm9ycyAmJiAodGV4dENvbnRyb2wuZGlydHkgfHwgdGV4dENvbnRyb2wudG91Y2hlZCl9XCJcbiAgICBbaWRdPVwiaWQoKVwiIFt0eXBlXT1cImNhc2VGaWVsZC5oaWRkZW4gPyAnaGlkZGVuJyA6ICd0ZXh0J1wiIFtmb3JtQ29udHJvbF09XCJ0ZXh0Q29udHJvbFwiIChibHVyKT1cIm9uQmx1cigkZXZlbnQpXCI+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -12444,17 +12444,19 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
|
|
|
12444
12444
|
i0.ɵɵelementEnd()();
|
|
12445
12445
|
} if (rf & 2) {
|
|
12446
12446
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
12447
|
-
i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(
|
|
12447
|
+
i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(14, _c1$o, ctx_r1.missingPostcode));
|
|
12448
12448
|
i0.ɵɵadvance();
|
|
12449
12449
|
i0.ɵɵproperty("for", ctx_r1.createElementId("postcodeInput"));
|
|
12450
12450
|
i0.ɵɵadvance(2);
|
|
12451
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4,
|
|
12451
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 10, "Enter a UK postcode"));
|
|
12452
12452
|
i0.ɵɵadvance(2);
|
|
12453
12453
|
i0.ɵɵproperty("ngIf", ctx_r1.missingPostcode);
|
|
12454
12454
|
i0.ɵɵadvance();
|
|
12455
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
12456
|
-
i0.ɵɵadvance(
|
|
12457
|
-
i0.ɵɵ
|
|
12455
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c2$3, ctx_r1.missingPostcode))("id", ctx_r1.createElementId("postcodeInput"))("formControl", ctx_r1.postcode);
|
|
12456
|
+
i0.ɵɵadvance();
|
|
12457
|
+
i0.ɵɵproperty("disabled", ctx_r1.loadingAddresses);
|
|
12458
|
+
i0.ɵɵadvance();
|
|
12459
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 12, ctx_r1.loadingAddresses ? "Finding addresses..." : "Find address"), " ");
|
|
12458
12460
|
} }
|
|
12459
12461
|
function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
12460
12462
|
i0.ɵɵelementStart(0, "span", 14);
|
|
@@ -12542,7 +12544,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
12542
12544
|
i0.ɵɵtext(2);
|
|
12543
12545
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
12544
12546
|
i0.ɵɵelementEnd();
|
|
12545
|
-
i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10,
|
|
12547
|
+
i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 18, "div", 5)(5, WriteAddressFieldComponent_div_1_div_5_Template, 10, 13, "div", 6)(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
|
|
12546
12548
|
i0.ɵɵelementEnd();
|
|
12547
12549
|
} if (rf & 2) {
|
|
12548
12550
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -12569,6 +12571,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12569
12571
|
errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
|
|
12570
12572
|
missingPostcode = false;
|
|
12571
12573
|
noAddressSelected = false;
|
|
12574
|
+
loadingAddresses = false;
|
|
12572
12575
|
constructor(addressesService, isCompoundPipe) {
|
|
12573
12576
|
super();
|
|
12574
12577
|
this.isCompoundPipe = isCompoundPipe;
|
|
@@ -12597,14 +12600,17 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12597
12600
|
}
|
|
12598
12601
|
else {
|
|
12599
12602
|
this.missingPostcode = false;
|
|
12603
|
+
this.loadingAddresses = true;
|
|
12600
12604
|
const postcode = this.postcode.value;
|
|
12601
12605
|
this.caseField.value = null;
|
|
12602
12606
|
this.addressOptions = [];
|
|
12603
|
-
this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe(result => {
|
|
12604
|
-
|
|
12607
|
+
this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe((result) => {
|
|
12608
|
+
this.loadingAddresses = false;
|
|
12609
|
+
result.forEach((address) => {
|
|
12605
12610
|
this.addressOptions.push(new AddressOption(address, null));
|
|
12606
12611
|
});
|
|
12607
12612
|
}, (error) => {
|
|
12613
|
+
this.loadingAddresses = false;
|
|
12608
12614
|
console.log(`An error occurred retrieving addresses for postcode ${postcode}. ${error}`);
|
|
12609
12615
|
});
|
|
12610
12616
|
this.addressList.setValue(undefined);
|
|
@@ -12682,7 +12688,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12682
12688
|
let _t;
|
|
12683
12689
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
12684
12690
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
|
|
12685
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [["writeComplexFieldComponent", ""], [1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "#", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "change", "id", "formControl"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "#", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
12691
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [["writeComplexFieldComponent", ""], [1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "#", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click", "disabled"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "change", "id", "formControl"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "#", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
12686
12692
|
i0.ɵɵelementStart(0, "div", 1);
|
|
12687
12693
|
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 2);
|
|
12688
12694
|
i0.ɵɵelement(2, "ccd-write-complex-type-field", 3, 0);
|
|
@@ -12697,7 +12703,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12697
12703
|
}
|
|
12698
12704
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
12699
12705
|
type: Component,
|
|
12700
|
-
args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\"
|
|
12706
|
+
args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\" [disabled]=\"loadingAddresses\">\n {{(loadingAddresses ? 'Finding addresses...' : 'Find address') | rpxTranslate}}\n </button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\" [ngClass]=\"{'form-group-error': noAddressSelected}\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"noAddressSelected\">{{errorMessage | rpxTranslate}}</span>\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngIf=\"addressOptions.length === 0\" [ngValue]=\"undefined\">\n {{'No address found' | rpxTranslate}}\n </option>\n <option *ngIf=\"addressOptions.length > 0\" [ngValue]=\"undefined\">\n {{addressOptions.length}} {{(addressOptions.length === 1 ? 'address found' : 'addresses found') | rpxTranslate}}\n </option>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress(); $event.preventDefault()\" href=\"#\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
|
|
12701
12707
|
}], () => [{ type: AddressesService }, { type: IsCompoundPipe }], { writeComplexFieldComponent: [{
|
|
12702
12708
|
type: ViewChild,
|
|
12703
12709
|
args: ['writeComplexFieldComponent', { static: false }]
|
|
@@ -14477,7 +14483,17 @@ class RemoveDialogComponent {
|
|
|
14477
14483
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RemoveDialogComponent, { className: "RemoveDialogComponent", filePath: "lib/shared/components/dialogs/remove-dialog/remove-dialog.component.ts", lineNumber: 9 }); })();
|
|
14478
14484
|
|
|
14479
14485
|
const _c0$T = ["collectionItem"];
|
|
14480
|
-
function
|
|
14486
|
+
function WriteCollectionFieldComponent_h2_2_Template(rf, ctx) { if (rf & 1) {
|
|
14487
|
+
i0.ɵɵelementStart(0, "h2", 7);
|
|
14488
|
+
i0.ɵɵtext(1);
|
|
14489
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
14490
|
+
i0.ɵɵelementEnd();
|
|
14491
|
+
} if (rf & 2) {
|
|
14492
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
14493
|
+
i0.ɵɵadvance();
|
|
14494
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField), " ");
|
|
14495
|
+
} }
|
|
14496
|
+
function WriteCollectionFieldComponent_h2_6_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
14481
14497
|
i0.ɵɵelementStart(0, "span", 10);
|
|
14482
14498
|
i0.ɵɵelement(1, "ccd-markdown", 11);
|
|
14483
14499
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -14487,7 +14503,7 @@ function WriteCollectionFieldComponent_h2_8_span_1_Template(rf, ctx) { if (rf &
|
|
|
14487
14503
|
i0.ɵɵadvance();
|
|
14488
14504
|
i0.ɵɵproperty("content", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
14489
14505
|
} }
|
|
14490
|
-
function
|
|
14506
|
+
function WriteCollectionFieldComponent_h2_6_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
14491
14507
|
i0.ɵɵelementStart(0, "span", 12);
|
|
14492
14508
|
i0.ɵɵtext(1);
|
|
14493
14509
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
@@ -14497,9 +14513,9 @@ function WriteCollectionFieldComponent_h2_8_span_2_Template(rf, ctx) { if (rf &
|
|
|
14497
14513
|
i0.ɵɵadvance();
|
|
14498
14514
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r0.formArray.errors, ctx_r0.caseField.label), " ");
|
|
14499
14515
|
} }
|
|
14500
|
-
function
|
|
14501
|
-
i0.ɵɵelementStart(0, "h2",
|
|
14502
|
-
i0.ɵɵtemplate(1,
|
|
14516
|
+
function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
|
|
14517
|
+
i0.ɵɵelementStart(0, "h2", 7);
|
|
14518
|
+
i0.ɵɵtemplate(1, WriteCollectionFieldComponent_h2_6_span_1_Template, 3, 3, "span", 8)(2, WriteCollectionFieldComponent_h2_6_span_2_Template, 3, 4, "span", 9);
|
|
14503
14519
|
i0.ɵɵelementEnd();
|
|
14504
14520
|
} if (rf & 2) {
|
|
14505
14521
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -14508,14 +14524,14 @@ function WriteCollectionFieldComponent_h2_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
14508
14524
|
i0.ɵɵadvance();
|
|
14509
14525
|
i0.ɵɵproperty("ngIf", ctx_r0.formArray.errors);
|
|
14510
14526
|
} }
|
|
14511
|
-
function
|
|
14527
|
+
function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
14512
14528
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
14513
14529
|
i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "label", 19)(6, "h3", 20);
|
|
14514
14530
|
i0.ɵɵtext(7);
|
|
14515
14531
|
i0.ɵɵpipe(8, "rpxTranslate");
|
|
14516
14532
|
i0.ɵɵelementEnd()()()();
|
|
14517
14533
|
i0.ɵɵelementStart(9, "div", 21)(10, "button", 22);
|
|
14518
|
-
i0.ɵɵlistener("click", function
|
|
14534
|
+
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_div_7_div_2_Template_button_click_10_listener() { const i_r3 = i0.ɵɵrestoreView(_r2).index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.openModal(i_r3)); });
|
|
14519
14535
|
i0.ɵɵtext(11);
|
|
14520
14536
|
i0.ɵɵpipe(12, "rpxTranslate");
|
|
14521
14537
|
i0.ɵɵelementEnd()()();
|
|
@@ -14538,9 +14554,9 @@ function WriteCollectionFieldComponent_div_9_div_2_Template(rf, ctx) { if (rf &
|
|
|
14538
14554
|
i0.ɵɵadvance(2);
|
|
14539
14555
|
i0.ɵɵproperty("caseField", item_r4.caseField)("caseFields", ctx_r0.caseFields)("formGroup", ctx_r0.formGroup)("parent", item_r4.container)("idPrefix", item_r4.prefix)("hidden", item_r4.caseField.hidden)("isExpanded", ctx_r0.isExpanded)("isInSearchBlock", ctx_r0.isInSearchBlock);
|
|
14540
14556
|
} }
|
|
14541
|
-
function
|
|
14557
|
+
function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
14542
14558
|
i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
|
|
14543
|
-
i0.ɵɵtemplate(2,
|
|
14559
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 14, 19, "div", 15);
|
|
14544
14560
|
i0.ɵɵelementEnd()();
|
|
14545
14561
|
} if (rf & 2) {
|
|
14546
14562
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -14548,10 +14564,10 @@ function WriteCollectionFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
14548
14564
|
i0.ɵɵadvance(2);
|
|
14549
14565
|
i0.ɵɵproperty("ngForOf", ctx_r0.collItems);
|
|
14550
14566
|
} }
|
|
14551
|
-
function
|
|
14567
|
+
function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
14552
14568
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
14553
14569
|
i0.ɵɵelementStart(0, "button", 24);
|
|
14554
|
-
i0.ɵɵlistener("click", function
|
|
14570
|
+
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addItem(false)); });
|
|
14555
14571
|
i0.ɵɵtext(1);
|
|
14556
14572
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14557
14573
|
i0.ɵɵelementEnd();
|
|
@@ -14868,26 +14884,24 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14868
14884
|
} if (rf & 2) {
|
|
14869
14885
|
let _t;
|
|
14870
14886
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
14871
|
-
} }, inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
14872
|
-
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)
|
|
14873
|
-
i0.ɵɵ
|
|
14874
|
-
i0.ɵɵ
|
|
14875
|
-
i0.ɵɵ
|
|
14876
|
-
i0.ɵɵ
|
|
14877
|
-
i0.ɵɵ
|
|
14878
|
-
i0.ɵɵtext(6);
|
|
14879
|
-
i0.ɵɵpipe(7, "rpxTranslate");
|
|
14887
|
+
} }, inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14888
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
14889
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
|
|
14890
|
+
i0.ɵɵelementStart(3, "button", 4);
|
|
14891
|
+
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_Template_button_click_3_listener() { return ctx.addItem(true); });
|
|
14892
|
+
i0.ɵɵtext(4);
|
|
14893
|
+
i0.ɵɵpipe(5, "rpxTranslate");
|
|
14880
14894
|
i0.ɵɵelementEnd();
|
|
14881
|
-
i0.ɵɵtemplate(
|
|
14895
|
+
i0.ɵɵtemplate(6, WriteCollectionFieldComponent_h2_6_Template, 3, 2, "h2", 3)(7, WriteCollectionFieldComponent_div_7_Template, 3, 2, "div", 5)(8, WriteCollectionFieldComponent_button_8_Template, 3, 4, "button", 6);
|
|
14882
14896
|
i0.ɵɵelementEnd()();
|
|
14883
14897
|
} if (rf & 2) {
|
|
14884
14898
|
i0.ɵɵproperty("id", ctx.id());
|
|
14885
|
-
i0.ɵɵadvance(3);
|
|
14886
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
|
|
14887
14899
|
i0.ɵɵadvance(2);
|
|
14900
|
+
i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
|
|
14901
|
+
i0.ɵɵadvance();
|
|
14888
14902
|
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
|
|
14889
14903
|
i0.ɵɵadvance();
|
|
14890
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
14904
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 7, "Add new"));
|
|
14891
14905
|
i0.ɵɵadvance(2);
|
|
14892
14906
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
|
|
14893
14907
|
i0.ɵɵadvance();
|
|
@@ -14898,7 +14912,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14898
14912
|
}
|
|
14899
14913
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
14900
14914
|
type: Component,
|
|
14901
|
-
args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
14915
|
+
args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
14902
14916
|
}], () => [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
|
|
14903
14917
|
type: Input
|
|
14904
14918
|
}], items: [{
|
|
@@ -23818,18 +23832,28 @@ class ReadTextFieldComponent extends AbstractFieldReadComponent {
|
|
|
23818
23832
|
|
|
23819
23833
|
const _c0$A = a0 => ({ "form-group-error": a0 });
|
|
23820
23834
|
const _c1$c = a0 => ({ "govuk-input--error": a0 });
|
|
23821
|
-
function
|
|
23822
|
-
i0.ɵɵelementStart(0, "span",
|
|
23835
|
+
function WriteTextFieldComponent_label_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
23836
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
23823
23837
|
i0.ɵɵtext(1);
|
|
23824
23838
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
23825
23839
|
i0.ɵɵelementEnd();
|
|
23826
23840
|
} if (rf & 2) {
|
|
23827
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
23841
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
23828
23842
|
i0.ɵɵadvance();
|
|
23829
23843
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
23830
23844
|
} }
|
|
23831
|
-
function
|
|
23832
|
-
i0.ɵɵelementStart(0, "
|
|
23845
|
+
function WriteTextFieldComponent_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
23846
|
+
i0.ɵɵelementStart(0, "label", 5);
|
|
23847
|
+
i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_span_1_Template, 3, 3, "span", 6);
|
|
23848
|
+
i0.ɵɵelementEnd();
|
|
23849
|
+
} if (rf & 2) {
|
|
23850
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
23851
|
+
i0.ɵɵproperty("for", ctx_r0.id());
|
|
23852
|
+
i0.ɵɵadvance();
|
|
23853
|
+
i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
23854
|
+
} }
|
|
23855
|
+
function WriteTextFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
23856
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
23833
23857
|
i0.ɵɵtext(1);
|
|
23834
23858
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
23835
23859
|
i0.ɵɵelementEnd();
|
|
@@ -23838,8 +23862,8 @@ function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
23838
23862
|
i0.ɵɵadvance();
|
|
23839
23863
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
23840
23864
|
} }
|
|
23841
|
-
function
|
|
23842
|
-
i0.ɵɵelementStart(0, "span",
|
|
23865
|
+
function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
23866
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
23843
23867
|
i0.ɵɵtext(1);
|
|
23844
23868
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
23845
23869
|
i0.ɵɵelementEnd();
|
|
@@ -23857,31 +23881,27 @@ class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
|
23857
23881
|
$event.target.value = $event.target.value.trim();
|
|
23858
23882
|
}
|
|
23859
23883
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteTextFieldComponent_BaseFactory; return function WriteTextFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteTextFieldComponent_BaseFactory || (ɵWriteTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteTextFieldComponent)))(__ngFactoryType__ || WriteTextFieldComponent); }; })();
|
|
23860
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
23861
|
-
i0.ɵɵelementStart(0, "div", 0)
|
|
23862
|
-
i0.ɵɵtemplate(2, WriteTextFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
23863
|
-
i0.ɵɵ
|
|
23864
|
-
i0.ɵɵ
|
|
23865
|
-
i0.ɵɵelementStart(5, "input", 5);
|
|
23866
|
-
i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_5_listener($event) { return ctx.onBlur($event); });
|
|
23884
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-control", "bottom-30", 3, "blur", "ngClass", "id", "type", "formControl"], [3, "for"], ["class", "form-label", 4, "ngIf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteTextFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23885
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
23886
|
+
i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_Template, 2, 2, "label", 1)(2, WriteTextFieldComponent_span_2_Template, 3, 3, "span", 2)(3, WriteTextFieldComponent_span_3_Template, 3, 4, "span", 3);
|
|
23887
|
+
i0.ɵɵelementStart(4, "input", 4);
|
|
23888
|
+
i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_4_listener($event) { return ctx.onBlur($event); });
|
|
23867
23889
|
i0.ɵɵelementEnd()();
|
|
23868
23890
|
} if (rf & 2) {
|
|
23869
23891
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$A, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
|
|
23870
23892
|
i0.ɵɵadvance();
|
|
23871
|
-
i0.ɵɵproperty("
|
|
23872
|
-
i0.ɵɵadvance();
|
|
23873
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
23893
|
+
i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
|
|
23874
23894
|
i0.ɵɵadvance();
|
|
23875
23895
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
23876
23896
|
i0.ɵɵadvance();
|
|
23877
23897
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
23878
23898
|
i0.ɵɵadvance();
|
|
23879
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
23899
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("type", ctx.caseField.hidden ? "hidden" : "text")("formControl", ctx.textControl);
|
|
23880
23900
|
} }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
23881
23901
|
}
|
|
23882
23902
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
|
|
23883
23903
|
type: Component,
|
|
23884
|
-
args: [{ selector: 'ccd-write-text-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !!textControl && !textControl.valid && (textControl.dirty || textControl.touched)}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"textControl?.errors && (textControl.dirty || textControl.touched)\">\n {{textControl.errors | ccdFirstError:caseField.label}}\n </span>\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': textControl?.errors && (textControl.dirty || textControl.touched)}\"\n
|
|
23904
|
+
args: [{ selector: 'ccd-write-text-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !!textControl && !textControl.valid && (textControl.dirty || textControl.touched)}\">\n <label [for]=\"id()\" *ngIf=\"!caseField.hidden\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"textControl?.errors && (textControl.dirty || textControl.touched)\">\n {{textControl.errors | ccdFirstError:caseField.label}}\n </span>\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': textControl?.errors && (textControl.dirty || textControl.touched)}\"\n [id]=\"id()\" [type]=\"caseField.hidden ? 'hidden' : 'text'\" [formControl]=\"textControl\" (blur)=\"onBlur($event)\">\n</div>\n" }]
|
|
23885
23905
|
}], null, null); })();
|
|
23886
23906
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteTextFieldComponent, { className: "WriteTextFieldComponent", filePath: "lib/shared/components/palette/text/write-text-field.component.ts", lineNumber: 9 }); })();
|
|
23887
23907
|
|