@hmcts/ccd-case-ui-toolkit 7.0.37 → 7.0.38-client-context-2

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 (65) hide show
  1. package/esm2020/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +11 -11
  2. package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +83 -38
  3. package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +6 -5
  4. package/esm2020/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +16 -14
  5. package/esm2020/lib/shared/components/case-editor/services/case-worker.service.mjs +3 -3
  6. package/esm2020/lib/shared/components/case-editor/services/cases.service.mjs +53 -27
  7. package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +14 -6
  8. package/esm2020/lib/shared/components/event-start/event-guard/event-start.guard.mjs +13 -5
  9. package/esm2020/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +11 -3
  10. package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +3 -5
  11. package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
  12. package/esm2020/lib/shared/components/palette/case-flag/write-case-flag-field.component.mjs +1 -1
  13. package/esm2020/lib/shared/components/palette/collection/write-collection-field.component.mjs +2 -4
  14. package/esm2020/lib/shared/components/palette/complex/write-complex-field.component.mjs +2 -4
  15. package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
  16. package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
  17. package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +43 -3
  18. package/esm2020/lib/shared/components/palette/query-management/components/query-list/query-list.component.mjs +2 -2
  19. package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
  20. package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
  21. package/esm2020/lib/shared/components/search-result/search-result.component.mjs +2 -2
  22. package/esm2020/lib/shared/domain/definition/case-field.model.mjs +4 -2
  23. package/esm2020/lib/shared/domain/work-allocation/Task.mjs +1 -1
  24. package/esm2020/lib/shared/services/fields/fields.utils.mjs +8 -1
  25. package/esm2020/lib/shared/services/form/field-type-sanitiser.mjs +13 -2
  26. package/esm2020/lib/shared/services/form/form-validators.service.mjs +28 -2
  27. package/esm2020/lib/shared/services/profile/profile.service.mjs +2 -1
  28. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +366 -169
  29. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  30. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +351 -169
  31. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  32. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  33. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
  34. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  35. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +1 -2
  36. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  37. package/lib/shared/components/case-editor/services/cases.service.d.ts +2 -1
  38. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  39. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts +1 -0
  40. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  41. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  42. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  43. package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
  44. package/lib/shared/components/palette/address/write-address-field.component.d.ts +1 -2
  45. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  46. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  47. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +0 -1
  48. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
  49. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +1 -2
  50. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  51. package/lib/shared/components/palette/complex/write-complex-field.component.d.ts +1 -2
  52. package/lib/shared/components/palette/complex/write-complex-field.component.d.ts.map +1 -1
  53. package/lib/shared/components/palette/markdown/markdown.component.d.ts +6 -1
  54. package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
  55. package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
  56. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  57. package/lib/shared/domain/work-allocation/Task.d.ts +4 -0
  58. package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
  59. package/lib/shared/services/fields/fields.utils.d.ts +2 -0
  60. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  61. package/lib/shared/services/form/field-type-sanitiser.d.ts +1 -0
  62. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  63. package/lib/shared/services/form/form-validators.service.d.ts +4 -0
  64. package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
  65. 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()) {
@@ -3896,6 +3903,13 @@ class FieldsUtils {
3896
3903
  return '';
3897
3904
  }
3898
3905
  }
3906
+ static getUserTaskFromClientContext(clientContextStr) {
3907
+ if (clientContextStr) {
3908
+ let clientContext = JSON.parse(clientContextStr);
3909
+ return clientContext.client_context.user_task;
3910
+ }
3911
+ return null;
3912
+ }
3899
3913
  buildCanShowPredicate(eventTrigger, form) {
3900
3914
  const currentState = this.getCurrentEventState(eventTrigger, form);
3901
3915
  return (page) => {
@@ -4550,6 +4564,7 @@ class FormValidatorsService {
4550
4564
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4551
4565
  const validators = [Validators.required];
4552
4566
  if (caseField.field_type.type === 'Text') {
4567
+ validators.push(this.markDownPatternValidator());
4553
4568
  if (caseField.field_type.regular_expression) {
4554
4569
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4555
4570
  }
@@ -4563,22 +4578,39 @@ class FormValidatorsService {
4563
4578
  validators.push(Validators.maxLength(caseField.field_type.max));
4564
4579
  }
4565
4580
  }
4581
+ if (caseField.field_type.type === 'TextArea') {
4582
+ validators.push(this.emptyValidator());
4583
+ validators.push(this.markDownPatternValidator());
4584
+ }
4566
4585
  if (control.validator) {
4567
4586
  validators.push(control.validator);
4568
4587
  }
4569
4588
  control.setValidators(validators);
4570
4589
  }
4590
+ else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')
4591
+ || (caseField.display_context === 'COMPLEX' && caseField.field_type.type === 'Complex')) {
4592
+ control.setValidators(this.markDownPatternValidator());
4593
+ }
4571
4594
  return control;
4572
4595
  }
4573
4596
  static emptyValidator() {
4574
4597
  const validator = (control) => {
4575
- if (control && control.value && control.value.toString().trim().length === 0) {
4598
+ var _a;
4599
+ if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
4576
4600
  return { required: {} };
4577
4601
  }
4578
4602
  return null;
4579
4603
  };
4580
4604
  return validator;
4581
4605
  }
4606
+ static markDownPatternValidator() {
4607
+ const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4608
+ return (control) => {
4609
+ var _a;
4610
+ const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
4611
+ return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4612
+ };
4613
+ }
4582
4614
  // TODO: Strip this out as it's only here for the moment because
4583
4615
  // the service is being injected all over the place but it doesn't
4584
4616
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4586,10 +4618,20 @@ class FormValidatorsService {
4586
4618
  addValidators(caseField, control) {
4587
4619
  return FormValidatorsService.addValidators(caseField, control);
4588
4620
  }
4621
+ addMarkDownValidators(formGroup, controlPath) {
4622
+ const control = formGroup.get(controlPath);
4623
+ if (control) {
4624
+ control.setValidators(FormValidatorsService.markDownPatternValidator());
4625
+ control.updateValueAndValidity();
4626
+ }
4627
+ return control;
4628
+ }
4589
4629
  }
4590
4630
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4591
4631
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4592
4632
  ];
4633
+ FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4634
+ FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4593
4635
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4594
4636
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4595
4637
  (function () {
@@ -5226,7 +5268,8 @@ class FieldTypeSanitiser {
5226
5268
  if (!data || !caseFields) {
5227
5269
  return;
5228
5270
  }
5229
- caseFields.forEach(caseField => {
5271
+ caseFields = this.ensureDynamicMultiSelectListPopulated(caseFields);
5272
+ caseFields.forEach((caseField) => {
5230
5273
  // tslint:disable-next-line:switch-default
5231
5274
  switch (caseField.field_type.type) {
5232
5275
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
@@ -5249,6 +5292,19 @@ class FieldTypeSanitiser {
5249
5292
  }
5250
5293
  });
5251
5294
  }
5295
+ ensureDynamicMultiSelectListPopulated(caseFields) {
5296
+ return caseFields.map((field) => {
5297
+ if (field.field_type.type !== 'Complex') {
5298
+ return field;
5299
+ }
5300
+ const complexFieldsUpdated = field.field_type.complex_fields.map((complexField) => {
5301
+ var _a, _b;
5302
+ 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])
5303
+ ? Object.assign(Object.assign({}, complexField), { list_items: (_b = field._value[complexField.id]) === null || _b === void 0 ? void 0 : _b.list_items }) : complexField;
5304
+ });
5305
+ return Object.assign(Object.assign({}, field), { field_type: Object.assign(Object.assign({}, field.field_type), { complex_fields: complexFieldsUpdated }) });
5306
+ });
5307
+ }
5252
5308
  convertArrayToDynamicListOutput(field, data) {
5253
5309
  const values = data[field.id];
5254
5310
  if (Array.isArray(values)) {
@@ -7018,6 +7074,7 @@ class ProfileService {
7018
7074
  .set('experimental', 'true')
7019
7075
  .set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
7020
7076
  .set('Content-Type', 'application/json');
7077
+ // Not adding client context header because header is added to call immediately afterwards
7021
7078
  return this.httpService
7022
7079
  .get(url, { headers, observe: 'body' })
7023
7080
  .pipe(map((p) => plainToClass(Profile, p)));
@@ -7912,6 +7969,7 @@ class CasesService {
7912
7969
  let headers = new HttpHeaders();
7913
7970
  headers = headers.set('experimental', 'true');
7914
7971
  headers = headers.set('Content-Type', 'application/json');
7972
+ headers = this.addClientContextHeader(headers);
7915
7973
  if (Draft.isDraft(caseId)) {
7916
7974
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
7917
7975
  }
@@ -7922,9 +7980,10 @@ class CasesService {
7922
7980
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
7923
7981
  }
7924
7982
  return this.http
7925
- .get(url, { headers, observe: 'body' })
7926
- .pipe(map(body => {
7927
- return FieldsUtils.handleNestedDynamicLists(body);
7983
+ .get(url, { headers, observe: 'response' })
7984
+ .pipe(map((response) => {
7985
+ this.updateClientContextStorage(response.headers);
7986
+ return FieldsUtils.handleNestedDynamicLists(response.body);
7928
7987
  }), catchError(error => {
7929
7988
  this.errorService.setError(error);
7930
7989
  return throwError(error);
@@ -7933,13 +7992,17 @@ class CasesService {
7933
7992
  createEvent(caseDetails, eventData) {
7934
7993
  const caseId = caseDetails.case_id;
7935
7994
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
7936
- const headers = new HttpHeaders()
7995
+ let headers = new HttpHeaders()
7937
7996
  .set('experimental', 'true')
7938
7997
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
7939
7998
  .set('Content-Type', 'application/json');
7999
+ headers = this.addClientContextHeader(headers);
7940
8000
  return this.http
7941
- .post(url, eventData, { headers, observe: 'body' })
7942
- .pipe(catchError(error => {
8001
+ .post(url, eventData, { headers, observe: 'response' })
8002
+ .pipe(map((response) => {
8003
+ this.updateClientContextStorage(response.headers);
8004
+ return response.body;
8005
+ }), catchError(error => {
7943
8006
  this.errorService.setError(error);
7944
8007
  return throwError(error);
7945
8008
  }));
@@ -7947,13 +8010,17 @@ class CasesService {
7947
8010
  validateCase(ctid, eventData, pageId) {
7948
8011
  const pageIdString = pageId ? `?pageId=${pageId}` : '';
7949
8012
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
7950
- const headers = new HttpHeaders()
8013
+ let headers = new HttpHeaders()
7951
8014
  .set('experimental', 'true')
7952
8015
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
7953
8016
  .set('Content-Type', 'application/json');
8017
+ headers = this.addClientContextHeader(headers);
7954
8018
  return this.http
7955
- .post(url, eventData, { headers, observe: 'body' })
7956
- .pipe(catchError(error => {
8019
+ .post(url, eventData, { headers, observe: 'response' })
8020
+ .pipe(map((response) => {
8021
+ this.updateClientContextStorage(response.headers);
8022
+ return response.body;
8023
+ }), catchError(error => {
7957
8024
  this.errorService.setError(error);
7958
8025
  return throwError(error);
7959
8026
  }));
@@ -7964,26 +8031,34 @@ class CasesService {
7964
8031
  ignoreWarning = 'true';
7965
8032
  }
7966
8033
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7967
- const headers = new HttpHeaders()
8034
+ let headers = new HttpHeaders()
7968
8035
  .set('experimental', 'true')
7969
8036
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
7970
8037
  .set('Content-Type', 'application/json');
8038
+ headers = this.addClientContextHeader(headers);
7971
8039
  return this.http
7972
- .post(url, eventData, { headers, observe: 'body' })
7973
- .pipe(catchError(error => {
8040
+ .post(url, eventData, { headers, observe: 'response' })
8041
+ .pipe(map((response) => {
8042
+ this.updateClientContextStorage(response.headers);
8043
+ return response.body;
8044
+ }), catchError(error => {
7974
8045
  this.errorService.setError(error);
7975
8046
  return throwError(error);
7976
8047
  }));
7977
8048
  }
7978
8049
  getPrintDocuments(caseId) {
7979
8050
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
7980
- const headers = new HttpHeaders()
8051
+ let headers = new HttpHeaders()
7981
8052
  .set('experimental', 'true')
7982
8053
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
7983
8054
  .set('Content-Type', 'application/json');
8055
+ headers = this.addClientContextHeader(headers);
7984
8056
  return this.http
7985
- .get(url, { headers, observe: 'body' })
7986
- .pipe(map(body => body.documentResources), catchError(error => {
8057
+ .get(url, { headers, observe: 'response' })
8058
+ .pipe(map((response) => {
8059
+ this.updateClientContextStorage(response.headers);
8060
+ return response.body.documentResources;
8061
+ }), catchError(error => {
7987
8062
  this.errorService.setError(error);
7988
8063
  return throwError(error);
7989
8064
  }));
@@ -8016,17 +8091,6 @@ class CasesService {
8016
8091
  wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
8017
8092
  });
8018
8093
  }
8019
- /*
8020
- Checks if the user has role of pui-case-manager and returns true or false
8021
- */
8022
- isPuiCaseManager() {
8023
- const userInfoStr = this.sessionStorageService.getItem('userDetails');
8024
- if (userInfoStr) {
8025
- const userInfo = JSON.parse(userInfoStr);
8026
- return userInfo && userInfo.roles && (userInfo.roles.indexOf(CasesService.PUI_CASE_MANAGER) !== -1);
8027
- }
8028
- return false;
8029
- }
8030
8094
  getCourtOrHearingCentreName(locationId) {
8031
8095
  return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
8032
8096
  }
@@ -8071,6 +8135,25 @@ class CasesService {
8071
8135
  .get(url)
8072
8136
  .pipe(catchError(error => throwError(error)));
8073
8137
  }
8138
+ addClientContextHeader(headers) {
8139
+ const clientContextDetails = this.sessionStorageService.getItem('clientContext');
8140
+ if (clientContextDetails) {
8141
+ // may require URI encoding in certain circumstances
8142
+ const clientContext = window.btoa(clientContextDetails);
8143
+ if (clientContext) {
8144
+ headers = headers.set('Client-Context', clientContext);
8145
+ }
8146
+ }
8147
+ return headers;
8148
+ }
8149
+ updateClientContextStorage(headers) {
8150
+ // for mocking - TODO: Kasi Remove/Uncomment for testing
8151
+ // headers = this.setMockClientContextHeader(headers);
8152
+ if (headers && headers.get('Client-Context')) {
8153
+ const clientContextString = window.atob(headers.get('Client-Context'));
8154
+ this.sessionStorageService.setItem('clientContext', clientContextString);
8155
+ }
8156
+ }
8074
8157
  }
8075
8158
  // Internal (UI) API
8076
8159
  CasesService.V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
@@ -8423,9 +8506,9 @@ class CaseworkerService {
8423
8506
  this.errorService = errorService;
8424
8507
  }
8425
8508
  getCaseworkers(serviceId) {
8426
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/retrieveCaseWorkersForServices`;
8509
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
8427
8510
  return this.http
8428
- .post(url, { serviceIds: [serviceId] })
8511
+ .post(url, { services: [serviceId] })
8429
8512
  .pipe(catchError(error => {
8430
8513
  this.errorService.setError(error);
8431
8514
  return throwError(error);
@@ -8584,8 +8667,9 @@ class EventCompletionStateMachineService {
8584
8667
  entryActionForStateCompleteEventAndTask(state, context) {
8585
8668
  // Trigger final state to complete processing of state machine
8586
8669
  state.trigger(EventCompletionStates.Final);
8587
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8588
- if (taskStr) {
8670
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8671
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8672
+ if (userTask === null || userTask === void 0 ? void 0 : userTask.task_data) {
8589
8673
  context.sessionStorageService.setItem('assignNeeded', 'false');
8590
8674
  // just set event can be completed
8591
8675
  context.component.eventCanBeCompleted.emit(true);
@@ -8604,9 +8688,9 @@ class EventCompletionStateMachineService {
8604
8688
  entryActionForStateTaskUnassigned(state, context) {
8605
8689
  // Trigger final state to complete processing of state machine
8606
8690
  state.trigger(EventCompletionStates.Final);
8607
- // Get task details
8608
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8609
- if (taskStr) {
8691
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8692
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8693
+ if (userTask === null || userTask === void 0 ? void 0 : userTask.task_data) {
8610
8694
  context.sessionStorageService.setItem('assignNeeded', 'true');
8611
8695
  context.component.eventCanBeCompleted.emit(true);
8612
8696
  }
@@ -8641,6 +8725,12 @@ class EventCompletionStateMachineService {
8641
8725
  addTransitionsForStateTaskUnassigned() {
8642
8726
  this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
8643
8727
  }
8728
+ taskPresentInSessionStorage(context) {
8729
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8730
+ console.log('clienht cintedt ', clientContextStr);
8731
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8732
+ return !!userTask.task_data;
8733
+ }
8644
8734
  }
8645
8735
  EventCompletionStateMachineService.ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
8646
8736
  EventCompletionStateMachineService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
@@ -9109,11 +9199,9 @@ class CaseEditComponent {
9109
9199
  this.isSubmitting = true;
9110
9200
  // We have to run the event completion checks if task in session storage
9111
9201
  // and if the task is in session storage, then is it associated to the case
9112
- let taskInSessionStorage;
9113
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9114
- if (taskStr) {
9115
- taskInSessionStorage = JSON.parse(taskStr);
9116
- }
9202
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
9203
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9204
+ const taskInSessionStorage = userTask ? userTask.task_data : null;
9117
9205
  if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
9118
9206
  // Show event completion component to perform event completion checks
9119
9207
  this.eventCompletionParams = ({
@@ -9312,14 +9400,16 @@ class CaseEditComponent {
9312
9400
  });
9313
9401
  }
9314
9402
  postCompleteTaskIfRequired() {
9315
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9403
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
9404
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9405
+ const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9316
9406
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9317
- if (taskStr && assignNeeded) {
9318
- const task = JSON.parse(taskStr);
9407
+ if (task && assignNeeded && taskToBeCompleted) {
9408
+ // const task: Task = JSON.parse(taskStr);
9319
9409
  return this.workAllocationService.assignAndCompleteTask(task.id);
9320
9410
  }
9321
- else if (taskStr) {
9322
- const task = JSON.parse(taskStr);
9411
+ else if (task && taskToBeCompleted) {
9412
+ // const task: Task = JSON.parse(taskStr);
9323
9413
  return this.workAllocationService.completeTask(task.id);
9324
9414
  }
9325
9415
  return of(true);
@@ -10970,8 +11060,12 @@ class CaseEventCompletionTaskReassignedComponent {
10970
11060
  }
10971
11061
  onContinue() {
10972
11062
  // Get task details
10973
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
10974
- if (taskStr) {
11063
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
11064
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
11065
+ const task = userTask ? userTask.task_data : null;
11066
+ // not complete_task not utilised here as related to event completion
11067
+ // service wanting task associated with event to not be completed not directly relevant
11068
+ if (task) {
10975
11069
  this.sessionStorageService.setItem('assignNeeded', 'true');
10976
11070
  // set event can be completed to true
10977
11071
  this.parentComponent.eventCanBeCompleted.emit(true);
@@ -11126,8 +11220,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
11126
11220
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
11127
11221
  }
11128
11222
  }
11129
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
11130
- const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
11223
+ const _c1$o = function (a0) { return { "form-group-error": a0 }; };
11224
+ const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
11131
11225
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11132
11226
  if (rf & 1) {
11133
11227
  const _r7 = i0.ɵɵgetCurrentView();
@@ -11145,7 +11239,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11145
11239
  }
11146
11240
  if (rf & 2) {
11147
11241
  const ctx_r2 = i0.ɵɵnextContext(2);
11148
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
11242
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
11149
11243
  i0.ɵɵadvance(1);
11150
11244
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
11151
11245
  i0.ɵɵadvance(2);
@@ -11153,7 +11247,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
11153
11247
  i0.ɵɵadvance(2);
11154
11248
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
11155
11249
  i0.ɵɵadvance(1);
11156
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11250
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11157
11251
  i0.ɵɵadvance(2);
11158
11252
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
11159
11253
  }
@@ -11200,7 +11294,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
11200
11294
  }
11201
11295
  if (rf & 2) {
11202
11296
  const ctx_r3 = i0.ɵɵnextContext(2);
11203
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
11297
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
11204
11298
  i0.ɵɵadvance(1);
11205
11299
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
11206
11300
  i0.ɵɵadvance(2);
@@ -11380,7 +11474,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11380
11474
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11381
11475
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11382
11476
  }
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) {
11477
+ }, 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
11478
  if (rf & 1) {
11385
11479
  i0.ɵɵelementStart(0, "div", 0);
11386
11480
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
@@ -11405,8 +11499,6 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11405
11499
  }], focusElementDirectives: [{
11406
11500
  type: ViewChildren,
11407
11501
  args: [FocusElementDirective]
11408
- }], formGroup: [{
11409
- type: Input
11410
11502
  }] });
11411
11503
  })();
11412
11504
 
@@ -12769,7 +12861,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
12769
12861
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12770
12862
  }
12771
12863
  }
12772
- const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12864
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12773
12865
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12774
12866
  ngOnInit() {
12775
12867
  if (this.caseField.value) {
@@ -12835,7 +12927,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12835
12927
  i0.ɵɵelementEnd();
12836
12928
  }
12837
12929
  if (rf & 2) {
12838
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12930
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12839
12931
  i0.ɵɵadvance(1);
12840
12932
  i0.ɵɵproperty("for", ctx.id());
12841
12933
  i0.ɵɵadvance(1);
@@ -12873,7 +12965,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
12873
12965
  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
12966
  }
12875
12967
  }
12876
- const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12968
+ const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12877
12969
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12878
12970
  if (rf & 1) {
12879
12971
  i0.ɵɵelementStart(0, "tr")(1, "td");
@@ -12885,7 +12977,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
12885
12977
  const i_r5 = ctx.index;
12886
12978
  const ctx_r3 = i0.ɵɵnextContext(3);
12887
12979
  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));
12980
+ 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
12981
  }
12890
12982
  }
12891
12983
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13418,7 +13510,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13418
13510
  let _t;
13419
13511
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
13420
13512
  }
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) {
13513
+ }, 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
13514
  if (rf & 1) {
13423
13515
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
13424
13516
  i0.ɵɵtext(3);
@@ -13456,8 +13548,6 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13456
13548
  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
13549
  }], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
13458
13550
  type: Input
13459
- }], formGroup: [{
13460
- type: Input
13461
13551
  }], items: [{
13462
13552
  type: ViewChildren,
13463
13553
  args: ['collectionItem']
@@ -13798,7 +13888,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
13798
13888
  }
13799
13889
  }
13800
13890
  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) {
13891
+ 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
13892
  if (rf & 1) {
13803
13893
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
13804
13894
  i0.ɵɵtemplate(3, WriteComplexFieldComponent_h2_3_Template, 3, 3, "h2", 1);
@@ -13820,8 +13910,6 @@ WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13820
13910
  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
13911
  }], function () { return [{ type: IsCompoundPipe }, { type: FormValidatorsService }]; }, { caseFields: [{
13822
13912
  type: Input
13823
- }], formGroup: [{
13824
- type: Input
13825
13913
  }], renderLabel: [{
13826
13914
  type: Input
13827
13915
  }], ignoreMandatory: [{
@@ -14083,7 +14171,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
14083
14171
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
14084
14172
  }
14085
14173
  }
14086
- const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
14174
+ const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
14087
14175
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14088
14176
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
14089
14177
  super();
@@ -14408,7 +14496,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14408
14496
  i0.ɵɵelementEnd()();
14409
14497
  }
14410
14498
  if (rf & 2) {
14411
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
14499
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
14412
14500
  i0.ɵɵadvance(1);
14413
14501
  i0.ɵɵproperty("for", ctx.id());
14414
14502
  i0.ɵɵadvance(1);
@@ -14435,7 +14523,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14435
14523
  (function () {
14436
14524
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
14437
14525
  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" }]
14526
+ 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
14527
  }], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }]; }, { fileInput: [{
14440
14528
  type: ViewChild,
14441
14529
  args: ['fileInput', { static: false }]
@@ -14636,13 +14724,49 @@ class MarkdownComponent {
14636
14724
  this._markdown = _markdown;
14637
14725
  this.router = router;
14638
14726
  this.renderer = renderer;
14727
+ this.renderUrlToTextFeature = true;
14639
14728
  }
14640
14729
  ngOnInit() {
14641
14730
  this.content = this.content.replace(/ \n/g, '<br>');
14731
+ if (this.renderUrlToTextFeature) {
14732
+ this.renderUrlToText();
14733
+ }
14734
+ }
14735
+ onMarkdownClick(event) {
14736
+ // If we don't have an anchor tag, we don't need to do anything.
14737
+ if (event.target instanceof HTMLAnchorElement === false) {
14738
+ return;
14739
+ }
14740
+ return true;
14741
+ }
14742
+ renderUrlToText() {
14743
+ const renderer = new marked.Renderer();
14744
+ renderer.link = (href, title, text) => {
14745
+ if (!text || text === href) {
14746
+ return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
14747
+ }
14748
+ return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
14749
+ };
14750
+ marked.setOptions({
14751
+ renderer: renderer
14752
+ });
14753
+ }
14754
+ isAllowedUrl(url) {
14755
+ const currentOrigin = window.location.origin;
14756
+ const urlOrigin = new URL(url, window.location.href).origin;
14757
+ return urlOrigin === currentOrigin || url.startsWith('/'); // Check if same origin or relative
14758
+ }
14759
+ detectMarkdownLinks(inputString) {
14760
+ const markdownLinkRegex = /\[([^\]]+)\]\(?([^ )]+)\)/g;
14761
+ return markdownLinkRegex.test(inputString);
14642
14762
  }
14643
14763
  }
14644
14764
  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) {
14765
+ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
14766
+ if (rf & 1) {
14767
+ i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
14768
+ }
14769
+ }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 6, consts: [[1, "markdown", 3, "sanitizeHtml", "data"]], template: function MarkdownComponent_Template(rf, ctx) {
14646
14770
  if (rf & 1) {
14647
14771
  i0.ɵɵelementStart(0, "div");
14648
14772
  i0.ɵɵelement(1, "markdown", 0);
@@ -14663,6 +14787,11 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
14663
14787
  type: Input
14664
14788
  }], markdownUseHrefAsRouterLink: [{
14665
14789
  type: Input
14790
+ }], renderUrlToTextFeature: [{
14791
+ type: Input
14792
+ }], onMarkdownClick: [{
14793
+ type: HostListener,
14794
+ args: ['click', ['$event']]
14666
14795
  }] });
14667
14796
  })();
14668
14797
 
@@ -14794,7 +14923,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
14794
14923
  i0.ɵɵadvance(1);
14795
14924
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14796
14925
  i0.ɵɵadvance(1);
14797
- i0.ɵɵproperty("content", checkbox_r4.label);
14926
+ i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
14798
14927
  }
14799
14928
  }
14800
14929
  const _c0$P = function (a0) { return { "error": a0 }; };
@@ -14859,14 +14988,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
14859
14988
  }
14860
14989
  }
14861
14990
  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) {
14991
+ 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
14992
  if (rf & 1) {
14864
14993
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
14865
14994
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14866
14995
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14867
14996
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14868
14997
  i0.ɵɵelementEnd();
14869
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14998
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14870
14999
  i0.ɵɵelementEnd()();
14871
15000
  }
14872
15001
  if (rf & 2) {
@@ -14884,7 +15013,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14884
15013
  (function () {
14885
15014
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14886
15015
  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"] }]
15016
+ 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
15017
  }], null, null);
14889
15018
  })();
14890
15019
 
@@ -15028,7 +15157,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15028
15157
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
15029
15158
  }
15030
15159
  }
15031
- const _c1$j = function (a0) { return { "form-group-error": a0 }; };
15160
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
15032
15161
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
15033
15162
  ngOnInit() {
15034
15163
  /**
@@ -15068,7 +15197,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
15068
15197
  i0.ɵɵelementEnd()();
15069
15198
  }
15070
15199
  if (rf & 2) {
15071
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15200
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15072
15201
  i0.ɵɵadvance(3);
15073
15202
  i0.ɵɵproperty("for", ctx.id());
15074
15203
  i0.ɵɵadvance(1);
@@ -15169,7 +15298,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
15169
15298
  }
15170
15299
  }
15171
15300
  const _c0$N = function (a0) { return { "form-group-error": a0 }; };
15172
- const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
15301
+ const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
15173
15302
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
15174
15303
  ngOnInit() {
15175
15304
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15197,7 +15326,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
15197
15326
  i0.ɵɵadvance(1);
15198
15327
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15199
15328
  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);
15329
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15201
15330
  }
15202
15331
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
15203
15332
  (function () {
@@ -15452,7 +15581,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15452
15581
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
15453
15582
  }
15454
15583
  }
15455
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15584
+ const _c1$i = function (a0) { return { "form-group-error": a0 }; };
15456
15585
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
15457
15586
  ngOnInit() {
15458
15587
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -15474,7 +15603,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
15474
15603
  i0.ɵɵelementEnd()();
15475
15604
  }
15476
15605
  if (rf & 2) {
15477
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15606
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15478
15607
  i0.ɵɵadvance(3);
15479
15608
  i0.ɵɵproperty("for", ctx.id());
15480
15609
  i0.ɵɵadvance(1);
@@ -15628,7 +15757,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
15628
15757
  i0.ɵɵelementEnd();
15629
15758
  }
15630
15759
  }
15631
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
15760
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
15632
15761
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
15633
15762
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
15634
15763
  super(compoundPipe, validatorsService);
@@ -15781,7 +15910,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
15781
15910
  }
15782
15911
  if (rf & 2) {
15783
15912
  const _r3 = i0.ɵɵreference(7);
15784
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
15913
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
15785
15914
  i0.ɵɵadvance(1);
15786
15915
  i0.ɵɵproperty("for", ctx.id());
15787
15916
  i0.ɵɵadvance(1);
@@ -16568,7 +16697,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
16568
16697
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
16569
16698
  }
16570
16699
  }
16571
- const _c1$f = function (a0) { return { "table-group-error": a0 }; };
16700
+ const _c1$g = function (a0) { return { "table-group-error": a0 }; };
16572
16701
  function LinkCasesComponent_tr_31_Template(rf, ctx) {
16573
16702
  if (rf & 1) {
16574
16703
  const _r21 = i0.ɵɵgetCurrentView();
@@ -16601,7 +16730,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
16601
16730
  const case_r16 = ctx.$implicit;
16602
16731
  const ctx_r2 = i0.ɵɵnextContext();
16603
16732
  i0.ɵɵadvance(2);
16604
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16733
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
16605
16734
  i0.ɵɵadvance(2);
16606
16735
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
16607
16736
  i0.ɵɵadvance(2);
@@ -18688,7 +18817,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
18688
18817
  }
18689
18818
  }
18690
18819
  const _c0$F = function (a0) { return { "form-group-error": a0 }; };
18691
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18820
+ const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
18692
18821
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
18693
18822
  ngOnInit() {
18694
18823
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18716,7 +18845,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
18716
18845
  i0.ɵɵadvance(1);
18717
18846
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
18718
18847
  i0.ɵɵadvance(1);
18719
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18848
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18720
18849
  }
18721
18850
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18722
18851
  (function () {
@@ -19432,7 +19561,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
19432
19561
  }
19433
19562
  }
19434
19563
  const _c0$D = function (a0) { return { "form-group-error": a0 }; };
19435
- const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
19564
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
19436
19565
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
19437
19566
  ngOnInit() {
19438
19567
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -19460,7 +19589,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
19460
19589
  i0.ɵɵadvance(1);
19461
19590
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
19462
19591
  i0.ɵɵadvance(1);
19463
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19592
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19464
19593
  }
19465
19594
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
19466
19595
  (function () {
@@ -20990,11 +21119,11 @@ QueryListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryLis
20990
21119
  if (rf & 2) {
20991
21120
  i0.ɵɵproperty("ngIf", ctx.queryListData);
20992
21121
  }
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}"] });
21122
+ }, 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
21123
  (function () {
20995
21124
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryListComponent, [{
20996
21125
  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"] }]
21126
+ 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
21127
  }], null, { caseQueriesCollection: [{
20999
21128
  type: Input
21000
21129
  }], selectedQuery: [{
@@ -21702,7 +21831,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
21702
21831
  }
21703
21832
  }
21704
21833
  const _c0$A = function (a0) { return { "form-group-error": a0 }; };
21705
- const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
21834
+ const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
21706
21835
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
21707
21836
  constructor(browserService) {
21708
21837
  super();
@@ -21742,7 +21871,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
21742
21871
  i0.ɵɵadvance(1);
21743
21872
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
21744
21873
  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);
21874
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
21746
21875
  }
21747
21876
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21748
21877
  (function () {
@@ -21817,7 +21946,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
21817
21946
  }
21818
21947
  }
21819
21948
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
21820
- const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
21949
+ const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
21821
21950
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
21822
21951
  ngOnInit() {
21823
21952
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -21849,7 +21978,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
21849
21978
  i0.ɵɵadvance(1);
21850
21979
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
21851
21980
  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);
21981
+ 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
21982
  }
21854
21983
  }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21855
21984
  (function () {
@@ -22056,7 +22185,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
22056
22185
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
22057
22186
  }
22058
22187
  }
22059
- const _c1$a = function (a0) { return { "form-group-error": a0 }; };
22188
+ const _c1$b = function (a0) { return { "form-group-error": a0 }; };
22060
22189
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
22061
22190
  constructor(yesNoService) {
22062
22191
  super();
@@ -22080,7 +22209,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
22080
22209
  i0.ɵɵelementEnd()()();
22081
22210
  }
22082
22211
  if (rf & 2) {
22083
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22212
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
22084
22213
  i0.ɵɵadvance(3);
22085
22214
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
22086
22215
  i0.ɵɵadvance(1);
@@ -22478,7 +22607,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
22478
22607
  i0.ɵɵelementContainer(0);
22479
22608
  }
22480
22609
  }
22481
- const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
22610
+ const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
22482
22611
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
22483
22612
  if (rf & 1) {
22484
22613
  i0.ɵɵelementContainerStart(0);
@@ -22491,7 +22620,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
22491
22620
  i0.ɵɵnextContext();
22492
22621
  const _r1 = i0.ɵɵreference(13);
22493
22622
  i0.ɵɵadvance(1);
22494
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
22623
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
22495
22624
  }
22496
22625
  }
22497
22626
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -22683,7 +22812,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
22683
22812
  }
22684
22813
  }
22685
22814
  const _c0$t = [[["", "trigger", ""]]];
22686
- const _c1$8 = ["[trigger]"];
22815
+ const _c1$9 = ["[trigger]"];
22687
22816
  class CaseFileViewOverlayMenuComponent {
22688
22817
  constructor() {
22689
22818
  this.title = '';
@@ -22697,7 +22826,7 @@ class CaseFileViewOverlayMenuComponent {
22697
22826
  }
22698
22827
  }
22699
22828
  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) {
22829
+ 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
22830
  if (rf & 1) {
22702
22831
  i0.ɵɵprojectionDef(_c0$t);
22703
22832
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
@@ -24960,7 +25089,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
24960
25089
  }
24961
25090
  }
24962
25091
  const _c0$o = function (a0) { return { "form-group-error": a0 }; };
24963
- const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
25092
+ const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
24964
25093
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24965
25094
  if (rf & 1) {
24966
25095
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
@@ -24982,7 +25111,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
24982
25111
  i0.ɵɵadvance(3);
24983
25112
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
24984
25113
  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);
25114
+ 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
25115
  i0.ɵɵadvance(1);
24987
25116
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
24988
25117
  }
@@ -25552,7 +25681,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
25552
25681
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
25553
25682
  }
25554
25683
  }
25555
- const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
25684
+ const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
25556
25685
  class UpdateFlagComponent {
25557
25686
  constructor(rpxTranslationService) {
25558
25687
  this.rpxTranslationService = rpxTranslationService;
@@ -25761,7 +25890,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
25761
25890
  const _r3 = i0.ɵɵreference(17);
25762
25891
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25763
25892
  i0.ɵɵadvance(2);
25764
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
25893
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
25765
25894
  i0.ɵɵadvance(3);
25766
25895
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
25767
25896
  i0.ɵɵadvance(2);
@@ -27157,7 +27286,7 @@ const CUSTOM_MOMENT_FORMATS = {
27157
27286
  };
27158
27287
 
27159
27288
  const _c0$h = ["picker"];
27160
- const _c1$5 = ["input"];
27289
+ const _c1$6 = ["input"];
27161
27290
  function DatetimePickerComponent_span_3_Template(rf, ctx) {
27162
27291
  if (rf & 1) {
27163
27292
  i0.ɵɵelementStart(0, "span", 11);
@@ -27221,7 +27350,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
27221
27350
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
27222
27351
  }
27223
27352
  }
27224
- const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
27353
+ const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
27225
27354
  class DatetimePickerComponent extends AbstractFormFieldComponent {
27226
27355
  constructor(formatTranslationService, ngxMatDateFormats) {
27227
27356
  super();
@@ -27387,7 +27516,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
27387
27516
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
27388
27517
  if (rf & 1) {
27389
27518
  i0.ɵɵviewQuery(_c0$h, 5);
27390
- i0.ɵɵviewQuery(_c1$5, 5);
27519
+ i0.ɵɵviewQuery(_c1$6, 5);
27391
27520
  }
27392
27521
  if (rf & 2) {
27393
27522
  let _t;
@@ -27423,7 +27552,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
27423
27552
  }
27424
27553
  if (rf & 2) {
27425
27554
  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));
27555
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
27427
27556
  i0.ɵɵadvance(3);
27428
27557
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
27429
27558
  i0.ɵɵadvance(1);
@@ -27677,7 +27806,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
27677
27806
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
27678
27807
  }
27679
27808
  }
27680
- const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27809
+ const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
27681
27810
  function EventLogTableComponent_tr_20_Template(rf, ctx) {
27682
27811
  if (rf & 1) {
27683
27812
  const _r18 = i0.ɵɵgetCurrentView();
@@ -27710,7 +27839,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
27710
27839
  if (rf & 2) {
27711
27840
  const event_r1 = ctx.$implicit;
27712
27841
  const ctx_r0 = i0.ɵɵnextContext();
27713
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
27842
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
27714
27843
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
27715
27844
  i0.ɵɵadvance(2);
27716
27845
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -29810,6 +29939,36 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
29810
29939
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
29811
29940
  }
29812
29941
  }
29942
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
29943
+ if (rf & 1) {
29944
+ i0.ɵɵelementStart(0, "span", 48);
29945
+ i0.ɵɵtext(1);
29946
+ i0.ɵɵpipe(2, "rpxTranslate");
29947
+ i0.ɵɵpipe(3, "ccdFirstError");
29948
+ i0.ɵɵelementEnd();
29949
+ }
29950
+ if (rf & 2) {
29951
+ const ctx_r36 = i0.ɵɵnextContext(3);
29952
+ i0.ɵɵadvance(1);
29953
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
29954
+ }
29955
+ }
29956
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
29957
+ if (rf & 1) {
29958
+ i0.ɵɵelementStart(0, "span", 48);
29959
+ i0.ɵɵtext(1);
29960
+ i0.ɵɵpipe(2, "rpxTranslate");
29961
+ i0.ɵɵpipe(3, "ccdFirstError");
29962
+ i0.ɵɵelementEnd();
29963
+ }
29964
+ if (rf & 2) {
29965
+ const ctx_r37 = i0.ɵɵnextContext(3);
29966
+ i0.ɵɵadvance(1);
29967
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
29968
+ }
29969
+ }
29970
+ const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
29971
+ const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
29813
29972
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29814
29973
  if (rf & 1) {
29815
29974
  i0.ɵɵelementContainerStart(0);
@@ -29820,21 +29979,38 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
29820
29979
  i0.ɵɵelementStart(6, "span", 43);
29821
29980
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
29822
29981
  i0.ɵɵelementEnd()();
29823
- i0.ɵɵelement(8, "input", 44);
29982
+ i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
29983
+ i0.ɵɵelement(9, "input", 45);
29824
29984
  i0.ɵɵelementEnd();
29825
- i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
29826
- i0.ɵɵtext(11, "Event description (optional)");
29985
+ i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
29986
+ i0.ɵɵtext(12, "Event description (optional)");
29827
29987
  i0.ɵɵelementEnd();
29828
- i0.ɵɵelement(12, "textarea", 46);
29988
+ i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
29989
+ i0.ɵɵelement(14, "textarea", 47);
29829
29990
  i0.ɵɵelementEnd()();
29830
29991
  i0.ɵɵelementContainerEnd();
29831
29992
  }
29993
+ if (rf & 2) {
29994
+ const ctx_r9 = i0.ɵɵnextContext(2);
29995
+ i0.ɵɵadvance(3);
29996
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
29997
+ i0.ɵɵadvance(5);
29998
+ i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
29999
+ i0.ɵɵadvance(1);
30000
+ 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)));
30001
+ i0.ɵɵadvance(1);
30002
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
30003
+ i0.ɵɵadvance(3);
30004
+ i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
30005
+ i0.ɵɵadvance(1);
30006
+ 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)));
30007
+ }
29832
30008
  }
29833
30009
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29834
30010
  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()); });
30011
+ const _r39 = i0.ɵɵgetCurrentView();
30012
+ i0.ɵɵelementStart(0, "button", 49);
30013
+ 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
30014
  i0.ɵɵtext(1);
29839
30015
  i0.ɵɵpipe(2, "rpxTranslate");
29840
30016
  i0.ɵɵelementEnd();
@@ -29848,7 +30024,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
29848
30024
  }
29849
30025
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29850
30026
  if (rf & 1) {
29851
- const _r39 = i0.ɵɵgetCurrentView();
30027
+ const _r41 = i0.ɵɵgetCurrentView();
29852
30028
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
29853
30029
  i0.ɵɵtext(2);
29854
30030
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -29858,13 +30034,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29858
30034
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
29859
30035
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
29860
30036
  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)); });
30037
+ 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
30038
  i0.ɵɵelementEnd();
29863
30039
  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()); });
30040
+ 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
30041
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
29866
30042
  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);
30043
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
29868
30044
  i0.ɵɵelementStart(15, "div", 9);
29869
30045
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
29870
30046
  i0.ɵɵelementStart(17, "button", 11);
@@ -29872,7 +30048,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29872
30048
  i0.ɵɵpipe(19, "rpxTranslate");
29873
30049
  i0.ɵɵelementEnd()();
29874
30050
  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()); });
30051
+ 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
30052
  i0.ɵɵtext(22);
29877
30053
  i0.ɵɵpipe(23, "rpxTranslate");
29878
30054
  i0.ɵɵelementEnd()()()();
@@ -29911,9 +30087,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
29911
30087
  }
29912
30088
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29913
30089
  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)); });
30090
+ const _r45 = i0.ɵɵgetCurrentView();
30091
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
30092
+ 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
30093
  i0.ɵɵelementEnd();
29918
30094
  }
29919
30095
  if (rf & 2) {
@@ -29923,14 +30099,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
29923
30099
  }
29924
30100
  // @dynamic
29925
30101
  class CaseEditSubmitComponent {
29926
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
30102
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
29927
30103
  this.caseEdit = caseEdit;
29928
30104
  this.fieldsUtils = fieldsUtils;
29929
30105
  this.caseFieldService = caseFieldService;
29930
30106
  this.route = route;
29931
30107
  this.orderService = orderService;
29932
30108
  this.profileNotifier = profileNotifier;
30109
+ this.formValidatorsService = formValidatorsService;
29933
30110
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
30111
+ this.eventSummaryLabel = 'Event summary';
30112
+ this.eventDescriptionLabel = 'Event description';
29934
30113
  }
29935
30114
  get isDisabled() {
29936
30115
  // EUI-3452.
@@ -29941,7 +30120,7 @@ class CaseEditSubmitComponent {
29941
30120
  }
29942
30121
  ngOnInit() {
29943
30122
  var _a, _b, _c;
29944
- this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
30123
+ this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
29945
30124
  this.eventTrigger = this.caseEdit.eventTrigger;
29946
30125
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
29947
30126
  this.editForm = this.caseEdit.form;
@@ -29954,10 +30133,12 @@ class CaseEditSubmitComponent {
29954
30133
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
29955
30134
  // a FlagLauncher field in the event trigger
29956
30135
  this.caseEdit.isCaseFlagSubmission =
29957
- this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
30136
+ this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
29958
30137
  this.caseEdit.isLinkedCasesSubmission =
29959
30138
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
29960
30139
  this.pageTitle = this.getPageTitle();
30140
+ this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
30141
+ this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
29961
30142
  }
29962
30143
  ngOnDestroy() {
29963
30144
  /* istanbul ignore else */
@@ -29966,12 +30147,14 @@ class CaseEditSubmitComponent {
29966
30147
  }
29967
30148
  }
29968
30149
  submit() {
29969
- this.caseEdit.submitForm({
29970
- eventTrigger: this.eventTrigger,
29971
- form: this.editForm,
29972
- submit: this.caseEdit.submit,
29973
- caseDetails: this.caseEdit.caseDetails,
29974
- });
30150
+ if (this.summary.valid && this.description.valid) {
30151
+ this.caseEdit.submitForm({
30152
+ eventTrigger: this.eventTrigger,
30153
+ form: this.editForm,
30154
+ submit: this.caseEdit.submit,
30155
+ caseDetails: this.caseEdit.caseDetails
30156
+ });
30157
+ }
29975
30158
  }
29976
30159
  onEventCanBeCompleted(eventCanBeCompleted) {
29977
30160
  this.caseEdit.onEventCanBeCompleted({
@@ -29979,7 +30162,7 @@ class CaseEditSubmitComponent {
29979
30162
  eventCanBeCompleted,
29980
30163
  caseDetails: this.caseEdit.caseDetails,
29981
30164
  form: this.editForm,
29982
- submit: this.caseEdit.submit,
30165
+ submit: this.caseEdit.submit
29983
30166
  });
29984
30167
  }
29985
30168
  getPageTitle() {
@@ -30055,7 +30238,7 @@ class CaseEditSubmitComponent {
30055
30238
  }
30056
30239
  }
30057
30240
  readOnlySummaryFieldsToDisplayExists() {
30058
- return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
30241
+ return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
30059
30242
  }
30060
30243
  showEventNotes() {
30061
30244
  var _a;
@@ -30071,7 +30254,7 @@ class CaseEditSubmitComponent {
30071
30254
  }
30072
30255
  getLastPageShown() {
30073
30256
  let lastPage;
30074
- this.wizard.reverse().forEach(page => {
30257
+ this.wizard.reverse().forEach((page) => {
30075
30258
  if (!lastPage && this.isShown(page)) {
30076
30259
  lastPage = page;
30077
30260
  }
@@ -30090,7 +30273,7 @@ class CaseEditSubmitComponent {
30090
30273
  }
30091
30274
  isShown(page) {
30092
30275
  const fields = this.fieldsUtils
30093
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
30276
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
30094
30277
  return page.parsedShowCondition.match(fields);
30095
30278
  }
30096
30279
  canShowFieldInCYA(field) {
@@ -30099,7 +30282,7 @@ class CaseEditSubmitComponent {
30099
30282
  sortFieldsByShowSummaryContent(fields) {
30100
30283
  return this.orderService
30101
30284
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
30102
- .filter(cf => cf.show_summary_content_option);
30285
+ .filter((cf) => cf.show_summary_content_option);
30103
30286
  }
30104
30287
  getCaseFields() {
30105
30288
  if (this.caseEdit.caseDetails) {
@@ -30118,9 +30301,7 @@ class CaseEditSubmitComponent {
30118
30301
  if (this.eventTrigger.can_save_draft) {
30119
30302
  return 'Return to case list';
30120
30303
  }
30121
- else {
30122
- return 'Cancel';
30123
- }
30304
+ return 'Cancel';
30124
30305
  }
30125
30306
  }
30126
30307
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -30134,8 +30315,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
30134
30315
  }
30135
30316
  return a.show_summary_content_option - b.show_summary_content_option;
30136
30317
  };
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) {
30318
+ 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)); };
30319
+ 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
30320
  if (rf & 1) {
30140
30321
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
30141
30322
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
@@ -30149,8 +30330,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
30149
30330
  (function () {
30150
30331
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
30151
30332
  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);
30333
+ 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"] }]
30334
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
30154
30335
  })();
30155
30336
 
30156
30337
  function CaseProgressComponent_div_0_Template(rf, ctx) {
@@ -30548,7 +30729,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
30548
30729
  CaseEditGenericErrorsComponent];
30549
30730
  }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
30550
30731
  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]; });
30732
+ 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
30733
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30553
30734
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
30554
30735
 
@@ -34911,19 +35092,27 @@ class EventStartGuard {
34911
35092
  task = tasksAssignedToUser[0];
34912
35093
  }
34913
35094
  // if one task assigned to user, allow user to complete event
34914
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
35095
+ const storeClientContext = {
35096
+ client_context: {
35097
+ user_task: {
35098
+ task_data: task,
35099
+ complete_task: true
35100
+ }
35101
+ }
35102
+ };
35103
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34915
35104
  return true;
34916
35105
  }
34917
35106
  }
34918
35107
  removeTaskFromSessionStorage() {
34919
- this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
35108
+ this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
34920
35109
  }
34921
35110
  checkForTasks(payload, caseId, eventId, taskId) {
34922
35111
  var _a;
34923
35112
  if (taskId && ((_a = payload === null || payload === void 0 ? void 0 : payload.tasks) === null || _a === void 0 ? void 0 : _a.length) > 0) {
34924
35113
  const task = payload.tasks.find((t) => t.id == taskId);
34925
35114
  if (task) {
34926
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
35115
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
34927
35116
  }
34928
35117
  else {
34929
35118
  this.removeTaskFromSessionStorage();
@@ -34945,7 +35134,7 @@ class EventStartGuard {
34945
35134
  }
34946
35135
  }
34947
35136
  }
34948
- EventStartGuard.TASK_TO_COMPLETE = 'taskToComplete';
35137
+ EventStartGuard.CLIENT_CONTEXT = 'clientContext';
34949
35138
  EventStartGuard.ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
34950
35139
  EventStartGuard.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
34951
35140
  (function () {
@@ -35085,9 +35274,17 @@ class EventStartStateMachineService {
35085
35274
  task = context.tasks[0];
35086
35275
  }
35087
35276
  const taskStr = JSON.stringify(task);
35088
- console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
35277
+ console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
35089
35278
  // Store task to session
35090
- context.sessionStorageService.setItem('taskToComplete', taskStr);
35279
+ const clientContext = {
35280
+ client_context: {
35281
+ user_task: {
35282
+ task_data: task,
35283
+ complete_task: true
35284
+ }
35285
+ }
35286
+ };
35287
+ context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
35091
35288
  // Allow user to perform the event
35092
35289
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
35093
35290
  }
@@ -38282,11 +38479,11 @@ SearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Searc
38282
38479
  i0.ɵɵadvance(1);
38283
38480
  i0.ɵɵproperty("ngIf", !(ctx.hasResults() || ctx.hasDrafts()));
38284
38481
  }
38285
- }, 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}"] });
38482
+ }, 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}"] });
38286
38483
  (function () {
38287
38484
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
38288
38485
  type: Component,
38289
- 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"] }]
38486
+ 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"] }]
38290
38487
  }], function () { return [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }]; }, { caseLinkUrlTemplate: [{
38291
38488
  type: Input
38292
38489
  }], jurisdiction: [{