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

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 (35) 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/event-trigger/event-trigger.component.mjs +3 -3
  6. package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +55 -18
  7. package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +5 -1
  8. package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
  9. package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +3 -20
  10. package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
  11. package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +1 -4
  12. package/esm2020/lib/shared/domain/http/http-error.model.mjs +2 -2
  13. package/esm2020/lib/shared/services/addresses/addresses.service.mjs +9 -1
  14. package/esm2020/lib/shared/services/form/form-validators.service.mjs +2 -27
  15. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +198 -224
  16. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  17. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +192 -215
  18. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  19. package/lib/shared/commons/address-validation-constants.d.ts +7 -0
  20. package/lib/shared/commons/address-validation-constants.d.ts.map +1 -0
  21. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +3 -2
  22. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  23. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +3 -8
  24. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  25. package/lib/shared/components/palette/address/write-address-field.component.d.ts +5 -0
  26. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  27. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  28. package/lib/shared/components/palette/markdown/markdown.component.d.ts +1 -3
  29. package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
  30. package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
  31. package/lib/shared/services/addresses/addresses.service.d.ts +3 -0
  32. package/lib/shared/services/addresses/addresses.service.d.ts.map +1 -1
  33. package/lib/shared/services/form/form-validators.service.d.ts +0 -4
  34. package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
  35. package/package.json +1 -1
@@ -8,7 +8,7 @@ import * as i1$1 from '@angular/router';
8
8
  import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
9
9
  import * as i3 from '@angular/forms';
10
10
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
11
- import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
11
+ import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
12
12
  import * as i1$2 from '@angular/common/http';
13
13
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
14
14
  import { catchError, map, publish, refCount, switchMap, debounceTime, delay, distinctUntilChanged, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
@@ -27,7 +27,6 @@ import { MatDialogConfig } from '@angular/material/dialog';
27
27
  import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
28
28
  import * as i2 from '@nicky-lenaers/ngx-scroll-to';
29
29
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
30
- import * as marked from 'marked';
31
30
  import * as i1$4 from 'ngx-md';
32
31
  import { NgxMdModule } from 'ngx-md';
33
32
  import * as i5 from '@angular/material/legacy-autocomplete';
@@ -128,11 +127,11 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
128
127
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 13, ctx_r1.workhours));
129
128
  } }
130
129
  const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
131
- const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
130
+ const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
132
131
  class FooterComponent {
133
132
  }
134
133
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
135
- FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
134
+ FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$t, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
136
135
  i0.ɵɵprojectionDef(_c0$13);
137
136
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
138
137
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2);
@@ -192,7 +191,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) { if (rf & 1) {
192
191
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, ctx_r2.title));
193
192
  } }
194
193
  const _c0$12 = [[["", "headerNavigation", ""]]];
195
- const _c1$t = ["[headerNavigation]"];
194
+ const _c1$s = ["[headerNavigation]"];
196
195
  class HeaderBarComponent {
197
196
  constructor() {
198
197
  this.signOutRequest = new EventEmitter();
@@ -202,7 +201,7 @@ class HeaderBarComponent {
202
201
  }
203
202
  }
204
203
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
205
- HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
204
+ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$s, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
206
205
  i0.ɵɵprojectionDef(_c0$12);
207
206
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
208
207
  i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3);
@@ -253,11 +252,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
253
252
  }] }); })();
254
253
 
255
254
  const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
256
- const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
255
+ const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
257
256
  class NavigationComponent {
258
257
  }
259
258
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
260
- NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
259
+ NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$r, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
261
260
  i0.ɵɵprojectionDef(_c0$11);
262
261
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
263
262
  i0.ɵɵprojection(2);
@@ -368,11 +367,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
368
367
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
369
368
 
370
369
  const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
371
- const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
370
+ const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
372
371
  class BodyComponent {
373
372
  }
374
373
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
375
- BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
374
+ BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$q, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
376
375
  i0.ɵɵprojectionDef(_c0$10);
377
376
  i0.ɵɵelementStart(0, "div", 0);
378
377
  i0.ɵɵprojection(1);
@@ -982,11 +981,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
982
981
  }] }); })();
983
982
 
984
983
  const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
985
- const _c1$q = ["*"];
984
+ const _c1$p = ["*"];
986
985
  class TabComponent {
987
986
  }
988
987
  TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
989
- TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
988
+ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$p, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
990
989
  i0.ɵɵprojectionDef();
991
990
  i0.ɵɵelementStart(0, "div", 0);
992
991
  i0.ɵɵprojection(1);
@@ -1007,8 +1006,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
1007
1006
  }] }); })();
1008
1007
 
1009
1008
  const _c0$Y = ["tab"];
1010
- const _c1$p = function () { return ["."]; };
1011
- const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1009
+ const _c1$o = function () { return ["."]; };
1010
+ const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1012
1011
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1013
1012
  const _r4 = i0.ɵɵgetCurrentView();
1014
1013
  i0.ɵɵelementStart(0, "li", 4)(1, "a", 5, 6);
@@ -1019,7 +1018,7 @@ function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1019
1018
  } if (rf & 2) {
1020
1019
  const panel_r1 = ctx.$implicit;
1021
1020
  i0.ɵɵadvance(1);
1022
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
1021
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
1023
1022
  i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
1024
1023
  i0.ɵɵadvance(2);
1025
1024
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
@@ -1244,7 +1243,7 @@ class HttpError {
1244
1243
  const error = new HttpError();
1245
1244
  // Check that the HttpErrorResponse contains an "error" object before mapping the error properties
1246
1245
  if (!!(response && response.error)) {
1247
- Object.keys(error).forEach(key => {
1246
+ Object.keys(error).forEach((key) => {
1248
1247
  error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
1249
1248
  });
1250
1249
  }
@@ -2731,9 +2730,6 @@ class FirstErrorPipe {
2731
2730
  else if (keys[0] === 'pattern') {
2732
2731
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2733
2732
  }
2734
- else if (keys[0] === 'markDownPattern') {
2735
- errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2736
- }
2737
2733
  else if (keys[0] === 'minlength') {
2738
2734
  errorMessage = '%FIELDLABEL% is below the minimum length';
2739
2735
  }
@@ -4551,7 +4547,6 @@ class FormValidatorsService {
4551
4547
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4552
4548
  const validators = [Validators.required];
4553
4549
  if (caseField.field_type.type === 'Text') {
4554
- validators.push(this.markDownPatternValidator());
4555
4550
  if (caseField.field_type.regular_expression) {
4556
4551
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4557
4552
  }
@@ -4565,36 +4560,22 @@ class FormValidatorsService {
4565
4560
  validators.push(Validators.maxLength(caseField.field_type.max));
4566
4561
  }
4567
4562
  }
4568
- if (caseField.field_type.type === 'TextArea') {
4569
- validators.push(this.emptyValidator());
4570
- validators.push(this.markDownPatternValidator());
4571
- }
4572
4563
  if (control.validator) {
4573
4564
  validators.push(control.validator);
4574
4565
  }
4575
4566
  control.setValidators(validators);
4576
4567
  }
4577
- else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
4578
- control.setValidators(this.markDownPatternValidator());
4579
- }
4580
4568
  return control;
4581
4569
  }
4582
4570
  static emptyValidator() {
4583
4571
  const validator = (control) => {
4584
- if (control?.value?.toString().trim().length === 0) {
4572
+ if (control && control.value && control.value.toString().trim().length === 0) {
4585
4573
  return { required: {} };
4586
4574
  }
4587
4575
  return null;
4588
4576
  };
4589
4577
  return validator;
4590
4578
  }
4591
- static markDownPatternValidator() {
4592
- const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4593
- return (control) => {
4594
- const value = control?.value?.toString().trim();
4595
- return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4596
- };
4597
- }
4598
4579
  // TODO: Strip this out as it's only here for the moment because
4599
4580
  // the service is being injected all over the place but it doesn't
4600
4581
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4602,20 +4583,10 @@ class FormValidatorsService {
4602
4583
  addValidators(caseField, control) {
4603
4584
  return FormValidatorsService.addValidators(caseField, control);
4604
4585
  }
4605
- addMarkDownValidators(formGroup, controlPath) {
4606
- const control = formGroup.get(controlPath);
4607
- if (control) {
4608
- control.setValidators(FormValidatorsService.markDownPatternValidator());
4609
- control.updateValueAndValidity();
4610
- }
4611
- return control;
4612
- }
4613
4586
  }
4614
4587
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4615
4588
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4616
4589
  ];
4617
- FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4618
- FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4619
4590
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4620
4591
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4621
4592
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormValidatorsService, [{
@@ -4635,7 +4606,11 @@ class AbstractFormFieldComponent {
4635
4606
  return control;
4636
4607
  }
4637
4608
  const existing = container.controls[this.caseField.id];
4609
+ // update the field value which has been set in mid-event call back
4638
4610
  if (existing) {
4611
+ if (existing.value === null && this.caseField?.value) {
4612
+ existing.value = this.caseField.value;
4613
+ }
4639
4614
  if (replace) {
4640
4615
  // Set the validators on the replacement with what already exists.
4641
4616
  control.setValidators(existing.validator);
@@ -6282,6 +6257,7 @@ class AddressesService {
6282
6257
  constructor(http, appConfig) {
6283
6258
  this.http = http;
6284
6259
  this.appConfig = appConfig;
6260
+ this.mandatoryError = new BehaviorSubject(false);
6285
6261
  }
6286
6262
  getAddressesForPostcode(postcode) {
6287
6263
  return this.http
@@ -6290,6 +6266,12 @@ class AddressesService {
6290
6266
  .pipe(map(res => res.results))
6291
6267
  .pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
6292
6268
  }
6269
+ getMandatoryError() {
6270
+ return this.mandatoryError.asObservable();
6271
+ }
6272
+ setMandatoryError(value) {
6273
+ this.mandatoryError.next(value);
6274
+ }
6293
6275
  format(addressModel) {
6294
6276
  return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
6295
6277
  }
@@ -9642,7 +9624,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
9642
9624
  i0.ɵɵproperty("eventCompletionParams", ctx_r8.caseEdit.eventCompletionParams);
9643
9625
  } }
9644
9626
  class CaseEditPageComponent {
9645
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
9627
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, addressService) {
9646
9628
  this.caseEdit = caseEdit;
9647
9629
  this.route = route;
9648
9630
  this.formValueService = formValueService;
@@ -9654,6 +9636,7 @@ class CaseEditPageComponent {
9654
9636
  this.caseEditDataService = caseEditDataService;
9655
9637
  this.loadingService = loadingService;
9656
9638
  this.validPageListCaseFieldsService = validPageListCaseFieldsService;
9639
+ this.addressService = addressService;
9657
9640
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
9658
9641
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
9659
9642
  this.formValuesChanged = false;
@@ -9776,7 +9759,14 @@ class CaseEditPageComponent {
9776
9759
  }
9777
9760
  }
9778
9761
  if (fieldElement.hasError('required')) {
9779
- this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
9762
+ if (casefield.id === 'AddressLine1') {
9763
+ // EUI-1067 - Display more relevant error message to user and correctly navigate to the field
9764
+ this.addressService.setMandatoryError(true);
9765
+ this.caseEditDataService.addFormValidationError({ id: `${path}_${path}`, message: `An address is required` });
9766
+ }
9767
+ else {
9768
+ this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
9769
+ }
9780
9770
  fieldElement.markAsDirty();
9781
9771
  // For the JudicialUser field type, an error needs to be set on the component so that an error message
9782
9772
  // can be displayed at field level
@@ -9851,6 +9841,7 @@ class CaseEditPageComponent {
9851
9841
  }
9852
9842
  }
9853
9843
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
9844
+ this.addressService.setMandatoryError(false);
9854
9845
  console.log('Case Edit Error', this.caseEdit.error);
9855
9846
  if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
9856
9847
  this.caseEdit.validPageList.push(this.currentPage);
@@ -10150,7 +10141,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
10150
10141
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
10151
10142
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
10152
10143
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
10153
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
10144
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(AddressesService)); };
10154
10145
  CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 12, vars: 11, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
10155
10146
  i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
10156
10147
  i0.ɵɵtemplate(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 1);
@@ -10185,7 +10176,7 @@ CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseE
10185
10176
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
10186
10177
  type: Component,
10187
10178
  args: [{ selector: 'ccd-case-edit-page', template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data']\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <fieldset id=\"fieldset-case-data\">\n <legend style=\"display: none;\"></legend>\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </fieldset>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" [disabled]=\"!(hasPreviousPage$ | async)\" (click)=\"toPreviousPage()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><a (click)=\"cancel()\" href=\"javascript:void(0)\">{{getCancelText() | rpxTranslate}}</a></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
10188
- }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, null); })();
10179
+ }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: AddressesService }]; }, null); })();
10189
10180
 
10190
10181
  class CallbackErrorsContext {
10191
10182
  }
@@ -10632,6 +10623,17 @@ class AddressOption {
10632
10623
  }
10633
10624
  }
10634
10625
 
10626
+ class AddressValidationConstants {
10627
+ }
10628
+ // allow alpha-numeric characters and spaces possibly between a connecting - character
10629
+ // this applies validation while allowing partial postcodes
10630
+ AddressValidationConstants.REGEX_POSTCODE = /^([A-Za-z0-9]-*| )+$/;
10631
+ AddressValidationConstants.ɵfac = function AddressValidationConstants_Factory(t) { return new (t || AddressValidationConstants)(); };
10632
+ AddressValidationConstants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AddressValidationConstants, factory: AddressValidationConstants.ɵfac });
10633
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressValidationConstants, [{
10634
+ type: Injectable
10635
+ }], null, null); })();
10636
+
10635
10637
  class FieldsFilterPipe {
10636
10638
  /**
10637
10639
  * Complex type should have at least on simple field descendant with a value.
@@ -10898,11 +10900,12 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (r
10898
10900
  i0.ɵɵpipe(2, "rpxTranslate");
10899
10901
  i0.ɵɵelementEnd();
10900
10902
  } if (rf & 2) {
10903
+ const ctx_r5 = i0.ɵɵnextContext(3);
10901
10904
  i0.ɵɵadvance(1);
10902
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Enter the Postcode"));
10905
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
10903
10906
  } }
10904
- const _c1$o = function (a0) { return { "form-group-error": a0 }; };
10905
- const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
10907
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
10908
+ const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
10906
10909
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1) {
10907
10910
  const _r7 = i0.ɵɵgetCurrentView();
10908
10911
  i0.ɵɵelementStart(0, "div", 8)(1, "label", 9)(2, "span", 10);
@@ -10918,7 +10921,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10918
10921
  i0.ɵɵelementEnd()();
10919
10922
  } if (rf & 2) {
10920
10923
  const ctx_r2 = i0.ɵɵnextContext(2);
10921
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
10924
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
10922
10925
  i0.ɵɵadvance(1);
10923
10926
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
10924
10927
  i0.ɵɵadvance(2);
@@ -10926,46 +10929,60 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10926
10929
  i0.ɵɵadvance(2);
10927
10930
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
10928
10931
  i0.ɵɵadvance(1);
10929
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
10932
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
10930
10933
  i0.ɵɵadvance(2);
10931
10934
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
10932
10935
  } }
10933
- function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) { if (rf & 1) {
10936
+ function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) { if (rf & 1) {
10937
+ i0.ɵɵelementStart(0, "span", 14);
10938
+ i0.ɵɵtext(1);
10939
+ i0.ɵɵpipe(2, "rpxTranslate");
10940
+ i0.ɵɵelementEnd();
10941
+ } if (rf & 2) {
10942
+ const ctx_r8 = i0.ɵɵnextContext(3);
10943
+ i0.ɵɵadvance(1);
10944
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r8.errorMessage));
10945
+ } }
10946
+ function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) { if (rf & 1) {
10934
10947
  i0.ɵɵelementStart(0, "option", 18);
10935
10948
  i0.ɵɵtext(1);
10936
10949
  i0.ɵɵpipe(2, "rpxTranslate");
10937
10950
  i0.ɵɵelementEnd();
10938
10951
  } if (rf & 2) {
10939
- const addressOption_r9 = ctx.$implicit;
10940
- i0.ɵɵproperty("ngValue", addressOption_r9.value);
10952
+ const addressOption_r10 = ctx.$implicit;
10953
+ i0.ɵɵproperty("ngValue", addressOption_r10.value);
10941
10954
  i0.ɵɵadvance(1);
10942
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r9.description), " ");
10955
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r10.description), " ");
10943
10956
  } }
10944
10957
  function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1) {
10945
- const _r11 = i0.ɵɵgetCurrentView();
10958
+ const _r12 = i0.ɵɵgetCurrentView();
10946
10959
  i0.ɵɵelementStart(0, "div", 15)(1, "label", 9)(2, "span", 10);
10947
10960
  i0.ɵɵtext(3);
10948
10961
  i0.ɵɵpipe(4, "rpxTranslate");
10949
10962
  i0.ɵɵelementEnd()();
10950
- i0.ɵɵelementStart(5, "select", 16);
10951
- i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_5_Template_select_change_5_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r10.addressSelected()); });
10952
- i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_div_5_option_6_Template, 3, 4, "option", 17);
10963
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_span_5_Template, 3, 3, "span", 11);
10964
+ i0.ɵɵelementStart(6, "select", 16);
10965
+ 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()); });
10966
+ i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_5_option_7_Template, 3, 4, "option", 17);
10953
10967
  i0.ɵɵelementEnd()();
10954
10968
  } if (rf & 2) {
10955
10969
  const ctx_r3 = i0.ɵɵnextContext(2);
10970
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
10956
10971
  i0.ɵɵadvance(1);
10957
10972
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
10958
10973
  i0.ɵɵadvance(2);
10959
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Select an address"));
10974
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, "Select an address"));
10960
10975
  i0.ɵɵadvance(2);
10976
+ i0.ɵɵproperty("ngIf", ctx_r3.noAddressSelected);
10977
+ i0.ɵɵadvance(1);
10961
10978
  i0.ɵɵproperty("id", ctx_r3.createElementId("addressList"))("formControl", ctx_r3.addressList);
10962
10979
  i0.ɵɵadvance(1);
10963
10980
  i0.ɵɵproperty("ngForOf", ctx_r3.addressOptions);
10964
10981
  } }
10965
10982
  function WriteAddressFieldComponent_div_1_a_6_Template(rf, ctx) { if (rf & 1) {
10966
- const _r13 = i0.ɵɵgetCurrentView();
10983
+ const _r14 = i0.ɵɵgetCurrentView();
10967
10984
  i0.ɵɵelementStart(0, "a", 19);
10968
- i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r12.blankAddress()); });
10985
+ i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r13.blankAddress()); });
10969
10986
  i0.ɵɵtext(1);
10970
10987
  i0.ɵɵpipe(2, "rpxTranslate");
10971
10988
  i0.ɵɵelementEnd();
@@ -10979,7 +10996,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10979
10996
  i0.ɵɵpipe(3, "ccdFieldLabel");
10980
10997
  i0.ɵɵelementEnd();
10981
10998
  i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 17, "div", 5);
10982
- i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 7, 7, "div", 6);
10999
+ i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 8, 11, "div", 6);
10983
11000
  i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
10984
11001
  i0.ɵɵelementEnd();
10985
11002
  } if (rf & 2) {
@@ -10998,19 +11015,30 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10998
11015
  super();
10999
11016
  this.isCompoundPipe = isCompoundPipe;
11000
11017
  this.addressFormGroup = new FormGroup({});
11018
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11001
11019
  this.missingPostcode = false;
11020
+ this.noAddressSelected = false;
11002
11021
  this.addressesService = addressesService;
11003
11022
  }
11004
11023
  ngOnInit() {
11005
11024
  if (!this.isComplexWithHiddenFields()) {
11006
- this.postcode = new FormControl('');
11025
+ this.postcode = new FormControl('', [Validators.required]);
11007
11026
  this.addressFormGroup.addControl('postcode', this.postcode);
11008
11027
  this.addressList = new FormControl('');
11009
11028
  this.addressFormGroup.addControl('address', this.addressList);
11010
11029
  }
11030
+ this.addressesService.getMandatoryError().subscribe((value) => {
11031
+ this.updateErrorsOnContinue(value);
11032
+ });
11011
11033
  }
11012
11034
  findAddress() {
11035
+ this.noAddressSelected = false;
11013
11036
  if (!this.postcode.value) {
11037
+ this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
11038
+ this.missingPostcode = true;
11039
+ }
11040
+ else if (!this.postcode.value.trim().match(AddressValidationConstants.REGEX_POSTCODE)) {
11041
+ this.errorMessage = WriteAddressFieldComponent.INVALID_ERROR_MESSAGE;
11014
11042
  this.missingPostcode = true;
11015
11043
  }
11016
11044
  else {
@@ -11039,6 +11067,8 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11039
11067
  blankAddress() {
11040
11068
  this.caseField.value = new AddressModel();
11041
11069
  this.setFormValue();
11070
+ this.missingPostcode = false;
11071
+ this.noAddressSelected = false;
11042
11072
  }
11043
11073
  isComplexWithHiddenFields() {
11044
11074
  if (this.caseField.isComplex() && this.caseField.field_type.complex_fields
@@ -11070,6 +11100,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11070
11100
  addressSelected() {
11071
11101
  this.caseField.value = this.addressList.value;
11072
11102
  this.setFormValue();
11103
+ this.noAddressSelected = false;
11073
11104
  }
11074
11105
  ngOnChanges(changes) {
11075
11106
  super.ngOnChanges(changes);
@@ -11090,7 +11121,14 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11090
11121
  this.writeComplexFieldComponent.complexGroup.setValue(this.caseField.value);
11091
11122
  }
11092
11123
  }
11124
+ updateErrorsOnContinue(value) {
11125
+ this.missingPostcode = value && !this.shouldShowDetailFields() && !this.addressOptions;
11126
+ this.noAddressSelected = value && !this.shouldShowDetailFields() && !!this.addressOptions;
11127
+ this.errorMessage = this.noAddressSelected ? 'Select an address' : this.errorMessage;
11128
+ }
11093
11129
  }
11130
+ WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE = 'Enter a Postcode';
11131
+ WriteAddressFieldComponent.INVALID_ERROR_MESSAGE = 'Enter a valid Postcode';
11094
11132
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
11095
11133
  WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
11096
11134
  i0.ɵɵviewQuery(_c0$U, 5);
@@ -11099,7 +11137,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11099
11137
  let _t;
11100
11138
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11101
11139
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11102
- } }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11140
+ } }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11103
11141
  i0.ɵɵelementStart(0, "div", 0);
11104
11142
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
11105
11143
  i0.ɵɵelement(2, "ccd-write-complex-type-field", 2, 3);
@@ -11113,7 +11151,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11113
11151
  } }, styles: [".manual-link[_ngcontent-%COMP%]{cursor:pointer;display:block;text-decoration:underline}"] });
11114
11152
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
11115
11153
  type: Component,
11116
- args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{'Enter the Postcode' | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\">{{'Find address' | rpxTranslate}}</button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description | rpxTranslate}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress()\" href=\"javascript:void(0)\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
11154
+ args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\">{{'Find address' | rpxTranslate}}</button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\" [ngClass]=\"{'form-group-error': noAddressSelected}\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"noAddressSelected\">{{errorMessage | rpxTranslate}}</span>\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description | rpxTranslate}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress()\" href=\"javascript:void(0)\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
11117
11155
  }], function () { return [{ type: AddressesService }, { type: IsCompoundPipe }]; }, { writeComplexFieldComponent: [{
11118
11156
  type: ViewChild,
11119
11157
  args: ['writeComplexFieldComponent', { static: false }]
@@ -12346,7 +12384,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12346
12384
  i0.ɵɵadvance(1);
12347
12385
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12348
12386
  } }
12349
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12387
+ const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12350
12388
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12351
12389
  ngOnInit() {
12352
12390
  if (this.caseField.value) {
@@ -12407,7 +12445,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12407
12445
  i0.ɵɵelement(5, "input", 5);
12408
12446
  i0.ɵɵelementEnd();
12409
12447
  } if (rf & 2) {
12410
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12448
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12411
12449
  i0.ɵɵadvance(1);
12412
12450
  i0.ɵɵproperty("for", ctx.id());
12413
12451
  i0.ɵɵadvance(1);
@@ -12439,7 +12477,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
12439
12477
  i0.ɵɵadvance(4);
12440
12478
  i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$S, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
12441
12479
  } }
12442
- const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12480
+ const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12443
12481
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
12444
12482
  i0.ɵɵelementStart(0, "tr")(1, "td");
12445
12483
  i0.ɵɵelement(2, "ccd-field-read", 7);
@@ -12449,7 +12487,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
12449
12487
  const i_r5 = ctx.index;
12450
12488
  const ctx_r3 = i0.ɵɵnextContext(3);
12451
12489
  i0.ɵɵadvance(2);
12452
- i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12490
+ i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$l, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12453
12491
  } }
12454
12492
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
12455
12493
  i0.ɵɵelementStart(0, "tbody");
@@ -13270,7 +13308,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
13270
13308
  const ctx_r2 = i0.ɵɵnextContext();
13271
13309
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
13272
13310
  } }
13273
- const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
13311
+ const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
13274
13312
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
13275
13313
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
13276
13314
  super();
@@ -13576,7 +13614,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13576
13614
  i0.ɵɵpipe(17, "rpxTranslate");
13577
13615
  i0.ɵɵelementEnd()();
13578
13616
  } if (rf & 2) {
13579
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
13617
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
13580
13618
  i0.ɵɵadvance(1);
13581
13619
  i0.ɵɵproperty("for", ctx.id());
13582
13620
  i0.ɵɵadvance(1);
@@ -13770,14 +13808,9 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
13770
13808
  }], null, null); })();
13771
13809
 
13772
13810
  class MarkdownComponent {
13773
- constructor() {
13774
- this.renderUrlToTextFeature = true;
13775
- }
13811
+ constructor() { }
13776
13812
  ngOnInit() {
13777
13813
  this.content = this.content.replace(/ \n/g, '<br>');
13778
- if (this.renderUrlToTextFeature) {
13779
- this.renderUrlToText();
13780
- }
13781
13814
  }
13782
13815
  onMarkdownClick(event) {
13783
13816
  // If we don't have an anchor tag, we don't need to do anything.
@@ -13786,20 +13819,11 @@ class MarkdownComponent {
13786
13819
  }
13787
13820
  return true;
13788
13821
  }
13789
- renderUrlToText() {
13790
- const renderer = new marked.Renderer();
13791
- renderer.link = (href, title, text) => {
13792
- return text; // Return the text without turning it into a link
13793
- };
13794
- marked.setOptions({
13795
- renderer: renderer
13796
- });
13797
- }
13798
13822
  }
13799
13823
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
13800
13824
  MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) { if (rf & 1) {
13801
13825
  i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
13802
- } }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
13826
+ } }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
13803
13827
  i0.ɵɵelementStart(0, "div");
13804
13828
  i0.ɵɵelement(1, "markdown", 0);
13805
13829
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -13816,8 +13840,6 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
13816
13840
  type: Input
13817
13841
  }], markdownUseHrefAsRouterLink: [{
13818
13842
  type: Input
13819
- }], renderUrlToTextFeature: [{
13820
- type: Input
13821
13843
  }], onMarkdownClick: [{
13822
13844
  type: HostListener,
13823
13845
  args: ['click', ['$event']]
@@ -13930,7 +13952,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
13930
13952
  i0.ɵɵadvance(1);
13931
13953
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
13932
13954
  i0.ɵɵadvance(1);
13933
- i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
13955
+ i0.ɵɵproperty("content", checkbox_r4.label);
13934
13956
  } }
13935
13957
  const _c0$O = function (a0) { return { "error": a0 }; };
13936
13958
  class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
@@ -13994,13 +14016,13 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
13994
14016
  }
13995
14017
  }
13996
14018
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
13997
- WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
14019
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
13998
14020
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
13999
14021
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14000
14022
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14001
14023
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14002
14024
  i0.ɵɵelementEnd();
14003
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14025
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14004
14026
  i0.ɵɵelementEnd()();
14005
14027
  } if (rf & 2) {
14006
14028
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$O, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
@@ -14015,7 +14037,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14015
14037
  } }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, MarkdownComponent, FieldLabelPipe, FirstErrorPipe], styles: ["ccd-markdown[_ngcontent-%COMP%]{display:inline-block}"] });
14016
14038
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14017
14039
  type: Component,
14018
- args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\" [renderUrlToTextFeature]=\"false\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
14040
+ args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
14019
14041
  }], null, null); })();
14020
14042
 
14021
14043
  class DynamicRadioListPipe {
@@ -14136,7 +14158,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
14136
14158
  i0.ɵɵadvance(1);
14137
14159
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
14138
14160
  } }
14139
- const _c1$k = function (a0) { return { "form-group-error": a0 }; };
14161
+ const _c1$j = function (a0) { return { "form-group-error": a0 }; };
14140
14162
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14141
14163
  ngOnInit() {
14142
14164
  /**
@@ -14174,7 +14196,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
14174
14196
  i0.ɵɵelementContainerEnd();
14175
14197
  i0.ɵɵelementEnd()();
14176
14198
  } if (rf & 2) {
14177
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14199
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14178
14200
  i0.ɵɵadvance(3);
14179
14201
  i0.ɵɵproperty("for", ctx.id());
14180
14202
  i0.ɵɵadvance(1);
@@ -14255,7 +14277,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14255
14277
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14256
14278
  } }
14257
14279
  const _c0$M = function (a0) { return { "form-group-error": a0 }; };
14258
- const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
14280
+ const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
14259
14281
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
14260
14282
  ngOnInit() {
14261
14283
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14281,7 +14303,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
14281
14303
  i0.ɵɵadvance(1);
14282
14304
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
14283
14305
  i0.ɵɵadvance(1);
14284
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14306
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14285
14307
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
14286
14308
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
14287
14309
  type: Component,
@@ -14492,7 +14514,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
14492
14514
  i0.ɵɵadvance(1);
14493
14515
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
14494
14516
  } }
14495
- const _c1$i = function (a0) { return { "form-group-error": a0 }; };
14517
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14496
14518
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
14497
14519
  ngOnInit() {
14498
14520
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -14512,7 +14534,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
14512
14534
  i0.ɵɵelementContainerEnd();
14513
14535
  i0.ɵɵelementEnd()();
14514
14536
  } if (rf & 2) {
14515
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14537
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14516
14538
  i0.ɵɵadvance(3);
14517
14539
  i0.ɵɵproperty("for", ctx.id());
14518
14540
  i0.ɵɵadvance(1);
@@ -14634,7 +14656,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) { if (r
14634
14656
  i0.ɵɵtext(1, " Invalid search term ");
14635
14657
  i0.ɵɵelementEnd();
14636
14658
  } }
14637
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14659
+ const _c1$g = function (a0) { return { "form-group-error": a0 }; };
14638
14660
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
14639
14661
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
14640
14662
  super(compoundPipe, validatorsService);
@@ -14781,7 +14803,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
14781
14803
  i0.ɵɵelementEnd()();
14782
14804
  } if (rf & 2) {
14783
14805
  const _r3 = i0.ɵɵreference(7);
14784
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
14806
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
14785
14807
  i0.ɵɵadvance(1);
14786
14808
  i0.ɵɵproperty("for", ctx.id());
14787
14809
  i0.ɵɵadvance(1);
@@ -15471,7 +15493,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
15471
15493
  i0.ɵɵadvance(1);
15472
15494
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
15473
15495
  } }
15474
- const _c1$g = function (a0) { return { "table-group-error": a0 }; };
15496
+ const _c1$f = function (a0) { return { "table-group-error": a0 }; };
15475
15497
  function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15476
15498
  const _r21 = i0.ɵɵgetCurrentView();
15477
15499
  i0.ɵɵelementStart(0, "tr", 10)(1, "td", 38);
@@ -15502,7 +15524,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15502
15524
  const case_r16 = ctx.$implicit;
15503
15525
  const ctx_r2 = i0.ɵɵnextContext();
15504
15526
  i0.ɵɵadvance(2);
15505
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15527
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15506
15528
  i0.ɵɵadvance(2);
15507
15529
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
15508
15530
  i0.ɵɵadvance(2);
@@ -17402,7 +17424,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
17402
17424
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label), " ");
17403
17425
  } }
17404
17426
  const _c0$E = function (a0) { return { "form-group-error": a0 }; };
17405
- const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
17427
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
17406
17428
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
17407
17429
  ngOnInit() {
17408
17430
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -17428,7 +17450,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
17428
17450
  i0.ɵɵadvance(1);
17429
17451
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
17430
17452
  i0.ɵɵadvance(1);
17431
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17453
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17432
17454
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
17433
17455
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
17434
17456
  type: Component,
@@ -18069,7 +18091,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18069
18091
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label), " ");
18070
18092
  } }
18071
18093
  const _c0$C = function (a0) { return { "form-group-error": a0 }; };
18072
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18094
+ const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
18073
18095
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
18074
18096
  ngOnInit() {
18075
18097
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18095,7 +18117,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
18095
18117
  i0.ɵɵadvance(1);
18096
18118
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
18097
18119
  i0.ɵɵadvance(1);
18098
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18120
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18099
18121
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18100
18122
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
18101
18123
  type: Component,
@@ -20111,7 +20133,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20111
20133
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label), " ");
20112
20134
  } }
20113
20135
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
20114
- const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
20136
+ const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
20115
20137
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
20116
20138
  constructor(browserService) {
20117
20139
  super();
@@ -20149,7 +20171,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
20149
20171
  i0.ɵɵadvance(1);
20150
20172
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
20151
20173
  i0.ɵɵadvance(1);
20152
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20174
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20153
20175
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20154
20176
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
20155
20177
  type: Component,
@@ -20207,7 +20229,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20207
20229
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label), " ");
20208
20230
  } }
20209
20231
  const _c0$y = function (a0) { return { "form-group-error": a0 }; };
20210
- const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
20232
+ const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
20211
20233
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
20212
20234
  ngOnInit() {
20213
20235
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -20237,7 +20259,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
20237
20259
  i0.ɵɵadvance(1);
20238
20260
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
20239
20261
  i0.ɵɵadvance(1);
20240
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
20262
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
20241
20263
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20242
20264
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
20243
20265
  type: Component,
@@ -20413,7 +20435,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
20413
20435
  i0.ɵɵadvance(1);
20414
20436
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
20415
20437
  } }
20416
- const _c1$b = function (a0) { return { "form-group-error": a0 }; };
20438
+ const _c1$a = function (a0) { return { "form-group-error": a0 }; };
20417
20439
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
20418
20440
  constructor(yesNoService) {
20419
20441
  super();
@@ -20435,7 +20457,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
20435
20457
  i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
20436
20458
  i0.ɵɵelementEnd()()();
20437
20459
  } if (rf & 2) {
20438
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20460
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20439
20461
  i0.ɵɵadvance(3);
20440
20462
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
20441
20463
  i0.ɵɵadvance(1);
@@ -20792,7 +20814,7 @@ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
20792
20814
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20793
20815
  i0.ɵɵelementContainer(0);
20794
20816
  } }
20795
- const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
20817
+ const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
20796
20818
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
20797
20819
  i0.ɵɵelementContainerStart(0);
20798
20820
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -20803,7 +20825,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
20803
20825
  i0.ɵɵnextContext();
20804
20826
  const _r1 = i0.ɵɵreference(13);
20805
20827
  i0.ɵɵadvance(1);
20806
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
20828
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
20807
20829
  } }
20808
20830
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
20809
20831
  const _r12 = i0.ɵɵgetCurrentView();
@@ -20971,7 +20993,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
20971
20993
  i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
20972
20994
  } }
20973
20995
  const _c0$s = [[["", "trigger", ""]]];
20974
- const _c1$9 = ["[trigger]"];
20996
+ const _c1$8 = ["[trigger]"];
20975
20997
  class CaseFileViewOverlayMenuComponent {
20976
20998
  constructor() {
20977
20999
  this.title = '';
@@ -20985,7 +21007,7 @@ class CaseFileViewOverlayMenuComponent {
20985
21007
  }
20986
21008
  }
20987
21009
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
20988
- CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
21010
+ CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
20989
21011
  i0.ɵɵprojectionDef(_c0$s);
20990
21012
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
20991
21013
  i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -23052,7 +23074,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
23052
23074
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "This flag should only be visible to HMCTS Staff"), " ");
23053
23075
  } }
23054
23076
  const _c0$n = function (a0) { return { "form-group-error": a0 }; };
23055
- const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
23077
+ const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
23056
23078
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (rf & 1) {
23057
23079
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
23058
23080
  i0.ɵɵtext(3);
@@ -23072,7 +23094,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (r
23072
23094
  i0.ɵɵadvance(3);
23073
23095
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
23074
23096
  i0.ɵɵadvance(1);
23075
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$8, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
23097
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$7, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
23076
23098
  i0.ɵɵadvance(1);
23077
23099
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
23078
23100
  } }
@@ -23572,7 +23594,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) { if (rf & 1) {
23572
23594
  i0.ɵɵadvance(3);
23573
23595
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
23574
23596
  } }
23575
- const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
23597
+ const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
23576
23598
  class UpdateFlagComponent {
23577
23599
  constructor(rpxTranslationService) {
23578
23600
  this.rpxTranslationService = rpxTranslationService;
@@ -23774,7 +23796,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
23774
23796
  const _r3 = i0.ɵɵreference(17);
23775
23797
  i0.ɵɵproperty("formGroup", ctx.formGroup);
23776
23798
  i0.ɵɵadvance(2);
23777
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
23799
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
23778
23800
  i0.ɵɵadvance(3);
23779
23801
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
23780
23802
  i0.ɵɵadvance(2);
@@ -25044,7 +25066,7 @@ const CUSTOM_MOMENT_FORMATS = {
25044
25066
  };
25045
25067
 
25046
25068
  const _c0$g = ["picker"];
25047
- const _c1$6 = ["input"];
25069
+ const _c1$5 = ["input"];
25048
25070
  function DatetimePickerComponent_span_3_Template(rf, ctx) { if (rf & 1) {
25049
25071
  i0.ɵɵelementStart(0, "span", 11);
25050
25072
  i0.ɵɵtext(1);
@@ -25093,7 +25115,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) { if (rf & 1) {
25093
25115
  i0.ɵɵadvance(1);
25094
25116
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
25095
25117
  } }
25096
- const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
25118
+ const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
25097
25119
  class DatetimePickerComponent extends AbstractFormFieldComponent {
25098
25120
  constructor(formatTranslationService, ngxMatDateFormats) {
25099
25121
  super();
@@ -25258,7 +25280,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
25258
25280
  DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { return new (t || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(NGX_MAT_DATE_FORMATS)); };
25259
25281
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) { if (rf & 1) {
25260
25282
  i0.ɵɵviewQuery(_c0$g, 5);
25261
- i0.ɵɵviewQuery(_c1$6, 5);
25283
+ i0.ɵɵviewQuery(_c1$5, 5);
25262
25284
  } if (rf & 2) {
25263
25285
  let _t;
25264
25286
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datetimePicker = _t.first);
@@ -25290,7 +25312,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
25290
25312
  i0.ɵɵelementEnd()()()()()();
25291
25313
  } if (rf & 2) {
25292
25314
  const _r6 = i0.ɵɵreference(13);
25293
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25315
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25294
25316
  i0.ɵɵadvance(3);
25295
25317
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
25296
25318
  i0.ɵɵadvance(1);
@@ -25514,7 +25536,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
25514
25536
  i0.ɵɵadvance(3);
25515
25537
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
25516
25538
  } }
25517
- const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25539
+ const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25518
25540
  function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25519
25541
  const _r18 = i0.ɵɵgetCurrentView();
25520
25542
  i0.ɵɵelementStart(0, "tr", 4);
@@ -25545,7 +25567,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25545
25567
  } if (rf & 2) {
25546
25568
  const event_r1 = ctx.$implicit;
25547
25569
  const ctx_r0 = i0.ɵɵnextContext();
25548
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
25570
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
25549
25571
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
25550
25572
  i0.ɵɵadvance(2);
25551
25573
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -27433,30 +27455,6 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) { if (r
27433
27455
  i0.ɵɵadvance(3);
27434
27456
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
27435
27457
  } }
27436
- function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) { if (rf & 1) {
27437
- i0.ɵɵelementStart(0, "span", 48);
27438
- i0.ɵɵtext(1);
27439
- i0.ɵɵpipe(2, "rpxTranslate");
27440
- i0.ɵɵpipe(3, "ccdFirstError");
27441
- i0.ɵɵelementEnd();
27442
- } if (rf & 2) {
27443
- const ctx_r36 = i0.ɵɵnextContext(3);
27444
- i0.ɵɵadvance(1);
27445
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
27446
- } }
27447
- function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) { if (rf & 1) {
27448
- i0.ɵɵelementStart(0, "span", 48);
27449
- i0.ɵɵtext(1);
27450
- i0.ɵɵpipe(2, "rpxTranslate");
27451
- i0.ɵɵpipe(3, "ccdFirstError");
27452
- i0.ɵɵelementEnd();
27453
- } if (rf & 2) {
27454
- const ctx_r37 = i0.ɵɵnextContext(3);
27455
- i0.ɵɵadvance(1);
27456
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
27457
- } }
27458
- const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
27459
- const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
27460
27458
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (rf & 1) {
27461
27459
  i0.ɵɵelementContainerStart(0);
27462
27460
  i0.ɵɵelementStart(1, "fieldset", 39);
@@ -27466,35 +27464,19 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (r
27466
27464
  i0.ɵɵelementStart(6, "span", 43);
27467
27465
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
27468
27466
  i0.ɵɵelementEnd()();
27469
- i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
27470
- i0.ɵɵelement(9, "input", 45);
27467
+ i0.ɵɵelement(8, "input", 44);
27471
27468
  i0.ɵɵelementEnd();
27472
- i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
27473
- i0.ɵɵtext(12, "Event description (optional)");
27469
+ i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
27470
+ i0.ɵɵtext(11, "Event description (optional)");
27474
27471
  i0.ɵɵelementEnd();
27475
- i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
27476
- i0.ɵɵelement(14, "textarea", 47);
27472
+ i0.ɵɵelement(12, "textarea", 46);
27477
27473
  i0.ɵɵelementEnd()();
27478
27474
  i0.ɵɵelementContainerEnd();
27479
- } if (rf & 2) {
27480
- const ctx_r9 = i0.ɵɵnextContext(2);
27481
- i0.ɵɵadvance(3);
27482
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
27483
- i0.ɵɵadvance(5);
27484
- i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
27485
- i0.ɵɵadvance(1);
27486
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$1, (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
27487
- i0.ɵɵadvance(1);
27488
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
27489
- i0.ɵɵadvance(3);
27490
- i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
27491
- i0.ɵɵadvance(1);
27492
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c2$1, (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched)));
27493
27475
  } }
27494
27476
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1) {
27495
- const _r39 = i0.ɵɵgetCurrentView();
27496
- i0.ɵɵelementStart(0, "button", 49);
27497
- i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.previous()); });
27477
+ const _r37 = i0.ɵɵgetCurrentView();
27478
+ i0.ɵɵelementStart(0, "button", 47);
27479
+ i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r37); const ctx_r36 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r36.previous()); });
27498
27480
  i0.ɵɵtext(1);
27499
27481
  i0.ɵɵpipe(2, "rpxTranslate");
27500
27482
  i0.ɵɵelementEnd();
@@ -27505,7 +27487,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1)
27505
27487
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "Previous"), " ");
27506
27488
  } }
27507
27489
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27508
- const _r41 = i0.ɵɵgetCurrentView();
27490
+ const _r39 = i0.ɵɵgetCurrentView();
27509
27491
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
27510
27492
  i0.ɵɵtext(2);
27511
27493
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -27515,13 +27497,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27515
27497
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
27516
27498
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
27517
27499
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
27518
- i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.callbackErrorsNotify($event)); });
27500
+ i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r38.callbackErrorsNotify($event)); });
27519
27501
  i0.ɵɵelementEnd();
27520
27502
  i0.ɵɵelementStart(11, "form", 8);
27521
- i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.submit()); });
27503
+ i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r39); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.submit()); });
27522
27504
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
27523
27505
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
27524
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
27506
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
27525
27507
  i0.ɵɵelementStart(15, "div", 9);
27526
27508
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
27527
27509
  i0.ɵɵelementStart(17, "button", 11);
@@ -27529,7 +27511,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27529
27511
  i0.ɵɵpipe(19, "rpxTranslate");
27530
27512
  i0.ɵɵelementEnd()();
27531
27513
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
27532
- i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.cancel()); });
27514
+ i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r39); const ctx_r41 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r41.cancel()); });
27533
27515
  i0.ɵɵtext(22);
27534
27516
  i0.ɵɵpipe(23, "rpxTranslate");
27535
27517
  i0.ɵɵelementEnd()()()();
@@ -27565,9 +27547,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27565
27547
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 20, ctx_r0.getCancelText()));
27566
27548
  } }
27567
27549
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) { if (rf & 1) {
27568
- const _r45 = i0.ɵɵgetCurrentView();
27569
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
27570
- i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.onEventCanBeCompleted($event)); });
27550
+ const _r43 = i0.ɵɵgetCurrentView();
27551
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
27552
+ i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.onEventCanBeCompleted($event)); });
27571
27553
  i0.ɵɵelementEnd();
27572
27554
  } if (rf & 2) {
27573
27555
  const ctx_r1 = i0.ɵɵnextContext();
@@ -27575,17 +27557,14 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
27575
27557
  } }
27576
27558
  // @dynamic
27577
27559
  class CaseEditSubmitComponent {
27578
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
27560
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
27579
27561
  this.caseEdit = caseEdit;
27580
27562
  this.fieldsUtils = fieldsUtils;
27581
27563
  this.caseFieldService = caseFieldService;
27582
27564
  this.route = route;
27583
27565
  this.orderService = orderService;
27584
27566
  this.profileNotifier = profileNotifier;
27585
- this.formValidatorsService = formValidatorsService;
27586
27567
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
27587
- this.eventSummaryLabel = 'Event summary';
27588
- this.eventDescriptionLabel = 'Event description';
27589
27568
  }
27590
27569
  get isDisabled() {
27591
27570
  // EUI-3452.
@@ -27595,7 +27574,7 @@ class CaseEditSubmitComponent {
27595
27574
  return this.caseEdit.isSubmitting || this.hasErrors;
27596
27575
  }
27597
27576
  ngOnInit() {
27598
- this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
27577
+ this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
27599
27578
  this.eventTrigger = this.caseEdit.eventTrigger;
27600
27579
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
27601
27580
  this.editForm = this.caseEdit.form;
@@ -27609,12 +27588,10 @@ class CaseEditSubmitComponent {
27609
27588
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
27610
27589
  // a FlagLauncher field in the event trigger
27611
27590
  this.caseEdit.isCaseFlagSubmission =
27612
- this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27591
+ this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27613
27592
  this.caseEdit.isLinkedCasesSubmission =
27614
27593
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
27615
27594
  this.pageTitle = this.getPageTitle();
27616
- this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
27617
- this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
27618
27595
  }
27619
27596
  ngOnDestroy() {
27620
27597
  /* istanbul ignore else */
@@ -27623,14 +27600,12 @@ class CaseEditSubmitComponent {
27623
27600
  }
27624
27601
  }
27625
27602
  submit() {
27626
- if (this.summary.valid && this.description.valid) {
27627
- this.caseEdit.submitForm({
27628
- eventTrigger: this.eventTrigger,
27629
- form: this.editForm,
27630
- submit: this.caseEdit.submit,
27631
- caseDetails: this.caseEdit.caseDetails
27632
- });
27633
- }
27603
+ this.caseEdit.submitForm({
27604
+ eventTrigger: this.eventTrigger,
27605
+ form: this.editForm,
27606
+ submit: this.caseEdit.submit,
27607
+ caseDetails: this.caseEdit.caseDetails,
27608
+ });
27634
27609
  }
27635
27610
  onEventCanBeCompleted(eventCanBeCompleted) {
27636
27611
  this.caseEdit.onEventCanBeCompleted({
@@ -27638,7 +27613,7 @@ class CaseEditSubmitComponent {
27638
27613
  eventCanBeCompleted,
27639
27614
  caseDetails: this.caseEdit.caseDetails,
27640
27615
  form: this.editForm,
27641
- submit: this.caseEdit.submit
27616
+ submit: this.caseEdit.submit,
27642
27617
  });
27643
27618
  }
27644
27619
  getPageTitle() {
@@ -27713,7 +27688,7 @@ class CaseEditSubmitComponent {
27713
27688
  }
27714
27689
  }
27715
27690
  readOnlySummaryFieldsToDisplayExists() {
27716
- return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
27691
+ return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
27717
27692
  }
27718
27693
  showEventNotes() {
27719
27694
  // Display event notes related controls only if the following conditions are met
@@ -27728,7 +27703,7 @@ class CaseEditSubmitComponent {
27728
27703
  }
27729
27704
  getLastPageShown() {
27730
27705
  let lastPage;
27731
- this.wizard.reverse().forEach((page) => {
27706
+ this.wizard.reverse().forEach(page => {
27732
27707
  if (!lastPage && this.isShown(page)) {
27733
27708
  lastPage = page;
27734
27709
  }
@@ -27747,7 +27722,7 @@ class CaseEditSubmitComponent {
27747
27722
  }
27748
27723
  isShown(page) {
27749
27724
  const fields = this.fieldsUtils
27750
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
27725
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
27751
27726
  return page.parsedShowCondition.match(fields);
27752
27727
  }
27753
27728
  canShowFieldInCYA(field) {
@@ -27756,7 +27731,7 @@ class CaseEditSubmitComponent {
27756
27731
  sortFieldsByShowSummaryContent(fields) {
27757
27732
  return this.orderService
27758
27733
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
27759
- .filter((cf) => cf.show_summary_content_option);
27734
+ .filter(cf => cf.show_summary_content_option);
27760
27735
  }
27761
27736
  getCaseFields() {
27762
27737
  if (this.caseEdit.caseDetails) {
@@ -27775,7 +27750,9 @@ class CaseEditSubmitComponent {
27775
27750
  if (this.eventTrigger.can_save_draft) {
27776
27751
  return 'Return to case list';
27777
27752
  }
27778
- return 'Cancel';
27753
+ else {
27754
+ return 'Cancel';
27755
+ }
27779
27756
  }
27780
27757
  }
27781
27758
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -27789,8 +27766,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
27789
27766
  }
27790
27767
  return a.show_summary_content_option - b.show_summary_content_option;
27791
27768
  };
27792
- CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
27793
- CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
27769
+ 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)); };
27770
+ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
27794
27771
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
27795
27772
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
27796
27773
  } if (rf & 2) {
@@ -27800,8 +27777,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
27800
27777
  } }, styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
27801
27778
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
27802
27779
  type: Component,
27803
- args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
27804
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null); })();
27780
+ 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"] }]
27781
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null); })();
27805
27782
 
27806
27783
  function CaseProgressComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27807
27784
  const _r2 = i0.ɵɵgetCurrentView();
@@ -28157,7 +28134,7 @@ i0.ɵɵsetComponentScope(CaseEditConfirmComponent, function () { return [i4.NgIf
28157
28134
  i0.ɵɵsetComponentScope(CaseEditPageComponent, function () { return [i4.NgForOf, i4.NgIf, i3.ɵNgNoValidate, i3.NgControlStatusGroup, i3.FormGroupDirective, CallbackErrorsComponent, MarkdownComponent, CaseEventCompletionComponent, CaseEditFormComponent,
28158
28135
  CaseEditGenericErrorsComponent]; }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
28159
28136
  i0.ɵɵsetComponentScope(CaseEditFormComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.NgControlStatusGroup, i3.FormGroupDirective, LabelSubstitutorDirective, ConditionalShowFormDirective, FieldReadComponent, FieldWriteComponent]; }, function () { return [IsCompoundPipe, IsReadOnlyAndNotCollectionPipe]; });
28160
- i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
28137
+ i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
28161
28138
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28162
28139
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28163
28140
 
@@ -32549,14 +32526,14 @@ class EventTriggerComponent {
32549
32526
  }
32550
32527
  }
32551
32528
  EventTriggerComponent.ɵfac = function EventTriggerComponent_Factory(t) { return new (t || EventTriggerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(OrderService)); };
32552
- EventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventTriggerComponent, selectors: [["ccd-event-trigger"]], inputs: { triggers: "triggers", triggerText: "triggerText", isDisabled: "isDisabled" }, outputs: { onTriggerSubmit: "onTriggerSubmit", onTriggerChange: "onTriggerChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "event-trigger", 3, "formGroup", "ngSubmit", 4, "ngIf"], [1, "event-trigger", 3, "formGroup", "ngSubmit"], [1, "form-group"], ["for", "next-step", 1, "form-label"], ["id", "next-step", "formControlName", "trigger", 1, "form-control", "ccd-dropdown", 3, "ngClass", "change"], ["value", "", "data-default", "", 4, "ngIf"], [3, "ngValue", "title", 4, "ngFor", "ngForOf"], ["type", "submit", 1, "button", 3, "disabled"], ["value", "", "data-default", ""], [3, "ngValue", "title"]], template: function EventTriggerComponent_Template(rf, ctx) { if (rf & 1) {
32529
+ EventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventTriggerComponent, selectors: [["ccd-event-trigger"]], inputs: { triggers: "triggers", triggerText: "triggerText", isDisabled: "isDisabled" }, outputs: { onTriggerSubmit: "onTriggerSubmit", onTriggerChange: "onTriggerChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "event-trigger", 3, "formGroup", "ngSubmit", 4, "ngIf"], [1, "event-trigger", 3, "formGroup", "ngSubmit"], [1, "form-group", 2, "width", "350px !important"], ["for", "next-step", 1, "form-label"], ["id", "next-step", "formControlName", "trigger", 1, "form-control", "ccd-dropdown", 3, "ngClass", "change"], ["value", "", "data-default", "", 4, "ngIf"], [3, "ngValue", "title", 4, "ngFor", "ngForOf"], ["type", "submit", 1, "button", 3, "disabled"], ["value", "", "data-default", ""], [3, "ngValue", "title"]], template: function EventTriggerComponent_Template(rf, ctx) { if (rf & 1) {
32553
32530
  i0.ɵɵtemplate(0, EventTriggerComponent_form_0_Template, 11, 13, "form", 0);
32554
32531
  } if (rf & 2) {
32555
32532
  i0.ɵɵproperty("ngIf", ctx.triggers && ctx.triggers.length);
32556
32533
  } }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i3.ɵNgNoValidate, i3.NgSelectOption, i3.ɵNgSelectMultipleOption, i3.SelectControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.FormGroupDirective, i3.FormControlName, i1.RpxTranslatePipe], styles: [".event-trigger[_ngcontent-%COMP%]{width:auto;margin-top:40px;margin-bottom:20px}.event-trigger[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-top:3px;margin-right:10px;margin-bottom:0;float:left;text-align:right;width:325px}.event-trigger[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{float:left;margin-top:5px}.event-trigger[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:250px}.event-trigger[_ngcontent-%COMP%] select.EventTrigger-empty[_ngcontent-%COMP%], .event-trigger[_ngcontent-%COMP%] select[_ngcontent-%COMP%] [data-default][_ngcontent-%COMP%]{color:#6f777b}"] });
32557
32534
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerComponent, [{
32558
32535
  type: Component,
32559
- args: [{ selector: 'ccd-event-trigger', template: "<form *ngIf=\"triggers && triggers.length\" class=\"event-trigger\" (ngSubmit)=\"triggerSubmit()\" [formGroup]=\"triggerForm\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"next-step\">{{'Next step' | rpxTranslate}}</label>\n <select class=\"form-control ccd-dropdown\" id=\"next-step\" (change)=\"triggerChange()\" formControlName=\"trigger\" [ngClass]=\"{\n 'EventTrigger-empty': !triggerForm.value['trigger']\n }\">\n <option *ngIf=\"1 !== triggers.length\" value=\"\" data-default>{{'Select action' | rpxTranslate}}</option>\n <option *ngFor=\"let trigger of triggers\" [ngValue]=\"trigger\" [title]=\"trigger.description\">{{trigger.name | rpxTranslate}}</option>\n </select>\n </div>\n <button [disabled]=\"isButtonDisabled()\" type=\"submit\" class=\"button\">{{triggerText | rpxTranslate}}</button>\n</form>\n", styles: [".event-trigger{width:auto;margin-top:40px;margin-bottom:20px}.event-trigger .form-group{margin-top:3px;margin-right:10px;margin-bottom:0;float:left;text-align:right;width:325px}.event-trigger .form-group .form-label{float:left;margin-top:5px}.event-trigger select{width:250px}.event-trigger select.EventTrigger-empty,.event-trigger select [data-default]{color:#6f777b}\n"] }]
32536
+ args: [{ selector: 'ccd-event-trigger', template: "<form *ngIf=\"triggers && triggers.length\" class=\"event-trigger\" (ngSubmit)=\"triggerSubmit()\" [formGroup]=\"triggerForm\">\n <div class=\"form-group\" style=\"width: 350px !important;\">\n <label class=\"form-label\" for=\"next-step\">{{'Next step' | rpxTranslate}}</label>\n <select class=\"form-control ccd-dropdown\" id=\"next-step\" (change)=\"triggerChange()\" formControlName=\"trigger\" [ngClass]=\"{\n 'EventTrigger-empty': !triggerForm.value['trigger']\n }\">\n <option *ngIf=\"1 !== triggers.length\" value=\"\" data-default>{{'Select action' | rpxTranslate}}</option>\n <option *ngFor=\"let trigger of triggers\" [ngValue]=\"trigger\" [title]=\"trigger.description\">{{trigger.name | rpxTranslate}}</option>\n </select>\n </div>\n <button [disabled]=\"isButtonDisabled()\" type=\"submit\" class=\"button\">{{triggerText | rpxTranslate}}</button>\n</form>\n", styles: [".event-trigger{width:auto;margin-top:40px;margin-bottom:20px}.event-trigger .form-group{margin-top:3px;margin-right:10px;margin-bottom:0;float:left;text-align:right;width:325px}.event-trigger .form-group .form-label{float:left;margin-top:5px}.event-trigger select{width:250px}.event-trigger select.EventTrigger-empty,.event-trigger select [data-default]{color:#6f777b}\n"] }]
32560
32537
  }], function () { return [{ type: i3.FormBuilder }, { type: OrderService }]; }, { triggers: [{
32561
32538
  type: Input
32562
32539
  }], triggerText: [{