@hmcts/ccd-case-ui-toolkit 7.0.37-default-tab-fix → 7.0.37-rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) 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/case-editor/services/case-worker.service.mjs +3 -3
  4. package/esm2020/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +3 -8
  5. package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +3 -5
  6. package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
  7. package/esm2020/lib/shared/components/palette/case-flag/write-case-flag-field.component.mjs +1 -1
  8. package/esm2020/lib/shared/components/palette/collection/write-collection-field.component.mjs +2 -4
  9. package/esm2020/lib/shared/components/palette/complex/write-complex-field.component.mjs +2 -4
  10. package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
  11. package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
  12. package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +43 -3
  13. package/esm2020/lib/shared/components/palette/query-management/components/query-list/query-list.component.mjs +2 -2
  14. package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
  15. package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
  16. package/esm2020/lib/shared/components/search-result/search-result.component.mjs +2 -2
  17. package/esm2020/lib/shared/domain/definition/case-field.model.mjs +4 -2
  18. package/esm2020/lib/shared/services/form/field-type-sanitiser.mjs +13 -2
  19. package/esm2020/lib/shared/services/form/form-validators.service.mjs +28 -2
  20. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +258 -127
  21. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  22. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +243 -127
  23. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  24. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
  25. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  26. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +0 -1
  27. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  28. package/lib/shared/components/palette/address/write-address-field.component.d.ts +1 -2
  29. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  30. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  31. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +0 -1
  32. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
  33. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +1 -2
  34. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  35. package/lib/shared/components/palette/complex/write-complex-field.component.d.ts +1 -2
  36. package/lib/shared/components/palette/complex/write-complex-field.component.d.ts.map +1 -1
  37. package/lib/shared/components/palette/markdown/markdown.component.d.ts +6 -1
  38. package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
  39. package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
  40. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  41. package/lib/shared/services/form/field-type-sanitiser.d.ts +1 -0
  42. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  43. package/lib/shared/services/form/form-validators.service.d.ts +4 -0
  44. package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
  45. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, HostListener, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
3
  import * as i4 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, AsyncPipe, CurrencyPipe, formatDate } from '@angular/common';
5
5
  import * as i1 from 'rpx-xui-translation';
@@ -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$14 = [[["", "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$14);
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$13 = [[["", "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$13);
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$12 = [[["", "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$12);
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$11 = [[["", "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$11);
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$_ = 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$Z = ["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));
@@ -2702,6 +2703,9 @@ class FirstErrorPipe {
2702
2703
  else if (keys[0] === 'pattern') {
2703
2704
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2704
2705
  }
2706
+ else if (keys[0] === 'markDownPattern') {
2707
+ errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2708
+ }
2705
2709
  else if (keys[0] === 'minlength') {
2706
2710
  errorMessage = '%FIELDLABEL% is below the minimum length';
2707
2711
  }
@@ -3025,7 +3029,10 @@ class CaseField {
3025
3029
  }
3026
3030
  }
3027
3031
  set list_items(items) {
3028
- this._list_items = items;
3032
+ var _a;
3033
+ if ((items && !this._list_items) || ((items === null || items === void 0 ? void 0 : items.length) > ((_a = this._list_items) === null || _a === void 0 ? void 0 : _a.length))) {
3034
+ this._list_items = items;
3035
+ }
3029
3036
  }
3030
3037
  get dateTimeEntryFormat() {
3031
3038
  if (this.isComplexDisplay()) {
@@ -4550,6 +4557,7 @@ class FormValidatorsService {
4550
4557
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4551
4558
  const validators = [Validators.required];
4552
4559
  if (caseField.field_type.type === 'Text') {
4560
+ validators.push(this.markDownPatternValidator());
4553
4561
  if (caseField.field_type.regular_expression) {
4554
4562
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4555
4563
  }
@@ -4563,22 +4571,39 @@ class FormValidatorsService {
4563
4571
  validators.push(Validators.maxLength(caseField.field_type.max));
4564
4572
  }
4565
4573
  }
4574
+ if (caseField.field_type.type === 'TextArea') {
4575
+ validators.push(this.emptyValidator());
4576
+ validators.push(this.markDownPatternValidator());
4577
+ }
4566
4578
  if (control.validator) {
4567
4579
  validators.push(control.validator);
4568
4580
  }
4569
4581
  control.setValidators(validators);
4570
4582
  }
4583
+ else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')
4584
+ || (caseField.display_context === 'COMPLEX' && caseField.field_type.type === 'Complex')) {
4585
+ control.setValidators(this.markDownPatternValidator());
4586
+ }
4571
4587
  return control;
4572
4588
  }
4573
4589
  static emptyValidator() {
4574
4590
  const validator = (control) => {
4575
- if (control && control.value && control.value.toString().trim().length === 0) {
4591
+ var _a;
4592
+ if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
4576
4593
  return { required: {} };
4577
4594
  }
4578
4595
  return null;
4579
4596
  };
4580
4597
  return validator;
4581
4598
  }
4599
+ static markDownPatternValidator() {
4600
+ const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4601
+ return (control) => {
4602
+ var _a;
4603
+ const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
4604
+ return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4605
+ };
4606
+ }
4582
4607
  // TODO: Strip this out as it's only here for the moment because
4583
4608
  // the service is being injected all over the place but it doesn't
4584
4609
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4586,10 +4611,20 @@ class FormValidatorsService {
4586
4611
  addValidators(caseField, control) {
4587
4612
  return FormValidatorsService.addValidators(caseField, control);
4588
4613
  }
4614
+ addMarkDownValidators(formGroup, controlPath) {
4615
+ const control = formGroup.get(controlPath);
4616
+ if (control) {
4617
+ control.setValidators(FormValidatorsService.markDownPatternValidator());
4618
+ control.updateValueAndValidity();
4619
+ }
4620
+ return control;
4621
+ }
4589
4622
  }
4590
4623
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4591
4624
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4592
4625
  ];
4626
+ FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4627
+ FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4593
4628
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4594
4629
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4595
4630
  (function () {
@@ -5226,7 +5261,8 @@ class FieldTypeSanitiser {
5226
5261
  if (!data || !caseFields) {
5227
5262
  return;
5228
5263
  }
5229
- caseFields.forEach(caseField => {
5264
+ caseFields = this.ensureDynamicMultiSelectListPopulated(caseFields);
5265
+ caseFields.forEach((caseField) => {
5230
5266
  // tslint:disable-next-line:switch-default
5231
5267
  switch (caseField.field_type.type) {
5232
5268
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
@@ -5249,6 +5285,19 @@ class FieldTypeSanitiser {
5249
5285
  }
5250
5286
  });
5251
5287
  }
5288
+ ensureDynamicMultiSelectListPopulated(caseFields) {
5289
+ return caseFields.map((field) => {
5290
+ if (field.field_type.type !== 'Complex') {
5291
+ return field;
5292
+ }
5293
+ const complexFieldsUpdated = field.field_type.complex_fields.map((complexField) => {
5294
+ var _a, _b;
5295
+ return complexField.field_type.type === FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST && complexField.display_context !== 'HIDDEN' && ((_a = field._value) === null || _a === void 0 ? void 0 : _a[complexField.id])
5296
+ ? Object.assign(Object.assign({}, complexField), { list_items: (_b = field._value[complexField.id]) === null || _b === void 0 ? void 0 : _b.list_items }) : complexField;
5297
+ });
5298
+ return Object.assign(Object.assign({}, field), { field_type: Object.assign(Object.assign({}, field.field_type), { complex_fields: complexFieldsUpdated }) });
5299
+ });
5300
+ }
5252
5301
  convertArrayToDynamicListOutput(field, data) {
5253
5302
  const values = data[field.id];
5254
5303
  if (Array.isArray(values)) {
@@ -8423,9 +8472,9 @@ class CaseworkerService {
8423
8472
  this.errorService = errorService;
8424
8473
  }
8425
8474
  getCaseworkers(serviceId) {
8426
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/retrieveCaseWorkersForServices`;
8475
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
8427
8476
  return this.http
8428
- .post(url, { serviceIds: [serviceId] })
8477
+ .post(url, { services: [serviceId] })
8429
8478
  .pipe(catchError(error => {
8430
8479
  this.errorService.setError(error);
8431
8480
  return throwError(error);
@@ -11126,8 +11175,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
11126
11175
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
11127
11176
  }
11128
11177
  }
11129
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
11130
- const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
11178
+ const _c1$o = function (a0) { return { "form-group-error": a0 }; };
11179
+ const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
11131
11180
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11132
11181
  if (rf & 1) {
11133
11182
  const _r7 = i0.ɵɵgetCurrentView();
@@ -11145,7 +11194,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11145
11194
  }
11146
11195
  if (rf & 2) {
11147
11196
  const ctx_r2 = i0.ɵɵnextContext(2);
11148
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
11197
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
11149
11198
  i0.ɵɵadvance(1);
11150
11199
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
11151
11200
  i0.ɵɵadvance(2);
@@ -11153,7 +11202,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11153
11202
  i0.ɵɵadvance(2);
11154
11203
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
11155
11204
  i0.ɵɵadvance(1);
11156
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11205
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11157
11206
  i0.ɵɵadvance(2);
11158
11207
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
11159
11208
  }
@@ -11200,7 +11249,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
11200
11249
  }
11201
11250
  if (rf & 2) {
11202
11251
  const ctx_r3 = i0.ɵɵnextContext(2);
11203
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
11252
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
11204
11253
  i0.ɵɵadvance(1);
11205
11254
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
11206
11255
  i0.ɵɵadvance(2);
@@ -11380,7 +11429,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11380
11429
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11381
11430
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11382
11431
  }
11383
- }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) {
11432
+ }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) {
11384
11433
  if (rf & 1) {
11385
11434
  i0.ɵɵelementStart(0, "div", 0);
11386
11435
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
@@ -11405,8 +11454,6 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11405
11454
  }], focusElementDirectives: [{
11406
11455
  type: ViewChildren,
11407
11456
  args: [FocusElementDirective]
11408
- }], formGroup: [{
11409
- type: Input
11410
11457
  }] });
11411
11458
  })();
11412
11459
 
@@ -12769,7 +12816,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
12769
12816
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12770
12817
  }
12771
12818
  }
12772
- const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12819
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12773
12820
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12774
12821
  ngOnInit() {
12775
12822
  if (this.caseField.value) {
@@ -12835,7 +12882,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12835
12882
  i0.ɵɵelementEnd();
12836
12883
  }
12837
12884
  if (rf & 2) {
12838
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12885
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12839
12886
  i0.ɵɵadvance(1);
12840
12887
  i0.ɵɵproperty("for", ctx.id());
12841
12888
  i0.ɵɵadvance(1);
@@ -12873,7 +12920,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
12873
12920
  i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$T, 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);
12874
12921
  }
12875
12922
  }
12876
- const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12923
+ const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12877
12924
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12878
12925
  if (rf & 1) {
12879
12926
  i0.ɵɵelementStart(0, "tr")(1, "td");
@@ -12885,7 +12932,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12885
12932
  const i_r5 = ctx.index;
12886
12933
  const ctx_r3 = i0.ɵɵnextContext(3);
12887
12934
  i0.ɵɵadvance(2);
12888
- 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));
12935
+ 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));
12889
12936
  }
12890
12937
  }
12891
12938
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13418,7 +13465,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13418
13465
  let _t;
13419
13466
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
13420
13467
  }
13421
- }, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 11, consts: [[1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], [1, "heading-h2", "error-spacing"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "disabled", "click"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [1, "error-message"], [1, "form-group", 3, "hidden"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf"], ["collectionItem", ""], [1, "collection-title"], [1, "float-left"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "disabled", "click"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) {
13468
+ }, inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 11, consts: [[1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], [1, "heading-h2", "error-spacing"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "disabled", "click"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [1, "error-message"], [1, "form-group", 3, "hidden"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf"], ["collectionItem", ""], [1, "collection-title"], [1, "float-left"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "disabled", "click"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) {
13422
13469
  if (rf & 1) {
13423
13470
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
13424
13471
  i0.ɵɵtext(3);
@@ -13456,8 +13503,6 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13456
13503
  args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text | rpxTranslate }}</span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
13457
13504
  }], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
13458
13505
  type: Input
13459
- }], formGroup: [{
13460
- type: Input
13461
13506
  }], items: [{
13462
13507
  type: ViewChildren,
13463
13508
  args: ['collectionItem']
@@ -13798,7 +13843,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
13798
13843
  }
13799
13844
  }
13800
13845
  WriteComplexFieldComponent.ɵfac = function WriteComplexFieldComponent_Factory(t) { return new (t || WriteComplexFieldComponent)(i0.ɵɵdirectiveInject(IsCompoundPipe), i0.ɵɵdirectiveInject(FormValidatorsService)); };
13801
- WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteComplexFieldComponent, selectors: [["ccd-write-complex-type-field"]], inputs: { caseFields: "caseFields", formGroup: "formGroup", renderLabel: "renderLabel", ignoreMandatory: "ignoreMandatory" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 3, consts: [[1, "form-group", 3, "id"], ["class", "heading-h2", 4, "ngIf"], [3, "ngSwitch", 4, "ngFor", "ngForOf"], [1, "heading-h2"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"]], template: function WriteComplexFieldComponent_Template(rf, ctx) {
13846
+ WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteComplexFieldComponent, selectors: [["ccd-write-complex-type-field"]], inputs: { caseFields: "caseFields", renderLabel: "renderLabel", ignoreMandatory: "ignoreMandatory" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 3, consts: [[1, "form-group", 3, "id"], ["class", "heading-h2", 4, "ngIf"], [3, "ngSwitch", 4, "ngFor", "ngForOf"], [1, "heading-h2"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"]], template: function WriteComplexFieldComponent_Template(rf, ctx) {
13802
13847
  if (rf & 1) {
13803
13848
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
13804
13849
  i0.ɵɵtemplate(3, WriteComplexFieldComponent_h2_3_Template, 3, 3, "h2", 1);
@@ -13820,8 +13865,6 @@ WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13820
13865
  args: [{ selector: 'ccd-write-complex-type-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <fieldset>\n <legend><h2 *ngIf=\"renderLabel\" class=\"heading-h2\">{{(caseField | ccdFieldLabel)}}</h2></legend>\n <ng-container [ngSwitch]=\"field | ccdIsReadOnly\" *ngFor=\"let field of complexFields\">\n <ccd-field-read *ngSwitchCase=\"true\"\n ccdLabelSubstitutor\n [caseField]=\"buildField(field)\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [withLabel]=\"true\">\n </ccd-field-read>\n <ccd-field-write *ngSwitchCase=\"false\"\n ccdLabelSubstitutor\n [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"complexGroup\"\n [idPrefix]=\"buildIdPrefix(field)\"\n [hidden]=\"field.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </ng-container>\n </fieldset>\n</div>\n", styles: [".complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}\n"] }]
13821
13866
  }], function () { return [{ type: IsCompoundPipe }, { type: FormValidatorsService }]; }, { caseFields: [{
13822
13867
  type: Input
13823
- }], formGroup: [{
13824
- type: Input
13825
13868
  }], renderLabel: [{
13826
13869
  type: Input
13827
13870
  }], ignoreMandatory: [{
@@ -14083,7 +14126,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
14083
14126
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
14084
14127
  }
14085
14128
  }
14086
- const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
14129
+ const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
14087
14130
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14088
14131
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
14089
14132
  super();
@@ -14408,7 +14451,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14408
14451
  i0.ɵɵelementEnd()();
14409
14452
  }
14410
14453
  if (rf & 2) {
14411
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
14454
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
14412
14455
  i0.ɵɵadvance(1);
14413
14456
  i0.ɵɵproperty("for", ctx.id());
14414
14457
  i0.ɵɵadvance(1);
@@ -14435,7 +14478,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14435
14478
  (function () {
14436
14479
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
14437
14480
  type: Component,
14438
- args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
14481
+ args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
14439
14482
  }], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }]; }, { fileInput: [{
14440
14483
  type: ViewChild,
14441
14484
  args: ['fileInput', { static: false }]
@@ -14636,13 +14679,49 @@ class MarkdownComponent {
14636
14679
  this._markdown = _markdown;
14637
14680
  this.router = router;
14638
14681
  this.renderer = renderer;
14682
+ this.renderUrlToTextFeature = true;
14639
14683
  }
14640
14684
  ngOnInit() {
14641
14685
  this.content = this.content.replace(/ \n/g, '<br>');
14686
+ if (this.renderUrlToTextFeature) {
14687
+ this.renderUrlToText();
14688
+ }
14689
+ }
14690
+ onMarkdownClick(event) {
14691
+ // If we don't have an anchor tag, we don't need to do anything.
14692
+ if (event.target instanceof HTMLAnchorElement === false) {
14693
+ return;
14694
+ }
14695
+ return true;
14696
+ }
14697
+ renderUrlToText() {
14698
+ const renderer = new marked.Renderer();
14699
+ renderer.link = (href, title, text) => {
14700
+ if (!text || text === href) {
14701
+ return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
14702
+ }
14703
+ return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
14704
+ };
14705
+ marked.setOptions({
14706
+ renderer: renderer
14707
+ });
14708
+ }
14709
+ isAllowedUrl(url) {
14710
+ const currentOrigin = window.location.origin;
14711
+ const urlOrigin = new URL(url, window.location.href).origin;
14712
+ return urlOrigin === currentOrigin || url.startsWith('/'); // Check if same origin or relative
14713
+ }
14714
+ detectMarkdownLinks(inputString) {
14715
+ const markdownLinkRegex = /\[([^\]]+)\]\(?([^ )]+)\)/g;
14716
+ return markdownLinkRegex.test(inputString);
14642
14717
  }
14643
14718
  }
14644
14719
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(i0.ɵɵdirectiveInject(i1$4.NgxMdService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i0.Renderer2)); };
14645
- MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 6, consts: [[1, "markdown", 3, "sanitizeHtml", "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14720
+ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
14721
+ if (rf & 1) {
14722
+ i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
14723
+ }
14724
+ }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 6, consts: [[1, "markdown", 3, "sanitizeHtml", "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14646
14725
  if (rf & 1) {
14647
14726
  i0.ɵɵelementStart(0, "div");
14648
14727
  i0.ɵɵelement(1, "markdown", 0);
@@ -14663,6 +14742,11 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
14663
14742
  type: Input
14664
14743
  }], markdownUseHrefAsRouterLink: [{
14665
14744
  type: Input
14745
+ }], renderUrlToTextFeature: [{
14746
+ type: Input
14747
+ }], onMarkdownClick: [{
14748
+ type: HostListener,
14749
+ args: ['click', ['$event']]
14666
14750
  }] });
14667
14751
  })();
14668
14752
 
@@ -14794,7 +14878,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
14794
14878
  i0.ɵɵadvance(1);
14795
14879
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14796
14880
  i0.ɵɵadvance(1);
14797
- i0.ɵɵproperty("content", checkbox_r4.label);
14881
+ i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
14798
14882
  }
14799
14883
  }
14800
14884
  const _c0$P = function (a0) { return { "error": a0 }; };
@@ -14859,14 +14943,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
14859
14943
  }
14860
14944
  }
14861
14945
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
14862
- 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) {
14946
+ 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) {
14863
14947
  if (rf & 1) {
14864
14948
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
14865
14949
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14866
14950
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14867
14951
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14868
14952
  i0.ɵɵelementEnd();
14869
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14953
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14870
14954
  i0.ɵɵelementEnd()();
14871
14955
  }
14872
14956
  if (rf & 2) {
@@ -14884,7 +14968,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14884
14968
  (function () {
14885
14969
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14886
14970
  type: Component,
14887
- 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"] }]
14971
+ 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"] }]
14888
14972
  }], null, null);
14889
14973
  })();
14890
14974
 
@@ -15028,7 +15112,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15028
15112
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
15029
15113
  }
15030
15114
  }
15031
- const _c1$j = function (a0) { return { "form-group-error": a0 }; };
15115
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
15032
15116
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
15033
15117
  ngOnInit() {
15034
15118
  /**
@@ -15068,7 +15152,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
15068
15152
  i0.ɵɵelementEnd()();
15069
15153
  }
15070
15154
  if (rf & 2) {
15071
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15155
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15072
15156
  i0.ɵɵadvance(3);
15073
15157
  i0.ɵɵproperty("for", ctx.id());
15074
15158
  i0.ɵɵadvance(1);
@@ -15169,7 +15253,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
15169
15253
  }
15170
15254
  }
15171
15255
  const _c0$N = function (a0) { return { "form-group-error": a0 }; };
15172
- const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
15256
+ const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
15173
15257
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
15174
15258
  ngOnInit() {
15175
15259
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15197,7 +15281,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
15197
15281
  i0.ɵɵadvance(1);
15198
15282
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15199
15283
  i0.ɵɵadvance(1);
15200
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15284
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15201
15285
  }
15202
15286
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
15203
15287
  (function () {
@@ -15452,7 +15536,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15452
15536
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
15453
15537
  }
15454
15538
  }
15455
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15539
+ const _c1$i = function (a0) { return { "form-group-error": a0 }; };
15456
15540
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
15457
15541
  ngOnInit() {
15458
15542
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -15474,7 +15558,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
15474
15558
  i0.ɵɵelementEnd()();
15475
15559
  }
15476
15560
  if (rf & 2) {
15477
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15561
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15478
15562
  i0.ɵɵadvance(3);
15479
15563
  i0.ɵɵproperty("for", ctx.id());
15480
15564
  i0.ɵɵadvance(1);
@@ -15628,7 +15712,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
15628
15712
  i0.ɵɵelementEnd();
15629
15713
  }
15630
15714
  }
15631
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
15715
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15632
15716
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
15633
15717
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
15634
15718
  super(compoundPipe, validatorsService);
@@ -15781,7 +15865,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
15781
15865
  }
15782
15866
  if (rf & 2) {
15783
15867
  const _r3 = i0.ɵɵreference(7);
15784
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
15868
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
15785
15869
  i0.ɵɵadvance(1);
15786
15870
  i0.ɵɵproperty("for", ctx.id());
15787
15871
  i0.ɵɵadvance(1);
@@ -16568,7 +16652,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
16568
16652
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
16569
16653
  }
16570
16654
  }
16571
- const _c1$f = function (a0) { return { "table-group-error": a0 }; };
16655
+ const _c1$g = function (a0) { return { "table-group-error": a0 }; };
16572
16656
  function LinkCasesComponent_tr_31_Template(rf, ctx) {
16573
16657
  if (rf & 1) {
16574
16658
  const _r21 = i0.ɵɵgetCurrentView();
@@ -16601,7 +16685,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
16601
16685
  const case_r16 = ctx.$implicit;
16602
16686
  const ctx_r2 = i0.ɵɵnextContext();
16603
16687
  i0.ɵɵadvance(2);
16604
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16688
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16605
16689
  i0.ɵɵadvance(2);
16606
16690
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
16607
16691
  i0.ɵɵadvance(2);
@@ -18688,7 +18772,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
18688
18772
  }
18689
18773
  }
18690
18774
  const _c0$F = function (a0) { return { "form-group-error": a0 }; };
18691
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18775
+ const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
18692
18776
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
18693
18777
  ngOnInit() {
18694
18778
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18716,7 +18800,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
18716
18800
  i0.ɵɵadvance(1);
18717
18801
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
18718
18802
  i0.ɵɵadvance(1);
18719
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18803
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18720
18804
  }
18721
18805
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18722
18806
  (function () {
@@ -19432,7 +19516,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
19432
19516
  }
19433
19517
  }
19434
19518
  const _c0$D = function (a0) { return { "form-group-error": a0 }; };
19435
- const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
19519
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
19436
19520
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
19437
19521
  ngOnInit() {
19438
19522
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -19460,7 +19544,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
19460
19544
  i0.ɵɵadvance(1);
19461
19545
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
19462
19546
  i0.ɵɵadvance(1);
19463
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19547
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19464
19548
  }
19465
19549
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
19466
19550
  (function () {
@@ -20990,11 +21074,11 @@ QueryListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryLis
20990
21074
  if (rf & 2) {
20991
21075
  i0.ɵɵproperty("ngIf", ctx.queryListData);
20992
21076
  }
20993
- }, dependencies: [i4.NgForOf, i4.NgIf, i4.DatePipe, i1.RpxTranslatePipe], styles: ["@charset \"UTF-8\";.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{padding-right:10px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}[aria-sort] button[_ngcontent-%COMP%], [aria-sort] button[_ngcontent-%COMP%]:hover, [aria-sort] button[_ngcontent-%COMP%]:hover, [aria-sort] button[_ngcontent-%COMP%]:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button[_ngcontent-%COMP%]:focus, [aria-sort] button[_ngcontent-%COMP%]:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort][_ngcontent-%COMP%]:first-child button{right:auto}[aria-sort] button[_ngcontent-%COMP%]:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button[_ngcontent-%COMP%]:before, [aria-sort=descending] button[_ngcontent-%COMP%]:before{content:none}[aria-sort=ascending] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button[_ngcontent-%COMP%]:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}"] });
21077
+ }, dependencies: [i4.NgForOf, i4.NgIf, i4.DatePipe, i1.RpxTranslatePipe], styles: ["@charset \"UTF-8\";.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{padding-right:10px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}[aria-sort] button[_ngcontent-%COMP%], [aria-sort] button[_ngcontent-%COMP%]:hover, [aria-sort] button[_ngcontent-%COMP%]:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button[_ngcontent-%COMP%]:focus, [aria-sort] button[_ngcontent-%COMP%]:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort][_ngcontent-%COMP%]:first-child button{right:auto}[aria-sort] button[_ngcontent-%COMP%]:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button[_ngcontent-%COMP%]:before, [aria-sort=descending] button[_ngcontent-%COMP%]:before{content:none}[aria-sort=ascending] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button[_ngcontent-%COMP%]:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}"] });
20994
21078
  (function () {
20995
21079
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryListComponent, [{
20996
21080
  type: Component,
20997
- args: [{ selector: 'ccd-query-list', template: "<ng-container *ngIf=\"queryListData\">\n <table class=\"govuk-table query-list__table\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ queryListData.partyName }}</div>\n </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row query-list__row\">\n <th scope=\"col\" class=\"govuk-table__header\" [attr.aria-sort]=\"getAriaSortHeaderValue(col)\"\n *ngFor=\"let col of displayedColumns; let i = index;\">\n <button type=\"button\" [attr.data-index]=\"i\" aria-sort=\"none\" (click)=\"sortTable(col)\" href=\"javascript:void(0)\">\n {{ col.displayName | rpxTranslate }}\n </button>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row query-list__row\"\n *ngFor=\"let message of queryListData.queries\"\n >\n <td class=\"govuk-table__cell query-list__cell query-list__cell--first\">\n <a href=\"javascript:void(0)\" (click)=\"showDetails(message)\">{{ message.subject }}</a>\n </td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedBy }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastResponseDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.responseStatus | rpxTranslate }}</td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.query-list__row>*:first-child{padding-left:10px}.query-list__row>*:last-child{padding-right:10px}.query-list__cell--first{width:33%}[aria-sort] button,[aria-sort] button:hover,[aria-sort] button:hover,[aria-sort] button:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button:focus,[aria-sort] button:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort]:first-child button{right:auto}[aria-sort] button:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button:before,[aria-sort=descending] button:before{content:none}[aria-sort=ascending] button:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}\n"] }]
21081
+ args: [{ selector: 'ccd-query-list', template: "<ng-container *ngIf=\"queryListData\">\n <table class=\"govuk-table query-list__table\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ queryListData.partyName }}</div>\n </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row query-list__row\">\n <th scope=\"col\" class=\"govuk-table__header\" [attr.aria-sort]=\"getAriaSortHeaderValue(col)\"\n *ngFor=\"let col of displayedColumns; let i = index;\">\n <button type=\"button\" [attr.data-index]=\"i\" aria-sort=\"none\" (click)=\"sortTable(col)\" href=\"javascript:void(0)\">\n {{ col.displayName | rpxTranslate }}\n </button>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row query-list__row\"\n *ngFor=\"let message of queryListData.queries\"\n >\n <td class=\"govuk-table__cell query-list__cell query-list__cell--first\">\n <a href=\"javascript:void(0)\" (click)=\"showDetails(message)\">{{ message.subject }}</a>\n </td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedBy }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastResponseDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.responseStatus | rpxTranslate }}</td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.query-list__row>*:first-child{padding-left:10px}.query-list__row>*:last-child{padding-right:10px}.query-list__cell--first{width:33%}[aria-sort] button,[aria-sort] button:hover,[aria-sort] button:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button:focus,[aria-sort] button:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort]:first-child button{right:auto}[aria-sort] button:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button:before,[aria-sort=descending] button:before{content:none}[aria-sort=ascending] button:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}\n"] }]
20998
21082
  }], null, { caseQueriesCollection: [{
20999
21083
  type: Input
21000
21084
  }], selectedQuery: [{
@@ -21702,7 +21786,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
21702
21786
  }
21703
21787
  }
21704
21788
  const _c0$A = function (a0) { return { "form-group-error": a0 }; };
21705
- const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
21789
+ const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
21706
21790
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
21707
21791
  constructor(browserService) {
21708
21792
  super();
@@ -21742,7 +21826,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
21742
21826
  i0.ɵɵadvance(1);
21743
21827
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
21744
21828
  i0.ɵɵadvance(1);
21745
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21829
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21746
21830
  }
21747
21831
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21748
21832
  (function () {
@@ -21817,7 +21901,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
21817
21901
  }
21818
21902
  }
21819
21903
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
21820
- const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
21904
+ const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
21821
21905
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
21822
21906
  ngOnInit() {
21823
21907
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -21849,7 +21933,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
21849
21933
  i0.ɵɵadvance(1);
21850
21934
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
21851
21935
  i0.ɵɵadvance(1);
21852
- 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);
21936
+ 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);
21853
21937
  }
21854
21938
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21855
21939
  (function () {
@@ -22056,7 +22140,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
22056
22140
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
22057
22141
  }
22058
22142
  }
22059
- const _c1$a = function (a0) { return { "form-group-error": a0 }; };
22143
+ const _c1$b = function (a0) { return { "form-group-error": a0 }; };
22060
22144
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
22061
22145
  constructor(yesNoService) {
22062
22146
  super();
@@ -22080,7 +22164,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
22080
22164
  i0.ɵɵelementEnd()()();
22081
22165
  }
22082
22166
  if (rf & 2) {
22083
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22167
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22084
22168
  i0.ɵɵadvance(3);
22085
22169
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
22086
22170
  i0.ɵɵadvance(1);
@@ -22478,7 +22562,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
22478
22562
  i0.ɵɵelementContainer(0);
22479
22563
  }
22480
22564
  }
22481
- const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
22565
+ const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
22482
22566
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
22483
22567
  if (rf & 1) {
22484
22568
  i0.ɵɵelementContainerStart(0);
@@ -22491,7 +22575,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
22491
22575
  i0.ɵɵnextContext();
22492
22576
  const _r1 = i0.ɵɵreference(13);
22493
22577
  i0.ɵɵadvance(1);
22494
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
22578
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
22495
22579
  }
22496
22580
  }
22497
22581
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -22683,7 +22767,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
22683
22767
  }
22684
22768
  }
22685
22769
  const _c0$t = [[["", "trigger", ""]]];
22686
- const _c1$8 = ["[trigger]"];
22770
+ const _c1$9 = ["[trigger]"];
22687
22771
  class CaseFileViewOverlayMenuComponent {
22688
22772
  constructor() {
22689
22773
  this.title = '';
@@ -22697,7 +22781,7 @@ class CaseFileViewOverlayMenuComponent {
22697
22781
  }
22698
22782
  }
22699
22783
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
22700
- 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) {
22784
+ 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) {
22701
22785
  if (rf & 1) {
22702
22786
  i0.ɵɵprojectionDef(_c0$t);
22703
22787
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
@@ -24960,7 +25044,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
24960
25044
  }
24961
25045
  }
24962
25046
  const _c0$o = function (a0) { return { "form-group-error": a0 }; };
24963
- const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
25047
+ const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
24964
25048
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24965
25049
  if (rf & 1) {
24966
25050
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
@@ -24982,7 +25066,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24982
25066
  i0.ɵɵadvance(3);
24983
25067
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
24984
25068
  i0.ɵɵadvance(1);
24985
- 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);
25069
+ 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);
24986
25070
  i0.ɵɵadvance(1);
24987
25071
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
24988
25072
  }
@@ -25552,7 +25636,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
25552
25636
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
25553
25637
  }
25554
25638
  }
25555
- const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
25639
+ const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
25556
25640
  class UpdateFlagComponent {
25557
25641
  constructor(rpxTranslationService) {
25558
25642
  this.rpxTranslationService = rpxTranslationService;
@@ -25761,7 +25845,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
25761
25845
  const _r3 = i0.ɵɵreference(17);
25762
25846
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25763
25847
  i0.ɵɵadvance(2);
25764
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
25848
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
25765
25849
  i0.ɵɵadvance(3);
25766
25850
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
25767
25851
  i0.ɵɵadvance(2);
@@ -27157,7 +27241,7 @@ const CUSTOM_MOMENT_FORMATS = {
27157
27241
  };
27158
27242
 
27159
27243
  const _c0$h = ["picker"];
27160
- const _c1$5 = ["input"];
27244
+ const _c1$6 = ["input"];
27161
27245
  function DatetimePickerComponent_span_3_Template(rf, ctx) {
27162
27246
  if (rf & 1) {
27163
27247
  i0.ɵɵelementStart(0, "span", 11);
@@ -27221,7 +27305,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
27221
27305
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
27222
27306
  }
27223
27307
  }
27224
- const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
27308
+ const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
27225
27309
  class DatetimePickerComponent extends AbstractFormFieldComponent {
27226
27310
  constructor(formatTranslationService, ngxMatDateFormats) {
27227
27311
  super();
@@ -27387,7 +27471,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
27387
27471
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
27388
27472
  if (rf & 1) {
27389
27473
  i0.ɵɵviewQuery(_c0$h, 5);
27390
- i0.ɵɵviewQuery(_c1$5, 5);
27474
+ i0.ɵɵviewQuery(_c1$6, 5);
27391
27475
  }
27392
27476
  if (rf & 2) {
27393
27477
  let _t;
@@ -27423,7 +27507,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
27423
27507
  }
27424
27508
  if (rf & 2) {
27425
27509
  const _r6 = i0.ɵɵreference(13);
27426
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27510
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27427
27511
  i0.ɵɵadvance(3);
27428
27512
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
27429
27513
  i0.ɵɵadvance(1);
@@ -27677,7 +27761,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
27677
27761
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
27678
27762
  }
27679
27763
  }
27680
- const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27764
+ const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27681
27765
  function EventLogTableComponent_tr_20_Template(rf, ctx) {
27682
27766
  if (rf & 1) {
27683
27767
  const _r18 = i0.ɵɵgetCurrentView();
@@ -27710,7 +27794,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
27710
27794
  if (rf & 2) {
27711
27795
  const event_r1 = ctx.$implicit;
27712
27796
  const ctx_r0 = i0.ɵɵnextContext();
27713
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
27797
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
27714
27798
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
27715
27799
  i0.ɵɵadvance(2);
27716
27800
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -29810,6 +29894,36 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
29810
29894
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
29811
29895
  }
29812
29896
  }
29897
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
29898
+ if (rf & 1) {
29899
+ i0.ɵɵelementStart(0, "span", 48);
29900
+ i0.ɵɵtext(1);
29901
+ i0.ɵɵpipe(2, "rpxTranslate");
29902
+ i0.ɵɵpipe(3, "ccdFirstError");
29903
+ i0.ɵɵelementEnd();
29904
+ }
29905
+ if (rf & 2) {
29906
+ const ctx_r36 = i0.ɵɵnextContext(3);
29907
+ i0.ɵɵadvance(1);
29908
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
29909
+ }
29910
+ }
29911
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
29912
+ if (rf & 1) {
29913
+ i0.ɵɵelementStart(0, "span", 48);
29914
+ i0.ɵɵtext(1);
29915
+ i0.ɵɵpipe(2, "rpxTranslate");
29916
+ i0.ɵɵpipe(3, "ccdFirstError");
29917
+ i0.ɵɵelementEnd();
29918
+ }
29919
+ if (rf & 2) {
29920
+ const ctx_r37 = i0.ɵɵnextContext(3);
29921
+ i0.ɵɵadvance(1);
29922
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
29923
+ }
29924
+ }
29925
+ const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
29926
+ const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
29813
29927
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29814
29928
  if (rf & 1) {
29815
29929
  i0.ɵɵelementContainerStart(0);
@@ -29820,21 +29934,38 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29820
29934
  i0.ɵɵelementStart(6, "span", 43);
29821
29935
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
29822
29936
  i0.ɵɵelementEnd()();
29823
- i0.ɵɵelement(8, "input", 44);
29937
+ i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
29938
+ i0.ɵɵelement(9, "input", 45);
29824
29939
  i0.ɵɵelementEnd();
29825
- i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
29826
- i0.ɵɵtext(11, "Event description (optional)");
29940
+ i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
29941
+ i0.ɵɵtext(12, "Event description (optional)");
29827
29942
  i0.ɵɵelementEnd();
29828
- i0.ɵɵelement(12, "textarea", 46);
29943
+ i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
29944
+ i0.ɵɵelement(14, "textarea", 47);
29829
29945
  i0.ɵɵelementEnd()();
29830
29946
  i0.ɵɵelementContainerEnd();
29831
29947
  }
29948
+ if (rf & 2) {
29949
+ const ctx_r9 = i0.ɵɵnextContext(2);
29950
+ i0.ɵɵadvance(3);
29951
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
29952
+ i0.ɵɵadvance(5);
29953
+ i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
29954
+ i0.ɵɵadvance(1);
29955
+ 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)));
29956
+ i0.ɵɵadvance(1);
29957
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
29958
+ i0.ɵɵadvance(3);
29959
+ i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
29960
+ i0.ɵɵadvance(1);
29961
+ 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)));
29962
+ }
29832
29963
  }
29833
29964
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29834
29965
  if (rf & 1) {
29835
- const _r37 = i0.ɵɵgetCurrentView();
29836
- i0.ɵɵelementStart(0, "button", 47);
29837
- 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()); });
29966
+ const _r39 = i0.ɵɵgetCurrentView();
29967
+ i0.ɵɵelementStart(0, "button", 49);
29968
+ 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()); });
29838
29969
  i0.ɵɵtext(1);
29839
29970
  i0.ɵɵpipe(2, "rpxTranslate");
29840
29971
  i0.ɵɵelementEnd();
@@ -29848,7 +29979,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29848
29979
  }
29849
29980
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29850
29981
  if (rf & 1) {
29851
- const _r39 = i0.ɵɵgetCurrentView();
29982
+ const _r41 = i0.ɵɵgetCurrentView();
29852
29983
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
29853
29984
  i0.ɵɵtext(2);
29854
29985
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -29858,13 +29989,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29858
29989
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
29859
29990
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
29860
29991
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
29861
- 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)); });
29992
+ 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)); });
29862
29993
  i0.ɵɵelementEnd();
29863
29994
  i0.ɵɵelementStart(11, "form", 8);
29864
- 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()); });
29995
+ 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()); });
29865
29996
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
29866
29997
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
29867
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
29998
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
29868
29999
  i0.ɵɵelementStart(15, "div", 9);
29869
30000
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
29870
30001
  i0.ɵɵelementStart(17, "button", 11);
@@ -29872,7 +30003,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29872
30003
  i0.ɵɵpipe(19, "rpxTranslate");
29873
30004
  i0.ɵɵelementEnd()();
29874
30005
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
29875
- 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()); });
30006
+ 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()); });
29876
30007
  i0.ɵɵtext(22);
29877
30008
  i0.ɵɵpipe(23, "rpxTranslate");
29878
30009
  i0.ɵɵelementEnd()()()();
@@ -29911,9 +30042,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29911
30042
  }
29912
30043
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29913
30044
  if (rf & 1) {
29914
- const _r43 = i0.ɵɵgetCurrentView();
29915
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
29916
- 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)); });
30045
+ const _r45 = i0.ɵɵgetCurrentView();
30046
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
30047
+ 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)); });
29917
30048
  i0.ɵɵelementEnd();
29918
30049
  }
29919
30050
  if (rf & 2) {
@@ -29923,14 +30054,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29923
30054
  }
29924
30055
  // @dynamic
29925
30056
  class CaseEditSubmitComponent {
29926
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
30057
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
29927
30058
  this.caseEdit = caseEdit;
29928
30059
  this.fieldsUtils = fieldsUtils;
29929
30060
  this.caseFieldService = caseFieldService;
29930
30061
  this.route = route;
29931
30062
  this.orderService = orderService;
29932
30063
  this.profileNotifier = profileNotifier;
30064
+ this.formValidatorsService = formValidatorsService;
29933
30065
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
30066
+ this.eventSummaryLabel = 'Event summary';
30067
+ this.eventDescriptionLabel = 'Event description';
29934
30068
  }
29935
30069
  get isDisabled() {
29936
30070
  // EUI-3452.
@@ -29941,7 +30075,7 @@ class CaseEditSubmitComponent {
29941
30075
  }
29942
30076
  ngOnInit() {
29943
30077
  var _a, _b, _c;
29944
- this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
30078
+ this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
29945
30079
  this.eventTrigger = this.caseEdit.eventTrigger;
29946
30080
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
29947
30081
  this.editForm = this.caseEdit.form;
@@ -29954,10 +30088,12 @@ class CaseEditSubmitComponent {
29954
30088
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
29955
30089
  // a FlagLauncher field in the event trigger
29956
30090
  this.caseEdit.isCaseFlagSubmission =
29957
- this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
30091
+ this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29958
30092
  this.caseEdit.isLinkedCasesSubmission =
29959
30093
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
29960
30094
  this.pageTitle = this.getPageTitle();
30095
+ this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
30096
+ this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
29961
30097
  }
29962
30098
  ngOnDestroy() {
29963
30099
  /* istanbul ignore else */
@@ -29966,12 +30102,14 @@ class CaseEditSubmitComponent {
29966
30102
  }
29967
30103
  }
29968
30104
  submit() {
29969
- this.caseEdit.submitForm({
29970
- eventTrigger: this.eventTrigger,
29971
- form: this.editForm,
29972
- submit: this.caseEdit.submit,
29973
- caseDetails: this.caseEdit.caseDetails,
29974
- });
30105
+ if (this.summary.valid && this.description.valid) {
30106
+ this.caseEdit.submitForm({
30107
+ eventTrigger: this.eventTrigger,
30108
+ form: this.editForm,
30109
+ submit: this.caseEdit.submit,
30110
+ caseDetails: this.caseEdit.caseDetails
30111
+ });
30112
+ }
29975
30113
  }
29976
30114
  onEventCanBeCompleted(eventCanBeCompleted) {
29977
30115
  this.caseEdit.onEventCanBeCompleted({
@@ -29979,7 +30117,7 @@ class CaseEditSubmitComponent {
29979
30117
  eventCanBeCompleted,
29980
30118
  caseDetails: this.caseEdit.caseDetails,
29981
30119
  form: this.editForm,
29982
- submit: this.caseEdit.submit,
30120
+ submit: this.caseEdit.submit
29983
30121
  });
29984
30122
  }
29985
30123
  getPageTitle() {
@@ -30055,7 +30193,7 @@ class CaseEditSubmitComponent {
30055
30193
  }
30056
30194
  }
30057
30195
  readOnlySummaryFieldsToDisplayExists() {
30058
- return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
30196
+ return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
30059
30197
  }
30060
30198
  showEventNotes() {
30061
30199
  var _a;
@@ -30071,7 +30209,7 @@ class CaseEditSubmitComponent {
30071
30209
  }
30072
30210
  getLastPageShown() {
30073
30211
  let lastPage;
30074
- this.wizard.reverse().forEach(page => {
30212
+ this.wizard.reverse().forEach((page) => {
30075
30213
  if (!lastPage && this.isShown(page)) {
30076
30214
  lastPage = page;
30077
30215
  }
@@ -30090,7 +30228,7 @@ class CaseEditSubmitComponent {
30090
30228
  }
30091
30229
  isShown(page) {
30092
30230
  const fields = this.fieldsUtils
30093
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
30231
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
30094
30232
  return page.parsedShowCondition.match(fields);
30095
30233
  }
30096
30234
  canShowFieldInCYA(field) {
@@ -30099,7 +30237,7 @@ class CaseEditSubmitComponent {
30099
30237
  sortFieldsByShowSummaryContent(fields) {
30100
30238
  return this.orderService
30101
30239
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
30102
- .filter(cf => cf.show_summary_content_option);
30240
+ .filter((cf) => cf.show_summary_content_option);
30103
30241
  }
30104
30242
  getCaseFields() {
30105
30243
  if (this.caseEdit.caseDetails) {
@@ -30118,9 +30256,7 @@ class CaseEditSubmitComponent {
30118
30256
  if (this.eventTrigger.can_save_draft) {
30119
30257
  return 'Return to case list';
30120
30258
  }
30121
- else {
30122
- return 'Cancel';
30123
- }
30259
+ return 'Cancel';
30124
30260
  }
30125
30261
  }
30126
30262
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -30134,8 +30270,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
30134
30270
  }
30135
30271
  return a.show_summary_content_option - b.show_summary_content_option;
30136
30272
  };
30137
- 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)); };
30138
- 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) {
30273
+ 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)); };
30274
+ 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) {
30139
30275
  if (rf & 1) {
30140
30276
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
30141
30277
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
@@ -30149,8 +30285,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
30149
30285
  (function () {
30150
30286
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
30151
30287
  type: Component,
30152
- 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"] }]
30153
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
30288
+ 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"] }]
30289
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
30154
30290
  })();
30155
30291
 
30156
30292
  function CaseProgressComponent_div_0_Template(rf, ctx) {
@@ -30548,7 +30684,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
30548
30684
  CaseEditGenericErrorsComponent];
30549
30685
  }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
30550
30686
  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]; });
30551
- 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]; });
30687
+ 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]; });
30552
30688
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30553
30689
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30554
30690
 
@@ -33854,8 +33990,8 @@ class CaseFullAccessViewComponent {
33854
33990
  else {
33855
33991
  // sort with the order of CCD predefined tabs
33856
33992
  this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
33857
- // select the first tab checking if the tab is visible
33858
- const preSelectTab = this.findPreSelectedActiveTab();
33993
+ // preselect the 1st order of CCD predefined tabs
33994
+ const preSelectTab = this.caseDetails.tabs[0];
33859
33995
  this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab.label }).then(() => {
33860
33996
  matTab = this.tabGroup._tabs.find((x) => x.textLabel === preSelectTab.label);
33861
33997
  // Update selectedIndex only if matTab.position is a non-zero number (positive or negative); this means the
@@ -33886,11 +34022,6 @@ class CaseFullAccessViewComponent {
33886
34022
  }
33887
34023
  }
33888
34024
  }
33889
- findPreSelectedActiveTab() {
33890
- const unOrderedTabsInSortedTabs = this.caseDetails.tabs
33891
- .filter((tab) => !tab.order && this.sortedTabs.some((sortedTab) => sortedTab.id === tab.id));
33892
- return unOrderedTabsInSortedTabs.length ? unOrderedTabsInSortedTabs[0] : this.sortedTabs[0];
33893
- }
33894
34025
  // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
33895
34026
  tabChanged(tabIndexChanged) {
33896
34027
  var _a;
@@ -38287,11 +38418,11 @@ SearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Searc
38287
38418
  i0.ɵɵadvance(1);
38288
38419
  i0.ɵɵproperty("ngIf", !(ctx.hasResults() || ctx.hasDrafts()));
38289
38420
  }
38290
- }, styles: ["table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:top}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:16px;word-wrap:break-word}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:left}table[_ngcontent-%COMP%] .caseid-col[_ngcontent-%COMP%]{white-space:nowrap}.notification[_ngcontent-%COMP%]{text-align:center;padding:30px 0;margin-top:75px}a[_ngcontent-%COMP%]:hover{color:#005ea5}.search-result-reset-link[_ngcontent-%COMP%]{padding-right:15px;padding-left:15px}.search-result-column-header[_ngcontent-%COMP%]{width:auto;width:initial;table-layout:normal}.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:block;float:right}}.search-result-column-label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort[_ngcontent-%COMP%]{font-size:16px}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium[_ngcontent-%COMP%]{margin-top:-20px}.govuk-table__checkbox[_ngcontent-%COMP%]{vertical-align:middle;padding-left:3px}#search-result-heading__text[_ngcontent-%COMP%]:focus{outline:none}"] });
38421
+ }, styles: ["table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:top}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:16px;word-wrap:break-word}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:left}table[_ngcontent-%COMP%] .caseid-col[_ngcontent-%COMP%]{white-space:nowrap}.notification[_ngcontent-%COMP%]{text-align:center;padding:30px 0;margin-top:75px}a[_ngcontent-%COMP%]:hover{color:#005ea5}.search-result-reset-link[_ngcontent-%COMP%]{padding-right:15px;padding-left:15px}.search-result-column-header[_ngcontent-%COMP%]{width:unset;table-layout:normal}.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:block;float:right}}.search-result-column-label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort[_ngcontent-%COMP%]{font-size:16px}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium[_ngcontent-%COMP%]{margin-top:-20px}.govuk-table__checkbox[_ngcontent-%COMP%]{vertical-align:middle;padding-left:3px}#search-result-heading__text[_ngcontent-%COMP%]:focus{outline:none}"] });
38291
38422
  (function () {
38292
38423
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
38293
38424
  type: Component,
38294
- args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\"\n [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\" role=\"status\">\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\">\n <table class=\"search-result-column-header\"\n [attr.aria-label]=\"('Sort by ' + col.label + ' ' + isSortAscending(col)? 'ascending' : 'descending') | rpxTranslate\">\n <tr>\n <th>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </th>\n </tr>\n </table>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:auto;width:initial;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
38425
+ args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\"\n [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\" role=\"status\">\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\">\n <table class=\"search-result-column-header\"\n [attr.aria-label]=\"('Sort by ' + col.label + ' ' + isSortAscending(col)? 'ascending' : 'descending') | rpxTranslate\">\n <tr>\n <th>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </th>\n </tr>\n </table>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
38295
38426
  }], function () { return [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }]; }, { caseLinkUrlTemplate: [{
38296
38427
  type: Input
38297
38428
  }], jurisdiction: [{