@hmcts/ccd-case-ui-toolkit 7.0.21-cot-771 → 7.0.21-markdown-pre-release

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 (24) hide show
  1. package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +83 -38
  2. package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +6 -5
  3. package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
  4. package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
  5. package/esm2020/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.mjs +4 -4
  6. package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +20 -3
  7. package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
  8. package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
  9. package/esm2020/lib/shared/services/form/form-validators.service.mjs +27 -2
  10. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +204 -105
  11. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  12. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +195 -105
  13. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  14. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
  15. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  16. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  17. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +1 -1
  18. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  19. package/lib/shared/components/palette/markdown/markdown.component.d.ts +3 -1
  20. package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
  21. package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
  22. package/lib/shared/services/form/form-validators.service.d.ts +4 -0
  23. package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
  24. package/package.json +1 -1
@@ -27,6 +27,7 @@ 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';
30
31
  import * as i1$4 from 'ngx-md';
31
32
  import { NgxMdModule } from 'ngx-md';
32
33
  import * as i5 from '@angular/material/legacy-autocomplete';
@@ -133,11 +134,11 @@ function FooterComponent_div_3_Template(rf, ctx) {
133
134
  }
134
135
  }
135
136
  const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
136
- const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
137
+ const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
137
138
  class FooterComponent {
138
139
  }
139
140
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
140
- FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$t, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
141
+ FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
141
142
  if (rf & 1) {
142
143
  i0.ɵɵprojectionDef(_c0$13);
143
144
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
@@ -211,7 +212,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) {
211
212
  }
212
213
  }
213
214
  const _c0$12 = [[["", "headerNavigation", ""]]];
214
- const _c1$s = ["[headerNavigation]"];
215
+ const _c1$t = ["[headerNavigation]"];
215
216
  class HeaderBarComponent {
216
217
  constructor() {
217
218
  this.signOutRequest = new EventEmitter();
@@ -221,7 +222,7 @@ class HeaderBarComponent {
221
222
  }
222
223
  }
223
224
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
224
- HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$s, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
225
+ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
225
226
  if (rf & 1) {
226
227
  i0.ɵɵprojectionDef(_c0$12);
227
228
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
@@ -277,11 +278,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
277
278
  })();
278
279
 
279
280
  const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
280
- const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
281
+ const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
281
282
  class NavigationComponent {
282
283
  }
283
284
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
284
- NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$r, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
285
+ NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
285
286
  if (rf & 1) {
286
287
  i0.ɵɵprojectionDef(_c0$11);
287
288
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
@@ -412,11 +413,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
412
413
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
413
414
 
414
415
  const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
415
- const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
416
+ const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
416
417
  class BodyComponent {
417
418
  }
418
419
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
419
- BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$q, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
420
+ BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
420
421
  if (rf & 1) {
421
422
  i0.ɵɵprojectionDef(_c0$10);
422
423
  i0.ɵɵelementStart(0, "div", 0);
@@ -1085,11 +1086,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
1085
1086
  })();
1086
1087
 
1087
1088
  const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
1088
- const _c1$p = ["*"];
1089
+ const _c1$q = ["*"];
1089
1090
  class TabComponent {
1090
1091
  }
1091
1092
  TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
1092
- TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$p, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) {
1093
+ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) {
1093
1094
  if (rf & 1) {
1094
1095
  i0.ɵɵprojectionDef();
1095
1096
  i0.ɵɵelementStart(0, "div", 0);
@@ -1115,8 +1116,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
1115
1116
  })();
1116
1117
 
1117
1118
  const _c0$Y = ["tab"];
1118
- const _c1$o = function () { return ["."]; };
1119
- const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1119
+ const _c1$p = function () { return ["."]; };
1120
+ const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1120
1121
  function TabsComponent_li_2_Template(rf, ctx) {
1121
1122
  if (rf & 1) {
1122
1123
  const _r4 = i0.ɵɵgetCurrentView();
@@ -1129,7 +1130,7 @@ function TabsComponent_li_2_Template(rf, ctx) {
1129
1130
  if (rf & 2) {
1130
1131
  const panel_r1 = ctx.$implicit;
1131
1132
  i0.ɵɵadvance(1);
1132
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
1133
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
1133
1134
  i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
1134
1135
  i0.ɵɵadvance(2);
1135
1136
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
@@ -2696,6 +2697,9 @@ class FirstErrorPipe {
2696
2697
  else if (keys[0] === 'pattern') {
2697
2698
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2698
2699
  }
2700
+ else if (keys[0] === 'markDownPattern') {
2701
+ errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2702
+ }
2699
2703
  else if (keys[0] === 'minlength') {
2700
2704
  errorMessage = '%FIELDLABEL% is below the minimum length';
2701
2705
  }
@@ -4544,6 +4548,7 @@ class FormValidatorsService {
4544
4548
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4545
4549
  const validators = [Validators.required];
4546
4550
  if (caseField.field_type.type === 'Text') {
4551
+ validators.push(this.markDownPatternValidator());
4547
4552
  if (caseField.field_type.regular_expression) {
4548
4553
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4549
4554
  }
@@ -4557,22 +4562,38 @@ class FormValidatorsService {
4557
4562
  validators.push(Validators.maxLength(caseField.field_type.max));
4558
4563
  }
4559
4564
  }
4565
+ if (caseField.field_type.type === 'TextArea') {
4566
+ validators.push(this.emptyValidator());
4567
+ validators.push(this.markDownPatternValidator());
4568
+ }
4560
4569
  if (control.validator) {
4561
4570
  validators.push(control.validator);
4562
4571
  }
4563
4572
  control.setValidators(validators);
4564
4573
  }
4574
+ else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
4575
+ control.setValidators(this.markDownPatternValidator());
4576
+ }
4565
4577
  return control;
4566
4578
  }
4567
4579
  static emptyValidator() {
4568
4580
  const validator = (control) => {
4569
- if (control && control.value && control.value.toString().trim().length === 0) {
4581
+ var _a;
4582
+ if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
4570
4583
  return { required: {} };
4571
4584
  }
4572
4585
  return null;
4573
4586
  };
4574
4587
  return validator;
4575
4588
  }
4589
+ static markDownPatternValidator() {
4590
+ const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4591
+ return (control) => {
4592
+ var _a;
4593
+ const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
4594
+ return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4595
+ };
4596
+ }
4576
4597
  // TODO: Strip this out as it's only here for the moment because
4577
4598
  // the service is being injected all over the place but it doesn't
4578
4599
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4580,10 +4601,20 @@ class FormValidatorsService {
4580
4601
  addValidators(caseField, control) {
4581
4602
  return FormValidatorsService.addValidators(caseField, control);
4582
4603
  }
4604
+ addMarkDownValidators(formGroup, controlPath) {
4605
+ const control = formGroup.get(controlPath);
4606
+ if (control) {
4607
+ control.setValidators(FormValidatorsService.markDownPatternValidator());
4608
+ control.updateValueAndValidity();
4609
+ }
4610
+ return control;
4611
+ }
4583
4612
  }
4584
4613
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4585
4614
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4586
4615
  ];
4616
+ FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4617
+ FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4587
4618
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4588
4619
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4589
4620
  (function () {
@@ -11088,8 +11119,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
11088
11119
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
11089
11120
  }
11090
11121
  }
11091
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
11092
- const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
11122
+ const _c1$o = function (a0) { return { "form-group-error": a0 }; };
11123
+ const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
11093
11124
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11094
11125
  if (rf & 1) {
11095
11126
  const _r7 = i0.ɵɵgetCurrentView();
@@ -11107,7 +11138,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11107
11138
  }
11108
11139
  if (rf & 2) {
11109
11140
  const ctx_r2 = i0.ɵɵnextContext(2);
11110
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
11141
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
11111
11142
  i0.ɵɵadvance(1);
11112
11143
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
11113
11144
  i0.ɵɵadvance(2);
@@ -11115,7 +11146,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11115
11146
  i0.ɵɵadvance(2);
11116
11147
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
11117
11148
  i0.ɵɵadvance(1);
11118
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11149
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11119
11150
  i0.ɵɵadvance(2);
11120
11151
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
11121
11152
  }
@@ -11162,7 +11193,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
11162
11193
  }
11163
11194
  if (rf & 2) {
11164
11195
  const ctx_r3 = i0.ɵɵnextContext(2);
11165
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
11196
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
11166
11197
  i0.ɵɵadvance(1);
11167
11198
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
11168
11199
  i0.ɵɵadvance(2);
@@ -12731,7 +12762,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
12731
12762
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12732
12763
  }
12733
12764
  }
12734
- const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12765
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12735
12766
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12736
12767
  ngOnInit() {
12737
12768
  if (this.caseField.value) {
@@ -12797,7 +12828,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12797
12828
  i0.ɵɵelementEnd();
12798
12829
  }
12799
12830
  if (rf & 2) {
12800
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12831
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12801
12832
  i0.ɵɵadvance(1);
12802
12833
  i0.ɵɵproperty("for", ctx.id());
12803
12834
  i0.ɵɵadvance(1);
@@ -12835,7 +12866,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
12835
12866
  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);
12836
12867
  }
12837
12868
  }
12838
- const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12869
+ const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12839
12870
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12840
12871
  if (rf & 1) {
12841
12872
  i0.ɵɵelementStart(0, "tr")(1, "td");
@@ -12847,7 +12878,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12847
12878
  const i_r5 = ctx.index;
12848
12879
  const ctx_r3 = i0.ɵɵnextContext(3);
12849
12880
  i0.ɵɵadvance(2);
12850
- 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));
12881
+ 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));
12851
12882
  }
12852
12883
  }
12853
12884
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -14043,7 +14074,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
14043
14074
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
14044
14075
  }
14045
14076
  }
14046
- const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
14077
+ const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
14047
14078
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14048
14079
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
14049
14080
  super();
@@ -14349,7 +14380,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14349
14380
  i0.ɵɵelementEnd()();
14350
14381
  }
14351
14382
  if (rf & 2) {
14352
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
14383
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
14353
14384
  i0.ɵɵadvance(1);
14354
14385
  i0.ɵɵproperty("for", ctx.id());
14355
14386
  i0.ɵɵadvance(1);
@@ -14573,9 +14604,14 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
14573
14604
  })();
14574
14605
 
14575
14606
  class MarkdownComponent {
14576
- constructor() { }
14607
+ constructor() {
14608
+ this.renderUrlToTextFeature = true;
14609
+ }
14577
14610
  ngOnInit() {
14578
14611
  this.content = this.content.replace(/ \n/g, '<br>');
14612
+ if (this.renderUrlToTextFeature) {
14613
+ this.renderUrlToText();
14614
+ }
14579
14615
  }
14580
14616
  onMarkdownClick(event) {
14581
14617
  // If we don't have an anchor tag, we don't need to do anything.
@@ -14584,13 +14620,22 @@ class MarkdownComponent {
14584
14620
  }
14585
14621
  return true;
14586
14622
  }
14623
+ renderUrlToText() {
14624
+ const renderer = new marked.Renderer();
14625
+ renderer.link = (href, title, text) => {
14626
+ return text; // Return the text without turning it into a link
14627
+ };
14628
+ marked.setOptions({
14629
+ renderer: renderer
14630
+ });
14631
+ }
14587
14632
  }
14588
14633
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
14589
14634
  MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
14590
14635
  if (rf & 1) {
14591
14636
  i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
14592
14637
  }
14593
- }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14638
+ }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14594
14639
  if (rf & 1) {
14595
14640
  i0.ɵɵelementStart(0, "div");
14596
14641
  i0.ɵɵelement(1, "markdown", 0);
@@ -14611,6 +14656,8 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
14611
14656
  type: Input
14612
14657
  }], markdownUseHrefAsRouterLink: [{
14613
14658
  type: Input
14659
+ }], renderUrlToTextFeature: [{
14660
+ type: Input
14614
14661
  }], onMarkdownClick: [{
14615
14662
  type: HostListener,
14616
14663
  args: ['click', ['$event']]
@@ -14745,7 +14792,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
14745
14792
  i0.ɵɵadvance(1);
14746
14793
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14747
14794
  i0.ɵɵadvance(1);
14748
- i0.ɵɵproperty("content", checkbox_r4.label);
14795
+ i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
14749
14796
  }
14750
14797
  }
14751
14798
  const _c0$O = function (a0) { return { "error": a0 }; };
@@ -14810,14 +14857,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
14810
14857
  }
14811
14858
  }
14812
14859
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
14813
- 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) {
14860
+ 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) {
14814
14861
  if (rf & 1) {
14815
14862
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
14816
14863
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14817
14864
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14818
14865
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14819
14866
  i0.ɵɵelementEnd();
14820
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14867
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14821
14868
  i0.ɵɵelementEnd()();
14822
14869
  }
14823
14870
  if (rf & 2) {
@@ -14835,7 +14882,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14835
14882
  (function () {
14836
14883
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14837
14884
  type: Component,
14838
- 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"] }]
14885
+ 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"] }]
14839
14886
  }], null, null);
14840
14887
  })();
14841
14888
 
@@ -14979,7 +15026,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14979
15026
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
14980
15027
  }
14981
15028
  }
14982
- const _c1$j = function (a0) { return { "form-group-error": a0 }; };
15029
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
14983
15030
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14984
15031
  ngOnInit() {
14985
15032
  /**
@@ -15019,7 +15066,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
15019
15066
  i0.ɵɵelementEnd()();
15020
15067
  }
15021
15068
  if (rf & 2) {
15022
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15069
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15023
15070
  i0.ɵɵadvance(3);
15024
15071
  i0.ɵɵproperty("for", ctx.id());
15025
15072
  i0.ɵɵadvance(1);
@@ -15120,7 +15167,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
15120
15167
  }
15121
15168
  }
15122
15169
  const _c0$M = function (a0) { return { "form-group-error": a0 }; };
15123
- const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
15170
+ const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
15124
15171
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
15125
15172
  ngOnInit() {
15126
15173
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15148,7 +15195,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
15148
15195
  i0.ɵɵadvance(1);
15149
15196
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15150
15197
  i0.ɵɵadvance(1);
15151
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15198
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15152
15199
  }
15153
15200
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
15154
15201
  (function () {
@@ -15403,7 +15450,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15403
15450
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
15404
15451
  }
15405
15452
  }
15406
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15453
+ const _c1$i = function (a0) { return { "form-group-error": a0 }; };
15407
15454
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
15408
15455
  ngOnInit() {
15409
15456
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -15425,7 +15472,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
15425
15472
  i0.ɵɵelementEnd()();
15426
15473
  }
15427
15474
  if (rf & 2) {
15428
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15475
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15429
15476
  i0.ɵɵadvance(3);
15430
15477
  i0.ɵɵproperty("for", ctx.id());
15431
15478
  i0.ɵɵadvance(1);
@@ -15579,7 +15626,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
15579
15626
  i0.ɵɵelementEnd();
15580
15627
  }
15581
15628
  }
15582
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
15629
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15583
15630
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
15584
15631
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
15585
15632
  super(compoundPipe, validatorsService);
@@ -15732,7 +15779,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
15732
15779
  }
15733
15780
  if (rf & 2) {
15734
15781
  const _r3 = i0.ɵɵreference(7);
15735
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
15782
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
15736
15783
  i0.ɵɵadvance(1);
15737
15784
  i0.ɵɵproperty("for", ctx.id());
15738
15785
  i0.ɵɵadvance(1);
@@ -16519,7 +16566,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
16519
16566
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
16520
16567
  }
16521
16568
  }
16522
- const _c1$f = function (a0) { return { "table-group-error": a0 }; };
16569
+ const _c1$g = function (a0) { return { "table-group-error": a0 }; };
16523
16570
  function LinkCasesComponent_tr_31_Template(rf, ctx) {
16524
16571
  if (rf & 1) {
16525
16572
  const _r21 = i0.ɵɵgetCurrentView();
@@ -16552,7 +16599,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
16552
16599
  const case_r16 = ctx.$implicit;
16553
16600
  const ctx_r2 = i0.ɵɵnextContext();
16554
16601
  i0.ɵɵadvance(2);
16555
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16602
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16556
16603
  i0.ɵɵadvance(2);
16557
16604
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
16558
16605
  i0.ɵɵadvance(2);
@@ -18020,8 +18067,8 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18020
18067
  }
18021
18068
  }
18022
18069
  }
18023
- getLinkedCaseReasons(serviceCode) {
18024
- const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode?serviceId=${serviceCode}`;
18070
+ getLinkedCaseReasons(serviceId) {
18071
+ const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode?serviceId=${serviceId}`;
18025
18072
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
18026
18073
  next: reasons => {
18027
18074
  // Sort in ascending order
@@ -18037,7 +18084,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18037
18084
  const servicesApiUrl = `refdata/location/orgServices?ccdCaseType=${(_b = (_a = this.caseDetails) === null || _a === void 0 ? void 0 : _a.case_type) === null || _b === void 0 ? void 0 : _b.id}`;
18038
18085
  this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe(result => {
18039
18086
  result.forEach(ids => {
18040
- this.getLinkedCaseReasons(ids.service_code);
18087
+ this.getLinkedCaseReasons(ids.service_id);
18041
18088
  });
18042
18089
  });
18043
18090
  }
@@ -18639,7 +18686,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
18639
18686
  }
18640
18687
  }
18641
18688
  const _c0$E = function (a0) { return { "form-group-error": a0 }; };
18642
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18689
+ const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
18643
18690
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
18644
18691
  ngOnInit() {
18645
18692
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18667,7 +18714,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
18667
18714
  i0.ɵɵadvance(1);
18668
18715
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
18669
18716
  i0.ɵɵadvance(1);
18670
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18717
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18671
18718
  }
18672
18719
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18673
18720
  (function () {
@@ -19383,7 +19430,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
19383
19430
  }
19384
19431
  }
19385
19432
  const _c0$C = function (a0) { return { "form-group-error": a0 }; };
19386
- const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
19433
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
19387
19434
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
19388
19435
  ngOnInit() {
19389
19436
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -19411,7 +19458,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
19411
19458
  i0.ɵɵadvance(1);
19412
19459
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
19413
19460
  i0.ɵɵadvance(1);
19414
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19461
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19415
19462
  }
19416
19463
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
19417
19464
  (function () {
@@ -21653,7 +21700,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
21653
21700
  }
21654
21701
  }
21655
21702
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
21656
- const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
21703
+ const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
21657
21704
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
21658
21705
  constructor(browserService) {
21659
21706
  super();
@@ -21693,7 +21740,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
21693
21740
  i0.ɵɵadvance(1);
21694
21741
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
21695
21742
  i0.ɵɵadvance(1);
21696
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21743
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21697
21744
  }
21698
21745
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21699
21746
  (function () {
@@ -21768,7 +21815,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
21768
21815
  }
21769
21816
  }
21770
21817
  const _c0$y = function (a0) { return { "form-group-error": a0 }; };
21771
- const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
21818
+ const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
21772
21819
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
21773
21820
  ngOnInit() {
21774
21821
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -21800,7 +21847,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
21800
21847
  i0.ɵɵadvance(1);
21801
21848
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
21802
21849
  i0.ɵɵadvance(1);
21803
- 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);
21850
+ 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);
21804
21851
  }
21805
21852
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21806
21853
  (function () {
@@ -22007,7 +22054,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
22007
22054
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
22008
22055
  }
22009
22056
  }
22010
- const _c1$a = function (a0) { return { "form-group-error": a0 }; };
22057
+ const _c1$b = function (a0) { return { "form-group-error": a0 }; };
22011
22058
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
22012
22059
  constructor(yesNoService) {
22013
22060
  super();
@@ -22031,7 +22078,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
22031
22078
  i0.ɵɵelementEnd()()();
22032
22079
  }
22033
22080
  if (rf & 2) {
22034
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22081
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22035
22082
  i0.ɵɵadvance(3);
22036
22083
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
22037
22084
  i0.ɵɵadvance(1);
@@ -22429,7 +22476,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
22429
22476
  i0.ɵɵelementContainer(0);
22430
22477
  }
22431
22478
  }
22432
- const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
22479
+ const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
22433
22480
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
22434
22481
  if (rf & 1) {
22435
22482
  i0.ɵɵelementContainerStart(0);
@@ -22442,7 +22489,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
22442
22489
  i0.ɵɵnextContext();
22443
22490
  const _r1 = i0.ɵɵreference(13);
22444
22491
  i0.ɵɵadvance(1);
22445
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
22492
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
22446
22493
  }
22447
22494
  }
22448
22495
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -22633,7 +22680,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
22633
22680
  }
22634
22681
  }
22635
22682
  const _c0$s = [[["", "trigger", ""]]];
22636
- const _c1$8 = ["[trigger]"];
22683
+ const _c1$9 = ["[trigger]"];
22637
22684
  class CaseFileViewOverlayMenuComponent {
22638
22685
  constructor() {
22639
22686
  this.title = '';
@@ -22647,7 +22694,7 @@ class CaseFileViewOverlayMenuComponent {
22647
22694
  }
22648
22695
  }
22649
22696
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
22650
- 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) {
22697
+ 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) {
22651
22698
  if (rf & 1) {
22652
22699
  i0.ɵɵprojectionDef(_c0$s);
22653
22700
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
@@ -24908,7 +24955,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
24908
24955
  }
24909
24956
  }
24910
24957
  const _c0$n = function (a0) { return { "form-group-error": a0 }; };
24911
- const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
24958
+ const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
24912
24959
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24913
24960
  if (rf & 1) {
24914
24961
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
@@ -24930,7 +24977,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24930
24977
  i0.ɵɵadvance(3);
24931
24978
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
24932
24979
  i0.ɵɵadvance(1);
24933
- 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);
24980
+ 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);
24934
24981
  i0.ɵɵadvance(1);
24935
24982
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
24936
24983
  }
@@ -25500,7 +25547,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
25500
25547
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
25501
25548
  }
25502
25549
  }
25503
- const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
25550
+ const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
25504
25551
  class UpdateFlagComponent {
25505
25552
  constructor(rpxTranslationService) {
25506
25553
  this.rpxTranslationService = rpxTranslationService;
@@ -25709,7 +25756,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
25709
25756
  const _r3 = i0.ɵɵreference(17);
25710
25757
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25711
25758
  i0.ɵɵadvance(2);
25712
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
25759
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
25713
25760
  i0.ɵɵadvance(3);
25714
25761
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
25715
25762
  i0.ɵɵadvance(2);
@@ -27105,7 +27152,7 @@ const CUSTOM_MOMENT_FORMATS = {
27105
27152
  };
27106
27153
 
27107
27154
  const _c0$g = ["picker"];
27108
- const _c1$5 = ["input"];
27155
+ const _c1$6 = ["input"];
27109
27156
  function DatetimePickerComponent_span_3_Template(rf, ctx) {
27110
27157
  if (rf & 1) {
27111
27158
  i0.ɵɵelementStart(0, "span", 11);
@@ -27169,7 +27216,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
27169
27216
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
27170
27217
  }
27171
27218
  }
27172
- const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
27219
+ const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
27173
27220
  class DatetimePickerComponent extends AbstractFormFieldComponent {
27174
27221
  constructor(formatTranslationService, ngxMatDateFormats) {
27175
27222
  super();
@@ -27335,7 +27382,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
27335
27382
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
27336
27383
  if (rf & 1) {
27337
27384
  i0.ɵɵviewQuery(_c0$g, 5);
27338
- i0.ɵɵviewQuery(_c1$5, 5);
27385
+ i0.ɵɵviewQuery(_c1$6, 5);
27339
27386
  }
27340
27387
  if (rf & 2) {
27341
27388
  let _t;
@@ -27371,7 +27418,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
27371
27418
  }
27372
27419
  if (rf & 2) {
27373
27420
  const _r6 = i0.ɵɵreference(13);
27374
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27421
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27375
27422
  i0.ɵɵadvance(3);
27376
27423
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
27377
27424
  i0.ɵɵadvance(1);
@@ -27625,7 +27672,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
27625
27672
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
27626
27673
  }
27627
27674
  }
27628
- const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27675
+ const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27629
27676
  function EventLogTableComponent_tr_20_Template(rf, ctx) {
27630
27677
  if (rf & 1) {
27631
27678
  const _r18 = i0.ɵɵgetCurrentView();
@@ -27658,7 +27705,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
27658
27705
  if (rf & 2) {
27659
27706
  const event_r1 = ctx.$implicit;
27660
27707
  const ctx_r0 = i0.ɵɵnextContext();
27661
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
27708
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
27662
27709
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
27663
27710
  i0.ɵɵadvance(2);
27664
27711
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -29726,6 +29773,36 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
29726
29773
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
29727
29774
  }
29728
29775
  }
29776
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
29777
+ if (rf & 1) {
29778
+ i0.ɵɵelementStart(0, "span", 48);
29779
+ i0.ɵɵtext(1);
29780
+ i0.ɵɵpipe(2, "rpxTranslate");
29781
+ i0.ɵɵpipe(3, "ccdFirstError");
29782
+ i0.ɵɵelementEnd();
29783
+ }
29784
+ if (rf & 2) {
29785
+ const ctx_r36 = i0.ɵɵnextContext(3);
29786
+ i0.ɵɵadvance(1);
29787
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
29788
+ }
29789
+ }
29790
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
29791
+ if (rf & 1) {
29792
+ i0.ɵɵelementStart(0, "span", 48);
29793
+ i0.ɵɵtext(1);
29794
+ i0.ɵɵpipe(2, "rpxTranslate");
29795
+ i0.ɵɵpipe(3, "ccdFirstError");
29796
+ i0.ɵɵelementEnd();
29797
+ }
29798
+ if (rf & 2) {
29799
+ const ctx_r37 = i0.ɵɵnextContext(3);
29800
+ i0.ɵɵadvance(1);
29801
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
29802
+ }
29803
+ }
29804
+ const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
29805
+ const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
29729
29806
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29730
29807
  if (rf & 1) {
29731
29808
  i0.ɵɵelementContainerStart(0);
@@ -29736,21 +29813,38 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29736
29813
  i0.ɵɵelementStart(6, "span", 43);
29737
29814
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
29738
29815
  i0.ɵɵelementEnd()();
29739
- i0.ɵɵelement(8, "input", 44);
29816
+ i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
29817
+ i0.ɵɵelement(9, "input", 45);
29740
29818
  i0.ɵɵelementEnd();
29741
- i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
29742
- i0.ɵɵtext(11, "Event description (optional)");
29819
+ i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
29820
+ i0.ɵɵtext(12, "Event description (optional)");
29743
29821
  i0.ɵɵelementEnd();
29744
- i0.ɵɵelement(12, "textarea", 46);
29822
+ i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
29823
+ i0.ɵɵelement(14, "textarea", 47);
29745
29824
  i0.ɵɵelementEnd()();
29746
29825
  i0.ɵɵelementContainerEnd();
29747
29826
  }
29827
+ if (rf & 2) {
29828
+ const ctx_r9 = i0.ɵɵnextContext(2);
29829
+ i0.ɵɵadvance(3);
29830
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
29831
+ i0.ɵɵadvance(5);
29832
+ i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
29833
+ i0.ɵɵadvance(1);
29834
+ 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)));
29835
+ i0.ɵɵadvance(1);
29836
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
29837
+ i0.ɵɵadvance(3);
29838
+ i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
29839
+ i0.ɵɵadvance(1);
29840
+ 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)));
29841
+ }
29748
29842
  }
29749
29843
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29750
29844
  if (rf & 1) {
29751
- const _r37 = i0.ɵɵgetCurrentView();
29752
- i0.ɵɵelementStart(0, "button", 47);
29753
- 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()); });
29845
+ const _r39 = i0.ɵɵgetCurrentView();
29846
+ i0.ɵɵelementStart(0, "button", 49);
29847
+ 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()); });
29754
29848
  i0.ɵɵtext(1);
29755
29849
  i0.ɵɵpipe(2, "rpxTranslate");
29756
29850
  i0.ɵɵelementEnd();
@@ -29764,7 +29858,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29764
29858
  }
29765
29859
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29766
29860
  if (rf & 1) {
29767
- const _r39 = i0.ɵɵgetCurrentView();
29861
+ const _r41 = i0.ɵɵgetCurrentView();
29768
29862
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
29769
29863
  i0.ɵɵtext(2);
29770
29864
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -29774,13 +29868,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29774
29868
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
29775
29869
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
29776
29870
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
29777
- 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)); });
29871
+ 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)); });
29778
29872
  i0.ɵɵelementEnd();
29779
29873
  i0.ɵɵelementStart(11, "form", 8);
29780
- 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()); });
29874
+ 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()); });
29781
29875
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
29782
29876
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
29783
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
29877
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
29784
29878
  i0.ɵɵelementStart(15, "div", 9);
29785
29879
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
29786
29880
  i0.ɵɵelementStart(17, "button", 11);
@@ -29788,7 +29882,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29788
29882
  i0.ɵɵpipe(19, "rpxTranslate");
29789
29883
  i0.ɵɵelementEnd()();
29790
29884
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
29791
- 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()); });
29885
+ 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()); });
29792
29886
  i0.ɵɵtext(22);
29793
29887
  i0.ɵɵpipe(23, "rpxTranslate");
29794
29888
  i0.ɵɵelementEnd()()()();
@@ -29827,9 +29921,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29827
29921
  }
29828
29922
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29829
29923
  if (rf & 1) {
29830
- const _r43 = i0.ɵɵgetCurrentView();
29831
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
29832
- 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)); });
29924
+ const _r45 = i0.ɵɵgetCurrentView();
29925
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
29926
+ 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)); });
29833
29927
  i0.ɵɵelementEnd();
29834
29928
  }
29835
29929
  if (rf & 2) {
@@ -29839,14 +29933,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29839
29933
  }
29840
29934
  // @dynamic
29841
29935
  class CaseEditSubmitComponent {
29842
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
29936
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
29843
29937
  this.caseEdit = caseEdit;
29844
29938
  this.fieldsUtils = fieldsUtils;
29845
29939
  this.caseFieldService = caseFieldService;
29846
29940
  this.route = route;
29847
29941
  this.orderService = orderService;
29848
29942
  this.profileNotifier = profileNotifier;
29943
+ this.formValidatorsService = formValidatorsService;
29849
29944
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
29945
+ this.eventSummaryLabel = 'Event summary';
29946
+ this.eventDescriptionLabel = 'Event description';
29850
29947
  }
29851
29948
  get isDisabled() {
29852
29949
  // EUI-3452.
@@ -29857,7 +29954,7 @@ class CaseEditSubmitComponent {
29857
29954
  }
29858
29955
  ngOnInit() {
29859
29956
  var _a, _b, _c;
29860
- this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
29957
+ this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
29861
29958
  this.eventTrigger = this.caseEdit.eventTrigger;
29862
29959
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
29863
29960
  this.editForm = this.caseEdit.form;
@@ -29870,10 +29967,12 @@ class CaseEditSubmitComponent {
29870
29967
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
29871
29968
  // a FlagLauncher field in the event trigger
29872
29969
  this.caseEdit.isCaseFlagSubmission =
29873
- this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29970
+ this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29874
29971
  this.caseEdit.isLinkedCasesSubmission =
29875
29972
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
29876
29973
  this.pageTitle = this.getPageTitle();
29974
+ this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
29975
+ this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
29877
29976
  }
29878
29977
  ngOnDestroy() {
29879
29978
  /* istanbul ignore else */
@@ -29882,12 +29981,14 @@ class CaseEditSubmitComponent {
29882
29981
  }
29883
29982
  }
29884
29983
  submit() {
29885
- this.caseEdit.submitForm({
29886
- eventTrigger: this.eventTrigger,
29887
- form: this.editForm,
29888
- submit: this.caseEdit.submit,
29889
- caseDetails: this.caseEdit.caseDetails,
29890
- });
29984
+ if (this.summary.valid && this.description.valid) {
29985
+ this.caseEdit.submitForm({
29986
+ eventTrigger: this.eventTrigger,
29987
+ form: this.editForm,
29988
+ submit: this.caseEdit.submit,
29989
+ caseDetails: this.caseEdit.caseDetails
29990
+ });
29991
+ }
29891
29992
  }
29892
29993
  onEventCanBeCompleted(eventCanBeCompleted) {
29893
29994
  this.caseEdit.onEventCanBeCompleted({
@@ -29895,7 +29996,7 @@ class CaseEditSubmitComponent {
29895
29996
  eventCanBeCompleted,
29896
29997
  caseDetails: this.caseEdit.caseDetails,
29897
29998
  form: this.editForm,
29898
- submit: this.caseEdit.submit,
29999
+ submit: this.caseEdit.submit
29899
30000
  });
29900
30001
  }
29901
30002
  getPageTitle() {
@@ -29971,7 +30072,7 @@ class CaseEditSubmitComponent {
29971
30072
  }
29972
30073
  }
29973
30074
  readOnlySummaryFieldsToDisplayExists() {
29974
- return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
30075
+ return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
29975
30076
  }
29976
30077
  showEventNotes() {
29977
30078
  var _a;
@@ -29987,7 +30088,7 @@ class CaseEditSubmitComponent {
29987
30088
  }
29988
30089
  getLastPageShown() {
29989
30090
  let lastPage;
29990
- this.wizard.reverse().forEach(page => {
30091
+ this.wizard.reverse().forEach((page) => {
29991
30092
  if (!lastPage && this.isShown(page)) {
29992
30093
  lastPage = page;
29993
30094
  }
@@ -30006,7 +30107,7 @@ class CaseEditSubmitComponent {
30006
30107
  }
30007
30108
  isShown(page) {
30008
30109
  const fields = this.fieldsUtils
30009
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
30110
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
30010
30111
  return page.parsedShowCondition.match(fields);
30011
30112
  }
30012
30113
  canShowFieldInCYA(field) {
@@ -30015,7 +30116,7 @@ class CaseEditSubmitComponent {
30015
30116
  sortFieldsByShowSummaryContent(fields) {
30016
30117
  return this.orderService
30017
30118
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
30018
- .filter(cf => cf.show_summary_content_option);
30119
+ .filter((cf) => cf.show_summary_content_option);
30019
30120
  }
30020
30121
  getCaseFields() {
30021
30122
  if (this.caseEdit.caseDetails) {
@@ -30034,9 +30135,7 @@ class CaseEditSubmitComponent {
30034
30135
  if (this.eventTrigger.can_save_draft) {
30035
30136
  return 'Return to case list';
30036
30137
  }
30037
- else {
30038
- return 'Cancel';
30039
- }
30138
+ return 'Cancel';
30040
30139
  }
30041
30140
  }
30042
30141
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -30050,8 +30149,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
30050
30149
  }
30051
30150
  return a.show_summary_content_option - b.show_summary_content_option;
30052
30151
  };
30053
- 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)); };
30054
- 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) {
30152
+ 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)); };
30153
+ 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) {
30055
30154
  if (rf & 1) {
30056
30155
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
30057
30156
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
@@ -30065,8 +30164,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
30065
30164
  (function () {
30066
30165
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
30067
30166
  type: Component,
30068
- 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"] }]
30069
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
30167
+ 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"] }]
30168
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
30070
30169
  })();
30071
30170
 
30072
30171
  function CaseProgressComponent_div_0_Template(rf, ctx) {
@@ -30464,7 +30563,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
30464
30563
  CaseEditGenericErrorsComponent];
30465
30564
  }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
30466
30565
  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]; });
30467
- 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]; });
30566
+ 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]; });
30468
30567
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30469
30568
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30470
30569