@hmcts/ccd-case-ui-toolkit 7.2.51 → 7.2.52
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/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 +58 -44
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -14477,7 +14477,17 @@ class RemoveDialogComponent {
|
|
|
14477
14477
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RemoveDialogComponent, { className: "RemoveDialogComponent", filePath: "lib/shared/components/dialogs/remove-dialog/remove-dialog.component.ts", lineNumber: 9 }); })();
|
|
14478
14478
|
|
|
14479
14479
|
const _c0$T = ["collectionItem"];
|
|
14480
|
-
function
|
|
14480
|
+
function WriteCollectionFieldComponent_h2_2_Template(rf, ctx) { if (rf & 1) {
|
|
14481
|
+
i0.ɵɵelementStart(0, "h2", 7);
|
|
14482
|
+
i0.ɵɵtext(1);
|
|
14483
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
14484
|
+
i0.ɵɵelementEnd();
|
|
14485
|
+
} if (rf & 2) {
|
|
14486
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
14487
|
+
i0.ɵɵadvance();
|
|
14488
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField), " ");
|
|
14489
|
+
} }
|
|
14490
|
+
function WriteCollectionFieldComponent_h2_6_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
14481
14491
|
i0.ɵɵelementStart(0, "span", 10);
|
|
14482
14492
|
i0.ɵɵelement(1, "ccd-markdown", 11);
|
|
14483
14493
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -14487,7 +14497,7 @@ function WriteCollectionFieldComponent_h2_8_span_1_Template(rf, ctx) { if (rf &
|
|
|
14487
14497
|
i0.ɵɵadvance();
|
|
14488
14498
|
i0.ɵɵproperty("content", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
14489
14499
|
} }
|
|
14490
|
-
function
|
|
14500
|
+
function WriteCollectionFieldComponent_h2_6_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
14491
14501
|
i0.ɵɵelementStart(0, "span", 12);
|
|
14492
14502
|
i0.ɵɵtext(1);
|
|
14493
14503
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
@@ -14497,9 +14507,9 @@ function WriteCollectionFieldComponent_h2_8_span_2_Template(rf, ctx) { if (rf &
|
|
|
14497
14507
|
i0.ɵɵadvance();
|
|
14498
14508
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r0.formArray.errors, ctx_r0.caseField.label), " ");
|
|
14499
14509
|
} }
|
|
14500
|
-
function
|
|
14501
|
-
i0.ɵɵelementStart(0, "h2",
|
|
14502
|
-
i0.ɵɵtemplate(1,
|
|
14510
|
+
function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
|
|
14511
|
+
i0.ɵɵelementStart(0, "h2", 7);
|
|
14512
|
+
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
14513
|
i0.ɵɵelementEnd();
|
|
14504
14514
|
} if (rf & 2) {
|
|
14505
14515
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -14508,14 +14518,14 @@ function WriteCollectionFieldComponent_h2_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
14508
14518
|
i0.ɵɵadvance();
|
|
14509
14519
|
i0.ɵɵproperty("ngIf", ctx_r0.formArray.errors);
|
|
14510
14520
|
} }
|
|
14511
|
-
function
|
|
14521
|
+
function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
14512
14522
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
14513
14523
|
i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "label", 19)(6, "h3", 20);
|
|
14514
14524
|
i0.ɵɵtext(7);
|
|
14515
14525
|
i0.ɵɵpipe(8, "rpxTranslate");
|
|
14516
14526
|
i0.ɵɵelementEnd()()()();
|
|
14517
14527
|
i0.ɵɵelementStart(9, "div", 21)(10, "button", 22);
|
|
14518
|
-
i0.ɵɵlistener("click", function
|
|
14528
|
+
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
14529
|
i0.ɵɵtext(11);
|
|
14520
14530
|
i0.ɵɵpipe(12, "rpxTranslate");
|
|
14521
14531
|
i0.ɵɵelementEnd()()();
|
|
@@ -14538,9 +14548,9 @@ function WriteCollectionFieldComponent_div_9_div_2_Template(rf, ctx) { if (rf &
|
|
|
14538
14548
|
i0.ɵɵadvance(2);
|
|
14539
14549
|
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
14550
|
} }
|
|
14541
|
-
function
|
|
14551
|
+
function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
14542
14552
|
i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
|
|
14543
|
-
i0.ɵɵtemplate(2,
|
|
14553
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 14, 19, "div", 15);
|
|
14544
14554
|
i0.ɵɵelementEnd()();
|
|
14545
14555
|
} if (rf & 2) {
|
|
14546
14556
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -14548,10 +14558,10 @@ function WriteCollectionFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
14548
14558
|
i0.ɵɵadvance(2);
|
|
14549
14559
|
i0.ɵɵproperty("ngForOf", ctx_r0.collItems);
|
|
14550
14560
|
} }
|
|
14551
|
-
function
|
|
14561
|
+
function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
14552
14562
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
14553
14563
|
i0.ɵɵelementStart(0, "button", 24);
|
|
14554
|
-
i0.ɵɵlistener("click", function
|
|
14564
|
+
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
14565
|
i0.ɵɵtext(1);
|
|
14556
14566
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14557
14567
|
i0.ɵɵelementEnd();
|
|
@@ -14868,26 +14878,24 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14868
14878
|
} if (rf & 2) {
|
|
14869
14879
|
let _t;
|
|
14870
14880
|
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");
|
|
14881
|
+
} }, 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) {
|
|
14882
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
14883
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
|
|
14884
|
+
i0.ɵɵelementStart(3, "button", 4);
|
|
14885
|
+
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_Template_button_click_3_listener() { return ctx.addItem(true); });
|
|
14886
|
+
i0.ɵɵtext(4);
|
|
14887
|
+
i0.ɵɵpipe(5, "rpxTranslate");
|
|
14880
14888
|
i0.ɵɵelementEnd();
|
|
14881
|
-
i0.ɵɵtemplate(
|
|
14889
|
+
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
14890
|
i0.ɵɵelementEnd()();
|
|
14883
14891
|
} if (rf & 2) {
|
|
14884
14892
|
i0.ɵɵproperty("id", ctx.id());
|
|
14885
|
-
i0.ɵɵadvance(3);
|
|
14886
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
|
|
14887
14893
|
i0.ɵɵadvance(2);
|
|
14894
|
+
i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
|
|
14895
|
+
i0.ɵɵadvance();
|
|
14888
14896
|
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
|
|
14889
14897
|
i0.ɵɵadvance();
|
|
14890
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
14898
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 7, "Add new"));
|
|
14891
14899
|
i0.ɵɵadvance(2);
|
|
14892
14900
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
|
|
14893
14901
|
i0.ɵɵadvance();
|
|
@@ -14898,7 +14906,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14898
14906
|
}
|
|
14899
14907
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
14900
14908
|
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"] }]
|
|
14909
|
+
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
14910
|
}], () => [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
|
|
14903
14911
|
type: Input
|
|
14904
14912
|
}], items: [{
|
|
@@ -23818,18 +23826,28 @@ class ReadTextFieldComponent extends AbstractFieldReadComponent {
|
|
|
23818
23826
|
|
|
23819
23827
|
const _c0$A = a0 => ({ "form-group-error": a0 });
|
|
23820
23828
|
const _c1$c = a0 => ({ "govuk-input--error": a0 });
|
|
23821
|
-
function
|
|
23822
|
-
i0.ɵɵelementStart(0, "span",
|
|
23829
|
+
function WriteTextFieldComponent_label_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
23830
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
23823
23831
|
i0.ɵɵtext(1);
|
|
23824
23832
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
23825
23833
|
i0.ɵɵelementEnd();
|
|
23826
23834
|
} if (rf & 2) {
|
|
23827
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
23835
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
23828
23836
|
i0.ɵɵadvance();
|
|
23829
23837
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
23830
23838
|
} }
|
|
23831
|
-
function
|
|
23832
|
-
i0.ɵɵelementStart(0, "
|
|
23839
|
+
function WriteTextFieldComponent_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
23840
|
+
i0.ɵɵelementStart(0, "label", 5);
|
|
23841
|
+
i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_span_1_Template, 3, 3, "span", 6);
|
|
23842
|
+
i0.ɵɵelementEnd();
|
|
23843
|
+
} if (rf & 2) {
|
|
23844
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
23845
|
+
i0.ɵɵproperty("for", ctx_r0.id());
|
|
23846
|
+
i0.ɵɵadvance();
|
|
23847
|
+
i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
23848
|
+
} }
|
|
23849
|
+
function WriteTextFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
23850
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
23833
23851
|
i0.ɵɵtext(1);
|
|
23834
23852
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
23835
23853
|
i0.ɵɵelementEnd();
|
|
@@ -23838,8 +23856,8 @@ function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
23838
23856
|
i0.ɵɵadvance();
|
|
23839
23857
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
23840
23858
|
} }
|
|
23841
|
-
function
|
|
23842
|
-
i0.ɵɵelementStart(0, "span",
|
|
23859
|
+
function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
23860
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
23843
23861
|
i0.ɵɵtext(1);
|
|
23844
23862
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
23845
23863
|
i0.ɵɵelementEnd();
|
|
@@ -23857,31 +23875,27 @@ class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
|
23857
23875
|
$event.target.value = $event.target.value.trim();
|
|
23858
23876
|
}
|
|
23859
23877
|
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); });
|
|
23878
|
+
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) {
|
|
23879
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
23880
|
+
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);
|
|
23881
|
+
i0.ɵɵelementStart(4, "input", 4);
|
|
23882
|
+
i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_4_listener($event) { return ctx.onBlur($event); });
|
|
23867
23883
|
i0.ɵɵelementEnd()();
|
|
23868
23884
|
} if (rf & 2) {
|
|
23869
23885
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$A, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
|
|
23870
23886
|
i0.ɵɵadvance();
|
|
23871
|
-
i0.ɵɵproperty("
|
|
23872
|
-
i0.ɵɵadvance();
|
|
23873
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
23887
|
+
i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
|
|
23874
23888
|
i0.ɵɵadvance();
|
|
23875
23889
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
23876
23890
|
i0.ɵɵadvance();
|
|
23877
23891
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
23878
23892
|
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);
|
|
23893
|
+
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
23894
|
} }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
23881
23895
|
}
|
|
23882
23896
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
|
|
23883
23897
|
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
|
|
23898
|
+
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
23899
|
}], null, null); })();
|
|
23886
23900
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteTextFieldComponent, { className: "WriteTextFieldComponent", filePath: "lib/shared/components/palette/text/write-text-field.component.ts", lineNumber: 9 }); })();
|
|
23887
23901
|
|