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

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 +54 -27
  7. package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +9 -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 +362 -169
  29. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  30. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +347 -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';
@@ -29,6 +29,7 @@ import * as i2 from '@nicky-lenaers/ngx-scroll-to';
29
29
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
30
30
  import * as i1$4 from 'ngx-md';
31
31
  import { NgxMdModule } from 'ngx-md';
32
+ import * as marked from 'marked';
32
33
  import * as i5 from '@angular/material/legacy-autocomplete';
33
34
  import { MatLegacyAutocompleteModule } from '@angular/material/legacy-autocomplete';
34
35
  import * as i6 from '@angular/material/legacy-core';
@@ -127,11 +128,11 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
127
128
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 13, ctx_r1.workhours));
128
129
  } }
129
130
  const _c0$14 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
130
- const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
131
+ const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
131
132
  class FooterComponent {
132
133
  }
133
134
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
134
- FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$t, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
135
+ FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
135
136
  i0.ɵɵprojectionDef(_c0$14);
136
137
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
137
138
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2);
@@ -191,7 +192,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) { if (rf & 1) {
191
192
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, ctx_r2.title));
192
193
  } }
193
194
  const _c0$13 = [[["", "headerNavigation", ""]]];
194
- const _c1$s = ["[headerNavigation]"];
195
+ const _c1$t = ["[headerNavigation]"];
195
196
  class HeaderBarComponent {
196
197
  constructor() {
197
198
  this.signOutRequest = new EventEmitter();
@@ -201,7 +202,7 @@ class HeaderBarComponent {
201
202
  }
202
203
  }
203
204
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
204
- HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$s, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
205
+ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
205
206
  i0.ɵɵprojectionDef(_c0$13);
206
207
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
207
208
  i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3);
@@ -252,11 +253,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
252
253
  }] }); })();
253
254
 
254
255
  const _c0$12 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
255
- const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
256
+ const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
256
257
  class NavigationComponent {
257
258
  }
258
259
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
259
- NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$r, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
260
+ NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
260
261
  i0.ɵɵprojectionDef(_c0$12);
261
262
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
262
263
  i0.ɵɵprojection(2);
@@ -367,11 +368,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
367
368
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
368
369
 
369
370
  const _c0$11 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
370
- const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
371
+ const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
371
372
  class BodyComponent {
372
373
  }
373
374
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
374
- BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$q, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
375
+ BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
375
376
  i0.ɵɵprojectionDef(_c0$11);
376
377
  i0.ɵɵelementStart(0, "div", 0);
377
378
  i0.ɵɵprojection(1);
@@ -981,11 +982,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
981
982
  }] }); })();
982
983
 
983
984
  const _c0$_ = function (a0) { return { "js-hidden": a0 }; };
984
- const _c1$p = ["*"];
985
+ const _c1$q = ["*"];
985
986
  class TabComponent {
986
987
  }
987
988
  TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
988
- TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$p, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
989
+ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
989
990
  i0.ɵɵprojectionDef();
990
991
  i0.ɵɵelementStart(0, "div", 0);
991
992
  i0.ɵɵprojection(1);
@@ -1006,8 +1007,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
1006
1007
  }] }); })();
1007
1008
 
1008
1009
  const _c0$Z = ["tab"];
1009
- const _c1$o = function () { return ["."]; };
1010
- const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1010
+ const _c1$p = function () { return ["."]; };
1011
+ const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1011
1012
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1012
1013
  const _r4 = i0.ɵɵgetCurrentView();
1013
1014
  i0.ɵɵelementStart(0, "li", 4)(1, "a", 5, 6);
@@ -1018,7 +1019,7 @@ function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
1018
1019
  } if (rf & 2) {
1019
1020
  const panel_r1 = ctx.$implicit;
1020
1021
  i0.ɵɵadvance(1);
1021
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
1022
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
1022
1023
  i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
1023
1024
  i0.ɵɵadvance(2);
1024
1025
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
@@ -2736,6 +2737,9 @@ class FirstErrorPipe {
2736
2737
  else if (keys[0] === 'pattern') {
2737
2738
  errorMessage = 'The data entered is not valid for %FIELDLABEL%';
2738
2739
  }
2740
+ else if (keys[0] === 'markDownPattern') {
2741
+ errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
2742
+ }
2739
2743
  else if (keys[0] === 'minlength') {
2740
2744
  errorMessage = '%FIELDLABEL% is below the minimum length';
2741
2745
  }
@@ -3043,7 +3047,9 @@ class CaseField {
3043
3047
  }
3044
3048
  }
3045
3049
  set list_items(items) {
3046
- this._list_items = items;
3050
+ if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
3051
+ this._list_items = items;
3052
+ }
3047
3053
  }
3048
3054
  get dateTimeEntryFormat() {
3049
3055
  if (this.isComplexDisplay()) {
@@ -3903,6 +3909,13 @@ class FieldsUtils {
3903
3909
  return '';
3904
3910
  }
3905
3911
  }
3912
+ static getUserTaskFromClientContext(clientContextStr) {
3913
+ if (clientContextStr) {
3914
+ let clientContext = JSON.parse(clientContextStr);
3915
+ return clientContext.client_context.user_task;
3916
+ }
3917
+ return null;
3918
+ }
3906
3919
  buildCanShowPredicate(eventTrigger, form) {
3907
3920
  const currentState = this.getCurrentEventState(eventTrigger, form);
3908
3921
  return (page) => {
@@ -4553,6 +4566,7 @@ class FormValidatorsService {
4553
4566
  FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
4554
4567
  const validators = [Validators.required];
4555
4568
  if (caseField.field_type.type === 'Text') {
4569
+ validators.push(this.markDownPatternValidator());
4556
4570
  if (caseField.field_type.regular_expression) {
4557
4571
  validators.push(Validators.pattern(caseField.field_type.regular_expression));
4558
4572
  }
@@ -4566,22 +4580,37 @@ class FormValidatorsService {
4566
4580
  validators.push(Validators.maxLength(caseField.field_type.max));
4567
4581
  }
4568
4582
  }
4583
+ if (caseField.field_type.type === 'TextArea') {
4584
+ validators.push(this.emptyValidator());
4585
+ validators.push(this.markDownPatternValidator());
4586
+ }
4569
4587
  if (control.validator) {
4570
4588
  validators.push(control.validator);
4571
4589
  }
4572
4590
  control.setValidators(validators);
4573
4591
  }
4592
+ else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')
4593
+ || (caseField.display_context === 'COMPLEX' && caseField.field_type.type === 'Complex')) {
4594
+ control.setValidators(this.markDownPatternValidator());
4595
+ }
4574
4596
  return control;
4575
4597
  }
4576
4598
  static emptyValidator() {
4577
4599
  const validator = (control) => {
4578
- if (control && control.value && control.value.toString().trim().length === 0) {
4600
+ if (control?.value?.toString().trim().length === 0) {
4579
4601
  return { required: {} };
4580
4602
  }
4581
4603
  return null;
4582
4604
  };
4583
4605
  return validator;
4584
4606
  }
4607
+ static markDownPatternValidator() {
4608
+ const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
4609
+ return (control) => {
4610
+ const value = control?.value?.toString().trim();
4611
+ return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
4612
+ };
4613
+ }
4585
4614
  // TODO: Strip this out as it's only here for the moment because
4586
4615
  // the service is being injected all over the place but it doesn't
4587
4616
  // need to be as FormValidatorsService.addValidators is perfectly
@@ -4589,10 +4618,20 @@ class FormValidatorsService {
4589
4618
  addValidators(caseField, control) {
4590
4619
  return FormValidatorsService.addValidators(caseField, control);
4591
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
+ }
4592
4629
  }
4593
4630
  FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
4594
4631
  'Date', 'MoneyGBP', 'Label', 'JudicialUser'
4595
4632
  ];
4633
+ FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
4634
+ FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
4596
4635
  FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
4597
4636
  FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
4598
4637
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormValidatorsService, [{
@@ -5216,7 +5255,8 @@ class FieldTypeSanitiser {
5216
5255
  if (!data || !caseFields) {
5217
5256
  return;
5218
5257
  }
5219
- caseFields.forEach(caseField => {
5258
+ caseFields = this.ensureDynamicMultiSelectListPopulated(caseFields);
5259
+ caseFields.forEach((caseField) => {
5220
5260
  // tslint:disable-next-line:switch-default
5221
5261
  switch (caseField.field_type.type) {
5222
5262
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
@@ -5239,6 +5279,16 @@ class FieldTypeSanitiser {
5239
5279
  }
5240
5280
  });
5241
5281
  }
5282
+ ensureDynamicMultiSelectListPopulated(caseFields) {
5283
+ return caseFields.map((field) => {
5284
+ if (field.field_type.type !== 'Complex') {
5285
+ return field;
5286
+ }
5287
+ const complexFieldsUpdated = field.field_type.complex_fields.map((complexField) => complexField.field_type.type === FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST && complexField.display_context !== 'HIDDEN' && field._value?.[complexField.id]
5288
+ ? { ...complexField, list_items: field._value[complexField.id]?.list_items } : complexField);
5289
+ return { ...field, field_type: { ...field.field_type, complex_fields: complexFieldsUpdated } };
5290
+ });
5291
+ }
5242
5292
  convertArrayToDynamicListOutput(field, data) {
5243
5293
  const values = data[field.id];
5244
5294
  if (Array.isArray(values)) {
@@ -6758,6 +6808,7 @@ class ProfileService {
6758
6808
  .set('experimental', 'true')
6759
6809
  .set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
6760
6810
  .set('Content-Type', 'application/json');
6811
+ // Not adding client context header because header is added to call immediately afterwards
6761
6812
  return this.httpService
6762
6813
  .get(url, { headers, observe: 'body' })
6763
6814
  .pipe(map((p) => plainToClass(Profile, p)));
@@ -7624,6 +7675,7 @@ class CasesService {
7624
7675
  let headers = new HttpHeaders();
7625
7676
  headers = headers.set('experimental', 'true');
7626
7677
  headers = headers.set('Content-Type', 'application/json');
7678
+ headers = this.addClientContextHeader(headers);
7627
7679
  if (Draft.isDraft(caseId)) {
7628
7680
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
7629
7681
  }
@@ -7634,9 +7686,11 @@ class CasesService {
7634
7686
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
7635
7687
  }
7636
7688
  return this.http
7637
- .get(url, { headers, observe: 'body' })
7638
- .pipe(map(body => {
7639
- return FieldsUtils.handleNestedDynamicLists(body);
7689
+ .get(url, { headers, observe: 'response' })
7690
+ .pipe(map((response) => {
7691
+ console.log('response barking mad', response);
7692
+ this.updateClientContextStorage(response.headers);
7693
+ return FieldsUtils.handleNestedDynamicLists(response.body);
7640
7694
  }), catchError(error => {
7641
7695
  this.errorService.setError(error);
7642
7696
  return throwError(error);
@@ -7645,13 +7699,17 @@ class CasesService {
7645
7699
  createEvent(caseDetails, eventData) {
7646
7700
  const caseId = caseDetails.case_id;
7647
7701
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
7648
- const headers = new HttpHeaders()
7702
+ let headers = new HttpHeaders()
7649
7703
  .set('experimental', 'true')
7650
7704
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
7651
7705
  .set('Content-Type', 'application/json');
7706
+ headers = this.addClientContextHeader(headers);
7652
7707
  return this.http
7653
- .post(url, eventData, { headers, observe: 'body' })
7654
- .pipe(catchError(error => {
7708
+ .post(url, eventData, { headers, observe: 'response' })
7709
+ .pipe(map((response) => {
7710
+ this.updateClientContextStorage(response.headers);
7711
+ return response.body;
7712
+ }), catchError(error => {
7655
7713
  this.errorService.setError(error);
7656
7714
  return throwError(error);
7657
7715
  }));
@@ -7659,13 +7717,17 @@ class CasesService {
7659
7717
  validateCase(ctid, eventData, pageId) {
7660
7718
  const pageIdString = pageId ? `?pageId=${pageId}` : '';
7661
7719
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
7662
- const headers = new HttpHeaders()
7720
+ let headers = new HttpHeaders()
7663
7721
  .set('experimental', 'true')
7664
7722
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
7665
7723
  .set('Content-Type', 'application/json');
7724
+ headers = this.addClientContextHeader(headers);
7666
7725
  return this.http
7667
- .post(url, eventData, { headers, observe: 'body' })
7668
- .pipe(catchError(error => {
7726
+ .post(url, eventData, { headers, observe: 'response' })
7727
+ .pipe(map((response) => {
7728
+ this.updateClientContextStorage(response.headers);
7729
+ return response.body;
7730
+ }), catchError(error => {
7669
7731
  this.errorService.setError(error);
7670
7732
  return throwError(error);
7671
7733
  }));
@@ -7676,26 +7738,34 @@ class CasesService {
7676
7738
  ignoreWarning = 'true';
7677
7739
  }
7678
7740
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7679
- const headers = new HttpHeaders()
7741
+ let headers = new HttpHeaders()
7680
7742
  .set('experimental', 'true')
7681
7743
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
7682
7744
  .set('Content-Type', 'application/json');
7745
+ headers = this.addClientContextHeader(headers);
7683
7746
  return this.http
7684
- .post(url, eventData, { headers, observe: 'body' })
7685
- .pipe(catchError(error => {
7747
+ .post(url, eventData, { headers, observe: 'response' })
7748
+ .pipe(map((response) => {
7749
+ this.updateClientContextStorage(response.headers);
7750
+ return response.body;
7751
+ }), catchError(error => {
7686
7752
  this.errorService.setError(error);
7687
7753
  return throwError(error);
7688
7754
  }));
7689
7755
  }
7690
7756
  getPrintDocuments(caseId) {
7691
7757
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
7692
- const headers = new HttpHeaders()
7758
+ let headers = new HttpHeaders()
7693
7759
  .set('experimental', 'true')
7694
7760
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
7695
7761
  .set('Content-Type', 'application/json');
7762
+ headers = this.addClientContextHeader(headers);
7696
7763
  return this.http
7697
- .get(url, { headers, observe: 'body' })
7698
- .pipe(map(body => body.documentResources), catchError(error => {
7764
+ .get(url, { headers, observe: 'response' })
7765
+ .pipe(map((response) => {
7766
+ this.updateClientContextStorage(response.headers);
7767
+ return response.body.documentResources;
7768
+ }), catchError(error => {
7699
7769
  this.errorService.setError(error);
7700
7770
  return throwError(error);
7701
7771
  }));
@@ -7728,17 +7798,6 @@ class CasesService {
7728
7798
  wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
7729
7799
  });
7730
7800
  }
7731
- /*
7732
- Checks if the user has role of pui-case-manager and returns true or false
7733
- */
7734
- isPuiCaseManager() {
7735
- const userInfoStr = this.sessionStorageService.getItem('userDetails');
7736
- if (userInfoStr) {
7737
- const userInfo = JSON.parse(userInfoStr);
7738
- return userInfo && userInfo.roles && (userInfo.roles.indexOf(CasesService.PUI_CASE_MANAGER) !== -1);
7739
- }
7740
- return false;
7741
- }
7742
7801
  getCourtOrHearingCentreName(locationId) {
7743
7802
  return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
7744
7803
  }
@@ -7805,6 +7864,25 @@ class CasesService {
7805
7864
  .get(url)
7806
7865
  .pipe(catchError(error => throwError(error)));
7807
7866
  }
7867
+ addClientContextHeader(headers) {
7868
+ const clientContextDetails = this.sessionStorageService.getItem('clientContext');
7869
+ if (clientContextDetails) {
7870
+ // may require URI encoding in certain circumstances
7871
+ const clientContext = window.btoa(clientContextDetails);
7872
+ if (clientContext) {
7873
+ headers = headers.set('Client-Context', clientContext);
7874
+ }
7875
+ }
7876
+ return headers;
7877
+ }
7878
+ updateClientContextStorage(headers) {
7879
+ // for mocking - TODO: Kasi Remove/Uncomment for testing
7880
+ // headers = this.setMockClientContextHeader(headers);
7881
+ if (headers && headers.get('Client-Context')) {
7882
+ const clientContextString = window.atob(headers.get('Client-Context'));
7883
+ this.sessionStorageService.setItem('clientContext', clientContextString);
7884
+ }
7885
+ }
7808
7886
  }
7809
7887
  // Internal (UI) API
7810
7888
  CasesService.V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
@@ -8138,9 +8216,9 @@ class CaseworkerService {
8138
8216
  this.errorService = errorService;
8139
8217
  }
8140
8218
  getCaseworkers(serviceId) {
8141
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/retrieveCaseWorkersForServices`;
8219
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
8142
8220
  return this.http
8143
- .post(url, { serviceIds: [serviceId] })
8221
+ .post(url, { services: [serviceId] })
8144
8222
  .pipe(catchError(error => {
8145
8223
  this.errorService.setError(error);
8146
8224
  return throwError(error);
@@ -8295,8 +8373,7 @@ class EventCompletionStateMachineService {
8295
8373
  entryActionForStateCompleteEventAndTask(state, context) {
8296
8374
  // Trigger final state to complete processing of state machine
8297
8375
  state.trigger(EventCompletionStates.Final);
8298
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8299
- if (taskStr) {
8376
+ if (this.getTaskFromClientContext(context)) {
8300
8377
  context.sessionStorageService.setItem('assignNeeded', 'false');
8301
8378
  // just set event can be completed
8302
8379
  context.component.eventCanBeCompleted.emit(true);
@@ -8315,9 +8392,7 @@ class EventCompletionStateMachineService {
8315
8392
  entryActionForStateTaskUnassigned(state, context) {
8316
8393
  // Trigger final state to complete processing of state machine
8317
8394
  state.trigger(EventCompletionStates.Final);
8318
- // Get task details
8319
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8320
- if (taskStr) {
8395
+ if (this.getTaskFromClientContext(context)) {
8321
8396
  context.sessionStorageService.setItem('assignNeeded', 'true');
8322
8397
  context.component.eventCanBeCompleted.emit(true);
8323
8398
  }
@@ -8352,6 +8427,11 @@ class EventCompletionStateMachineService {
8352
8427
  addTransitionsForStateTaskUnassigned() {
8353
8428
  this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
8354
8429
  }
8430
+ getTaskFromClientContext(context) {
8431
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8432
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8433
+ return userTask ? userTask.task_data : null;
8434
+ }
8355
8435
  }
8356
8436
  EventCompletionStateMachineService.ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
8357
8437
  EventCompletionStateMachineService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
@@ -8810,11 +8890,9 @@ class CaseEditComponent {
8810
8890
  this.isSubmitting = true;
8811
8891
  // We have to run the event completion checks if task in session storage
8812
8892
  // and if the task is in session storage, then is it associated to the case
8813
- let taskInSessionStorage;
8814
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
8815
- if (taskStr) {
8816
- taskInSessionStorage = JSON.parse(taskStr);
8817
- }
8893
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
8894
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8895
+ const taskInSessionStorage = userTask ? userTask.task_data : null;
8818
8896
  if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
8819
8897
  // Show event completion component to perform event completion checks
8820
8898
  this.eventCompletionParams = ({
@@ -9013,14 +9091,16 @@ class CaseEditComponent {
9013
9091
  });
9014
9092
  }
9015
9093
  postCompleteTaskIfRequired() {
9016
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9094
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
9095
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9096
+ const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9017
9097
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9018
- if (taskStr && assignNeeded) {
9019
- const task = JSON.parse(taskStr);
9098
+ if (task && assignNeeded && taskToBeCompleted) {
9099
+ // const task: Task = JSON.parse(taskStr);
9020
9100
  return this.workAllocationService.assignAndCompleteTask(task.id);
9021
9101
  }
9022
- else if (taskStr) {
9023
- const task = JSON.parse(taskStr);
9102
+ else if (task && taskToBeCompleted) {
9103
+ // const task: Task = JSON.parse(taskStr);
9024
9104
  return this.workAllocationService.completeTask(task.id);
9025
9105
  }
9026
9106
  return of(true);
@@ -10544,8 +10624,12 @@ class CaseEventCompletionTaskReassignedComponent {
10544
10624
  }
10545
10625
  onContinue() {
10546
10626
  // Get task details
10547
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
10548
- if (taskStr) {
10627
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
10628
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
10629
+ const task = userTask ? userTask.task_data : null;
10630
+ // not complete_task not utilised here as related to event completion
10631
+ // service wanting task associated with event to not be completed not directly relevant
10632
+ if (task) {
10549
10633
  this.sessionStorageService.setItem('assignNeeded', 'true');
10550
10634
  // set event can be completed to true
10551
10635
  this.parentComponent.eventCanBeCompleted.emit(true);
@@ -10905,7 +10989,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
10905
10989
  }
10906
10990
  }
10907
10991
  WriteComplexFieldComponent.ɵfac = function WriteComplexFieldComponent_Factory(t) { return new (t || WriteComplexFieldComponent)(i0.ɵɵdirectiveInject(IsCompoundPipe), i0.ɵɵdirectiveInject(FormValidatorsService)); };
10908
- 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) { if (rf & 1) {
10992
+ 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) { if (rf & 1) {
10909
10993
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
10910
10994
  i0.ɵɵtemplate(3, WriteComplexFieldComponent_h2_3_Template, 3, 3, "h2", 1);
10911
10995
  i0.ɵɵelementEnd();
@@ -10923,8 +11007,6 @@ WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
10923
11007
  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"] }]
10924
11008
  }], function () { return [{ type: IsCompoundPipe }, { type: FormValidatorsService }]; }, { caseFields: [{
10925
11009
  type: Input
10926
- }], formGroup: [{
10927
- type: Input
10928
11010
  }], renderLabel: [{
10929
11011
  type: Input
10930
11012
  }], ignoreMandatory: [{
@@ -10942,8 +11024,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (r
10942
11024
  i0.ɵɵadvance(1);
10943
11025
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
10944
11026
  } }
10945
- const _c1$n = function (a0) { return { "form-group-error": a0 }; };
10946
- const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
11027
+ const _c1$o = function (a0) { return { "form-group-error": a0 }; };
11028
+ const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
10947
11029
  function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1) {
10948
11030
  const _r7 = i0.ɵɵgetCurrentView();
10949
11031
  i0.ɵɵelementStart(0, "div", 8)(1, "label", 9)(2, "span", 10);
@@ -10959,7 +11041,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10959
11041
  i0.ɵɵelementEnd()();
10960
11042
  } if (rf & 2) {
10961
11043
  const ctx_r2 = i0.ɵɵnextContext(2);
10962
- i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
11044
+ i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
10963
11045
  i0.ɵɵadvance(1);
10964
11046
  i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
10965
11047
  i0.ɵɵadvance(2);
@@ -10967,7 +11049,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
10967
11049
  i0.ɵɵadvance(2);
10968
11050
  i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
10969
11051
  i0.ɵɵadvance(1);
10970
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
11052
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
10971
11053
  i0.ɵɵadvance(2);
10972
11054
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
10973
11055
  } }
@@ -11005,7 +11087,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1)
11005
11087
  i0.ɵɵelementEnd()();
11006
11088
  } if (rf & 2) {
11007
11089
  const ctx_r3 = i0.ɵɵnextContext(2);
11008
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
11090
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
11009
11091
  i0.ɵɵadvance(1);
11010
11092
  i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
11011
11093
  i0.ɵɵadvance(2);
@@ -11175,7 +11257,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11175
11257
  let _t;
11176
11258
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11177
11259
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
11178
- } }, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11260
+ } }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
11179
11261
  i0.ɵɵelementStart(0, "div", 0);
11180
11262
  i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
11181
11263
  i0.ɵɵelement(2, "ccd-write-complex-type-field", 2, 3);
@@ -11196,8 +11278,6 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
11196
11278
  }], focusElementDirectives: [{
11197
11279
  type: ViewChildren,
11198
11280
  args: [FocusElementDirective]
11199
- }], formGroup: [{
11200
- type: Input
11201
11281
  }] }); })();
11202
11282
 
11203
11283
  var PaletteContext;
@@ -12422,7 +12502,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12422
12502
  i0.ɵɵadvance(1);
12423
12503
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
12424
12504
  } }
12425
- const _c1$m = function (a0) { return { "form-group-error": a0 }; };
12505
+ const _c1$n = function (a0) { return { "form-group-error": a0 }; };
12426
12506
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
12427
12507
  ngOnInit() {
12428
12508
  if (this.caseField.value) {
@@ -12483,7 +12563,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
12483
12563
  i0.ɵɵelement(5, "input", 5);
12484
12564
  i0.ɵɵelementEnd();
12485
12565
  } if (rf & 2) {
12486
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12566
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12487
12567
  i0.ɵɵadvance(1);
12488
12568
  i0.ɵɵproperty("for", ctx.id());
12489
12569
  i0.ɵɵadvance(1);
@@ -12515,7 +12595,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
12515
12595
  i0.ɵɵadvance(4);
12516
12596
  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);
12517
12597
  } }
12518
- const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12598
+ const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12519
12599
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
12520
12600
  i0.ɵɵelementStart(0, "tr")(1, "td");
12521
12601
  i0.ɵɵelement(2, "ccd-field-read", 7);
@@ -12525,7 +12605,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
12525
12605
  const i_r5 = ctx.index;
12526
12606
  const ctx_r3 = i0.ɵɵnextContext(3);
12527
12607
  i0.ɵɵadvance(2);
12528
- 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));
12608
+ 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));
12529
12609
  } }
12530
12610
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
12531
12611
  i0.ɵɵelementStart(0, "tbody");
@@ -13018,7 +13098,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13018
13098
  } if (rf & 2) {
13019
13099
  let _t;
13020
13100
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
13021
- } }, 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) { if (rf & 1) {
13101
+ } }, 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) { if (rf & 1) {
13022
13102
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
13023
13103
  i0.ɵɵtext(3);
13024
13104
  i0.ɵɵpipe(4, "ccdFieldLabel");
@@ -13052,8 +13132,6 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13052
13132
  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"] }]
13053
13133
  }], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
13054
13134
  type: Input
13055
- }], formGroup: [{
13056
- type: Input
13057
13135
  }], items: [{
13058
13136
  type: ViewChildren,
13059
13137
  args: ['collectionItem']
@@ -13348,7 +13426,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
13348
13426
  const ctx_r2 = i0.ɵɵnextContext();
13349
13427
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
13350
13428
  } }
13351
- const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
13429
+ const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
13352
13430
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
13353
13431
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
13354
13432
  super();
@@ -13679,7 +13757,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13679
13757
  i0.ɵɵpipe(17, "rpxTranslate");
13680
13758
  i0.ɵɵelementEnd()();
13681
13759
  } if (rf & 2) {
13682
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
13760
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
13683
13761
  i0.ɵɵadvance(1);
13684
13762
  i0.ɵɵproperty("for", ctx.id());
13685
13763
  i0.ɵɵadvance(1);
@@ -13704,7 +13782,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
13704
13782
  } }, encapsulation: 2 });
13705
13783
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
13706
13784
  type: Component,
13707
- 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" }]
13785
+ 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" }]
13708
13786
  }], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }]; }, { fileInput: [{
13709
13787
  type: ViewChild,
13710
13788
  args: ['fileInput', { static: false }]
@@ -13877,13 +13955,47 @@ class MarkdownComponent {
13877
13955
  this._markdown = _markdown;
13878
13956
  this.router = router;
13879
13957
  this.renderer = renderer;
13958
+ this.renderUrlToTextFeature = true;
13880
13959
  }
13881
13960
  ngOnInit() {
13882
13961
  this.content = this.content.replace(/ \n/g, '<br>');
13962
+ if (this.renderUrlToTextFeature) {
13963
+ this.renderUrlToText();
13964
+ }
13965
+ }
13966
+ onMarkdownClick(event) {
13967
+ // If we don't have an anchor tag, we don't need to do anything.
13968
+ if (event.target instanceof HTMLAnchorElement === false) {
13969
+ return;
13970
+ }
13971
+ return true;
13972
+ }
13973
+ renderUrlToText() {
13974
+ const renderer = new marked.Renderer();
13975
+ renderer.link = (href, title, text) => {
13976
+ if (!text || text === href) {
13977
+ return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
13978
+ }
13979
+ return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
13980
+ };
13981
+ marked.setOptions({
13982
+ renderer: renderer
13983
+ });
13984
+ }
13985
+ isAllowedUrl(url) {
13986
+ const currentOrigin = window.location.origin;
13987
+ const urlOrigin = new URL(url, window.location.href).origin;
13988
+ return urlOrigin === currentOrigin || url.startsWith('/'); // Check if same origin or relative
13989
+ }
13990
+ detectMarkdownLinks(inputString) {
13991
+ const markdownLinkRegex = /\[([^\]]+)\]\(?([^ )]+)\)/g;
13992
+ return markdownLinkRegex.test(inputString);
13883
13993
  }
13884
13994
  }
13885
13995
  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(i0.ɵɵdirectiveInject(i1$4.NgxMdService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i0.Renderer2)); };
13886
- 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) { if (rf & 1) {
13996
+ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) { if (rf & 1) {
13997
+ i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
13998
+ } }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 6, consts: [[1, "markdown", 3, "sanitizeHtml", "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
13887
13999
  i0.ɵɵelementStart(0, "div");
13888
14000
  i0.ɵɵelement(1, "markdown", 0);
13889
14001
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -13900,6 +14012,11 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
13900
14012
  type: Input
13901
14013
  }], markdownUseHrefAsRouterLink: [{
13902
14014
  type: Input
14015
+ }], renderUrlToTextFeature: [{
14016
+ type: Input
14017
+ }], onMarkdownClick: [{
14018
+ type: HostListener,
14019
+ args: ['click', ['$event']]
13903
14020
  }] }); })();
13904
14021
 
13905
14022
  class FixedListPipe {
@@ -14009,7 +14126,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
14009
14126
  i0.ɵɵadvance(1);
14010
14127
  i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14011
14128
  i0.ɵɵadvance(1);
14012
- i0.ɵɵproperty("content", checkbox_r4.label);
14129
+ i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
14013
14130
  } }
14014
14131
  const _c0$P = function (a0) { return { "error": a0 }; };
14015
14132
  class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
@@ -14073,13 +14190,13 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
14073
14190
  }
14074
14191
  }
14075
14192
  WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
14076
- WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
14193
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
14077
14194
  i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
14078
14195
  i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14079
14196
  i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14080
14197
  i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14081
14198
  i0.ɵɵelementEnd();
14082
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14199
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
14083
14200
  i0.ɵɵelementEnd()();
14084
14201
  } if (rf & 2) {
14085
14202
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$P, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
@@ -14094,7 +14211,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
14094
14211
  } }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, MarkdownComponent, FieldLabelPipe, FirstErrorPipe], styles: ["ccd-markdown[_ngcontent-%COMP%]{display:inline-block}"] });
14095
14212
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14096
14213
  type: Component,
14097
- 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"] }]
14214
+ 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"] }]
14098
14215
  }], null, null); })();
14099
14216
 
14100
14217
  class DynamicRadioListPipe {
@@ -14215,7 +14332,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
14215
14332
  i0.ɵɵadvance(1);
14216
14333
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
14217
14334
  } }
14218
- const _c1$j = function (a0) { return { "form-group-error": a0 }; };
14335
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
14219
14336
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14220
14337
  ngOnInit() {
14221
14338
  /**
@@ -14253,7 +14370,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
14253
14370
  i0.ɵɵelementContainerEnd();
14254
14371
  i0.ɵɵelementEnd()();
14255
14372
  } if (rf & 2) {
14256
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14373
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14257
14374
  i0.ɵɵadvance(3);
14258
14375
  i0.ɵɵproperty("for", ctx.id());
14259
14376
  i0.ɵɵadvance(1);
@@ -14334,7 +14451,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14334
14451
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14335
14452
  } }
14336
14453
  const _c0$N = function (a0) { return { "form-group-error": a0 }; };
14337
- const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
14454
+ const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
14338
14455
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
14339
14456
  ngOnInit() {
14340
14457
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14360,7 +14477,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
14360
14477
  i0.ɵɵadvance(1);
14361
14478
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
14362
14479
  i0.ɵɵadvance(1);
14363
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14480
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14364
14481
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
14365
14482
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
14366
14483
  type: Component,
@@ -14571,7 +14688,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
14571
14688
  i0.ɵɵadvance(1);
14572
14689
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
14573
14690
  } }
14574
- const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14691
+ const _c1$i = function (a0) { return { "form-group-error": a0 }; };
14575
14692
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
14576
14693
  ngOnInit() {
14577
14694
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -14591,7 +14708,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
14591
14708
  i0.ɵɵelementContainerEnd();
14592
14709
  i0.ɵɵelementEnd()();
14593
14710
  } if (rf & 2) {
14594
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14711
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
14595
14712
  i0.ɵɵadvance(3);
14596
14713
  i0.ɵɵproperty("for", ctx.id());
14597
14714
  i0.ɵɵadvance(1);
@@ -14713,7 +14830,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) { if (r
14713
14830
  i0.ɵɵtext(1, " Invalid search term ");
14714
14831
  i0.ɵɵelementEnd();
14715
14832
  } }
14716
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
14833
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
14717
14834
  class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
14718
14835
  constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
14719
14836
  super(compoundPipe, validatorsService);
@@ -14860,7 +14977,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
14860
14977
  i0.ɵɵelementEnd()();
14861
14978
  } if (rf & 2) {
14862
14979
  const _r3 = i0.ɵɵreference(7);
14863
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
14980
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
14864
14981
  i0.ɵɵadvance(1);
14865
14982
  i0.ɵɵproperty("for", ctx.id());
14866
14983
  i0.ɵɵadvance(1);
@@ -15550,7 +15667,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
15550
15667
  i0.ɵɵadvance(1);
15551
15668
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
15552
15669
  } }
15553
- const _c1$f = function (a0) { return { "table-group-error": a0 }; };
15670
+ const _c1$g = function (a0) { return { "table-group-error": a0 }; };
15554
15671
  function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15555
15672
  const _r21 = i0.ɵɵgetCurrentView();
15556
15673
  i0.ɵɵelementStart(0, "tr", 10)(1, "td", 38);
@@ -15581,7 +15698,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
15581
15698
  const case_r16 = ctx.$implicit;
15582
15699
  const ctx_r2 = i0.ɵɵnextContext();
15583
15700
  i0.ɵɵadvance(2);
15584
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15701
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
15585
15702
  i0.ɵɵadvance(2);
15586
15703
  i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
15587
15704
  i0.ɵɵadvance(2);
@@ -17481,7 +17598,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
17481
17598
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label), " ");
17482
17599
  } }
17483
17600
  const _c0$F = function (a0) { return { "form-group-error": a0 }; };
17484
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
17601
+ const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
17485
17602
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
17486
17603
  ngOnInit() {
17487
17604
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -17507,7 +17624,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
17507
17624
  i0.ɵɵadvance(1);
17508
17625
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
17509
17626
  i0.ɵɵadvance(1);
17510
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17627
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
17511
17628
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
17512
17629
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
17513
17630
  type: Component,
@@ -18148,7 +18265,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18148
18265
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label), " ");
18149
18266
  } }
18150
18267
  const _c0$D = function (a0) { return { "form-group-error": a0 }; };
18151
- const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
18268
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18152
18269
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
18153
18270
  ngOnInit() {
18154
18271
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -18174,7 +18291,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
18174
18291
  i0.ɵɵadvance(1);
18175
18292
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
18176
18293
  i0.ɵɵadvance(1);
18177
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18294
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
18178
18295
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18179
18296
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
18180
18297
  type: Component,
@@ -19556,10 +19673,10 @@ QueryListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryLis
19556
19673
  i0.ɵɵtemplate(0, QueryListComponent_ng_container_0_Template, 10, 3, "ng-container", 0);
19557
19674
  } if (rf & 2) {
19558
19675
  i0.ɵɵproperty("ngIf", ctx.queryListData);
19559
- } }, 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}"] });
19676
+ } }, 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}"] });
19560
19677
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryListComponent, [{
19561
19678
  type: Component,
19562
- 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"] }]
19679
+ 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"] }]
19563
19680
  }], null, { caseQueriesCollection: [{
19564
19681
  type: Input
19565
19682
  }], selectedQuery: [{
@@ -20190,7 +20307,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20190
20307
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label), " ");
20191
20308
  } }
20192
20309
  const _c0$A = function (a0) { return { "form-group-error": a0 }; };
20193
- const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
20310
+ const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
20194
20311
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
20195
20312
  constructor(browserService) {
20196
20313
  super();
@@ -20228,7 +20345,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
20228
20345
  i0.ɵɵadvance(1);
20229
20346
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
20230
20347
  i0.ɵɵadvance(1);
20231
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20348
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
20232
20349
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20233
20350
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
20234
20351
  type: Component,
@@ -20286,7 +20403,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
20286
20403
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label), " ");
20287
20404
  } }
20288
20405
  const _c0$z = function (a0) { return { "form-group-error": a0 }; };
20289
- const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
20406
+ const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
20290
20407
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
20291
20408
  ngOnInit() {
20292
20409
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -20316,7 +20433,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
20316
20433
  i0.ɵɵadvance(1);
20317
20434
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
20318
20435
  i0.ɵɵadvance(1);
20319
- 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);
20436
+ 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);
20320
20437
  } }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20321
20438
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
20322
20439
  type: Component,
@@ -20489,7 +20606,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
20489
20606
  i0.ɵɵadvance(1);
20490
20607
  i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
20491
20608
  } }
20492
- const _c1$a = function (a0) { return { "form-group-error": a0 }; };
20609
+ const _c1$b = function (a0) { return { "form-group-error": a0 }; };
20493
20610
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
20494
20611
  constructor(yesNoService) {
20495
20612
  super();
@@ -20511,7 +20628,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
20511
20628
  i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
20512
20629
  i0.ɵɵelementEnd()()();
20513
20630
  } if (rf & 2) {
20514
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20631
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
20515
20632
  i0.ɵɵadvance(3);
20516
20633
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
20517
20634
  i0.ɵɵadvance(1);
@@ -20868,7 +20985,7 @@ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
20868
20985
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20869
20986
  i0.ɵɵelementContainer(0);
20870
20987
  } }
20871
- const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
20988
+ const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
20872
20989
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
20873
20990
  i0.ɵɵelementContainerStart(0);
20874
20991
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -20879,7 +20996,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
20879
20996
  i0.ɵɵnextContext();
20880
20997
  const _r1 = i0.ɵɵreference(13);
20881
20998
  i0.ɵɵadvance(1);
20882
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
20999
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
20883
21000
  } }
20884
21001
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
20885
21002
  const _r12 = i0.ɵɵgetCurrentView();
@@ -21048,7 +21165,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
21048
21165
  i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
21049
21166
  } }
21050
21167
  const _c0$t = [[["", "trigger", ""]]];
21051
- const _c1$8 = ["[trigger]"];
21168
+ const _c1$9 = ["[trigger]"];
21052
21169
  class CaseFileViewOverlayMenuComponent {
21053
21170
  constructor() {
21054
21171
  this.title = '';
@@ -21062,7 +21179,7 @@ class CaseFileViewOverlayMenuComponent {
21062
21179
  }
21063
21180
  }
21064
21181
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
21065
- CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
21182
+ CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
21066
21183
  i0.ɵɵprojectionDef(_c0$t);
21067
21184
  i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
21068
21185
  i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -23131,7 +23248,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
23131
23248
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "This flag should only be visible to HMCTS Staff"), " ");
23132
23249
  } }
23133
23250
  const _c0$o = function (a0) { return { "form-group-error": a0 }; };
23134
- const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
23251
+ const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
23135
23252
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (rf & 1) {
23136
23253
  i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
23137
23254
  i0.ɵɵtext(3);
@@ -23151,7 +23268,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (r
23151
23268
  i0.ɵɵadvance(3);
23152
23269
  i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
23153
23270
  i0.ɵɵadvance(1);
23154
- 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);
23271
+ 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);
23155
23272
  i0.ɵɵadvance(1);
23156
23273
  i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
23157
23274
  } }
@@ -23651,7 +23768,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) { if (rf & 1) {
23651
23768
  i0.ɵɵadvance(3);
23652
23769
  i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
23653
23770
  } }
23654
- const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
23771
+ const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
23655
23772
  class UpdateFlagComponent {
23656
23773
  constructor(rpxTranslationService) {
23657
23774
  this.rpxTranslationService = rpxTranslationService;
@@ -23853,7 +23970,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
23853
23970
  const _r3 = i0.ɵɵreference(17);
23854
23971
  i0.ɵɵproperty("formGroup", ctx.formGroup);
23855
23972
  i0.ɵɵadvance(2);
23856
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
23973
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
23857
23974
  i0.ɵɵadvance(3);
23858
23975
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
23859
23976
  i0.ɵɵadvance(2);
@@ -25123,7 +25240,7 @@ const CUSTOM_MOMENT_FORMATS = {
25123
25240
  };
25124
25241
 
25125
25242
  const _c0$h = ["picker"];
25126
- const _c1$5 = ["input"];
25243
+ const _c1$6 = ["input"];
25127
25244
  function DatetimePickerComponent_span_3_Template(rf, ctx) { if (rf & 1) {
25128
25245
  i0.ɵɵelementStart(0, "span", 11);
25129
25246
  i0.ɵɵtext(1);
@@ -25172,7 +25289,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) { if (rf & 1) {
25172
25289
  i0.ɵɵadvance(1);
25173
25290
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
25174
25291
  } }
25175
- const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
25292
+ const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
25176
25293
  class DatetimePickerComponent extends AbstractFormFieldComponent {
25177
25294
  constructor(formatTranslationService, ngxMatDateFormats) {
25178
25295
  super();
@@ -25337,7 +25454,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
25337
25454
  DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { return new (t || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(NGX_MAT_DATE_FORMATS)); };
25338
25455
  DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) { if (rf & 1) {
25339
25456
  i0.ɵɵviewQuery(_c0$h, 5);
25340
- i0.ɵɵviewQuery(_c1$5, 5);
25457
+ i0.ɵɵviewQuery(_c1$6, 5);
25341
25458
  } if (rf & 2) {
25342
25459
  let _t;
25343
25460
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datetimePicker = _t.first);
@@ -25369,7 +25486,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
25369
25486
  i0.ɵɵelementEnd()()()()()();
25370
25487
  } if (rf & 2) {
25371
25488
  const _r6 = i0.ɵɵreference(13);
25372
- i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25489
+ i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
25373
25490
  i0.ɵɵadvance(3);
25374
25491
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
25375
25492
  i0.ɵɵadvance(1);
@@ -25593,7 +25710,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
25593
25710
  i0.ɵɵadvance(3);
25594
25711
  i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
25595
25712
  } }
25596
- const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25713
+ const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
25597
25714
  function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25598
25715
  const _r18 = i0.ɵɵgetCurrentView();
25599
25716
  i0.ɵɵelementStart(0, "tr", 4);
@@ -25624,7 +25741,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
25624
25741
  } if (rf & 2) {
25625
25742
  const event_r1 = ctx.$implicit;
25626
25743
  const ctx_r0 = i0.ɵɵnextContext();
25627
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
25744
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
25628
25745
  i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
25629
25746
  i0.ɵɵadvance(2);
25630
25747
  i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
@@ -27539,6 +27656,30 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) { if (r
27539
27656
  i0.ɵɵadvance(3);
27540
27657
  i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
27541
27658
  } }
27659
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) { if (rf & 1) {
27660
+ i0.ɵɵelementStart(0, "span", 48);
27661
+ i0.ɵɵtext(1);
27662
+ i0.ɵɵpipe(2, "rpxTranslate");
27663
+ i0.ɵɵpipe(3, "ccdFirstError");
27664
+ i0.ɵɵelementEnd();
27665
+ } if (rf & 2) {
27666
+ const ctx_r36 = i0.ɵɵnextContext(3);
27667
+ i0.ɵɵadvance(1);
27668
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
27669
+ } }
27670
+ function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) { if (rf & 1) {
27671
+ i0.ɵɵelementStart(0, "span", 48);
27672
+ i0.ɵɵtext(1);
27673
+ i0.ɵɵpipe(2, "rpxTranslate");
27674
+ i0.ɵɵpipe(3, "ccdFirstError");
27675
+ i0.ɵɵelementEnd();
27676
+ } if (rf & 2) {
27677
+ const ctx_r37 = i0.ɵɵnextContext(3);
27678
+ i0.ɵɵadvance(1);
27679
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
27680
+ } }
27681
+ const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
27682
+ const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
27542
27683
  function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (rf & 1) {
27543
27684
  i0.ɵɵelementContainerStart(0);
27544
27685
  i0.ɵɵelementStart(1, "fieldset", 39);
@@ -27548,19 +27689,35 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (r
27548
27689
  i0.ɵɵelementStart(6, "span", 43);
27549
27690
  i0.ɵɵtext(7, "A few words describing the purpose of the event.");
27550
27691
  i0.ɵɵelementEnd()();
27551
- i0.ɵɵelement(8, "input", 44);
27692
+ i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
27693
+ i0.ɵɵelement(9, "input", 45);
27552
27694
  i0.ɵɵelementEnd();
27553
- i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
27554
- i0.ɵɵtext(11, "Event description (optional)");
27695
+ i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
27696
+ i0.ɵɵtext(12, "Event description (optional)");
27555
27697
  i0.ɵɵelementEnd();
27556
- i0.ɵɵelement(12, "textarea", 46);
27698
+ i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
27699
+ i0.ɵɵelement(14, "textarea", 47);
27557
27700
  i0.ɵɵelementEnd()();
27558
27701
  i0.ɵɵelementContainerEnd();
27702
+ } if (rf & 2) {
27703
+ const ctx_r9 = i0.ɵɵnextContext(2);
27704
+ i0.ɵɵadvance(3);
27705
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
27706
+ i0.ɵɵadvance(5);
27707
+ i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
27708
+ i0.ɵɵadvance(1);
27709
+ 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)));
27710
+ i0.ɵɵadvance(1);
27711
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
27712
+ i0.ɵɵadvance(3);
27713
+ i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
27714
+ i0.ɵɵadvance(1);
27715
+ 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)));
27559
27716
  } }
27560
27717
  function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1) {
27561
- const _r37 = i0.ɵɵgetCurrentView();
27562
- i0.ɵɵelementStart(0, "button", 47);
27563
- 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()); });
27718
+ const _r39 = i0.ɵɵgetCurrentView();
27719
+ i0.ɵɵelementStart(0, "button", 49);
27720
+ 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()); });
27564
27721
  i0.ɵɵtext(1);
27565
27722
  i0.ɵɵpipe(2, "rpxTranslate");
27566
27723
  i0.ɵɵelementEnd();
@@ -27571,7 +27728,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1)
27571
27728
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "Previous"), " ");
27572
27729
  } }
27573
27730
  function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27574
- const _r39 = i0.ɵɵgetCurrentView();
27731
+ const _r41 = i0.ɵɵgetCurrentView();
27575
27732
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
27576
27733
  i0.ɵɵtext(2);
27577
27734
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -27581,13 +27738,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27581
27738
  i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
27582
27739
  i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
27583
27740
  i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
27584
- 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)); });
27741
+ 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)); });
27585
27742
  i0.ɵɵelementEnd();
27586
27743
  i0.ɵɵelementStart(11, "form", 8);
27587
- 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()); });
27744
+ 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()); });
27588
27745
  i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
27589
27746
  i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
27590
- i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
27747
+ i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
27591
27748
  i0.ɵɵelementStart(15, "div", 9);
27592
27749
  i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
27593
27750
  i0.ɵɵelementStart(17, "button", 11);
@@ -27595,7 +27752,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27595
27752
  i0.ɵɵpipe(19, "rpxTranslate");
27596
27753
  i0.ɵɵelementEnd()();
27597
27754
  i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
27598
- 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()); });
27755
+ 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()); });
27599
27756
  i0.ɵɵtext(22);
27600
27757
  i0.ɵɵpipe(23, "rpxTranslate");
27601
27758
  i0.ɵɵelementEnd()()()();
@@ -27631,9 +27788,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27631
27788
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 20, ctx_r0.getCancelText()));
27632
27789
  } }
27633
27790
  function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) { if (rf & 1) {
27634
- const _r43 = i0.ɵɵgetCurrentView();
27635
- i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
27636
- 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)); });
27791
+ const _r45 = i0.ɵɵgetCurrentView();
27792
+ i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
27793
+ 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)); });
27637
27794
  i0.ɵɵelementEnd();
27638
27795
  } if (rf & 2) {
27639
27796
  const ctx_r1 = i0.ɵɵnextContext();
@@ -27641,14 +27798,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
27641
27798
  } }
27642
27799
  // @dynamic
27643
27800
  class CaseEditSubmitComponent {
27644
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
27801
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
27645
27802
  this.caseEdit = caseEdit;
27646
27803
  this.fieldsUtils = fieldsUtils;
27647
27804
  this.caseFieldService = caseFieldService;
27648
27805
  this.route = route;
27649
27806
  this.orderService = orderService;
27650
27807
  this.profileNotifier = profileNotifier;
27808
+ this.formValidatorsService = formValidatorsService;
27651
27809
  this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
27810
+ this.eventSummaryLabel = 'Event summary';
27811
+ this.eventDescriptionLabel = 'Event description';
27652
27812
  }
27653
27813
  get isDisabled() {
27654
27814
  // EUI-3452.
@@ -27658,7 +27818,7 @@ class CaseEditSubmitComponent {
27658
27818
  return this.caseEdit.isSubmitting || this.hasErrors;
27659
27819
  }
27660
27820
  ngOnInit() {
27661
- this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
27821
+ this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
27662
27822
  this.eventTrigger = this.caseEdit.eventTrigger;
27663
27823
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
27664
27824
  this.editForm = this.caseEdit.form;
@@ -27672,10 +27832,12 @@ class CaseEditSubmitComponent {
27672
27832
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
27673
27833
  // a FlagLauncher field in the event trigger
27674
27834
  this.caseEdit.isCaseFlagSubmission =
27675
- this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27835
+ this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
27676
27836
  this.caseEdit.isLinkedCasesSubmission =
27677
27837
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
27678
27838
  this.pageTitle = this.getPageTitle();
27839
+ this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
27840
+ this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
27679
27841
  }
27680
27842
  ngOnDestroy() {
27681
27843
  /* istanbul ignore else */
@@ -27684,12 +27846,14 @@ class CaseEditSubmitComponent {
27684
27846
  }
27685
27847
  }
27686
27848
  submit() {
27687
- this.caseEdit.submitForm({
27688
- eventTrigger: this.eventTrigger,
27689
- form: this.editForm,
27690
- submit: this.caseEdit.submit,
27691
- caseDetails: this.caseEdit.caseDetails,
27692
- });
27849
+ if (this.summary.valid && this.description.valid) {
27850
+ this.caseEdit.submitForm({
27851
+ eventTrigger: this.eventTrigger,
27852
+ form: this.editForm,
27853
+ submit: this.caseEdit.submit,
27854
+ caseDetails: this.caseEdit.caseDetails
27855
+ });
27856
+ }
27693
27857
  }
27694
27858
  onEventCanBeCompleted(eventCanBeCompleted) {
27695
27859
  this.caseEdit.onEventCanBeCompleted({
@@ -27697,7 +27861,7 @@ class CaseEditSubmitComponent {
27697
27861
  eventCanBeCompleted,
27698
27862
  caseDetails: this.caseEdit.caseDetails,
27699
27863
  form: this.editForm,
27700
- submit: this.caseEdit.submit,
27864
+ submit: this.caseEdit.submit
27701
27865
  });
27702
27866
  }
27703
27867
  getPageTitle() {
@@ -27772,7 +27936,7 @@ class CaseEditSubmitComponent {
27772
27936
  }
27773
27937
  }
27774
27938
  readOnlySummaryFieldsToDisplayExists() {
27775
- return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
27939
+ return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
27776
27940
  }
27777
27941
  showEventNotes() {
27778
27942
  // Display event notes related controls only if the following conditions are met
@@ -27787,7 +27951,7 @@ class CaseEditSubmitComponent {
27787
27951
  }
27788
27952
  getLastPageShown() {
27789
27953
  let lastPage;
27790
- this.wizard.reverse().forEach(page => {
27954
+ this.wizard.reverse().forEach((page) => {
27791
27955
  if (!lastPage && this.isShown(page)) {
27792
27956
  lastPage = page;
27793
27957
  }
@@ -27806,7 +27970,7 @@ class CaseEditSubmitComponent {
27806
27970
  }
27807
27971
  isShown(page) {
27808
27972
  const fields = this.fieldsUtils
27809
- .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
27973
+ .mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
27810
27974
  return page.parsedShowCondition.match(fields);
27811
27975
  }
27812
27976
  canShowFieldInCYA(field) {
@@ -27815,7 +27979,7 @@ class CaseEditSubmitComponent {
27815
27979
  sortFieldsByShowSummaryContent(fields) {
27816
27980
  return this.orderService
27817
27981
  .sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
27818
- .filter(cf => cf.show_summary_content_option);
27982
+ .filter((cf) => cf.show_summary_content_option);
27819
27983
  }
27820
27984
  getCaseFields() {
27821
27985
  if (this.caseEdit.caseDetails) {
@@ -27834,9 +27998,7 @@ class CaseEditSubmitComponent {
27834
27998
  if (this.eventTrigger.can_save_draft) {
27835
27999
  return 'Return to case list';
27836
28000
  }
27837
- else {
27838
- return 'Cancel';
27839
- }
28001
+ return 'Cancel';
27840
28002
  }
27841
28003
  }
27842
28004
  CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
@@ -27850,8 +28012,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
27850
28012
  }
27851
28013
  return a.show_summary_content_option - b.show_summary_content_option;
27852
28014
  };
27853
- 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)); };
27854
- CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
28015
+ 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)); };
28016
+ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
27855
28017
  i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
27856
28018
  i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
27857
28019
  } if (rf & 2) {
@@ -27861,8 +28023,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
27861
28023
  } }, styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
27862
28024
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
27863
28025
  type: Component,
27864
- 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"] }]
27865
- }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null); })();
28026
+ 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"] }]
28027
+ }], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null); })();
27866
28028
 
27867
28029
  function CaseProgressComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27868
28030
  const _r2 = i0.ɵɵgetCurrentView();
@@ -28218,7 +28380,7 @@ i0.ɵɵsetComponentScope(CaseEditConfirmComponent, function () { return [i4.NgIf
28218
28380
  i0.ɵɵsetComponentScope(CaseEditPageComponent, function () { return [i4.NgForOf, i4.NgIf, i3.ɵNgNoValidate, i3.NgControlStatusGroup, i3.FormGroupDirective, CallbackErrorsComponent, MarkdownComponent, CaseEventCompletionComponent, CaseEditFormComponent,
28219
28381
  CaseEditGenericErrorsComponent]; }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
28220
28382
  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]; });
28221
- 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]; });
28383
+ 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]; });
28222
28384
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28223
28385
  i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
28224
28386
 
@@ -32191,18 +32353,26 @@ class EventStartGuard {
32191
32353
  task = tasksAssignedToUser[0];
32192
32354
  }
32193
32355
  // if one task assigned to user, allow user to complete event
32194
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
32356
+ const storeClientContext = {
32357
+ client_context: {
32358
+ user_task: {
32359
+ task_data: task,
32360
+ complete_task: true
32361
+ }
32362
+ }
32363
+ };
32364
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
32195
32365
  return true;
32196
32366
  }
32197
32367
  }
32198
32368
  removeTaskFromSessionStorage() {
32199
- this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
32369
+ this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
32200
32370
  }
32201
32371
  checkForTasks(payload, caseId, eventId, taskId) {
32202
32372
  if (taskId && payload?.tasks?.length > 0) {
32203
32373
  const task = payload.tasks.find((t) => t.id == taskId);
32204
32374
  if (task) {
32205
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
32375
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
32206
32376
  }
32207
32377
  else {
32208
32378
  this.removeTaskFromSessionStorage();
@@ -32224,7 +32394,7 @@ class EventStartGuard {
32224
32394
  }
32225
32395
  }
32226
32396
  }
32227
- EventStartGuard.TASK_TO_COMPLETE = 'taskToComplete';
32397
+ EventStartGuard.CLIENT_CONTEXT = 'clientContext';
32228
32398
  EventStartGuard.ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
32229
32399
  EventStartGuard.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
32230
32400
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
@@ -32362,9 +32532,17 @@ class EventStartStateMachineService {
32362
32532
  task = context.tasks[0];
32363
32533
  }
32364
32534
  const taskStr = JSON.stringify(task);
32365
- console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
32535
+ console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
32366
32536
  // Store task to session
32367
- context.sessionStorageService.setItem('taskToComplete', taskStr);
32537
+ const clientContext = {
32538
+ client_context: {
32539
+ user_task: {
32540
+ task_data: task,
32541
+ complete_task: true
32542
+ }
32543
+ }
32544
+ };
32545
+ context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
32368
32546
  // Allow user to perform the event
32369
32547
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
32370
32548
  }
@@ -35326,10 +35504,10 @@ SearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Searc
35326
35504
  i0.ɵɵproperty("ngIf", ctx.hasResults());
35327
35505
  i0.ɵɵadvance(1);
35328
35506
  i0.ɵɵproperty("ngIf", !(ctx.hasResults() || ctx.hasDrafts()));
35329
- } }, 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}"] });
35507
+ } }, 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}"] });
35330
35508
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
35331
35509
  type: Component,
35332
- 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"] }]
35510
+ 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"] }]
35333
35511
  }], function () { return [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }]; }, { caseLinkUrlTemplate: [{
35334
35512
  type: Input
35335
35513
  }], jurisdiction: [{