@hmcts/ccd-case-ui-toolkit 7.3.6-angular-20 → 7.3.7-angular-20

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.
@@ -14493,7 +14493,17 @@ class RemoveDialogComponent {
14493
14493
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RemoveDialogComponent, { className: "RemoveDialogComponent", filePath: "lib/shared/components/dialogs/remove-dialog/remove-dialog.component.ts", lineNumber: 10 }); })();
14494
14494
 
14495
14495
  const _c0$T = ["collectionItem"];
14496
- function WriteCollectionFieldComponent_h2_8_span_1_Template(rf, ctx) { if (rf & 1) {
14496
+ function WriteCollectionFieldComponent_h2_2_Template(rf, ctx) { if (rf & 1) {
14497
+ i0.ɵɵelementStart(0, "h2", 7);
14498
+ i0.ɵɵtext(1);
14499
+ i0.ɵɵpipe(2, "ccdFieldLabel");
14500
+ i0.ɵɵelementEnd();
14501
+ } if (rf & 2) {
14502
+ const ctx_r0 = i0.ɵɵnextContext();
14503
+ i0.ɵɵadvance();
14504
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField), " ");
14505
+ } }
14506
+ function WriteCollectionFieldComponent_h2_6_span_1_Template(rf, ctx) { if (rf & 1) {
14497
14507
  i0.ɵɵelementStart(0, "span", 10);
14498
14508
  i0.ɵɵelement(1, "ccd-markdown", 11);
14499
14509
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -14503,7 +14513,7 @@ function WriteCollectionFieldComponent_h2_8_span_1_Template(rf, ctx) { if (rf &
14503
14513
  i0.ɵɵadvance();
14504
14514
  i0.ɵɵproperty("content", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
14505
14515
  } }
14506
- function WriteCollectionFieldComponent_h2_8_span_2_Template(rf, ctx) { if (rf & 1) {
14516
+ function WriteCollectionFieldComponent_h2_6_span_2_Template(rf, ctx) { if (rf & 1) {
14507
14517
  i0.ɵɵelementStart(0, "span", 12);
14508
14518
  i0.ɵɵtext(1);
14509
14519
  i0.ɵɵpipe(2, "ccdFirstError");
@@ -14513,9 +14523,9 @@ function WriteCollectionFieldComponent_h2_8_span_2_Template(rf, ctx) { if (rf &
14513
14523
  i0.ɵɵadvance();
14514
14524
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r0.formArray.errors, ctx_r0.caseField.label), " ");
14515
14525
  } }
14516
- function WriteCollectionFieldComponent_h2_8_Template(rf, ctx) { if (rf & 1) {
14517
- i0.ɵɵelementStart(0, "h2", 3);
14518
- i0.ɵɵtemplate(1, WriteCollectionFieldComponent_h2_8_span_1_Template, 3, 3, "span", 8)(2, WriteCollectionFieldComponent_h2_8_span_2_Template, 3, 4, "span", 9);
14526
+ function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
14527
+ i0.ɵɵelementStart(0, "h2", 7);
14528
+ i0.ɵɵtemplate(1, WriteCollectionFieldComponent_h2_6_span_1_Template, 3, 3, "span", 8)(2, WriteCollectionFieldComponent_h2_6_span_2_Template, 3, 4, "span", 9);
14519
14529
  i0.ɵɵelementEnd();
14520
14530
  } if (rf & 2) {
14521
14531
  const ctx_r0 = i0.ɵɵnextContext();
@@ -14524,14 +14534,14 @@ function WriteCollectionFieldComponent_h2_8_Template(rf, ctx) { if (rf & 1) {
14524
14534
  i0.ɵɵadvance();
14525
14535
  i0.ɵɵproperty("ngIf", ctx_r0.formArray.errors);
14526
14536
  } }
14527
- function WriteCollectionFieldComponent_div_9_div_2_Template(rf, ctx) { if (rf & 1) {
14537
+ function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
14528
14538
  const _r2 = i0.ɵɵgetCurrentView();
14529
14539
  i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "label", 19)(6, "h3", 20);
14530
14540
  i0.ɵɵtext(7);
14531
14541
  i0.ɵɵpipe(8, "rpxTranslate");
14532
14542
  i0.ɵɵelementEnd()()()();
14533
14543
  i0.ɵɵelementStart(9, "div", 21)(10, "button", 22);
14534
- i0.ɵɵlistener("click", function WriteCollectionFieldComponent_div_9_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)); });
14544
+ 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)); });
14535
14545
  i0.ɵɵtext(11);
14536
14546
  i0.ɵɵpipe(12, "rpxTranslate");
14537
14547
  i0.ɵɵelementEnd()()();
@@ -14554,9 +14564,9 @@ function WriteCollectionFieldComponent_div_9_div_2_Template(rf, ctx) { if (rf &
14554
14564
  i0.ɵɵadvance(2);
14555
14565
  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);
14556
14566
  } }
14557
- function WriteCollectionFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
14567
+ function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
14558
14568
  i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
14559
- i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_9_div_2_Template, 14, 19, "div", 15);
14569
+ i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 14, 19, "div", 15);
14560
14570
  i0.ɵɵelementEnd()();
14561
14571
  } if (rf & 2) {
14562
14572
  const ctx_r0 = i0.ɵɵnextContext();
@@ -14564,10 +14574,10 @@ function WriteCollectionFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
14564
14574
  i0.ɵɵadvance(2);
14565
14575
  i0.ɵɵproperty("ngForOf", ctx_r0.collItems);
14566
14576
  } }
14567
- function WriteCollectionFieldComponent_button_10_Template(rf, ctx) { if (rf & 1) {
14577
+ function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
14568
14578
  const _r5 = i0.ɵɵgetCurrentView();
14569
14579
  i0.ɵɵelementStart(0, "button", 24);
14570
- i0.ɵɵlistener("click", function WriteCollectionFieldComponent_button_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addItem(false)); });
14580
+ 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)); });
14571
14581
  i0.ɵɵtext(1);
14572
14582
  i0.ɵɵpipe(2, "rpxTranslate");
14573
14583
  i0.ɵɵelementEnd();
@@ -14884,26 +14894,24 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
14884
14894
  } if (rf & 2) {
14885
14895
  let _t;
14886
14896
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
14887
- } }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 11, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], [1, "heading-h2", "error-spacing"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["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)(2, "h2", 3);
14889
- i0.ɵɵtext(3);
14890
- i0.ɵɵpipe(4, "ccdFieldLabel");
14891
- i0.ɵɵelementEnd();
14892
- i0.ɵɵelementStart(5, "button", 4);
14893
- i0.ɵɵlistener("click", function WriteCollectionFieldComponent_Template_button_click_5_listener() { return ctx.addItem(true); });
14894
- i0.ɵɵtext(6);
14895
- i0.ɵɵpipe(7, "rpxTranslate");
14897
+ } }, inputs: { caseFields: "caseFields" }, standalone: false, 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) {
14898
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
14899
+ i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
14900
+ i0.ɵɵelementStart(3, "button", 4);
14901
+ i0.ɵɵlistener("click", function WriteCollectionFieldComponent_Template_button_click_3_listener() { return ctx.addItem(true); });
14902
+ i0.ɵɵtext(4);
14903
+ i0.ɵɵpipe(5, "rpxTranslate");
14896
14904
  i0.ɵɵelementEnd();
14897
- i0.ɵɵtemplate(8, WriteCollectionFieldComponent_h2_8_Template, 3, 2, "h2", 5)(9, WriteCollectionFieldComponent_div_9_Template, 3, 2, "div", 6)(10, WriteCollectionFieldComponent_button_10_Template, 3, 4, "button", 7);
14905
+ 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);
14898
14906
  i0.ɵɵelementEnd()();
14899
14907
  } if (rf & 2) {
14900
14908
  i0.ɵɵproperty("id", ctx.id());
14901
- i0.ɵɵadvance(3);
14902
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
14903
14909
  i0.ɵɵadvance(2);
14910
+ i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
14911
+ i0.ɵɵadvance();
14904
14912
  i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
14905
14913
  i0.ɵɵadvance();
14906
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 9, "Add new"));
14914
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 7, "Add new"));
14907
14915
  i0.ɵɵadvance(2);
14908
14916
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
14909
14917
  i0.ɵɵadvance();
@@ -14914,7 +14922,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
14914
14922
  }
14915
14923
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
14916
14924
  type: Component,
14917
- args: [{ selector: 'ccd-write-collection-field', standalone: false, 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"] }]
14925
+ args: [{ selector: 'ccd-write-collection-field', standalone: false, 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"] }]
14918
14926
  }], () => [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
14919
14927
  type: Input
14920
14928
  }], items: [{
@@ -23844,18 +23852,28 @@ class ReadTextFieldComponent extends AbstractFieldReadComponent {
23844
23852
 
23845
23853
  const _c0$A = a0 => ({ "form-group-error": a0 });
23846
23854
  const _c1$c = a0 => ({ "govuk-input--error": a0 });
23847
- function WriteTextFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
23848
- i0.ɵɵelementStart(0, "span", 6);
23855
+ function WriteTextFieldComponent_label_1_span_1_Template(rf, ctx) { if (rf & 1) {
23856
+ i0.ɵɵelementStart(0, "span", 7);
23849
23857
  i0.ɵɵtext(1);
23850
23858
  i0.ɵɵpipe(2, "ccdFieldLabel");
23851
23859
  i0.ɵɵelementEnd();
23852
23860
  } if (rf & 2) {
23853
- const ctx_r0 = i0.ɵɵnextContext();
23861
+ const ctx_r0 = i0.ɵɵnextContext(2);
23854
23862
  i0.ɵɵadvance();
23855
23863
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
23856
23864
  } }
23857
- function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
23858
- i0.ɵɵelementStart(0, "span", 7);
23865
+ function WriteTextFieldComponent_label_1_Template(rf, ctx) { if (rf & 1) {
23866
+ i0.ɵɵelementStart(0, "label", 5);
23867
+ i0.ɵɵtemplate(1, WriteTextFieldComponent_label_1_span_1_Template, 3, 3, "span", 6);
23868
+ i0.ɵɵelementEnd();
23869
+ } if (rf & 2) {
23870
+ const ctx_r0 = i0.ɵɵnextContext();
23871
+ i0.ɵɵproperty("for", ctx_r0.id());
23872
+ i0.ɵɵadvance();
23873
+ i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
23874
+ } }
23875
+ function WriteTextFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
23876
+ i0.ɵɵelementStart(0, "span", 8);
23859
23877
  i0.ɵɵtext(1);
23860
23878
  i0.ɵɵpipe(2, "rpxTranslate");
23861
23879
  i0.ɵɵelementEnd();
@@ -23864,8 +23882,8 @@ function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
23864
23882
  i0.ɵɵadvance();
23865
23883
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
23866
23884
  } }
23867
- function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
23868
- i0.ɵɵelementStart(0, "span", 8);
23885
+ function WriteTextFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
23886
+ i0.ɵɵelementStart(0, "span", 9);
23869
23887
  i0.ɵɵtext(1);
23870
23888
  i0.ɵɵpipe(2, "ccdFirstError");
23871
23889
  i0.ɵɵelementEnd();
@@ -23883,31 +23901,27 @@ class WriteTextFieldComponent extends AbstractFieldWriteComponent {
23883
23901
  $event.target.value = $event.target.value.trim();
23884
23902
  }
23885
23903
  static ɵfac = /*@__PURE__*/ (() => { let ɵWriteTextFieldComponent_BaseFactory; return function WriteTextFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteTextFieldComponent_BaseFactory || (ɵWriteTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteTextFieldComponent)))(__ngFactoryType__ || WriteTextFieldComponent); }; })();
23886
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "blur", "ngClass", "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteTextFieldComponent_Template(rf, ctx) { if (rf & 1) {
23887
- i0.ɵɵelementStart(0, "div", 0)(1, "label", 1);
23888
- i0.ɵɵtemplate(2, WriteTextFieldComponent_span_2_Template, 3, 3, "span", 2);
23889
- i0.ɵɵelementEnd();
23890
- i0.ɵɵtemplate(3, WriteTextFieldComponent_span_3_Template, 3, 3, "span", 3)(4, WriteTextFieldComponent_span_4_Template, 3, 4, "span", 4);
23891
- i0.ɵɵelementStart(5, "input", 5);
23892
- i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_5_listener($event) { return ctx.onBlur($event); });
23904
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteTextFieldComponent, selectors: [["ccd-write-text-field"]], standalone: false, 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) {
23905
+ i0.ɵɵelementStart(0, "div", 0);
23906
+ 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);
23907
+ i0.ɵɵelementStart(4, "input", 4);
23908
+ i0.ɵɵlistener("blur", function WriteTextFieldComponent_Template_input_blur_4_listener($event) { return ctx.onBlur($event); });
23893
23909
  i0.ɵɵelementEnd()();
23894
23910
  } if (rf & 2) {
23895
23911
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$A, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
23896
23912
  i0.ɵɵadvance();
23897
- i0.ɵɵproperty("for", ctx.id());
23898
- i0.ɵɵadvance();
23899
- i0.ɵɵproperty("ngIf", ctx.caseField.label);
23913
+ i0.ɵɵproperty("ngIf", !ctx.caseField.hidden);
23900
23914
  i0.ɵɵadvance();
23901
23915
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
23902
23916
  i0.ɵɵadvance();
23903
23917
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
23904
23918
  i0.ɵɵadvance();
23905
- 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);
23919
+ 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);
23906
23920
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
23907
23921
  }
23908
23922
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
23909
23923
  type: Component,
23910
- args: [{ selector: 'ccd-write-text-field', standalone: false, 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 [id]=\"id()\" type=\"text\" [formControl]=\"textControl\" (blur)=\"onBlur($event)\">\n</div>\n" }]
23924
+ args: [{ selector: 'ccd-write-text-field', standalone: false, 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" }]
23911
23925
  }], null, null); })();
23912
23926
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteTextFieldComponent, { className: "WriteTextFieldComponent", filePath: "lib/shared/components/palette/text/write-text-field.component.ts", lineNumber: 10 }); })();
23913
23927