@hmcts/ccd-case-ui-toolkit 7.0.18-pre-release → 7.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/esm2020/lib/shared/commons/address-validation-constants.mjs +13 -0
  2. package/esm2020/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +15 -6
  3. package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +38 -83
  4. package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +5 -6
  5. package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +55 -18
  6. package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +5 -1
  7. package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
  8. package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +3 -20
  9. package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
  10. package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +1 -4
  11. package/esm2020/lib/shared/domain/http/http-error.model.mjs +8 -2
  12. package/esm2020/lib/shared/services/addresses/addresses.service.mjs +9 -1
  13. package/esm2020/lib/shared/services/form/form-validators.service.mjs +2 -27
  14. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +202 -222
  15. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  16. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +196 -213
  17. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  18. package/lib/shared/commons/address-validation-constants.d.ts +7 -0
  19. package/lib/shared/commons/address-validation-constants.d.ts.map +1 -0
  20. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +3 -2
  21. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  22. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +3 -8
  23. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  24. package/lib/shared/components/palette/address/write-address-field.component.d.ts +5 -0
  25. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  26. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  27. package/lib/shared/components/palette/markdown/markdown.component.d.ts +1 -3
  28. package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
  29. package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
  30. package/lib/shared/domain/http/http-error.model.d.ts +1 -0
  31. package/lib/shared/domain/http/http-error.model.d.ts.map +1 -1
  32. package/lib/shared/services/addresses/addresses.service.d.ts +3 -0
  33. package/lib/shared/services/addresses/addresses.service.d.ts.map +1 -1
  34. package/lib/shared/services/form/form-validators.service.d.ts +0 -4
  35. package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
  36. package/package.json +1 -1
@@ -8,7 +8,7 @@ import * as i1$1 from '@angular/router';
8
8
  import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
9
9
  import * as i3 from '@angular/forms';
10
10
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
11
- import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
11
+ import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
12
12
  import * as i1$2 from '@angular/common/http';
13
13
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
14
14
  import { catchError, map, publish, refCount, switchMap, debounceTime, delay, distinctUntilChanged, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
@@ -27,7 +27,6 @@ import { MatDialogConfig } from '@angular/material/dialog';
27
27
  import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
28
28
  import * as i2 from '@nicky-lenaers/ngx-scroll-to';
29
29
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
30
- import * as marked from 'marked';
31
30
  import * as i1$4 from 'ngx-md';
32
31
  import { NgxMdModule } from 'ngx-md';
33
32
  import * as i5 from '@angular/material/legacy-autocomplete';
@@ -128,11 +127,11 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
128
127
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 13, ctx_r1.workhours));
129
128
  } }
130
129
  const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
131
- const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
130
+ const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
132
131
  class FooterComponent {
133
132
  }
134
133
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
135
- FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
134
+ FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$t, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
136
135
  i0.ɵɵprojectionDef(_c0$13);
137
136
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
138
137
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2);
@@ -192,7 +191,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) { if (rf & 1) {
192
191
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, ctx_r2.title));
193
192
  } }
194
193
  const _c0$12 = [[["", "headerNavigation", ""]]];
195
- const _c1$t = ["[headerNavigation]"];
194
+ const _c1$s = ["[headerNavigation]"];
196
195
  class HeaderBarComponent {
197
196
  constructor() {
198
197
  this.signOutRequest = new EventEmitter();
@@ -202,7 +201,7 @@ class HeaderBarComponent {
202
201
  }
203
202
  }
204
203
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
205
- HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
204
+ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$s, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
206
205
  i0.ɵɵprojectionDef(_c0$12);
207
206
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
208
207
  i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3);
@@ -253,11 +252,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
253
252
  }] }); })();
254
253
 
255
254
  const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
256
- const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
255
+ const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
257
256
  class NavigationComponent {
258
257
  }
259
258
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
260
- NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
259
+ NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$r, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
261
260
  i0.ɵɵprojectionDef(_c0$11);
262
261
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
263
262
  i0.ɵɵprojection(2);
@@ -368,11 +367,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
368
367
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
369
368
 
370
369
  const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
371
- const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
370
+ const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
372
371
  class BodyComponent {
373
372
  }
374
373
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
375
- BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
374
+ BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$q, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
376
375
  i0.ɵɵprojectionDef(_c0$10);
377
376
  i0.ɵɵelementStart(0, "div", 0);
378
377
  i0.ɵɵprojection(1);
@@ -982,11 +981,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
982
981
  }] }); })();
983
982
 
984
983
  const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
985
- const _c1$q = ["*"];
984
+ const _c1$p = ["*"];
986
985
  class TabComponent {
987
986
  }
988
987
  TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
989
- TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
988
+ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$p, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
990
989
  i0.ɵɵprojectionDef();
991
990
  i0.ɵɵelementStart(0, "div", 0);
992
991
  i0.ɵɵprojection(1);
@@ -1007,8 +1006,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
1007
1006
  }] }); })();
1008
1007
 
1009
1008
  const _c0$Y = ["tab"];
1010
- const _c1$p = function () { return ["."]; };
1011
- const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1009
+ const _c1$o = function () { return ["."]; };
1010
+ const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1012
1011
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1013
1012
  const _r4 = i0.ɵɵgetCurrentView();
1014
1013
  i0.ɵɵelementStart(0, "li", 4)(1, "a", 5, 6);
@@ -1019,7 +1018,7 @@ function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1019
1018
  } if (rf & 2) {
1020
1019
  const panel_r1 = ctx.$implicit;
1021
1020
  i0.ɵɵadvance(1);
1022
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
1021
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
1023
1022
  i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
1024
1023
  i0.ɵɵadvance(2);
1025
1024
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
@@ -1242,9 +1241,14 @@ class HttpError {
1242
1241
  }
1243
1242
  static from(response) {
1244
1243
  const error = new HttpError();
1244
+ if (response?.status === 429) {
1245
+ error.error = HttpError.MESSAGE_ERROR_429;
1246
+ error.status = response.status;
1247
+ error.message = response.message;
1248
+ }
1245
1249
  // Check that the HttpErrorResponse contains an "error" object before mapping the error properties
1246
1250
  if (!!(response && response.error)) {
1247
- Object.keys(error).forEach(key => {
1251
+ Object.keys(error).forEach((key) => {
1248
1252
  error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
1249
1253
  });
1250
1254
  }
@@ -1261,6 +1265,7 @@ class HttpError {
1261
1265
  HttpError.DEFAULT_ERROR = 'Unknown error';
1262
1266
  HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
1263
1267
  HttpError.DEFAULT_STATUS = 500;
1268
+ HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
1264
1269
 
1265
1270
  /**
1266
1271
  * `Oauth2Service` and `AuthService` cannot be merged as it creates a cyclic dependency on `AuthService` through `HttpErrorService`.
@@ -2731,9 +2736,6 @@ class FirstErrorPipe {
2731
2736
  else if (keys[0] === 'pattern') {
2732
2737
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2733
2738
  }
2734
- else if (keys[0] === 'markDownPattern') {
2735
- errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2736
- }
2737
2739
  else if (keys[0] === 'minlength') {
2738
2740
  errorMessage = '%FIELDLABEL% is below the minimum length';
2739
2741
  }
@@ -4551,7 +4553,6 @@ class FormValidatorsService {
4551
4553
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4552
4554
  const validators = [Validators.required];
4553
4555
  if (caseField.field_type.type === 'Text') {
4554
- validators.push(this.markDownPatternValidator());
4555
4556
  if (caseField.field_type.regular_expression) {
4556
4557
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4557
4558
  }
@@ -4565,36 +4566,22 @@ class FormValidatorsService {
4565
4566
  validators.push(Validators.maxLength(caseField.field_type.max));
4566
4567
  }
4567
4568
  }
4568
- if (caseField.field_type.type === 'TextArea') {
4569
- validators.push(this.emptyValidator());
4570
- validators.push(this.markDownPatternValidator());
4571
- }
4572
4569
  if (control.validator) {
4573
4570
  validators.push(control.validator);
4574
4571
  }
4575
4572
  control.setValidators(validators);
4576
4573
  }
4577
- else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
4578
- control.setValidators(this.markDownPatternValidator());
4579
- }
4580
4574
  return control;
4581
4575
  }
4582
4576
  static emptyValidator() {
4583
4577
  const validator = (control) => {
4584
- if (control?.value?.toString().trim().length === 0) {
4578
+ if (control && control.value && control.value.toString().trim().length === 0) {
4585
4579
  return { required: {} };
4586
4580
  }
4587
4581
  return null;
4588
4582
  };
4589
4583
  return validator;
4590
4584
  }
4591
- static markDownPatternValidator() {
4592
- const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4593
- return (control) => {
4594
- const value = control?.value?.toString().trim();
4595
- return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4596
- };
4597
- }
4598
4585
  // TODO: Strip this out as it's only here for the moment because
4599
4586
  // the service is being injected all over the place but it doesn't
4600
4587
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4602,20 +4589,10 @@ class FormValidatorsService {
4602
4589
  addValidators(caseField, control) {
4603
4590
  return FormValidatorsService.addValidators(caseField, control);
4604
4591
  }
4605
- addMarkDownValidators(formGroup, controlPath) {
4606
- const control = formGroup.get(controlPath);
4607
- if (control) {
4608
- control.setValidators(FormValidatorsService.markDownPatternValidator());
4609
- control.updateValueAndValidity();
4610
- }
4611
- return control;
4612
- }
4613
4592
  }
4614
4593
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4615
4594
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4616
4595
  ];
4617
- FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4618
- FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4619
4596
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4620
4597
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4621
4598
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormValidatorsService, [{
@@ -4635,7 +4612,11 @@ class AbstractFormFieldComponent {
4635
4612
  return control;
4636
4613
  }
4637
4614
  const existing = container.controls[this.caseField.id];
4615
+ // update the field value which has been set in mid-event call back
4638
4616
  if (existing) {
4617
+ if (existing.value === null && this.caseField?.value) {
4618
+ existing.value = this.caseField.value;
4619
+ }
4639
4620
  if (replace) {
4640
4621
  // Set the validators on the replacement with what already exists.
4641
4622
  control.setValidators(existing.validator);
@@ -6282,6 +6263,7 @@ class AddressesService {
6282
6263
  constructor(http, appConfig) {
6283
6264
  this.http = http;
6284
6265
  this.appConfig = appConfig;
6266
+ this.mandatoryError = new BehaviorSubject(false);
6285
6267
  }
6286
6268
  getAddressesForPostcode(postcode) {
6287
6269
  return this.http
@@ -6290,6 +6272,12 @@ class AddressesService {
6290
6272
  .pipe(map(res => res.results))
6291
6273
  .pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
6292
6274
  }
6275
+ getMandatoryError() {
6276
+ return this.mandatoryError.asObservable();
6277
+ }
6278
+ setMandatoryError(value) {
6279
+ this.mandatoryError.next(value);
6280
+ }
6293
6281
  format(addressModel) {
6294
6282
  return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
6295
6283
  }
@@ -9642,7 +9630,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
9642
9630
  i0.ɵɵproperty("eventCompletionParams", ctx_r8.caseEdit.eventCompletionParams);
9643
9631
  } }
9644
9632
  class CaseEditPageComponent {
9645
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
9633
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, addressService) {
9646
9634
  this.caseEdit = caseEdit;
9647
9635
  this.route = route;
9648
9636
  this.formValueService = formValueService;
@@ -9654,6 +9642,7 @@ class CaseEditPageComponent {
9654
9642
  this.caseEditDataService = caseEditDataService;
9655
9643
  this.loadingService = loadingService;
9656
9644
  this.validPageListCaseFieldsService = validPageListCaseFieldsService;
9645
+ this.addressService = addressService;
9657
9646
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
9658
9647
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
9659
9648
  this.formValuesChanged = false;
@@ -9776,7 +9765,14 @@ class CaseEditPageComponent {
9776
9765
  }
9777
9766
  }
9778
9767
  if (fieldElement.hasError('required')) {
9779
- this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
9768
+ if (casefield.id === 'AddressLine1') {
9769
+ // EUI-1067 - Display more relevant error message to user and correctly navigate to the field
9770
+ this.addressService.setMandatoryError(true);
9771
+ this.caseEditDataService.addFormValidationError({ id: `${path}_${path}`, message: `An address is required` });
9772
+ }
9773
+ else {
9774
+ this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
9775
+ }
9780
9776
  fieldElement.markAsDirty();
9781
9777
  // For the JudicialUser field type, an error needs to be set on the component so that an error message
9782
9778
  // can be displayed at field level
@@ -9851,6 +9847,7 @@ class CaseEditPageComponent {
9851
9847
  }
9852
9848
  }
9853
9849
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
9850
+ this.addressService.setMandatoryError(false);
9854
9851
  console.log('Case Edit Error', this.caseEdit.error);
9855
9852
  if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
9856
9853
  this.caseEdit.validPageList.push(this.currentPage);
@@ -10150,7 +10147,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
10150
10147
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
10151
10148
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
10152
10149
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
10153
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
10150
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(AddressesService)); };
10154
10151
  CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 12, vars: 11, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
10155
10152
  i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
10156
10153
  i0.ɵɵtemplate(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 1);
@@ -10185,7 +10182,7 @@ CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseE
10185
10182
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
10186
10183
  type: Component,
10187
10184
  args: [{ selector: 'ccd-case-edit-page', template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data']\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <fieldset id=\"fieldset-case-data\">\n <legend style=\"display: none;\"></legend>\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </fieldset>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" [disabled]=\"!(hasPreviousPage$ | async)\" (click)=\"toPreviousPage()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><a (click)=\"cancel()\" href=\"javascript:void(0)\">{{getCancelText() | rpxTranslate}}</a></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
10188
- }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, null); })();
10185
+ }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: AddressesService }]; }, null); })();
10189
10186
 
10190
10187
  class CallbackErrorsContext {
10191
10188
  }
@@ -10632,6 +10629,17 @@ class AddressOption {
10632
10629
  }
10633
10630
  }
10634
10631
 
10632
+ class AddressValidationConstants {
10633
+ }
10634
+ // allow alpha-numeric characters and spaces possibly between a connecting - character
10635
+ // this applies validation while allowing partial postcodes
10636
+ AddressValidationConstants.REGEX_POSTCODE = /^([A-Za-z0-9]-*| )+$/;
10637
+ AddressValidationConstants.ɵfac = function AddressValidationConstants_Factory(t) { return new (t || AddressValidationConstants)(); };
10638
+ AddressValidationConstants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AddressValidationConstants, factory: AddressValidationConstants.ɵfac });
10639
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressValidationConstants, [{
10640
+ type: Injectable
10641
+ }], null, null); })();
10642
+
10635
10643
  class FieldsFilterPipe {
10636
10644
  /**
10637
10645
  * Complex type should have at least on simple field descendant with a value.
@@ -10898,11 +10906,12 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (r
10898
10906
  i0.ɵɵpipe(2, "rpxTranslate");
10899
10907
  i0.ɵɵelementEnd();
10900
10908
  } if (rf & 2) {
10909
+ const ctx_r5 = i0.ɵɵnextContext(3);
10901
10910
  i0.ɵɵadvance(1);
10902
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Enter the Postcode"));
10911
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
10903
10912
  } }
10904
- const _c1$o = function (a0) { return { "form-group-error": a0 }; };
10905
- const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
10913
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
10914
+ const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
10906
10915
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1) {
10907
10916
  const _r7 = i0.ɵɵgetCurrentView();
10908
10917
  i0.ɵɵelementStart(0, "div", 8)(1, "label", 9)(2, "span", 10);
@@ -10918,7 +10927,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10918
10927
  i0.ɵɵelementEnd()();
10919
10928
  } if (rf & 2) {
10920
10929
  const ctx_r2 = i0.ɵɵnextContext(2);
10921
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
10930
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
10922
10931
  i0.ɵɵadvance(1);
10923
10932
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
10924
10933
  i0.ɵɵadvance(2);
@@ -10926,46 +10935,60 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10926
10935
  i0.ɵɵadvance(2);
10927
10936
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
10928
10937
  i0.ɵɵadvance(1);
10929
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
10938
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
10930
10939
  i0.ɵɵadvance(2);
10931
10940
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
10932
10941
  } }
10933
- function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) { if (rf & 1) {
10942
+ function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) { if (rf & 1) {
10943
+ i0.ɵɵelementStart(0, "span", 14);
10944
+ i0.ɵɵtext(1);
10945
+ i0.ɵɵpipe(2, "rpxTranslate");
10946
+ i0.ɵɵelementEnd();
10947
+ } if (rf & 2) {
10948
+ const ctx_r8 = i0.ɵɵnextContext(3);
10949
+ i0.ɵɵadvance(1);
10950
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r8.errorMessage));
10951
+ } }
10952
+ function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) { if (rf & 1) {
10934
10953
  i0.ɵɵelementStart(0, "option", 18);
10935
10954
  i0.ɵɵtext(1);
10936
10955
  i0.ɵɵpipe(2, "rpxTranslate");
10937
10956
  i0.ɵɵelementEnd();
10938
10957
  } if (rf & 2) {
10939
- const addressOption_r9 = ctx.$implicit;
10940
- i0.ɵɵproperty("ngValue", addressOption_r9.value);
10958
+ const addressOption_r10 = ctx.$implicit;
10959
+ i0.ɵɵproperty("ngValue", addressOption_r10.value);
10941
10960
  i0.ɵɵadvance(1);
10942
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r9.description), " ");
10961
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r10.description), " ");
10943
10962
  } }
10944
10963
  function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1) {
10945
- const _r11 = i0.ɵɵgetCurrentView();
10964
+ const _r12 = i0.ɵɵgetCurrentView();
10946
10965
  i0.ɵɵelementStart(0, "div", 15)(1, "label", 9)(2, "span", 10);
10947
10966
  i0.ɵɵtext(3);
10948
10967
  i0.ɵɵpipe(4, "rpxTranslate");
10949
10968
  i0.ɵɵelementEnd()();
10950
- i0.ɵɵelementStart(5, "select", 16);
10951
- i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_5_Template_select_change_5_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r10.addressSelected()); });
10952
- i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_div_5_option_6_Template, 3, 4, "option", 17);
10969
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_span_5_Template, 3, 3, "span", 11);
10970
+ i0.ɵɵelementStart(6, "select", 16);
10971
+ i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_5_Template_select_change_6_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.addressSelected()); });
10972
+ i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_5_option_7_Template, 3, 4, "option", 17);
10953
10973
  i0.ɵɵelementEnd()();
10954
10974
  } if (rf & 2) {
10955
10975
  const ctx_r3 = i0.ɵɵnextContext(2);
10976
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
10956
10977
  i0.ɵɵadvance(1);
10957
10978
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
10958
10979
  i0.ɵɵadvance(2);
10959
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Select an address"));
10980
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, "Select an address"));
10960
10981
  i0.ɵɵadvance(2);
10982
+ i0.ɵɵproperty("ngIf", ctx_r3.noAddressSelected);
10983
+ i0.ɵɵadvance(1);
10961
10984
  i0.ɵɵproperty("id", ctx_r3.createElementId("addressList"))("formControl", ctx_r3.addressList);
10962
10985
  i0.ɵɵadvance(1);
10963
10986
  i0.ɵɵproperty("ngForOf", ctx_r3.addressOptions);
10964
10987
  } }
10965
10988
  function WriteAddressFieldComponent_div_1_a_6_Template(rf, ctx) { if (rf & 1) {
10966
- const _r13 = i0.ɵɵgetCurrentView();
10989
+ const _r14 = i0.ɵɵgetCurrentView();
10967
10990
  i0.ɵɵelementStart(0, "a", 19);
10968
- i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r12.blankAddress()); });
10991
+ i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r13.blankAddress()); });
10969
10992
  i0.ɵɵtext(1);
10970
10993
  i0.ɵɵpipe(2, "rpxTranslate");
10971
10994
  i0.ɵɵelementEnd();
@@ -10979,7 +11002,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10979
11002
  i0.ɵɵpipe(3, "ccdFieldLabel");
10980
11003
  i0.ɵɵelementEnd();
10981
11004
  i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 17, "div", 5);
10982
- i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 7, 7, "div", 6);
11005
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 8, 11, "div", 6);
10983
11006
  i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
10984
11007
  i0.ɵɵelementEnd();
10985
11008
  } if (rf & 2) {
@@ -10998,19 +11021,30 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10998
11021
  super();
10999
11022
  this.isCompoundPipe = isCompoundPipe;
11000
11023
  this.addressFormGroup = new FormGroup({});
11024
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11001
11025
  this.missingPostcode = false;
11026
+ this.noAddressSelected = false;
11002
11027
  this.addressesService = addressesService;
11003
11028
  }
11004
11029
  ngOnInit() {
11005
11030
  if (!this.isComplexWithHiddenFields()) {
11006
- this.postcode = new FormControl('');
11031
+ this.postcode = new FormControl('', [Validators.required]);
11007
11032
  this.addressFormGroup.addControl('postcode', this.postcode);
11008
11033
  this.addressList = new FormControl('');
11009
11034
  this.addressFormGroup.addControl('address', this.addressList);
11010
11035
  }
11036
+ this.addressesService.getMandatoryError().subscribe((value) => {
11037
+ this.updateErrorsOnContinue(value);
11038
+ });
11011
11039
  }
11012
11040
  findAddress() {
11041
+ this.noAddressSelected = false;
11013
11042
  if (!this.postcode.value) {
11043
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11044
+ this.missingPostcode = true;
11045
+ }
11046
+ else if (!this.postcode.value.trim().match(AddressValidationConstants.REGEX_POSTCODE)) {
11047
+ this.errorMessage = WriteAddressFieldComponent.INVALID_ERROR_MESSAGE;
11014
11048
  this.missingPostcode = true;
11015
11049
  }
11016
11050
  else {
@@ -11039,6 +11073,8 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11039
11073
  blankAddress() {
11040
11074
  this.caseField.value = new AddressModel();
11041
11075
  this.setFormValue();
11076
+ this.missingPostcode = false;
11077
+ this.noAddressSelected = false;
11042
11078
  }
11043
11079
  isComplexWithHiddenFields() {
11044
11080
  if (this.caseField.isComplex() && this.caseField.field_type.complex_fields
@@ -11070,6 +11106,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11070
11106
  addressSelected() {
11071
11107
  this.caseField.value = this.addressList.value;
11072
11108
  this.setFormValue();
11109
+ this.noAddressSelected = false;
11073
11110
  }
11074
11111
  ngOnChanges(changes) {
11075
11112
  super.ngOnChanges(changes);
@@ -11090,7 +11127,14 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11090
11127
  this.writeComplexFieldComponent.complexGroup.setValue(this.caseField.value);
11091
11128
  }
11092
11129
  }
11130
+ updateErrorsOnContinue(value) {
11131
+ this.missingPostcode = value && !this.shouldShowDetailFields() && !this.addressOptions;
11132
+ this.noAddressSelected = value && !this.shouldShowDetailFields() && !!this.addressOptions;
11133
+ this.errorMessage = this.noAddressSelected ? 'Select an address' : this.errorMessage;
11134
+ }
11093
11135
  }
11136
+ WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE = 'Enter a Postcode';
11137
+ WriteAddressFieldComponent.INVALID_ERROR_MESSAGE = 'Enter a valid Postcode';
11094
11138
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
11095
11139
  WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
11096
11140
  i0.ɵɵviewQuery(_c0$U, 5);
@@ -11099,7 +11143,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11099
11143
  let _t;
11100
11144
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11101
11145
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11102
- } }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 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"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11146
+ } }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [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", "javascript:void(0)", 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, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11103
11147
  i0.ɵɵelementStart(0, "div", 0);
11104
11148
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
11105
11149
  i0.ɵɵelement(2, "ccd-write-complex-type-field", 2, 3);
@@ -11113,7 +11157,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11113
11157
  } }, styles: [".manual-link[_ngcontent-%COMP%]{cursor:pointer;display:block;text-decoration:underline}"] });
11114
11158
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
11115
11159
  type: Component,
11116
- 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\">{{'Enter the Postcode' | 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()\">{{'Find address' | rpxTranslate}}</button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description | rpxTranslate}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress()\" href=\"javascript:void(0)\">\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"] }]
11160
+ 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()\">{{'Find address' | rpxTranslate}}</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 *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description | rpxTranslate}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress()\" href=\"javascript:void(0)\">\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"] }]
11117
11161
  }], function () { return [{ type: AddressesService }, { type: IsCompoundPipe }]; }, { writeComplexFieldComponent: [{
11118
11162
  type: ViewChild,
11119
11163
  args: ['writeComplexFieldComponent', { static: false }]
@@ -12346,7 +12390,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12346
12390
  i0.ɵɵadvance(1);
12347
12391
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12348
12392
  } }
12349
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12393
+ const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12350
12394
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12351
12395
  ngOnInit() {
12352
12396
  if (this.caseField.value) {
@@ -12407,7 +12451,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12407
12451
  i0.ɵɵelement(5, "input", 5);
12408
12452
  i0.ɵɵelementEnd();
12409
12453
  } if (rf & 2) {
12410
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12454
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12411
12455
  i0.ɵɵadvance(1);
12412
12456
  i0.ɵɵproperty("for", ctx.id());
12413
12457
  i0.ɵɵadvance(1);
@@ -12439,7 +12483,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
12439
12483
  i0.ɵɵadvance(4);
12440
12484
  i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$S, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
12441
12485
  } }
12442
- const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12486
+ const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12443
12487
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
12444
12488
  i0.ɵɵelementStart(0, "tr")(1, "td");
12445
12489
  i0.ɵɵelement(2, "ccd-field-read", 7);
@@ -12449,7 +12493,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
12449
12493
  const i_r5 = ctx.index;
12450
12494
  const ctx_r3 = i0.ɵɵnextContext(3);
12451
12495
  i0.ɵɵadvance(2);
12452
- i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12496
+ i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$l, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12453
12497
  } }
12454
12498
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
12455
12499
  i0.ɵɵelementStart(0, "tbody");
@@ -13270,7 +13314,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
13270
13314
  const ctx_r2 = i0.ɵɵnextContext();
13271
13315
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
13272
13316
  } }
13273
- const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
13317
+ const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
13274
13318
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
13275
13319
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
13276
13320
  super();
@@ -13576,7 +13620,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13576
13620
  i0.ɵɵpipe(17, "rpxTranslate");
13577
13621
  i0.ɵɵelementEnd()();
13578
13622
  } if (rf & 2) {
13579
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
13623
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
13580
13624
  i0.ɵɵadvance(1);
13581
13625
  i0.ɵɵproperty("for", ctx.id());
13582
13626
  i0.ɵɵadvance(1);
@@ -13770,14 +13814,9 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
13770
13814
  }], null, null); })();
13771
13815
 
13772
13816
  class MarkdownComponent {
13773
- constructor() {
13774
- this.renderUrlToTextFeature = true;
13775
- }
13817
+ constructor() { }
13776
13818
  ngOnInit() {
13777
13819
  this.content = this.content.replace(/ \n/g, '<br>');
13778
- if (this.renderUrlToTextFeature) {
13779
- this.renderUrlToText();
13780
- }
13781
13820
  }
13782
13821
  onMarkdownClick(event) {
13783
13822
  // If we don't have an anchor tag, we don't need to do anything.
@@ -13786,20 +13825,11 @@ class MarkdownComponent {
13786
13825
  }
13787
13826
  return true;
13788
13827
  }
13789
- renderUrlToText() {
13790
- const renderer = new marked.Renderer();
13791
- renderer.link = (href, title, text) => {
13792
- return text; // Return the text without turning it into a link
13793
- };
13794
- marked.setOptions({
13795
- renderer: renderer
13796
- });
13797
- }
13798
13828
  }
13799
13829
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
13800
13830
  MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) { if (rf & 1) {
13801
13831
  i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
13802
- } }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
13832
+ } }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
13803
13833
  i0.ɵɵelementStart(0, "div");
13804
13834
  i0.ɵɵelement(1, "markdown", 0);
13805
13835
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -13816,8 +13846,6 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
13816
13846
  type: Input
13817
13847
  }], markdownUseHrefAsRouterLink: [{
13818
13848
  type: Input
13819
- }], renderUrlToTextFeature: [{
13820
- type: Input
13821
13849
  }], onMarkdownClick: [{
13822
13850
  type: HostListener,
13823
13851
  args: ['click', ['$event']]
@@ -13930,7 +13958,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
13930
13958
  i0.ɵɵadvance(1);
13931
13959
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
13932
13960
  i0.ɵɵadvance(1);
13933
- i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
13961
+ i0.ɵɵproperty("content", checkbox_r4.label);
13934
13962
  } }
13935
13963
  const _c0$O = function (a0) { return { "error": a0 }; };
13936
13964
  class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
@@ -13994,13 +14022,13 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
13994
14022
  }
13995
14023
  }
13996
14024
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
13997
- WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
14025
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
13998
14026
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
13999
14027
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14000
14028
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14001
14029
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14002
14030
  i0.ɵɵelementEnd();
14003
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14031
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14004
14032
  i0.ɵɵelementEnd()();
14005
14033
  } if (rf & 2) {
14006
14034
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$O, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
@@ -14015,7 +14043,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14015
14043
  } }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, MarkdownComponent, FieldLabelPipe, FirstErrorPipe], styles: ["ccd-markdown[_ngcontent-%COMP%]{display:inline-block}"] });
14016
14044
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14017
14045
  type: Component,
14018
- args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\" [renderUrlToTextFeature]=\"false\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
14046
+ args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
14019
14047
  }], null, null); })();
14020
14048
 
14021
14049
  class DynamicRadioListPipe {
@@ -14136,7 +14164,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
14136
14164
  i0.ɵɵadvance(1);
14137
14165
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
14138
14166
  } }
14139
- const _c1$k = function (a0) { return { "form-group-error": a0 }; };
14167
+ const _c1$j = function (a0) { return { "form-group-error": a0 }; };
14140
14168
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14141
14169
  ngOnInit() {
14142
14170
  /**
@@ -14174,7 +14202,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
14174
14202
  i0.ɵɵelementContainerEnd();
14175
14203
  i0.ɵɵelementEnd()();
14176
14204
  } if (rf & 2) {
14177
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14205
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14178
14206
  i0.ɵɵadvance(3);
14179
14207
  i0.ɵɵproperty("for", ctx.id());
14180
14208
  i0.ɵɵadvance(1);
@@ -14255,7 +14283,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14255
14283
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14256
14284
  } }
14257
14285
  const _c0$M = function (a0) { return { "form-group-error": a0 }; };
14258
- const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
14286
+ const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
14259
14287
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
14260
14288
  ngOnInit() {
14261
14289
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14281,7 +14309,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
14281
14309
  i0.ɵɵadvance(1);
14282
14310
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
14283
14311
  i0.ɵɵadvance(1);
14284
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14312
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14285
14313
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
14286
14314
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
14287
14315
  type: Component,
@@ -14492,7 +14520,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
14492
14520
  i0.ɵɵadvance(1);
14493
14521
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
14494
14522
  } }
14495
- const _c1$i = function (a0) { return { "form-group-error": a0 }; };
14523
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14496
14524
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
14497
14525
  ngOnInit() {
14498
14526
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -14512,7 +14540,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
14512
14540
  i0.ɵɵelementContainerEnd();
14513
14541
  i0.ɵɵelementEnd()();
14514
14542
  } if (rf & 2) {
14515
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14543
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14516
14544
  i0.ɵɵadvance(3);
14517
14545
  i0.ɵɵproperty("for", ctx.id());
14518
14546
  i0.ɵɵadvance(1);
@@ -14634,7 +14662,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) { if (r
14634
14662
  i0.ɵɵtext(1, " Invalid search term ");
14635
14663
  i0.ɵɵelementEnd();
14636
14664
  } }
14637
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14665
+ const _c1$g = function (a0) { return { "form-group-error": a0 }; };
14638
14666
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
14639
14667
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
14640
14668
  super(compoundPipe, validatorsService);
@@ -14781,7 +14809,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
14781
14809
  i0.ɵɵelementEnd()();
14782
14810
  } if (rf & 2) {
14783
14811
  const _r3 = i0.ɵɵreference(7);
14784
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
14812
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
14785
14813
  i0.ɵɵadvance(1);
14786
14814
  i0.ɵɵproperty("for", ctx.id());
14787
14815
  i0.ɵɵadvance(1);
@@ -15471,7 +15499,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
15471
15499
  i0.ɵɵadvance(1);
15472
15500
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
15473
15501
  } }
15474
- const _c1$g = function (a0) { return { "table-group-error": a0 }; };
15502
+ const _c1$f = function (a0) { return { "table-group-error": a0 }; };
15475
15503
  function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15476
15504
  const _r21 = i0.ɵɵgetCurrentView();
15477
15505
  i0.ɵɵelementStart(0, "tr", 10)(1, "td", 38);
@@ -15502,7 +15530,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15502
15530
  const case_r16 = ctx.$implicit;
15503
15531
  const ctx_r2 = i0.ɵɵnextContext();
15504
15532
  i0.ɵɵadvance(2);
15505
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15533
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15506
15534
  i0.ɵɵadvance(2);
15507
15535
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
15508
15536
  i0.ɵɵadvance(2);
@@ -17402,7 +17430,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
17402
17430
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label), " ");
17403
17431
  } }
17404
17432
  const _c0$E = function (a0) { return { "form-group-error": a0 }; };
17405
- const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
17433
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
17406
17434
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
17407
17435
  ngOnInit() {
17408
17436
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -17428,7 +17456,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
17428
17456
  i0.ɵɵadvance(1);
17429
17457
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
17430
17458
  i0.ɵɵadvance(1);
17431
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17459
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17432
17460
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
17433
17461
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
17434
17462
  type: Component,
@@ -18069,7 +18097,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18069
18097
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label), " ");
18070
18098
  } }
18071
18099
  const _c0$C = function (a0) { return { "form-group-error": a0 }; };
18072
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18100
+ const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
18073
18101
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
18074
18102
  ngOnInit() {
18075
18103
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18095,7 +18123,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
18095
18123
  i0.ɵɵadvance(1);
18096
18124
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
18097
18125
  i0.ɵɵadvance(1);
18098
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18126
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18099
18127
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18100
18128
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
18101
18129
  type: Component,
@@ -20111,7 +20139,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20111
20139
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label), " ");
20112
20140
  } }
20113
20141
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
20114
- const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
20142
+ const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
20115
20143
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
20116
20144
  constructor(browserService) {
20117
20145
  super();
@@ -20149,7 +20177,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
20149
20177
  i0.ɵɵadvance(1);
20150
20178
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
20151
20179
  i0.ɵɵadvance(1);
20152
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20180
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20153
20181
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20154
20182
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
20155
20183
  type: Component,
@@ -20207,7 +20235,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20207
20235
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label), " ");
20208
20236
  } }
20209
20237
  const _c0$y = function (a0) { return { "form-group-error": a0 }; };
20210
- const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
20238
+ const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
20211
20239
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
20212
20240
  ngOnInit() {
20213
20241
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -20237,7 +20265,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
20237
20265
  i0.ɵɵadvance(1);
20238
20266
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
20239
20267
  i0.ɵɵadvance(1);
20240
- 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);
20268
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
20241
20269
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20242
20270
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
20243
20271
  type: Component,
@@ -20413,7 +20441,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
20413
20441
  i0.ɵɵadvance(1);
20414
20442
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
20415
20443
  } }
20416
- const _c1$b = function (a0) { return { "form-group-error": a0 }; };
20444
+ const _c1$a = function (a0) { return { "form-group-error": a0 }; };
20417
20445
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
20418
20446
  constructor(yesNoService) {
20419
20447
  super();
@@ -20435,7 +20463,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
20435
20463
  i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
20436
20464
  i0.ɵɵelementEnd()()();
20437
20465
  } if (rf & 2) {
20438
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20466
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20439
20467
  i0.ɵɵadvance(3);
20440
20468
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
20441
20469
  i0.ɵɵadvance(1);
@@ -20792,7 +20820,7 @@ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
20792
20820
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20793
20821
  i0.ɵɵelementContainer(0);
20794
20822
  } }
20795
- const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
20823
+ const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
20796
20824
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
20797
20825
  i0.ɵɵelementContainerStart(0);
20798
20826
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -20803,7 +20831,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
20803
20831
  i0.ɵɵnextContext();
20804
20832
  const _r1 = i0.ɵɵreference(13);
20805
20833
  i0.ɵɵadvance(1);
20806
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
20834
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
20807
20835
  } }
20808
20836
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
20809
20837
  const _r12 = i0.ɵɵgetCurrentView();
@@ -20971,7 +20999,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
20971
20999
  i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
20972
21000
  } }
20973
21001
  const _c0$s = [[["", "trigger", ""]]];
20974
- const _c1$9 = ["[trigger]"];
21002
+ const _c1$8 = ["[trigger]"];
20975
21003
  class CaseFileViewOverlayMenuComponent {
20976
21004
  constructor() {
20977
21005
  this.title = '';
@@ -20985,7 +21013,7 @@ class CaseFileViewOverlayMenuComponent {
20985
21013
  }
20986
21014
  }
20987
21015
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
20988
- CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
21016
+ CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
20989
21017
  i0.ɵɵprojectionDef(_c0$s);
20990
21018
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
20991
21019
  i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -23052,7 +23080,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
23052
23080
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "This flag should only be visible to HMCTS Staff"), " ");
23053
23081
  } }
23054
23082
  const _c0$n = function (a0) { return { "form-group-error": a0 }; };
23055
- const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
23083
+ const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
23056
23084
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (rf & 1) {
23057
23085
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
23058
23086
  i0.ɵɵtext(3);
@@ -23072,7 +23100,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (r
23072
23100
  i0.ɵɵadvance(3);
23073
23101
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
23074
23102
  i0.ɵɵadvance(1);
23075
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$8, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
23103
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$7, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
23076
23104
  i0.ɵɵadvance(1);
23077
23105
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
23078
23106
  } }
@@ -23572,7 +23600,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) { if (rf & 1) {
23572
23600
  i0.ɵɵadvance(3);
23573
23601
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
23574
23602
  } }
23575
- const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
23603
+ const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
23576
23604
  class UpdateFlagComponent {
23577
23605
  constructor(rpxTranslationService) {
23578
23606
  this.rpxTranslationService = rpxTranslationService;
@@ -23774,7 +23802,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
23774
23802
  const _r3 = i0.ɵɵreference(17);
23775
23803
  i0.ɵɵproperty("formGroup", ctx.formGroup);
23776
23804
  i0.ɵɵadvance(2);
23777
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
23805
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
23778
23806
  i0.ɵɵadvance(3);
23779
23807
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
23780
23808
  i0.ɵɵadvance(2);
@@ -25044,7 +25072,7 @@ const CUSTOM_MOMENT_FORMATS = {
25044
25072
  };
25045
25073
 
25046
25074
  const _c0$g = ["picker"];
25047
- const _c1$6 = ["input"];
25075
+ const _c1$5 = ["input"];
25048
25076
  function DatetimePickerComponent_span_3_Template(rf, ctx) { if (rf & 1) {
25049
25077
  i0.ɵɵelementStart(0, "span", 11);
25050
25078
  i0.ɵɵtext(1);
@@ -25093,7 +25121,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) { if (rf & 1) {
25093
25121
  i0.ɵɵadvance(1);
25094
25122
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
25095
25123
  } }
25096
- const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
25124
+ const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
25097
25125
  class DatetimePickerComponent extends AbstractFormFieldComponent {
25098
25126
  constructor(formatTranslationService, ngxMatDateFormats) {
25099
25127
  super();
@@ -25258,7 +25286,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
25258
25286
  DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { return new (t || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(NGX_MAT_DATE_FORMATS)); };
25259
25287
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) { if (rf & 1) {
25260
25288
  i0.ɵɵviewQuery(_c0$g, 5);
25261
- i0.ɵɵviewQuery(_c1$6, 5);
25289
+ i0.ɵɵviewQuery(_c1$5, 5);
25262
25290
  } if (rf & 2) {
25263
25291
  let _t;
25264
25292
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datetimePicker = _t.first);
@@ -25290,7 +25318,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
25290
25318
  i0.ɵɵelementEnd()()()()()();
25291
25319
  } if (rf & 2) {
25292
25320
  const _r6 = i0.ɵɵreference(13);
25293
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25321
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25294
25322
  i0.ɵɵadvance(3);
25295
25323
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
25296
25324
  i0.ɵɵadvance(1);
@@ -25514,7 +25542,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
25514
25542
  i0.ɵɵadvance(3);
25515
25543
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
25516
25544
  } }
25517
- const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25545
+ const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25518
25546
  function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25519
25547
  const _r18 = i0.ɵɵgetCurrentView();
25520
25548
  i0.ɵɵelementStart(0, "tr", 4);
@@ -25545,7 +25573,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25545
25573
  } if (rf & 2) {
25546
25574
  const event_r1 = ctx.$implicit;
25547
25575
  const ctx_r0 = i0.ɵɵnextContext();
25548
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
25576
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
25549
25577
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
25550
25578
  i0.ɵɵadvance(2);
25551
25579
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -27433,30 +27461,6 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) { if (r
27433
27461
  i0.ɵɵadvance(3);
27434
27462
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
27435
27463
  } }
27436
- function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) { if (rf & 1) {
27437
- i0.ɵɵelementStart(0, "span", 48);
27438
- i0.ɵɵtext(1);
27439
- i0.ɵɵpipe(2, "rpxTranslate");
27440
- i0.ɵɵpipe(3, "ccdFirstError");
27441
- i0.ɵɵelementEnd();
27442
- } if (rf & 2) {
27443
- const ctx_r36 = i0.ɵɵnextContext(3);
27444
- i0.ɵɵadvance(1);
27445
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
27446
- } }
27447
- function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) { if (rf & 1) {
27448
- i0.ɵɵelementStart(0, "span", 48);
27449
- i0.ɵɵtext(1);
27450
- i0.ɵɵpipe(2, "rpxTranslate");
27451
- i0.ɵɵpipe(3, "ccdFirstError");
27452
- i0.ɵɵelementEnd();
27453
- } if (rf & 2) {
27454
- const ctx_r37 = i0.ɵɵnextContext(3);
27455
- i0.ɵɵadvance(1);
27456
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
27457
- } }
27458
- const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
27459
- const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
27460
27464
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (rf & 1) {
27461
27465
  i0.ɵɵelementContainerStart(0);
27462
27466
  i0.ɵɵelementStart(1, "fieldset", 39);
@@ -27466,35 +27470,19 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (r
27466
27470
  i0.ɵɵelementStart(6, "span", 43);
27467
27471
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
27468
27472
  i0.ɵɵelementEnd()();
27469
- i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
27470
- i0.ɵɵelement(9, "input", 45);
27473
+ i0.ɵɵelement(8, "input", 44);
27471
27474
  i0.ɵɵelementEnd();
27472
- i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
27473
- i0.ɵɵtext(12, "Event description (optional)");
27475
+ i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
27476
+ i0.ɵɵtext(11, "Event description (optional)");
27474
27477
  i0.ɵɵelementEnd();
27475
- i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
27476
- i0.ɵɵelement(14, "textarea", 47);
27478
+ i0.ɵɵelement(12, "textarea", 46);
27477
27479
  i0.ɵɵelementEnd()();
27478
27480
  i0.ɵɵelementContainerEnd();
27479
- } if (rf & 2) {
27480
- const ctx_r9 = i0.ɵɵnextContext(2);
27481
- i0.ɵɵadvance(3);
27482
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
27483
- i0.ɵɵadvance(5);
27484
- i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
27485
- i0.ɵɵadvance(1);
27486
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$1, (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
27487
- i0.ɵɵadvance(1);
27488
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
27489
- i0.ɵɵadvance(3);
27490
- i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
27491
- i0.ɵɵadvance(1);
27492
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c2$1, (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched)));
27493
27481
  } }
27494
27482
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1) {
27495
- const _r39 = i0.ɵɵgetCurrentView();
27496
- i0.ɵɵelementStart(0, "button", 49);
27497
- i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.previous()); });
27483
+ const _r37 = i0.ɵɵgetCurrentView();
27484
+ i0.ɵɵelementStart(0, "button", 47);
27485
+ i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r37); const ctx_r36 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r36.previous()); });
27498
27486
  i0.ɵɵtext(1);
27499
27487
  i0.ɵɵpipe(2, "rpxTranslate");
27500
27488
  i0.ɵɵelementEnd();
@@ -27505,7 +27493,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1)
27505
27493
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "Previous"), " ");
27506
27494
  } }
27507
27495
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27508
- const _r41 = i0.ɵɵgetCurrentView();
27496
+ const _r39 = i0.ɵɵgetCurrentView();
27509
27497
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
27510
27498
  i0.ɵɵtext(2);
27511
27499
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -27515,13 +27503,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27515
27503
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
27516
27504
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
27517
27505
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
27518
- i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.callbackErrorsNotify($event)); });
27506
+ i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r38.callbackErrorsNotify($event)); });
27519
27507
  i0.ɵɵelementEnd();
27520
27508
  i0.ɵɵelementStart(11, "form", 8);
27521
- i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.submit()); });
27509
+ i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r39); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.submit()); });
27522
27510
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
27523
27511
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
27524
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
27512
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
27525
27513
  i0.ɵɵelementStart(15, "div", 9);
27526
27514
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
27527
27515
  i0.ɵɵelementStart(17, "button", 11);
@@ -27529,7 +27517,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27529
27517
  i0.ɵɵpipe(19, "rpxTranslate");
27530
27518
  i0.ɵɵelementEnd()();
27531
27519
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
27532
- i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.cancel()); });
27520
+ i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r39); const ctx_r41 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r41.cancel()); });
27533
27521
  i0.ɵɵtext(22);
27534
27522
  i0.ɵɵpipe(23, "rpxTranslate");
27535
27523
  i0.ɵɵelementEnd()()()();
@@ -27565,9 +27553,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27565
27553
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 20, ctx_r0.getCancelText()));
27566
27554
  } }
27567
27555
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) { if (rf & 1) {
27568
- const _r45 = i0.ɵɵgetCurrentView();
27569
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
27570
- i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.onEventCanBeCompleted($event)); });
27556
+ const _r43 = i0.ɵɵgetCurrentView();
27557
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
27558
+ i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.onEventCanBeCompleted($event)); });
27571
27559
  i0.ɵɵelementEnd();
27572
27560
  } if (rf & 2) {
27573
27561
  const ctx_r1 = i0.ɵɵnextContext();
@@ -27575,17 +27563,14 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
27575
27563
  } }
27576
27564
  // @dynamic
27577
27565
  class CaseEditSubmitComponent {
27578
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
27566
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
27579
27567
  this.caseEdit = caseEdit;
27580
27568
  this.fieldsUtils = fieldsUtils;
27581
27569
  this.caseFieldService = caseFieldService;
27582
27570
  this.route = route;
27583
27571
  this.orderService = orderService;
27584
27572
  this.profileNotifier = profileNotifier;
27585
- this.formValidatorsService = formValidatorsService;
27586
27573
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
27587
- this.eventSummaryLabel = 'Event summary';
27588
- this.eventDescriptionLabel = 'Event description';
27589
27574
  }
27590
27575
  get isDisabled() {
27591
27576
  // EUI-3452.
@@ -27595,7 +27580,7 @@ class CaseEditSubmitComponent {
27595
27580
  return this.caseEdit.isSubmitting || this.hasErrors;
27596
27581
  }
27597
27582
  ngOnInit() {
27598
- this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
27583
+ this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
27599
27584
  this.eventTrigger = this.caseEdit.eventTrigger;
27600
27585
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
27601
27586
  this.editForm = this.caseEdit.form;
@@ -27609,12 +27594,10 @@ class CaseEditSubmitComponent {
27609
27594
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
27610
27595
  // a FlagLauncher field in the event trigger
27611
27596
  this.caseEdit.isCaseFlagSubmission =
27612
- this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27597
+ this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27613
27598
  this.caseEdit.isLinkedCasesSubmission =
27614
27599
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
27615
27600
  this.pageTitle = this.getPageTitle();
27616
- this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
27617
- this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
27618
27601
  }
27619
27602
  ngOnDestroy() {
27620
27603
  /* istanbul ignore else */
@@ -27623,14 +27606,12 @@ class CaseEditSubmitComponent {
27623
27606
  }
27624
27607
  }
27625
27608
  submit() {
27626
- if (this.summary.valid && this.description.valid) {
27627
- this.caseEdit.submitForm({
27628
- eventTrigger: this.eventTrigger,
27629
- form: this.editForm,
27630
- submit: this.caseEdit.submit,
27631
- caseDetails: this.caseEdit.caseDetails
27632
- });
27633
- }
27609
+ this.caseEdit.submitForm({
27610
+ eventTrigger: this.eventTrigger,
27611
+ form: this.editForm,
27612
+ submit: this.caseEdit.submit,
27613
+ caseDetails: this.caseEdit.caseDetails,
27614
+ });
27634
27615
  }
27635
27616
  onEventCanBeCompleted(eventCanBeCompleted) {
27636
27617
  this.caseEdit.onEventCanBeCompleted({
@@ -27638,7 +27619,7 @@ class CaseEditSubmitComponent {
27638
27619
  eventCanBeCompleted,
27639
27620
  caseDetails: this.caseEdit.caseDetails,
27640
27621
  form: this.editForm,
27641
- submit: this.caseEdit.submit
27622
+ submit: this.caseEdit.submit,
27642
27623
  });
27643
27624
  }
27644
27625
  getPageTitle() {
@@ -27713,7 +27694,7 @@ class CaseEditSubmitComponent {
27713
27694
  }
27714
27695
  }
27715
27696
  readOnlySummaryFieldsToDisplayExists() {
27716
- return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
27697
+ return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
27717
27698
  }
27718
27699
  showEventNotes() {
27719
27700
  // Display event notes related controls only if the following conditions are met
@@ -27728,7 +27709,7 @@ class CaseEditSubmitComponent {
27728
27709
  }
27729
27710
  getLastPageShown() {
27730
27711
  let lastPage;
27731
- this.wizard.reverse().forEach((page) => {
27712
+ this.wizard.reverse().forEach(page => {
27732
27713
  if (!lastPage && this.isShown(page)) {
27733
27714
  lastPage = page;
27734
27715
  }
@@ -27747,7 +27728,7 @@ class CaseEditSubmitComponent {
27747
27728
  }
27748
27729
  isShown(page) {
27749
27730
  const fields = this.fieldsUtils
27750
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
27731
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
27751
27732
  return page.parsedShowCondition.match(fields);
27752
27733
  }
27753
27734
  canShowFieldInCYA(field) {
@@ -27756,7 +27737,7 @@ class CaseEditSubmitComponent {
27756
27737
  sortFieldsByShowSummaryContent(fields) {
27757
27738
  return this.orderService
27758
27739
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
27759
- .filter((cf) => cf.show_summary_content_option);
27740
+ .filter(cf => cf.show_summary_content_option);
27760
27741
  }
27761
27742
  getCaseFields() {
27762
27743
  if (this.caseEdit.caseDetails) {
@@ -27775,7 +27756,9 @@ class CaseEditSubmitComponent {
27775
27756
  if (this.eventTrigger.can_save_draft) {
27776
27757
  return 'Return to case list';
27777
27758
  }
27778
- return 'Cancel';
27759
+ else {
27760
+ return 'Cancel';
27761
+ }
27779
27762
  }
27780
27763
  }
27781
27764
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -27789,8 +27772,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
27789
27772
  }
27790
27773
  return a.show_summary_content_option - b.show_summary_content_option;
27791
27774
  };
27792
- CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
27793
- CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
27775
+ CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
27776
+ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
27794
27777
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
27795
27778
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
27796
27779
  } if (rf & 2) {
@@ -27800,8 +27783,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
27800
27783
  } }, styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
27801
27784
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
27802
27785
  type: Component,
27803
- args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
27804
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null); })();
27786
+ args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
27787
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null); })();
27805
27788
 
27806
27789
  function CaseProgressComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27807
27790
  const _r2 = i0.ɵɵgetCurrentView();
@@ -28157,7 +28140,7 @@ i0.ɵɵsetComponentScope(CaseEditConfirmComponent, function () { return [i4.NgIf
28157
28140
  i0.ɵɵsetComponentScope(CaseEditPageComponent, function () { return [i4.NgForOf, i4.NgIf, i3.ɵNgNoValidate, i3.NgControlStatusGroup, i3.FormGroupDirective, CallbackErrorsComponent, MarkdownComponent, CaseEventCompletionComponent, CaseEditFormComponent,
28158
28141
  CaseEditGenericErrorsComponent]; }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
28159
28142
  i0.ɵɵsetComponentScope(CaseEditFormComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.NgControlStatusGroup, i3.FormGroupDirective, LabelSubstitutorDirective, ConditionalShowFormDirective, FieldReadComponent, FieldWriteComponent]; }, function () { return [IsCompoundPipe, IsReadOnlyAndNotCollectionPipe]; });
28160
- i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
28143
+ i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
28161
28144
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28162
28145
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28163
28146