@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, BehaviorSubject, Observable, 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, switchMap, debounceTime, publish, refCount, 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';
@@ -134,11 +133,11 @@ function FooterComponent_div_3_Template(rf, ctx) {
134
133
  }
135
134
  }
136
135
  const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
137
- const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
136
+ const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
138
137
  class FooterComponent {
139
138
  }
140
139
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
141
- 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) {
140
+ 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) {
142
141
  if (rf & 1) {
143
142
  i0.ɵɵprojectionDef(_c0$13);
144
143
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
@@ -212,7 +211,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) {
212
211
  }
213
212
  }
214
213
  const _c0$12 = [[["", "headerNavigation", ""]]];
215
- const _c1$t = ["[headerNavigation]"];
214
+ const _c1$s = ["[headerNavigation]"];
216
215
  class HeaderBarComponent {
217
216
  constructor() {
218
217
  this.signOutRequest = new EventEmitter();
@@ -222,7 +221,7 @@ class HeaderBarComponent {
222
221
  }
223
222
  }
224
223
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
225
- 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) {
224
+ 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) {
226
225
  if (rf & 1) {
227
226
  i0.ɵɵprojectionDef(_c0$12);
228
227
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
@@ -278,11 +277,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
278
277
  })();
279
278
 
280
279
  const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
281
- const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
280
+ const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
282
281
  class NavigationComponent {
283
282
  }
284
283
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
285
- 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) {
284
+ 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) {
286
285
  if (rf & 1) {
287
286
  i0.ɵɵprojectionDef(_c0$11);
288
287
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
@@ -413,11 +412,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
413
412
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
414
413
 
415
414
  const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
416
- const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
415
+ const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
417
416
  class BodyComponent {
418
417
  }
419
418
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
420
- 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) {
419
+ 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) {
421
420
  if (rf & 1) {
422
421
  i0.ɵɵprojectionDef(_c0$10);
423
422
  i0.ɵɵelementStart(0, "div", 0);
@@ -1086,11 +1085,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
1086
1085
  })();
1087
1086
 
1088
1087
  const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
1089
- const _c1$q = ["*"];
1088
+ const _c1$p = ["*"];
1090
1089
  class TabComponent {
1091
1090
  }
1092
1091
  TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
1093
- 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) {
1092
+ 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) {
1094
1093
  if (rf & 1) {
1095
1094
  i0.ɵɵprojectionDef();
1096
1095
  i0.ɵɵelementStart(0, "div", 0);
@@ -1116,8 +1115,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
1116
1115
  })();
1117
1116
 
1118
1117
  const _c0$Y = ["tab"];
1119
- const _c1$p = function () { return ["."]; };
1120
- const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1118
+ const _c1$o = function () { return ["."]; };
1119
+ const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1121
1120
  function TabsComponent_li_2_Template(rf, ctx) {
1122
1121
  if (rf & 1) {
1123
1122
  const _r4 = i0.ɵɵgetCurrentView();
@@ -1130,7 +1129,7 @@ function TabsComponent_li_2_Template(rf, ctx) {
1130
1129
  if (rf & 2) {
1131
1130
  const panel_r1 = ctx.$implicit;
1132
1131
  i0.ɵɵadvance(1);
1133
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
1132
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
1134
1133
  i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
1135
1134
  i0.ɵɵadvance(2);
1136
1135
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
@@ -1334,9 +1333,14 @@ class HttpError {
1334
1333
  }
1335
1334
  static from(response) {
1336
1335
  const error = new HttpError();
1336
+ if ((response === null || response === void 0 ? void 0 : response.status) === 429) {
1337
+ error.error = HttpError.MESSAGE_ERROR_429;
1338
+ error.status = response.status;
1339
+ error.message = response.message;
1340
+ }
1337
1341
  // Check that the HttpErrorResponse contains an "error" object before mapping the error properties
1338
1342
  if (!!(response && response.error)) {
1339
- Object.keys(error).forEach(key => {
1343
+ Object.keys(error).forEach((key) => {
1340
1344
  error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
1341
1345
  });
1342
1346
  }
@@ -1353,6 +1357,7 @@ class HttpError {
1353
1357
  HttpError.DEFAULT_ERROR = 'Unknown error';
1354
1358
  HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
1355
1359
  HttpError.DEFAULT_STATUS = 500;
1360
+ HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
1356
1361
 
1357
1362
  class AbstractAppConfig {
1358
1363
  /**
@@ -2697,9 +2702,6 @@ class FirstErrorPipe {
2697
2702
  else if (keys[0] === 'pattern') {
2698
2703
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2699
2704
  }
2700
- else if (keys[0] === 'markDownPattern') {
2701
- errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2702
- }
2703
2705
  else if (keys[0] === 'minlength') {
2704
2706
  errorMessage = '%FIELDLABEL% is below the minimum length';
2705
2707
  }
@@ -4548,7 +4550,6 @@ class FormValidatorsService {
4548
4550
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4549
4551
  const validators = [Validators.required];
4550
4552
  if (caseField.field_type.type === 'Text') {
4551
- validators.push(this.markDownPatternValidator());
4552
4553
  if (caseField.field_type.regular_expression) {
4553
4554
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4554
4555
  }
@@ -4562,38 +4563,22 @@ class FormValidatorsService {
4562
4563
  validators.push(Validators.maxLength(caseField.field_type.max));
4563
4564
  }
4564
4565
  }
4565
- if (caseField.field_type.type === 'TextArea') {
4566
- validators.push(this.emptyValidator());
4567
- validators.push(this.markDownPatternValidator());
4568
- }
4569
4566
  if (control.validator) {
4570
4567
  validators.push(control.validator);
4571
4568
  }
4572
4569
  control.setValidators(validators);
4573
4570
  }
4574
- else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
4575
- control.setValidators(this.markDownPatternValidator());
4576
- }
4577
4571
  return control;
4578
4572
  }
4579
4573
  static emptyValidator() {
4580
4574
  const validator = (control) => {
4581
- var _a;
4582
- if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
4575
+ if (control && control.value && control.value.toString().trim().length === 0) {
4583
4576
  return { required: {} };
4584
4577
  }
4585
4578
  return null;
4586
4579
  };
4587
4580
  return validator;
4588
4581
  }
4589
- static markDownPatternValidator() {
4590
- const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4591
- return (control) => {
4592
- var _a;
4593
- const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
4594
- return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4595
- };
4596
- }
4597
4582
  // TODO: Strip this out as it's only here for the moment because
4598
4583
  // the service is being injected all over the place but it doesn't
4599
4584
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4601,20 +4586,10 @@ class FormValidatorsService {
4601
4586
  addValidators(caseField, control) {
4602
4587
  return FormValidatorsService.addValidators(caseField, control);
4603
4588
  }
4604
- addMarkDownValidators(formGroup, controlPath) {
4605
- const control = formGroup.get(controlPath);
4606
- if (control) {
4607
- control.setValidators(FormValidatorsService.markDownPatternValidator());
4608
- control.updateValueAndValidity();
4609
- }
4610
- return control;
4611
- }
4612
4589
  }
4613
4590
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4614
4591
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4615
4592
  ];
4616
- FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4617
- FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4618
4593
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4619
4594
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4620
4595
  (function () {
@@ -4631,12 +4606,17 @@ class AbstractFormFieldComponent {
4631
4606
  return this.idPrefix + this.caseField.id;
4632
4607
  }
4633
4608
  registerControl(control, replace = false) {
4609
+ var _a;
4634
4610
  const container = this.parent || this.formGroup;
4635
4611
  if (!container) {
4636
4612
  return control;
4637
4613
  }
4638
4614
  const existing = container.controls[this.caseField.id];
4615
+ // update the field value which has been set in mid-event call back
4639
4616
  if (existing) {
4617
+ if (existing.value === null && ((_a = this.caseField) === null || _a === void 0 ? void 0 : _a.value)) {
4618
+ existing.value = this.caseField.value;
4619
+ }
4640
4620
  if (replace) {
4641
4621
  // Set the validators on the replacement with what already exists.
4642
4622
  control.setValidators(existing.validator);
@@ -6307,6 +6287,7 @@ class AddressesService {
6307
6287
  constructor(http, appConfig) {
6308
6288
  this.http = http;
6309
6289
  this.appConfig = appConfig;
6290
+ this.mandatoryError = new BehaviorSubject(false);
6310
6291
  }
6311
6292
  getAddressesForPostcode(postcode) {
6312
6293
  return this.http
@@ -6315,6 +6296,12 @@ class AddressesService {
6315
6296
  .pipe(map(res => res.results))
6316
6297
  .pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
6317
6298
  }
6299
+ getMandatoryError() {
6300
+ return this.mandatoryError.asObservable();
6301
+ }
6302
+ setMandatoryError(value) {
6303
+ this.mandatoryError.next(value);
6304
+ }
6318
6305
  format(addressModel) {
6319
6306
  return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
6320
6307
  }
@@ -10034,7 +10021,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
10034
10021
  }
10035
10022
  }
10036
10023
  class CaseEditPageComponent {
10037
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
10024
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, addressService) {
10038
10025
  this.caseEdit = caseEdit;
10039
10026
  this.route = route;
10040
10027
  this.formValueService = formValueService;
@@ -10046,6 +10033,7 @@ class CaseEditPageComponent {
10046
10033
  this.caseEditDataService = caseEditDataService;
10047
10034
  this.loadingService = loadingService;
10048
10035
  this.validPageListCaseFieldsService = validPageListCaseFieldsService;
10036
+ this.addressService = addressService;
10049
10037
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
10050
10038
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
10051
10039
  this.formValuesChanged = false;
@@ -10170,7 +10158,14 @@ class CaseEditPageComponent {
10170
10158
  }
10171
10159
  }
10172
10160
  if (fieldElement.hasError('required')) {
10173
- this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
10161
+ if (casefield.id === 'AddressLine1') {
10162
+ // EUI-1067 - Display more relevant error message to user and correctly navigate to the field
10163
+ this.addressService.setMandatoryError(true);
10164
+ this.caseEditDataService.addFormValidationError({ id: `${path}_${path}`, message: `An address is required` });
10165
+ }
10166
+ else {
10167
+ this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
10168
+ }
10174
10169
  fieldElement.markAsDirty();
10175
10170
  // For the JudicialUser field type, an error needs to be set on the component so that an error message
10176
10171
  // can be displayed at field level
@@ -10245,6 +10240,7 @@ class CaseEditPageComponent {
10245
10240
  }
10246
10241
  }
10247
10242
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
10243
+ this.addressService.setMandatoryError(false);
10248
10244
  console.log('Case Edit Error', this.caseEdit.error);
10249
10245
  if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
10250
10246
  this.caseEdit.validPageList.push(this.currentPage);
@@ -10540,7 +10536,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
10540
10536
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
10541
10537
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
10542
10538
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
10543
- 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)); };
10539
+ 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)); };
10544
10540
  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) {
10545
10541
  if (rf & 1) {
10546
10542
  i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
@@ -10579,7 +10575,7 @@ CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseE
10579
10575
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
10580
10576
  type: Component,
10581
10577
  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"] }]
10582
- }], 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);
10578
+ }], 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);
10583
10579
  })();
10584
10580
 
10585
10581
  class CallbackErrorsContext {
@@ -11071,6 +11067,19 @@ class AddressOption {
11071
11067
  }
11072
11068
  }
11073
11069
 
11070
+ class AddressValidationConstants {
11071
+ }
11072
+ // allow alpha-numeric characters and spaces possibly between a connecting - character
11073
+ // this applies validation while allowing partial postcodes
11074
+ AddressValidationConstants.REGEX_POSTCODE = /^([A-Za-z0-9]-*| )+$/;
11075
+ AddressValidationConstants.ɵfac = function AddressValidationConstants_Factory(t) { return new (t || AddressValidationConstants)(); };
11076
+ AddressValidationConstants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AddressValidationConstants, factory: AddressValidationConstants.ɵfac });
11077
+ (function () {
11078
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressValidationConstants, [{
11079
+ type: Injectable
11080
+ }], null, null);
11081
+ })();
11082
+
11074
11083
  const _c0$U = ["writeComplexFieldComponent"];
11075
11084
  function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
11076
11085
  if (rf & 1) {
@@ -11080,12 +11089,13 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
11080
11089
  i0.ɵɵelementEnd();
11081
11090
  }
11082
11091
  if (rf & 2) {
11092
+ const ctx_r5 = i0.ɵɵnextContext(3);
11083
11093
  i0.ɵɵadvance(1);
11084
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Enter the Postcode"));
11094
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
11085
11095
  }
11086
11096
  }
11087
- const _c1$o = function (a0) { return { "form-group-error": a0 }; };
11088
- const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
11097
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
11098
+ const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
11089
11099
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11090
11100
  if (rf & 1) {
11091
11101
  const _r7 = i0.ɵɵgetCurrentView();
@@ -11103,7 +11113,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11103
11113
  }
11104
11114
  if (rf & 2) {
11105
11115
  const ctx_r2 = i0.ɵɵnextContext(2);
11106
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
11116
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
11107
11117
  i0.ɵɵadvance(1);
11108
11118
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
11109
11119
  i0.ɵɵadvance(2);
@@ -11111,12 +11121,25 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11111
11121
  i0.ɵɵadvance(2);
11112
11122
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
11113
11123
  i0.ɵɵadvance(1);
11114
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11124
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11115
11125
  i0.ɵɵadvance(2);
11116
11126
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
11117
11127
  }
11118
11128
  }
11119
- function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) {
11129
+ function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) {
11130
+ if (rf & 1) {
11131
+ i0.ɵɵelementStart(0, "span", 14);
11132
+ i0.ɵɵtext(1);
11133
+ i0.ɵɵpipe(2, "rpxTranslate");
11134
+ i0.ɵɵelementEnd();
11135
+ }
11136
+ if (rf & 2) {
11137
+ const ctx_r8 = i0.ɵɵnextContext(3);
11138
+ i0.ɵɵadvance(1);
11139
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r8.errorMessage));
11140
+ }
11141
+ }
11142
+ function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) {
11120
11143
  if (rf & 1) {
11121
11144
  i0.ɵɵelementStart(0, "option", 18);
11122
11145
  i0.ɵɵtext(1);
@@ -11124,31 +11147,35 @@ function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) {
11124
11147
  i0.ɵɵelementEnd();
11125
11148
  }
11126
11149
  if (rf & 2) {
11127
- const addressOption_r9 = ctx.$implicit;
11128
- i0.ɵɵproperty("ngValue", addressOption_r9.value);
11150
+ const addressOption_r10 = ctx.$implicit;
11151
+ i0.ɵɵproperty("ngValue", addressOption_r10.value);
11129
11152
  i0.ɵɵadvance(1);
11130
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r9.description), " ");
11153
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r10.description), " ");
11131
11154
  }
11132
11155
  }
11133
11156
  function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
11134
11157
  if (rf & 1) {
11135
- const _r11 = i0.ɵɵgetCurrentView();
11158
+ const _r12 = i0.ɵɵgetCurrentView();
11136
11159
  i0.ɵɵelementStart(0, "div", 15)(1, "label", 9)(2, "span", 10);
11137
11160
  i0.ɵɵtext(3);
11138
11161
  i0.ɵɵpipe(4, "rpxTranslate");
11139
11162
  i0.ɵɵelementEnd()();
11140
- i0.ɵɵelementStart(5, "select", 16);
11141
- 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()); });
11142
- i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_div_5_option_6_Template, 3, 4, "option", 17);
11163
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_span_5_Template, 3, 3, "span", 11);
11164
+ i0.ɵɵelementStart(6, "select", 16);
11165
+ 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()); });
11166
+ i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_5_option_7_Template, 3, 4, "option", 17);
11143
11167
  i0.ɵɵelementEnd()();
11144
11168
  }
11145
11169
  if (rf & 2) {
11146
11170
  const ctx_r3 = i0.ɵɵnextContext(2);
11171
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
11147
11172
  i0.ɵɵadvance(1);
11148
11173
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
11149
11174
  i0.ɵɵadvance(2);
11150
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Select an address"));
11175
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, "Select an address"));
11151
11176
  i0.ɵɵadvance(2);
11177
+ i0.ɵɵproperty("ngIf", ctx_r3.noAddressSelected);
11178
+ i0.ɵɵadvance(1);
11152
11179
  i0.ɵɵproperty("id", ctx_r3.createElementId("addressList"))("formControl", ctx_r3.addressList);
11153
11180
  i0.ɵɵadvance(1);
11154
11181
  i0.ɵɵproperty("ngForOf", ctx_r3.addressOptions);
@@ -11156,9 +11183,9 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
11156
11183
  }
11157
11184
  function WriteAddressFieldComponent_div_1_a_6_Template(rf, ctx) {
11158
11185
  if (rf & 1) {
11159
- const _r13 = i0.ɵɵgetCurrentView();
11186
+ const _r14 = i0.ɵɵgetCurrentView();
11160
11187
  i0.ɵɵelementStart(0, "a", 19);
11161
- 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()); });
11188
+ 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()); });
11162
11189
  i0.ɵɵtext(1);
11163
11190
  i0.ɵɵpipe(2, "rpxTranslate");
11164
11191
  i0.ɵɵelementEnd();
@@ -11175,7 +11202,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) {
11175
11202
  i0.ɵɵpipe(3, "ccdFieldLabel");
11176
11203
  i0.ɵɵelementEnd();
11177
11204
  i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 17, "div", 5);
11178
- i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 7, 7, "div", 6);
11205
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 8, 11, "div", 6);
11179
11206
  i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
11180
11207
  i0.ɵɵelementEnd();
11181
11208
  }
@@ -11196,19 +11223,30 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11196
11223
  super();
11197
11224
  this.isCompoundPipe = isCompoundPipe;
11198
11225
  this.addressFormGroup = new FormGroup({});
11226
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11199
11227
  this.missingPostcode = false;
11228
+ this.noAddressSelected = false;
11200
11229
  this.addressesService = addressesService;
11201
11230
  }
11202
11231
  ngOnInit() {
11203
11232
  if (!this.isComplexWithHiddenFields()) {
11204
- this.postcode = new FormControl('');
11233
+ this.postcode = new FormControl('', [Validators.required]);
11205
11234
  this.addressFormGroup.addControl('postcode', this.postcode);
11206
11235
  this.addressList = new FormControl('');
11207
11236
  this.addressFormGroup.addControl('address', this.addressList);
11208
11237
  }
11238
+ this.addressesService.getMandatoryError().subscribe((value) => {
11239
+ this.updateErrorsOnContinue(value);
11240
+ });
11209
11241
  }
11210
11242
  findAddress() {
11243
+ this.noAddressSelected = false;
11211
11244
  if (!this.postcode.value) {
11245
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11246
+ this.missingPostcode = true;
11247
+ }
11248
+ else if (!this.postcode.value.trim().match(AddressValidationConstants.REGEX_POSTCODE)) {
11249
+ this.errorMessage = WriteAddressFieldComponent.INVALID_ERROR_MESSAGE;
11212
11250
  this.missingPostcode = true;
11213
11251
  }
11214
11252
  else {
@@ -11237,6 +11275,8 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11237
11275
  blankAddress() {
11238
11276
  this.caseField.value = new AddressModel();
11239
11277
  this.setFormValue();
11278
+ this.missingPostcode = false;
11279
+ this.noAddressSelected = false;
11240
11280
  }
11241
11281
  isComplexWithHiddenFields() {
11242
11282
  if (this.caseField.isComplex() && this.caseField.field_type.complex_fields
@@ -11268,6 +11308,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11268
11308
  addressSelected() {
11269
11309
  this.caseField.value = this.addressList.value;
11270
11310
  this.setFormValue();
11311
+ this.noAddressSelected = false;
11271
11312
  }
11272
11313
  ngOnChanges(changes) {
11273
11314
  super.ngOnChanges(changes);
@@ -11288,7 +11329,14 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11288
11329
  this.writeComplexFieldComponent.complexGroup.setValue(this.caseField.value);
11289
11330
  }
11290
11331
  }
11332
+ updateErrorsOnContinue(value) {
11333
+ this.missingPostcode = value && !this.shouldShowDetailFields() && !this.addressOptions;
11334
+ this.noAddressSelected = value && !this.shouldShowDetailFields() && !!this.addressOptions;
11335
+ this.errorMessage = this.noAddressSelected ? 'Select an address' : this.errorMessage;
11336
+ }
11291
11337
  }
11338
+ WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE = 'Enter a Postcode';
11339
+ WriteAddressFieldComponent.INVALID_ERROR_MESSAGE = 'Enter a valid Postcode';
11292
11340
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
11293
11341
  WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11294
11342
  if (rf & 1) {
@@ -11300,7 +11348,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11300
11348
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11301
11349
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11302
11350
  }
11303
- }, 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) {
11351
+ }, 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) {
11304
11352
  if (rf & 1) {
11305
11353
  i0.ɵɵelementStart(0, "div", 0);
11306
11354
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
@@ -11318,7 +11366,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11318
11366
  (function () {
11319
11367
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
11320
11368
  type: Component,
11321
- 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"] }]
11369
+ 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"] }]
11322
11370
  }], function () { return [{ type: AddressesService }, { type: IsCompoundPipe }]; }, { writeComplexFieldComponent: [{
11323
11371
  type: ViewChild,
11324
11372
  args: ['writeComplexFieldComponent', { static: false }]
@@ -12689,7 +12737,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
12689
12737
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12690
12738
  }
12691
12739
  }
12692
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12740
+ const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12693
12741
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12694
12742
  ngOnInit() {
12695
12743
  if (this.caseField.value) {
@@ -12755,7 +12803,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12755
12803
  i0.ɵɵelementEnd();
12756
12804
  }
12757
12805
  if (rf & 2) {
12758
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12806
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12759
12807
  i0.ɵɵadvance(1);
12760
12808
  i0.ɵɵproperty("for", ctx.id());
12761
12809
  i0.ɵɵadvance(1);
@@ -12793,7 +12841,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
12793
12841
  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);
12794
12842
  }
12795
12843
  }
12796
- const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12844
+ const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12797
12845
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12798
12846
  if (rf & 1) {
12799
12847
  i0.ɵɵelementStart(0, "tr")(1, "td");
@@ -12805,7 +12853,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12805
12853
  const i_r5 = ctx.index;
12806
12854
  const ctx_r3 = i0.ɵɵnextContext(3);
12807
12855
  i0.ɵɵadvance(2);
12808
- 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));
12856
+ 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));
12809
12857
  }
12810
12858
  }
12811
12859
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -14001,7 +14049,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
14001
14049
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
14002
14050
  }
14003
14051
  }
14004
- const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
14052
+ const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
14005
14053
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14006
14054
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
14007
14055
  super();
@@ -14307,7 +14355,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14307
14355
  i0.ɵɵelementEnd()();
14308
14356
  }
14309
14357
  if (rf & 2) {
14310
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
14358
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
14311
14359
  i0.ɵɵadvance(1);
14312
14360
  i0.ɵɵproperty("for", ctx.id());
14313
14361
  i0.ɵɵadvance(1);
@@ -14531,14 +14579,9 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
14531
14579
  })();
14532
14580
 
14533
14581
  class MarkdownComponent {
14534
- constructor() {
14535
- this.renderUrlToTextFeature = true;
14536
- }
14582
+ constructor() { }
14537
14583
  ngOnInit() {
14538
14584
  this.content = this.content.replace(/ \n/g, '<br>');
14539
- if (this.renderUrlToTextFeature) {
14540
- this.renderUrlToText();
14541
- }
14542
14585
  }
14543
14586
  onMarkdownClick(event) {
14544
14587
  // If we don't have an anchor tag, we don't need to do anything.
@@ -14547,22 +14590,13 @@ class MarkdownComponent {
14547
14590
  }
14548
14591
  return true;
14549
14592
  }
14550
- renderUrlToText() {
14551
- const renderer = new marked.Renderer();
14552
- renderer.link = (href, title, text) => {
14553
- return text; // Return the text without turning it into a link
14554
- };
14555
- marked.setOptions({
14556
- renderer: renderer
14557
- });
14558
- }
14559
14593
  }
14560
14594
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
14561
14595
  MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
14562
14596
  if (rf & 1) {
14563
14597
  i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
14564
14598
  }
14565
- }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14599
+ }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14566
14600
  if (rf & 1) {
14567
14601
  i0.ɵɵelementStart(0, "div");
14568
14602
  i0.ɵɵelement(1, "markdown", 0);
@@ -14583,8 +14617,6 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
14583
14617
  type: Input
14584
14618
  }], markdownUseHrefAsRouterLink: [{
14585
14619
  type: Input
14586
- }], renderUrlToTextFeature: [{
14587
- type: Input
14588
14620
  }], onMarkdownClick: [{
14589
14621
  type: HostListener,
14590
14622
  args: ['click', ['$event']]
@@ -14719,7 +14751,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
14719
14751
  i0.ɵɵadvance(1);
14720
14752
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14721
14753
  i0.ɵɵadvance(1);
14722
- i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
14754
+ i0.ɵɵproperty("content", checkbox_r4.label);
14723
14755
  }
14724
14756
  }
14725
14757
  const _c0$O = function (a0) { return { "error": a0 }; };
@@ -14784,14 +14816,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
14784
14816
  }
14785
14817
  }
14786
14818
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
14787
- 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) {
14819
+ 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) {
14788
14820
  if (rf & 1) {
14789
14821
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
14790
14822
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14791
14823
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14792
14824
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14793
14825
  i0.ɵɵelementEnd();
14794
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14826
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14795
14827
  i0.ɵɵelementEnd()();
14796
14828
  }
14797
14829
  if (rf & 2) {
@@ -14809,7 +14841,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14809
14841
  (function () {
14810
14842
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14811
14843
  type: Component,
14812
- 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"] }]
14844
+ 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"] }]
14813
14845
  }], null, null);
14814
14846
  })();
14815
14847
 
@@ -14953,7 +14985,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14953
14985
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
14954
14986
  }
14955
14987
  }
14956
- const _c1$k = function (a0) { return { "form-group-error": a0 }; };
14988
+ const _c1$j = function (a0) { return { "form-group-error": a0 }; };
14957
14989
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14958
14990
  ngOnInit() {
14959
14991
  /**
@@ -14993,7 +15025,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
14993
15025
  i0.ɵɵelementEnd()();
14994
15026
  }
14995
15027
  if (rf & 2) {
14996
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15028
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14997
15029
  i0.ɵɵadvance(3);
14998
15030
  i0.ɵɵproperty("for", ctx.id());
14999
15031
  i0.ɵɵadvance(1);
@@ -15094,7 +15126,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
15094
15126
  }
15095
15127
  }
15096
15128
  const _c0$M = function (a0) { return { "form-group-error": a0 }; };
15097
- const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
15129
+ const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
15098
15130
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
15099
15131
  ngOnInit() {
15100
15132
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15122,7 +15154,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
15122
15154
  i0.ɵɵadvance(1);
15123
15155
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15124
15156
  i0.ɵɵadvance(1);
15125
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15157
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15126
15158
  }
15127
15159
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
15128
15160
  (function () {
@@ -15377,7 +15409,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15377
15409
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
15378
15410
  }
15379
15411
  }
15380
- const _c1$i = function (a0) { return { "form-group-error": a0 }; };
15412
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15381
15413
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
15382
15414
  ngOnInit() {
15383
15415
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -15399,7 +15431,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
15399
15431
  i0.ɵɵelementEnd()();
15400
15432
  }
15401
15433
  if (rf & 2) {
15402
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15434
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15403
15435
  i0.ɵɵadvance(3);
15404
15436
  i0.ɵɵproperty("for", ctx.id());
15405
15437
  i0.ɵɵadvance(1);
@@ -15553,7 +15585,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
15553
15585
  i0.ɵɵelementEnd();
15554
15586
  }
15555
15587
  }
15556
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15588
+ const _c1$g = function (a0) { return { "form-group-error": a0 }; };
15557
15589
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
15558
15590
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
15559
15591
  super(compoundPipe, validatorsService);
@@ -15706,7 +15738,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
15706
15738
  }
15707
15739
  if (rf & 2) {
15708
15740
  const _r3 = i0.ɵɵreference(7);
15709
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
15741
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
15710
15742
  i0.ɵɵadvance(1);
15711
15743
  i0.ɵɵproperty("for", ctx.id());
15712
15744
  i0.ɵɵadvance(1);
@@ -16493,7 +16525,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
16493
16525
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
16494
16526
  }
16495
16527
  }
16496
- const _c1$g = function (a0) { return { "table-group-error": a0 }; };
16528
+ const _c1$f = function (a0) { return { "table-group-error": a0 }; };
16497
16529
  function LinkCasesComponent_tr_31_Template(rf, ctx) {
16498
16530
  if (rf & 1) {
16499
16531
  const _r21 = i0.ɵɵgetCurrentView();
@@ -16526,7 +16558,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
16526
16558
  const case_r16 = ctx.$implicit;
16527
16559
  const ctx_r2 = i0.ɵɵnextContext();
16528
16560
  i0.ɵɵadvance(2);
16529
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16561
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16530
16562
  i0.ɵɵadvance(2);
16531
16563
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
16532
16564
  i0.ɵɵadvance(2);
@@ -18613,7 +18645,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
18613
18645
  }
18614
18646
  }
18615
18647
  const _c0$E = function (a0) { return { "form-group-error": a0 }; };
18616
- const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
18648
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18617
18649
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
18618
18650
  ngOnInit() {
18619
18651
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18641,7 +18673,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
18641
18673
  i0.ɵɵadvance(1);
18642
18674
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
18643
18675
  i0.ɵɵadvance(1);
18644
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18676
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18645
18677
  }
18646
18678
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18647
18679
  (function () {
@@ -19357,7 +19389,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
19357
19389
  }
19358
19390
  }
19359
19391
  const _c0$C = function (a0) { return { "form-group-error": a0 }; };
19360
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
19392
+ const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
19361
19393
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
19362
19394
  ngOnInit() {
19363
19395
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -19385,7 +19417,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
19385
19417
  i0.ɵɵadvance(1);
19386
19418
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
19387
19419
  i0.ɵɵadvance(1);
19388
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19420
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19389
19421
  }
19390
19422
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
19391
19423
  (function () {
@@ -21627,7 +21659,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
21627
21659
  }
21628
21660
  }
21629
21661
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
21630
- const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
21662
+ const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
21631
21663
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
21632
21664
  constructor(browserService) {
21633
21665
  super();
@@ -21667,7 +21699,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
21667
21699
  i0.ɵɵadvance(1);
21668
21700
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
21669
21701
  i0.ɵɵadvance(1);
21670
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21702
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21671
21703
  }
21672
21704
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21673
21705
  (function () {
@@ -21742,7 +21774,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
21742
21774
  }
21743
21775
  }
21744
21776
  const _c0$y = function (a0) { return { "form-group-error": a0 }; };
21745
- const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
21777
+ const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
21746
21778
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
21747
21779
  ngOnInit() {
21748
21780
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -21774,7 +21806,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
21774
21806
  i0.ɵɵadvance(1);
21775
21807
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
21776
21808
  i0.ɵɵadvance(1);
21777
- 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);
21809
+ 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);
21778
21810
  }
21779
21811
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21780
21812
  (function () {
@@ -21984,7 +22016,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
21984
22016
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
21985
22017
  }
21986
22018
  }
21987
- const _c1$b = function (a0) { return { "form-group-error": a0 }; };
22019
+ const _c1$a = function (a0) { return { "form-group-error": a0 }; };
21988
22020
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
21989
22021
  constructor(yesNoService) {
21990
22022
  super();
@@ -22008,7 +22040,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
22008
22040
  i0.ɵɵelementEnd()()();
22009
22041
  }
22010
22042
  if (rf & 2) {
22011
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22043
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22012
22044
  i0.ɵɵadvance(3);
22013
22045
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
22014
22046
  i0.ɵɵadvance(1);
@@ -22406,7 +22438,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
22406
22438
  i0.ɵɵelementContainer(0);
22407
22439
  }
22408
22440
  }
22409
- const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
22441
+ const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
22410
22442
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
22411
22443
  if (rf & 1) {
22412
22444
  i0.ɵɵelementContainerStart(0);
@@ -22419,7 +22451,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
22419
22451
  i0.ɵɵnextContext();
22420
22452
  const _r1 = i0.ɵɵreference(13);
22421
22453
  i0.ɵɵadvance(1);
22422
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
22454
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
22423
22455
  }
22424
22456
  }
22425
22457
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -22610,7 +22642,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
22610
22642
  }
22611
22643
  }
22612
22644
  const _c0$s = [[["", "trigger", ""]]];
22613
- const _c1$9 = ["[trigger]"];
22645
+ const _c1$8 = ["[trigger]"];
22614
22646
  class CaseFileViewOverlayMenuComponent {
22615
22647
  constructor() {
22616
22648
  this.title = '';
@@ -22624,7 +22656,7 @@ class CaseFileViewOverlayMenuComponent {
22624
22656
  }
22625
22657
  }
22626
22658
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
22627
- 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) {
22659
+ 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) {
22628
22660
  if (rf & 1) {
22629
22661
  i0.ɵɵprojectionDef(_c0$s);
22630
22662
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
@@ -24885,7 +24917,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
24885
24917
  }
24886
24918
  }
24887
24919
  const _c0$n = function (a0) { return { "form-group-error": a0 }; };
24888
- const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
24920
+ const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
24889
24921
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24890
24922
  if (rf & 1) {
24891
24923
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
@@ -24907,7 +24939,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24907
24939
  i0.ɵɵadvance(3);
24908
24940
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
24909
24941
  i0.ɵɵadvance(1);
24910
- 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);
24942
+ 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);
24911
24943
  i0.ɵɵadvance(1);
24912
24944
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
24913
24945
  }
@@ -25477,7 +25509,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
25477
25509
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
25478
25510
  }
25479
25511
  }
25480
- const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
25512
+ const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
25481
25513
  class UpdateFlagComponent {
25482
25514
  constructor(rpxTranslationService) {
25483
25515
  this.rpxTranslationService = rpxTranslationService;
@@ -25686,7 +25718,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
25686
25718
  const _r3 = i0.ɵɵreference(17);
25687
25719
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25688
25720
  i0.ɵɵadvance(2);
25689
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
25721
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
25690
25722
  i0.ɵɵadvance(3);
25691
25723
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
25692
25724
  i0.ɵɵadvance(2);
@@ -27082,7 +27114,7 @@ const CUSTOM_MOMENT_FORMATS = {
27082
27114
  };
27083
27115
 
27084
27116
  const _c0$g = ["picker"];
27085
- const _c1$6 = ["input"];
27117
+ const _c1$5 = ["input"];
27086
27118
  function DatetimePickerComponent_span_3_Template(rf, ctx) {
27087
27119
  if (rf & 1) {
27088
27120
  i0.ɵɵelementStart(0, "span", 11);
@@ -27146,7 +27178,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
27146
27178
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
27147
27179
  }
27148
27180
  }
27149
- const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
27181
+ const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
27150
27182
  class DatetimePickerComponent extends AbstractFormFieldComponent {
27151
27183
  constructor(formatTranslationService, ngxMatDateFormats) {
27152
27184
  super();
@@ -27312,7 +27344,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
27312
27344
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
27313
27345
  if (rf & 1) {
27314
27346
  i0.ɵɵviewQuery(_c0$g, 5);
27315
- i0.ɵɵviewQuery(_c1$6, 5);
27347
+ i0.ɵɵviewQuery(_c1$5, 5);
27316
27348
  }
27317
27349
  if (rf & 2) {
27318
27350
  let _t;
@@ -27348,7 +27380,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
27348
27380
  }
27349
27381
  if (rf & 2) {
27350
27382
  const _r6 = i0.ɵɵreference(13);
27351
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27383
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27352
27384
  i0.ɵɵadvance(3);
27353
27385
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
27354
27386
  i0.ɵɵadvance(1);
@@ -27602,7 +27634,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
27602
27634
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
27603
27635
  }
27604
27636
  }
27605
- const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27637
+ const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27606
27638
  function EventLogTableComponent_tr_20_Template(rf, ctx) {
27607
27639
  if (rf & 1) {
27608
27640
  const _r18 = i0.ɵɵgetCurrentView();
@@ -27635,7 +27667,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
27635
27667
  if (rf & 2) {
27636
27668
  const event_r1 = ctx.$implicit;
27637
27669
  const ctx_r0 = i0.ɵɵnextContext();
27638
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
27670
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
27639
27671
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
27640
27672
  i0.ɵɵadvance(2);
27641
27673
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -29703,36 +29735,6 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
29703
29735
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
29704
29736
  }
29705
29737
  }
29706
- function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
29707
- if (rf & 1) {
29708
- i0.ɵɵelementStart(0, "span", 48);
29709
- i0.ɵɵtext(1);
29710
- i0.ɵɵpipe(2, "rpxTranslate");
29711
- i0.ɵɵpipe(3, "ccdFirstError");
29712
- i0.ɵɵelementEnd();
29713
- }
29714
- if (rf & 2) {
29715
- const ctx_r36 = i0.ɵɵnextContext(3);
29716
- i0.ɵɵadvance(1);
29717
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
29718
- }
29719
- }
29720
- function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
29721
- if (rf & 1) {
29722
- i0.ɵɵelementStart(0, "span", 48);
29723
- i0.ɵɵtext(1);
29724
- i0.ɵɵpipe(2, "rpxTranslate");
29725
- i0.ɵɵpipe(3, "ccdFirstError");
29726
- i0.ɵɵelementEnd();
29727
- }
29728
- if (rf & 2) {
29729
- const ctx_r37 = i0.ɵɵnextContext(3);
29730
- i0.ɵɵadvance(1);
29731
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
29732
- }
29733
- }
29734
- const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
29735
- const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
29736
29738
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29737
29739
  if (rf & 1) {
29738
29740
  i0.ɵɵelementContainerStart(0);
@@ -29743,38 +29745,21 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29743
29745
  i0.ɵɵelementStart(6, "span", 43);
29744
29746
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
29745
29747
  i0.ɵɵelementEnd()();
29746
- i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
29747
- i0.ɵɵelement(9, "input", 45);
29748
+ i0.ɵɵelement(8, "input", 44);
29748
29749
  i0.ɵɵelementEnd();
29749
- i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
29750
- i0.ɵɵtext(12, "Event description (optional)");
29750
+ i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
29751
+ i0.ɵɵtext(11, "Event description (optional)");
29751
29752
  i0.ɵɵelementEnd();
29752
- i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
29753
- i0.ɵɵelement(14, "textarea", 47);
29753
+ i0.ɵɵelement(12, "textarea", 46);
29754
29754
  i0.ɵɵelementEnd()();
29755
29755
  i0.ɵɵelementContainerEnd();
29756
29756
  }
29757
- if (rf & 2) {
29758
- const ctx_r9 = i0.ɵɵnextContext(2);
29759
- i0.ɵɵadvance(3);
29760
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
29761
- i0.ɵɵadvance(5);
29762
- i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
29763
- i0.ɵɵadvance(1);
29764
- 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)));
29765
- i0.ɵɵadvance(1);
29766
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
29767
- i0.ɵɵadvance(3);
29768
- i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
29769
- i0.ɵɵadvance(1);
29770
- 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)));
29771
- }
29772
29757
  }
29773
29758
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29774
29759
  if (rf & 1) {
29775
- const _r39 = i0.ɵɵgetCurrentView();
29776
- i0.ɵɵelementStart(0, "button", 49);
29777
- 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()); });
29760
+ const _r37 = i0.ɵɵgetCurrentView();
29761
+ i0.ɵɵelementStart(0, "button", 47);
29762
+ 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()); });
29778
29763
  i0.ɵɵtext(1);
29779
29764
  i0.ɵɵpipe(2, "rpxTranslate");
29780
29765
  i0.ɵɵelementEnd();
@@ -29788,7 +29773,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29788
29773
  }
29789
29774
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29790
29775
  if (rf & 1) {
29791
- const _r41 = i0.ɵɵgetCurrentView();
29776
+ const _r39 = i0.ɵɵgetCurrentView();
29792
29777
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
29793
29778
  i0.ɵɵtext(2);
29794
29779
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -29798,13 +29783,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29798
29783
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
29799
29784
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
29800
29785
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
29801
- 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)); });
29786
+ 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)); });
29802
29787
  i0.ɵɵelementEnd();
29803
29788
  i0.ɵɵelementStart(11, "form", 8);
29804
- 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()); });
29789
+ 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()); });
29805
29790
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
29806
29791
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
29807
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
29792
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
29808
29793
  i0.ɵɵelementStart(15, "div", 9);
29809
29794
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
29810
29795
  i0.ɵɵelementStart(17, "button", 11);
@@ -29812,7 +29797,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29812
29797
  i0.ɵɵpipe(19, "rpxTranslate");
29813
29798
  i0.ɵɵelementEnd()();
29814
29799
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
29815
- 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()); });
29800
+ 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()); });
29816
29801
  i0.ɵɵtext(22);
29817
29802
  i0.ɵɵpipe(23, "rpxTranslate");
29818
29803
  i0.ɵɵelementEnd()()()();
@@ -29851,9 +29836,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29851
29836
  }
29852
29837
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29853
29838
  if (rf & 1) {
29854
- const _r45 = i0.ɵɵgetCurrentView();
29855
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
29856
- 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)); });
29839
+ const _r43 = i0.ɵɵgetCurrentView();
29840
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
29841
+ 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)); });
29857
29842
  i0.ɵɵelementEnd();
29858
29843
  }
29859
29844
  if (rf & 2) {
@@ -29863,17 +29848,14 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29863
29848
  }
29864
29849
  // @dynamic
29865
29850
  class CaseEditSubmitComponent {
29866
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
29851
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
29867
29852
  this.caseEdit = caseEdit;
29868
29853
  this.fieldsUtils = fieldsUtils;
29869
29854
  this.caseFieldService = caseFieldService;
29870
29855
  this.route = route;
29871
29856
  this.orderService = orderService;
29872
29857
  this.profileNotifier = profileNotifier;
29873
- this.formValidatorsService = formValidatorsService;
29874
29858
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
29875
- this.eventSummaryLabel = 'Event summary';
29876
- this.eventDescriptionLabel = 'Event description';
29877
29859
  }
29878
29860
  get isDisabled() {
29879
29861
  // EUI-3452.
@@ -29884,7 +29866,7 @@ class CaseEditSubmitComponent {
29884
29866
  }
29885
29867
  ngOnInit() {
29886
29868
  var _a, _b, _c;
29887
- this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
29869
+ this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
29888
29870
  this.eventTrigger = this.caseEdit.eventTrigger;
29889
29871
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
29890
29872
  this.editForm = this.caseEdit.form;
@@ -29897,12 +29879,10 @@ class CaseEditSubmitComponent {
29897
29879
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
29898
29880
  // a FlagLauncher field in the event trigger
29899
29881
  this.caseEdit.isCaseFlagSubmission =
29900
- this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29882
+ this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29901
29883
  this.caseEdit.isLinkedCasesSubmission =
29902
29884
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
29903
29885
  this.pageTitle = this.getPageTitle();
29904
- this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
29905
- this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
29906
29886
  }
29907
29887
  ngOnDestroy() {
29908
29888
  /* istanbul ignore else */
@@ -29911,14 +29891,12 @@ class CaseEditSubmitComponent {
29911
29891
  }
29912
29892
  }
29913
29893
  submit() {
29914
- if (this.summary.valid && this.description.valid) {
29915
- this.caseEdit.submitForm({
29916
- eventTrigger: this.eventTrigger,
29917
- form: this.editForm,
29918
- submit: this.caseEdit.submit,
29919
- caseDetails: this.caseEdit.caseDetails
29920
- });
29921
- }
29894
+ this.caseEdit.submitForm({
29895
+ eventTrigger: this.eventTrigger,
29896
+ form: this.editForm,
29897
+ submit: this.caseEdit.submit,
29898
+ caseDetails: this.caseEdit.caseDetails,
29899
+ });
29922
29900
  }
29923
29901
  onEventCanBeCompleted(eventCanBeCompleted) {
29924
29902
  this.caseEdit.onEventCanBeCompleted({
@@ -29926,7 +29904,7 @@ class CaseEditSubmitComponent {
29926
29904
  eventCanBeCompleted,
29927
29905
  caseDetails: this.caseEdit.caseDetails,
29928
29906
  form: this.editForm,
29929
- submit: this.caseEdit.submit
29907
+ submit: this.caseEdit.submit,
29930
29908
  });
29931
29909
  }
29932
29910
  getPageTitle() {
@@ -30002,7 +29980,7 @@ class CaseEditSubmitComponent {
30002
29980
  }
30003
29981
  }
30004
29982
  readOnlySummaryFieldsToDisplayExists() {
30005
- return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
29983
+ return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
30006
29984
  }
30007
29985
  showEventNotes() {
30008
29986
  var _a;
@@ -30018,7 +29996,7 @@ class CaseEditSubmitComponent {
30018
29996
  }
30019
29997
  getLastPageShown() {
30020
29998
  let lastPage;
30021
- this.wizard.reverse().forEach((page) => {
29999
+ this.wizard.reverse().forEach(page => {
30022
30000
  if (!lastPage && this.isShown(page)) {
30023
30001
  lastPage = page;
30024
30002
  }
@@ -30037,7 +30015,7 @@ class CaseEditSubmitComponent {
30037
30015
  }
30038
30016
  isShown(page) {
30039
30017
  const fields = this.fieldsUtils
30040
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
30018
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
30041
30019
  return page.parsedShowCondition.match(fields);
30042
30020
  }
30043
30021
  canShowFieldInCYA(field) {
@@ -30046,7 +30024,7 @@ class CaseEditSubmitComponent {
30046
30024
  sortFieldsByShowSummaryContent(fields) {
30047
30025
  return this.orderService
30048
30026
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
30049
- .filter((cf) => cf.show_summary_content_option);
30027
+ .filter(cf => cf.show_summary_content_option);
30050
30028
  }
30051
30029
  getCaseFields() {
30052
30030
  if (this.caseEdit.caseDetails) {
@@ -30065,7 +30043,9 @@ class CaseEditSubmitComponent {
30065
30043
  if (this.eventTrigger.can_save_draft) {
30066
30044
  return 'Return to case list';
30067
30045
  }
30068
- return 'Cancel';
30046
+ else {
30047
+ return 'Cancel';
30048
+ }
30069
30049
  }
30070
30050
  }
30071
30051
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -30079,8 +30059,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
30079
30059
  }
30080
30060
  return a.show_summary_content_option - b.show_summary_content_option;
30081
30061
  };
30082
- 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)); };
30083
- 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) {
30062
+ 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)); };
30063
+ 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) {
30084
30064
  if (rf & 1) {
30085
30065
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
30086
30066
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
@@ -30094,8 +30074,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
30094
30074
  (function () {
30095
30075
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
30096
30076
  type: Component,
30097
- 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"] }]
30098
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
30077
+ 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"] }]
30078
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
30099
30079
  })();
30100
30080
 
30101
30081
  function CaseProgressComponent_div_0_Template(rf, ctx) {
@@ -30493,7 +30473,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
30493
30473
  CaseEditGenericErrorsComponent];
30494
30474
  }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
30495
30475
  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]; });
30496
- 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]; });
30476
+ 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]; });
30497
30477
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30498
30478
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30499
30479