@hmcts/ccd-case-ui-toolkit 6.14.0 → 6.14.4-eui-4157

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 (60) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +584 -387
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +4 -7
  7. package/esm2015/lib/shared/components/palette/base-field/field-read.component.js +2 -2
  8. package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +2 -2
  9. package/esm2015/lib/shared/components/palette/base-field/payment-field.component.js +1 -4
  10. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +12 -5
  11. package/esm2015/lib/shared/components/palette/case-file-view/index.js +1 -2
  12. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +13 -2
  13. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/index.js +3 -0
  14. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +47 -0
  15. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +153 -0
  16. package/esm2015/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.js +5 -6
  17. package/esm2015/lib/shared/components/palette/index.js +2 -1
  18. package/esm2015/lib/shared/components/palette/palette.module.js +30 -7
  19. package/esm2015/lib/shared/components/palette/palette.service.js +5 -3
  20. package/esm2015/lib/shared/components/palette/payment/case-payment-history-viewer-field.component.js +3 -3
  21. package/esm2015/lib/shared/components/palette/waystopay/waystopay-field.component.js +4 -4
  22. package/esm2015/lib/shared/domain/definition/case-field.model.js +6 -3
  23. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  24. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +16 -1
  25. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +556 -381
  26. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  27. package/lib/app.config.d.ts +0 -2
  28. package/lib/app.config.d.ts.map +1 -1
  29. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  30. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  31. package/lib/shared/components/palette/base-field/payment-field.component.d.ts +0 -1
  32. package/lib/shared/components/palette/base-field/payment-field.component.d.ts.map +1 -1
  33. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +5 -2
  34. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
  35. package/lib/shared/components/palette/case-file-view/index.d.ts +0 -1
  36. package/lib/shared/components/palette/case-file-view/index.d.ts.map +1 -1
  37. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +1 -0
  38. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  39. package/lib/shared/components/palette/dynamic-multi-select-list/index.d.ts +3 -0
  40. package/lib/shared/components/palette/dynamic-multi-select-list/index.d.ts.map +1 -0
  41. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts +9 -0
  42. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -0
  43. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts +17 -0
  44. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -0
  45. package/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.d.ts +1 -1
  46. package/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.d.ts.map +1 -1
  47. package/lib/shared/components/palette/index.d.ts +1 -0
  48. package/lib/shared/components/palette/index.d.ts.map +1 -1
  49. package/lib/shared/components/palette/palette.module.d.ts +60 -59
  50. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  51. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  52. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  53. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  54. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  55. package/lib/shared/services/form/field-type-sanitiser.d.ts +2 -0
  56. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  57. package/package.json +2 -2
  58. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +0 -72
  59. package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts +0 -8
  60. package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts.map +0 -1
@@ -118,7 +118,7 @@
118
118
  i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
119
119
  }
120
120
  }
121
- var _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
121
+ var _c0$$ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
122
122
  var _c1$s = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
123
123
  var FooterComponent = /** @class */ (function () {
124
124
  function FooterComponent() {
@@ -128,7 +128,7 @@
128
128
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
129
129
  FooterComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$s, 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) {
130
130
  if (rf & 1) {
131
- i0__namespace.ɵɵprojectionDef(_c0$_);
131
+ i0__namespace.ɵɵprojectionDef(_c0$$);
132
132
  i0__namespace.ɵɵelementStart(0, "footer", 0);
133
133
  i0__namespace.ɵɵelementStart(1, "div", 1);
134
134
  i0__namespace.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
@@ -207,7 +207,7 @@
207
207
  i0__namespace.ɵɵtextInterpolate(ctx_r2.title);
208
208
  }
209
209
  }
210
- var _c0$Z = [[["", "headerNavigation", ""]]];
210
+ var _c0$_ = [[["", "headerNavigation", ""]]];
211
211
  var _c1$r = ["[headerNavigation]"];
212
212
  var HeaderBarComponent = /** @class */ (function () {
213
213
  function HeaderBarComponent() {
@@ -221,7 +221,7 @@
221
221
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
222
222
  HeaderBarComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$r, decls: 15, vars: 8, 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) {
223
223
  if (rf & 1) {
224
- i0__namespace.ɵɵprojectionDef(_c0$Z);
224
+ i0__namespace.ɵɵprojectionDef(_c0$_);
225
225
  i0__namespace.ɵɵelementStart(0, "header", 0);
226
226
  i0__namespace.ɵɵelementStart(1, "div", 1);
227
227
  i0__namespace.ɵɵelementStart(2, "div", 2);
@@ -282,7 +282,7 @@
282
282
  }] });
283
283
  })();
284
284
 
285
- var _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
285
+ var _c0$Z = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
286
286
  var _c1$q = ["[leftNavLinks]", "[rightNavLinks]"];
287
287
  var NavigationComponent = /** @class */ (function () {
288
288
  function NavigationComponent() {
@@ -292,7 +292,7 @@
292
292
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
293
293
  NavigationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$q, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
294
294
  if (rf & 1) {
295
- i0__namespace.ɵɵprojectionDef(_c0$Y);
295
+ i0__namespace.ɵɵprojectionDef(_c0$Z);
296
296
  i0__namespace.ɵɵelementStart(0, "div");
297
297
  i0__namespace.ɵɵelementStart(1, "nav", 0);
298
298
  i0__namespace.ɵɵprojection(2);
@@ -437,7 +437,7 @@
437
437
  }], null, null);
438
438
  })();
439
439
 
440
- var _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
440
+ var _c0$Y = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
441
441
  var _c1$p = ["[topBody]", "[leftBody]", "[rightBody]"];
442
442
  var BodyComponent = /** @class */ (function () {
443
443
  function BodyComponent() {
@@ -447,7 +447,7 @@
447
447
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
448
448
  BodyComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$p, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
449
449
  if (rf & 1) {
450
- i0__namespace.ɵɵprojectionDef(_c0$X);
450
+ i0__namespace.ɵɵprojectionDef(_c0$Y);
451
451
  i0__namespace.ɵɵelementStart(0, "div", 0);
452
452
  i0__namespace.ɵɵprojection(1);
453
453
  i0__namespace.ɵɵprojection(2, 1);
@@ -852,7 +852,7 @@
852
852
  return typeof state === "function" ? receiver === state : state.has(receiver);
853
853
  }
854
854
 
855
- var _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
855
+ var _c0$X = function (a0) { return { "govuk-input--error": a0 }; };
856
856
  function DateInputComponent_div_16_Template(rf, ctx) {
857
857
  if (rf & 1) {
858
858
  var _r8_1 = i0__namespace.ɵɵgetCurrentView();
@@ -870,7 +870,7 @@
870
870
  i0__namespace.ɵɵadvance(1);
871
871
  i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
872
872
  i0__namespace.ɵɵadvance(2);
873
- i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r3.isInvalid));
873
+ i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r3.isInvalid));
874
874
  }
875
875
  }
876
876
  function DateInputComponent_div_17_Template(rf, ctx) {
@@ -890,7 +890,7 @@
890
890
  i0__namespace.ɵɵadvance(1);
891
891
  i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
892
892
  i0__namespace.ɵɵadvance(2);
893
- i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r4.isInvalid));
893
+ i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r4.isInvalid));
894
894
  }
895
895
  }
896
896
  function DateInputComponent_div_18_Template(rf, ctx) {
@@ -910,7 +910,7 @@
910
910
  i0__namespace.ɵɵadvance(1);
911
911
  i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
912
912
  i0__namespace.ɵɵadvance(2);
913
- i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r5.isInvalid));
913
+ i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r5.isInvalid));
914
914
  }
915
915
  }
916
916
  var DateInputComponent = /** @class */ (function () {
@@ -1144,15 +1144,15 @@
1144
1144
  i0__namespace.ɵɵadvance(2);
1145
1145
  i0__namespace.ɵɵproperty("for", ctx.dayId());
1146
1146
  i0__namespace.ɵɵadvance(2);
1147
- i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
1147
+ i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$X, ctx.isInvalid));
1148
1148
  i0__namespace.ɵɵadvance(3);
1149
1149
  i0__namespace.ɵɵproperty("for", ctx.monthId());
1150
1150
  i0__namespace.ɵɵadvance(2);
1151
- i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
1151
+ i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$X, ctx.isInvalid));
1152
1152
  i0__namespace.ɵɵadvance(3);
1153
1153
  i0__namespace.ɵɵproperty("for", ctx.yearId());
1154
1154
  i0__namespace.ɵɵadvance(2);
1155
- i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
1155
+ i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$X, ctx.isInvalid));
1156
1156
  i0__namespace.ɵɵadvance(2);
1157
1157
  i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
1158
1158
  i0__namespace.ɵɵadvance(1);
@@ -1233,7 +1233,7 @@
1233
1233
  i0__namespace.ɵɵelementContainerEnd();
1234
1234
  }
1235
1235
  }
1236
- var _c0$V = ["*"];
1236
+ var _c0$W = ["*"];
1237
1237
  exports.AlertMessageType = void 0;
1238
1238
  (function (AlertMessageType) {
1239
1239
  AlertMessageType["WARNING"] = "warning";
@@ -1254,7 +1254,7 @@
1254
1254
  AlertComponent.TYPE_ERROR = 'error';
1255
1255
  AlertComponent.TYPE_INFORMATION = 'information';
1256
1256
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
1257
- AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1257
+ AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$W, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1258
1258
  if (rf & 1) {
1259
1259
  i0__namespace.ɵɵprojectionDef();
1260
1260
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -1529,7 +1529,7 @@
1529
1529
  }] });
1530
1530
  })();
1531
1531
 
1532
- var _c0$U = function (a0) { return { "js-hidden": a0 }; };
1532
+ var _c0$V = function (a0) { return { "js-hidden": a0 }; };
1533
1533
  var _c1$o = ["*"];
1534
1534
  var TabComponent = /** @class */ (function () {
1535
1535
  function TabComponent() {
@@ -1545,7 +1545,7 @@
1545
1545
  i0__namespace.ɵɵelementEnd();
1546
1546
  }
1547
1547
  if (rf & 2) {
1548
- i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1548
+ i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$V, !ctx.selected));
1549
1549
  i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
1550
1550
  }
1551
1551
  }, directives: [i1__namespace.NgClass], styles: [".tabs-toggle[_ngcontent-%COMP%]{display:block;padding:10px 15px 3px;margin-bottom:8px}.tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{color:#0b0c0c;text-decoration:none;border-bottom:none}.tabs-toggle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005ea5}@media (max-width:640px){.tabs-list[_ngcontent-%COMP%]{border-bottom:1px solid #bfc1c3;margin-left:-15px;margin-right:-15px}.tabs-toggle[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3}.tabs-toggle[_ngcontent-%COMP%]:focus{color:#0b0c0c;outline:none}}@media (min-width:641px){.tabs-panel[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3;clear:both;overflow:hidden}.tabs-list[_ngcontent-%COMP%]{float:left}.tabs-list-item[_ngcontent-%COMP%]{float:left;position:relative;bottom:-1px;padding-top:10px}.tabs-toggle[_ngcontent-%COMP%]{background-color:#dee0e2;border:1px solid transparent;float:left;margin:0 6px 0 0;text-decoration:none}.tabs-toggle[_ngcontent-%COMP%]:visited{color:#005ea5}.tabs-toggle-selected[_ngcontent-%COMP%], .tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{background-color:#fff;border-bottom:0;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
@@ -1568,7 +1568,7 @@
1568
1568
  }] });
1569
1569
  })();
1570
1570
 
1571
- var _c0$T = ["tab"];
1571
+ var _c0$U = ["tab"];
1572
1572
  var _c1$n = function () { return ["."]; };
1573
1573
  var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1574
1574
  function TabsComponent_li_2_Template(rf, ctx) {
@@ -1622,7 +1622,7 @@
1622
1622
  }
1623
1623
  }, viewQuery: function TabsComponent_Query(rf, ctx) {
1624
1624
  if (rf & 1) {
1625
- i0__namespace.ɵɵviewQuery(_c0$T, 1);
1625
+ i0__namespace.ɵɵviewQuery(_c0$U, 1);
1626
1626
  }
1627
1627
  if (rf & 2) {
1628
1628
  var _t = void 0;
@@ -1701,7 +1701,7 @@
1701
1701
  }], null, null);
1702
1702
  })();
1703
1703
 
1704
- var _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1704
+ var _c0$T = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1705
1705
  var ActivityBannerComponent = /** @class */ (function () {
1706
1706
  function ActivityBannerComponent() {
1707
1707
  }
@@ -1722,7 +1722,7 @@
1722
1722
  i0__namespace.ɵɵelementEnd();
1723
1723
  }
1724
1724
  if (rf & 2) {
1725
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1725
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$T, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1726
1726
  i0__namespace.ɵɵadvance(2);
1727
1727
  i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
1728
1728
  i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
@@ -3360,9 +3360,12 @@
3360
3360
  }
3361
3361
  Object.defineProperty(CaseField.prototype, "value", {
3362
3362
  get: function () {
3363
- if (this.isDynamic()) {
3363
+ if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
3364
3364
  return this._value && this._value.value ? this._value.value.code : this._value;
3365
3365
  }
3366
+ else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
3367
+ return this._value && this._value.value ? this._value.value : this._value;
3368
+ }
3366
3369
  else {
3367
3370
  return this._value;
3368
3371
  }
@@ -3452,7 +3455,7 @@
3452
3455
  };
3453
3456
  CaseField.prototype.isDynamic = function () {
3454
3457
  var _this = this;
3455
- var dynamicFieldTypes = ['DynamicList', 'DynamicRadioList'];
3458
+ var dynamicFieldTypes = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
3456
3459
  if (!this.field_type) {
3457
3460
  return false;
3458
3461
  }
@@ -5653,6 +5656,9 @@
5653
5656
  }
5654
5657
  caseFields.forEach(function (caseField) {
5655
5658
  switch (caseField.field_type.type) {
5659
+ case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
5660
+ _this.convertArrayToDynamicListOutput(caseField, data);
5661
+ break;
5656
5662
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_RADIO_LIST:
5657
5663
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_LIST:
5658
5664
  _this.convertStringToDynamicListOutput(caseField, data);
@@ -5670,6 +5676,17 @@
5670
5676
  }
5671
5677
  });
5672
5678
  };
5679
+ FieldTypeSanitiser.prototype.convertArrayToDynamicListOutput = function (field, data) {
5680
+ var values = data[field.id];
5681
+ if (Array.isArray(values)) {
5682
+ var listItems = this.getListItems(field);
5683
+ var matches = listItems.filter(function (item) { return values.map(function (v) { return v.code; }).indexOf(item.code) !== -1; });
5684
+ data[field.id] = {
5685
+ value: matches,
5686
+ list_items: listItems
5687
+ };
5688
+ }
5689
+ };
5673
5690
  FieldTypeSanitiser.prototype.convertStringToDynamicListOutput = function (field, data) {
5674
5691
  var stringValue = data[field.id];
5675
5692
  if (typeof stringValue === 'string') {
@@ -5700,6 +5717,7 @@
5700
5717
  FieldTypeSanitiser.FIELD_TYPE_COLLECTION = 'Collection';
5701
5718
  FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_LIST = 'DynamicList';
5702
5719
  FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_RADIO_LIST = 'DynamicRadioList';
5720
+ FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST = 'DynamicMultiSelectList';
5703
5721
  FieldTypeSanitiser.ɵfac = function FieldTypeSanitiser_Factory(t) { return new (t || FieldTypeSanitiser)(); };
5704
5722
  FieldTypeSanitiser.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: FieldTypeSanitiser, factory: FieldTypeSanitiser.ɵfac });
5705
5723
  (function () {
@@ -8403,223 +8421,13 @@
8403
8421
  }], null, null);
8404
8422
  })();
8405
8423
 
8406
- var MULTIPLE_TASKS_FOUND = 'More than one task found!';
8407
- var WorkAllocationService = /** @class */ (function () {
8408
- function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
8409
- this.http = http;
8410
- this.appConfig = appConfig;
8411
- this.errorService = errorService;
8412
- this.alertService = alertService;
8413
- this.sessionStorageService = sessionStorageService;
8414
- // Check to see if work allocation is enabled
8415
- }
8416
- /**
8417
- * Call the API to get tasks matching the search criteria.
8418
- * @param searchRequest The search parameters that specify which tasks to match.
8419
- */
8420
- WorkAllocationService.prototype.searchTasks = function (searchRequest) {
8421
- var _this = this;
8422
- // Do not need to check if WA enabled as parent method will do that
8423
- var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
8424
- return this.http
8425
- .post(url, { searchRequest: searchRequest }, null, false)
8426
- .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
8427
- _this.errorService.setError(error);
8428
- // explicitly eat away 401 error and 400 error
8429
- if (error && error.status && (error.status === 401 || error.status === 400)) {
8430
- // do nothing
8431
- console.log('error status 401 or 400', error);
8432
- }
8433
- else {
8434
- return rxjs.throwError(error);
8435
- }
8436
- }));
8437
- };
8438
- WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
8439
- this.features = this.appConfig.getWAServiceConfig();
8440
- var enabled = false;
8441
- if (!jurisdiction || !caseType) {
8442
- var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
8443
- jurisdiction = caseInfo.jurisdiction;
8444
- caseType = caseInfo.caseType;
8445
- }
8446
- if (!this.features || !this.features.configurations) {
8447
- return false;
8448
- }
8449
- this.features.configurations.forEach(function (serviceConfig) {
8450
- if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
8451
- enabled = true;
8452
- }
8453
- });
8454
- return enabled;
8455
- };
8456
- /**
8457
- * Call the API to assign a task.
8458
- * @param taskId specifies which task should be assigned.
8459
- * @param userId specifies the user the task should be assigned to.
8460
- */
8461
- WorkAllocationService.prototype.assignTask = function (taskId, userId) {
8462
- var _this = this;
8463
- if (!this.isWAEnabled()) {
8464
- return rxjs.of(null);
8465
- }
8466
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
8467
- return this.http
8468
- .post(url, { userId: userId })
8469
- .pipe(operators.catchError(function (error) {
8470
- _this.errorService.setError(error);
8471
- return rxjs.throwError(error);
8472
- }));
8473
- };
8474
- /**
8475
- * Call the API to complete a task.
8476
- * @param taskId specifies which task should be completed.
8477
- */
8478
- WorkAllocationService.prototype.completeTask = function (taskId) {
8479
- var _this = this;
8480
- if (!this.isWAEnabled()) {
8481
- return rxjs.of(null);
8482
- }
8483
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8484
- return this.http
8485
- .post(url, {})
8486
- .pipe(operators.catchError(function (error) {
8487
- _this.errorService.setError(error);
8488
- // this will subscribe to get the user details and decide whether to display an error message
8489
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8490
- _this.handleTaskCompletionError(response);
8491
- });
8492
- return rxjs.throwError(error);
8493
- }));
8494
- };
8495
- /**
8496
- * Call the API to assign and complete a task.
8497
- * @param taskId specifies which task should be completed.
8498
- */
8499
- WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
8500
- var _this = this;
8501
- if (!this.isWAEnabled()) {
8502
- return rxjs.of(null);
8503
- }
8504
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8505
- return this.http
8506
- .post(url, {
8507
- completion_options: {
8508
- assign_and_complete: true
8509
- }
8510
- })
8511
- .pipe(operators.catchError(function (error) {
8512
- _this.errorService.setError(error);
8513
- // this will subscribe to get the user details and decide whether to display an error message
8514
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8515
- _this.handleTaskCompletionError(response);
8516
- });
8517
- return rxjs.throwError(error);
8518
- }));
8519
- };
8520
- /**
8521
- * Handles the response from the observable to get the user details when task is completed.
8522
- * @param response is the response given from the observable which contains the user detaild.
8523
- */
8524
- WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
8525
- var userDetails = response;
8526
- if (this.userIsCaseworker(userDetails.userInfo.roles)) {
8527
- // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
8528
- this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
8529
- this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
8530
- }
8531
- };
8532
- /**
8533
- * Returns true if the user's role is equivalent to a caseworker.
8534
- * @param roles is the list of roles found from the current user.
8535
- */
8536
- WorkAllocationService.prototype.userIsCaseworker = function (roles) {
8537
- var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
8538
- // When/if lib & target permanently change to es2016, replace indexOf with includes
8539
- return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
8540
- || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
8541
- };
8542
- /**
8543
- * Look for open tasks for a case and event combination. There are 5 possible scenarios:
8544
- * 1. No tasks found => Success.
8545
- * 2. One task found => Mark as done => Success.
8546
- * 3. One task found => Mark as done throws error => Failure.
8547
- * 4. More than one task found => Failure.
8548
- * 5. Search call throws an error => Failure.
8549
- * @param ccdId The ID of the case to find tasks for.
8550
- * @param eventId The ID of the event to find tasks for.
8551
- */
8552
- WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
8553
- var _this = this;
8554
- if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
8555
- return rxjs.of(null);
8556
- }
8557
- var taskSearchParameter = {
8558
- ccdId: ccdId,
8559
- eventId: eventId,
8560
- jurisdiction: jurisdiction,
8561
- caseTypeId: caseTypeId
8562
- };
8563
- return this.searchTasks(taskSearchParameter)
8564
- .pipe(operators.map(function (response) {
8565
- var tasks = response.tasks;
8566
- if (tasks && tasks.length > 0) {
8567
- if (tasks.length === 1) {
8568
- _this.completeTask(tasks[0].id).subscribe();
8569
- }
8570
- else {
8571
- // This is a problem. Throw an appropriate error.
8572
- throw new Error(MULTIPLE_TASKS_FOUND);
8573
- }
8574
- }
8575
- return true; // All good. Nothing to see here.
8576
- }), operators.catchError(function (error) {
8577
- // Simply rethrow it.
8578
- return rxjs.throwError(error);
8579
- }));
8580
- };
8581
- /**
8582
- * Return tasks for case and event.
8583
- */
8584
- WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
8585
- var defaultPayload = {
8586
- task_required_for_event: false,
8587
- tasks: []
8588
- };
8589
- if (!this.isWAEnabled()) {
8590
- return rxjs.of(defaultPayload);
8591
- }
8592
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
8593
- };
8594
- /**
8595
- * Call the API to get a task
8596
- */
8597
- WorkAllocationService.prototype.getTask = function (taskId) {
8598
- if (!this.isWAEnabled()) {
8599
- return rxjs.of({ task: null });
8600
- }
8601
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
8602
- };
8603
- return WorkAllocationService;
8604
- }());
8605
- WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
8606
- WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
8607
- WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
8608
- WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
8609
- (function () {
8610
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
8611
- type: i0.Injectable
8612
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
8613
- })();
8614
-
8615
8424
  var CasesService = /** @class */ (function () {
8616
- function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
8425
+ function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
8617
8426
  this.http = http;
8618
8427
  this.appConfig = appConfig;
8619
8428
  this.orderService = orderService;
8620
8429
  this.errorService = errorService;
8621
8430
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
8622
- this.workAllocationService = workAllocationService;
8623
8431
  this.loadingService = loadingService;
8624
8432
  this.sessionStorageService = sessionStorageService;
8625
8433
  this.get = this.getCaseView;
@@ -8854,12 +8662,12 @@
8854
8662
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
8855
8663
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
8856
8664
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
8857
- CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(WorkAllocationService), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8665
+ CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8858
8666
  CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8859
8667
  (function () {
8860
8668
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
8861
8669
  type: i0.Injectable
8862
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8670
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8863
8671
  })();
8864
8672
 
8865
8673
  var EventTriggerService = /** @class */ (function () {
@@ -9513,6 +9321,215 @@
9513
9321
  }], function () { return [{ type: CaseFieldService }]; }, null);
9514
9322
  })();
9515
9323
 
9324
+ var MULTIPLE_TASKS_FOUND = 'More than one task found!';
9325
+ var WorkAllocationService = /** @class */ (function () {
9326
+ function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
9327
+ this.http = http;
9328
+ this.appConfig = appConfig;
9329
+ this.errorService = errorService;
9330
+ this.alertService = alertService;
9331
+ this.sessionStorageService = sessionStorageService;
9332
+ // Check to see if work allocation is enabled
9333
+ }
9334
+ /**
9335
+ * Call the API to get tasks matching the search criteria.
9336
+ * @param searchRequest The search parameters that specify which tasks to match.
9337
+ */
9338
+ WorkAllocationService.prototype.searchTasks = function (searchRequest) {
9339
+ var _this = this;
9340
+ // Do not need to check if WA enabled as parent method will do that
9341
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
9342
+ return this.http
9343
+ .post(url, { searchRequest: searchRequest }, null, false)
9344
+ .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
9345
+ _this.errorService.setError(error);
9346
+ // explicitly eat away 401 error and 400 error
9347
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
9348
+ // do nothing
9349
+ console.log('error status 401 or 400', error);
9350
+ }
9351
+ else {
9352
+ return rxjs.throwError(error);
9353
+ }
9354
+ }));
9355
+ };
9356
+ WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
9357
+ this.features = this.appConfig.getWAServiceConfig();
9358
+ var enabled = false;
9359
+ if (!jurisdiction || !caseType) {
9360
+ var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
9361
+ jurisdiction = caseInfo.jurisdiction;
9362
+ caseType = caseInfo.caseType;
9363
+ }
9364
+ if (!this.features || !this.features.configurations) {
9365
+ return false;
9366
+ }
9367
+ this.features.configurations.forEach(function (serviceConfig) {
9368
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
9369
+ enabled = true;
9370
+ }
9371
+ });
9372
+ return enabled;
9373
+ };
9374
+ /**
9375
+ * Call the API to assign a task.
9376
+ * @param taskId specifies which task should be assigned.
9377
+ * @param userId specifies the user the task should be assigned to.
9378
+ */
9379
+ WorkAllocationService.prototype.assignTask = function (taskId, userId) {
9380
+ var _this = this;
9381
+ if (!this.isWAEnabled()) {
9382
+ return rxjs.of(null);
9383
+ }
9384
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
9385
+ return this.http
9386
+ .post(url, { userId: userId })
9387
+ .pipe(operators.catchError(function (error) {
9388
+ _this.errorService.setError(error);
9389
+ return rxjs.throwError(error);
9390
+ }));
9391
+ };
9392
+ /**
9393
+ * Call the API to complete a task.
9394
+ * @param taskId specifies which task should be completed.
9395
+ */
9396
+ WorkAllocationService.prototype.completeTask = function (taskId) {
9397
+ var _this = this;
9398
+ if (!this.isWAEnabled()) {
9399
+ return rxjs.of(null);
9400
+ }
9401
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9402
+ return this.http
9403
+ .post(url, {})
9404
+ .pipe(operators.catchError(function (error) {
9405
+ _this.errorService.setError(error);
9406
+ // this will subscribe to get the user details and decide whether to display an error message
9407
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9408
+ _this.handleTaskCompletionError(response);
9409
+ });
9410
+ return rxjs.throwError(error);
9411
+ }));
9412
+ };
9413
+ /**
9414
+ * Call the API to assign and complete a task.
9415
+ * @param taskId specifies which task should be completed.
9416
+ */
9417
+ WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
9418
+ var _this = this;
9419
+ if (!this.isWAEnabled()) {
9420
+ return rxjs.of(null);
9421
+ }
9422
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9423
+ return this.http
9424
+ .post(url, {
9425
+ completion_options: {
9426
+ assign_and_complete: true
9427
+ }
9428
+ })
9429
+ .pipe(operators.catchError(function (error) {
9430
+ _this.errorService.setError(error);
9431
+ // this will subscribe to get the user details and decide whether to display an error message
9432
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9433
+ _this.handleTaskCompletionError(response);
9434
+ });
9435
+ return rxjs.throwError(error);
9436
+ }));
9437
+ };
9438
+ /**
9439
+ * Handles the response from the observable to get the user details when task is completed.
9440
+ * @param response is the response given from the observable which contains the user detaild.
9441
+ */
9442
+ WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
9443
+ var userDetails = response;
9444
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
9445
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
9446
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
9447
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
9448
+ }
9449
+ };
9450
+ /**
9451
+ * Returns true if the user's role is equivalent to a caseworker.
9452
+ * @param roles is the list of roles found from the current user.
9453
+ */
9454
+ WorkAllocationService.prototype.userIsCaseworker = function (roles) {
9455
+ var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
9456
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
9457
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
9458
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
9459
+ };
9460
+ /**
9461
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
9462
+ * 1. No tasks found => Success.
9463
+ * 2. One task found => Mark as done => Success.
9464
+ * 3. One task found => Mark as done throws error => Failure.
9465
+ * 4. More than one task found => Failure.
9466
+ * 5. Search call throws an error => Failure.
9467
+ * @param ccdId The ID of the case to find tasks for.
9468
+ * @param eventId The ID of the event to find tasks for.
9469
+ */
9470
+ WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
9471
+ var _this = this;
9472
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
9473
+ return rxjs.of(null);
9474
+ }
9475
+ var taskSearchParameter = {
9476
+ ccdId: ccdId,
9477
+ eventId: eventId,
9478
+ jurisdiction: jurisdiction,
9479
+ caseTypeId: caseTypeId
9480
+ };
9481
+ return this.searchTasks(taskSearchParameter)
9482
+ .pipe(operators.map(function (response) {
9483
+ var tasks = response.tasks;
9484
+ if (tasks && tasks.length > 0) {
9485
+ if (tasks.length === 1) {
9486
+ _this.completeTask(tasks[0].id).subscribe();
9487
+ }
9488
+ else {
9489
+ // This is a problem. Throw an appropriate error.
9490
+ throw new Error(MULTIPLE_TASKS_FOUND);
9491
+ }
9492
+ }
9493
+ return true; // All good. Nothing to see here.
9494
+ }), operators.catchError(function (error) {
9495
+ // Simply rethrow it.
9496
+ return rxjs.throwError(error);
9497
+ }));
9498
+ };
9499
+ /**
9500
+ * Return tasks for case and event.
9501
+ */
9502
+ WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
9503
+ var defaultPayload = {
9504
+ task_required_for_event: false,
9505
+ tasks: []
9506
+ };
9507
+ if (!this.isWAEnabled()) {
9508
+ return rxjs.of(defaultPayload);
9509
+ }
9510
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
9511
+ };
9512
+ /**
9513
+ * Call the API to get a task
9514
+ */
9515
+ WorkAllocationService.prototype.getTask = function (taskId) {
9516
+ if (!this.isWAEnabled()) {
9517
+ return rxjs.of({ task: null });
9518
+ }
9519
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
9520
+ };
9521
+ return WorkAllocationService;
9522
+ }());
9523
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
9524
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
9525
+ WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
9526
+ WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
9527
+ (function () {
9528
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
9529
+ type: i0.Injectable
9530
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
9531
+ })();
9532
+
9516
9533
  var CaseEditComponent = /** @class */ (function () {
9517
9534
  function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
9518
9535
  this.fb = fb;
@@ -11012,7 +11029,7 @@
11012
11029
  return AddressOption;
11013
11030
  }());
11014
11031
 
11015
- var _c0$R = ["writeComplexFieldComponent"];
11032
+ var _c0$S = ["writeComplexFieldComponent"];
11016
11033
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
11017
11034
  if (rf & 1) {
11018
11035
  i0__namespace.ɵɵelementStart(0, "span", 14);
@@ -11226,7 +11243,7 @@
11226
11243
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
11227
11244
  WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11228
11245
  if (rf & 1) {
11229
- i0__namespace.ɵɵviewQuery(_c0$R, 1);
11246
+ i0__namespace.ɵɵviewQuery(_c0$S, 1);
11230
11247
  i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
11231
11248
  }
11232
11249
  if (rf & 2) {
@@ -11372,12 +11389,13 @@
11372
11389
  }
11373
11390
  }
11374
11391
  var CaseFileViewFieldComponent = /** @class */ (function () {
11375
- function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService) {
11392
+ function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService) {
11376
11393
  this.elementRef = elementRef;
11377
11394
  this.route = route;
11378
11395
  this.caseFileViewService = caseFileViewService;
11379
11396
  this.documentManagementService = documentManagementService;
11380
11397
  this.loadingService = loadingService;
11398
+ this.sessionStorageService = sessionStorageService;
11381
11399
  this.allowMoving = true;
11382
11400
  this.getCategoriesAndDocumentsError = false;
11383
11401
  }
@@ -11391,6 +11409,12 @@
11391
11409
  },
11392
11410
  error: function (_) { return _this.getCategoriesAndDocumentsError = true; }
11393
11411
  });
11412
+ // EXUI-8000
11413
+ var userInfo = JSON.parse(this.sessionStorageService.getItem('userDetails'));
11414
+ // Get acls that intersects from acl roles and user roles
11415
+ var acls = this.caseField.acls.filter(function (acl) { return userInfo.roles.includes(acl.role); });
11416
+ // As there can be more than one intersecting role, if any acls are update: true
11417
+ this.allowMoving = acls.some(function (acl) { return acl.update; });
11394
11418
  };
11395
11419
  CaseFileViewFieldComponent.prototype.ngAfterViewInit = function () {
11396
11420
  var slider = this.elementRef.nativeElement.querySelector('.slider');
@@ -11438,7 +11462,7 @@
11438
11462
  return CaseFileViewFieldComponent;
11439
11463
  }());
11440
11464
  CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
11441
- CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
11465
+ CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
11442
11466
  CaseFileViewFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
11443
11467
  if (rf & 1) {
11444
11468
  i0__namespace.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
@@ -11458,92 +11482,7 @@
11458
11482
  templateUrl: './case-file-view-field.component.html',
11459
11483
  styleUrls: ['./case-file-view-field.component.scss'],
11460
11484
  }]
11461
- }], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }]; }, null);
11462
- })();
11463
-
11464
- function CaseFileViewFieldReadComponent_div_0_Template(rf, ctx) {
11465
- if (rf & 1) {
11466
- i0__namespace.ɵɵelementStart(0, "div", 2);
11467
- i0__namespace.ɵɵelementStart(1, "h1", 3);
11468
- i0__namespace.ɵɵtext(2, "Sorry, there is a problem with the service");
11469
- i0__namespace.ɵɵelementEnd();
11470
- i0__namespace.ɵɵelementStart(3, "p", 4);
11471
- i0__namespace.ɵɵtext(4, "Try again later.");
11472
- i0__namespace.ɵɵelementEnd();
11473
- i0__namespace.ɵɵelementEnd();
11474
- }
11475
- }
11476
- function CaseFileViewFieldReadComponent_div_1_ng_container_8_Template(rf, ctx) {
11477
- if (rf & 1) {
11478
- i0__namespace.ɵɵelementContainerStart(0);
11479
- i0__namespace.ɵɵelement(1, "mv-media-viewer", 11);
11480
- i0__namespace.ɵɵelementContainerEnd();
11481
- }
11482
- if (rf & 2) {
11483
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
11484
- i0__namespace.ɵɵadvance(1);
11485
- i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
11486
- }
11487
- }
11488
- function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) {
11489
- if (rf & 1) {
11490
- var _r4_1 = i0__namespace.ɵɵgetCurrentView();
11491
- i0__namespace.ɵɵelementStart(0, "div");
11492
- i0__namespace.ɵɵelementStart(1, "h2", 5);
11493
- i0__namespace.ɵɵtext(2, "Case file");
11494
- i0__namespace.ɵɵelementEnd();
11495
- i0__namespace.ɵɵelementStart(3, "div", 6);
11496
- i0__namespace.ɵɵelementStart(4, "div", 7);
11497
- i0__namespace.ɵɵelementStart(5, "ccd-case-file-view-folder", 8);
11498
- i0__namespace.ɵɵlistener("clickedDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_clickedDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.setMediaViewerFile($event); })("moveDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_moveDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.moveDocument($event); });
11499
- i0__namespace.ɵɵelementEnd();
11500
- i0__namespace.ɵɵelementEnd();
11501
- i0__namespace.ɵɵelement(6, "div", 9);
11502
- i0__namespace.ɵɵelementStart(7, "div", 10);
11503
- i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
11504
- i0__namespace.ɵɵelementEnd();
11505
- i0__namespace.ɵɵelementEnd();
11506
- i0__namespace.ɵɵelementEnd();
11507
- }
11508
- if (rf & 2) {
11509
- var ctx_r1 = i0__namespace.ɵɵnextContext();
11510
- i0__namespace.ɵɵadvance(5);
11511
- i0__namespace.ɵɵproperty("categoriesAndDocuments", ctx_r1.categoriesAndDocuments$)("allowMoving", ctx_r1.allowMoving);
11512
- i0__namespace.ɵɵadvance(3);
11513
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.currentDocument);
11514
- }
11515
- }
11516
- var CaseFileViewFieldReadComponent = /** @class */ (function (_super) {
11517
- __extends(CaseFileViewFieldReadComponent, _super);
11518
- function CaseFileViewFieldReadComponent() {
11519
- var _this = _super.apply(this, __spread(arguments)) || this;
11520
- _this.allowMoving = false;
11521
- return _this;
11522
- }
11523
- return CaseFileViewFieldReadComponent;
11524
- }(CaseFileViewFieldComponent));
11525
- CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
11526
- CaseFileViewFieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
11527
- if (rf & 1) {
11528
- i0__namespace.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
11529
- i0__namespace.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
11530
- }
11531
- if (rf & 2) {
11532
- i0__namespace.ɵɵproperty("ngIf", ctx.getCategoriesAndDocumentsError);
11533
- i0__namespace.ɵɵadvance(1);
11534
- i0__namespace.ɵɵproperty("ngIf", !ctx.getCategoriesAndDocumentsError);
11535
- }
11536
- }, styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9;height:100vh;position:relative}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{background-color:#dee0e2;flex:1 1 0;overflow:hidden}"] });
11537
- var ɵCaseFileViewFieldReadComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(CaseFileViewFieldReadComponent);
11538
- (function () {
11539
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFieldReadComponent, [{
11540
- type: i0.Component,
11541
- args: [{
11542
- selector: 'ccd-case-file-view-field',
11543
- templateUrl: './case-file-view-field.component.html',
11544
- styleUrls: ['./case-file-view-field.component.scss'],
11545
- }]
11546
- }], null, null);
11485
+ }], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
11547
11486
  })();
11548
11487
 
11549
11488
  exports.AddCommentsErrorMessage = void 0;
@@ -11898,7 +11837,7 @@
11898
11837
  i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
11899
11838
  }
11900
11839
  }
11901
- var _c0$Q = function (a0) { return { "form-group-error": a0 }; };
11840
+ var _c0$R = function (a0) { return { "form-group-error": a0 }; };
11902
11841
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
11903
11842
  if (rf & 1) {
11904
11843
  i0__namespace.ɵɵelementStart(0, "div", 8);
@@ -11919,7 +11858,7 @@
11919
11858
  i0__namespace.ɵɵadvance(1);
11920
11859
  i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
11921
11860
  i0__namespace.ɵɵadvance(1);
11922
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
11861
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$R, ctx_r1.errorMessages.length > 0));
11923
11862
  i0__namespace.ɵɵadvance(1);
11924
11863
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
11925
11864
  i0__namespace.ɵɵadvance(1);
@@ -12395,7 +12334,7 @@
12395
12334
  }], null, null);
12396
12335
  })();
12397
12336
 
12398
- var _c0$P = ["writeComplexFieldComponent"];
12337
+ var _c0$Q = ["writeComplexFieldComponent"];
12399
12338
  function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
12400
12339
  if (rf & 1) {
12401
12340
  i0__namespace.ɵɵelementStart(0, "span", 6);
@@ -12500,7 +12439,7 @@
12500
12439
  WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
12501
12440
  WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
12502
12441
  if (rf & 1) {
12503
- i0__namespace.ɵɵviewQuery(_c0$P, 1);
12442
+ i0__namespace.ɵɵviewQuery(_c0$Q, 1);
12504
12443
  }
12505
12444
  if (rf & 2) {
12506
12445
  var _t = void 0;
@@ -12545,7 +12484,7 @@
12545
12484
  }] });
12546
12485
  })();
12547
12486
 
12548
- var _c0$O = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
12487
+ var _c0$P = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
12549
12488
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
12550
12489
  if (rf & 1) {
12551
12490
  i0__namespace.ɵɵelementStart(0, "tbody");
@@ -12560,7 +12499,7 @@
12560
12499
  if (rf & 2) {
12561
12500
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
12562
12501
  i0__namespace.ɵɵadvance(4);
12563
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$O, 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);
12502
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$P, 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);
12564
12503
  }
12565
12504
  }
12566
12505
  var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
@@ -12711,7 +12650,7 @@
12711
12650
  }], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
12712
12651
  })();
12713
12652
 
12714
- var _c0$N = ["collectionItem"];
12653
+ var _c0$O = ["collectionItem"];
12715
12654
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
12716
12655
  if (rf & 1) {
12717
12656
  i0__namespace.ɵɵelementStart(0, "span", 9);
@@ -12953,6 +12892,11 @@
12953
12892
  // Manually resetting errors is required to prevent `ExpressionChangedAfterItHasBeenCheckedError`
12954
12893
  this.formArray.setErrors(null);
12955
12894
  var item = { value: null };
12895
+ if (this.isCollectionDynamic()) {
12896
+ item = Object.assign({}, this.caseField.value[this.caseField.value.length - 1]);
12897
+ var key = Number(item['id'][item['id'].length - 1]) + 1;
12898
+ item.id = item['id'].replace(/.$/, key.toString());
12899
+ }
12956
12900
  this.caseField.value.push(item);
12957
12901
  var index = this.caseField.value.length - 1;
12958
12902
  var caseField = this.buildCaseField(item, index, true);
@@ -12975,6 +12919,12 @@
12975
12919
  setTimeout(function () { return _this.focusLastItem(); });
12976
12920
  }
12977
12921
  };
12922
+ WriteCollectionFieldComponent.prototype.isCollectionDynamic = function () {
12923
+ if (!this.caseField.field_type || !this.caseField.field_type.collection_field_type) {
12924
+ return false;
12925
+ }
12926
+ return this.caseField.field_type.collection_field_type.id === 'DynamicRadioList';
12927
+ };
12978
12928
  WriteCollectionFieldComponent.prototype.newCaseField = function (id, item, index, isNew) {
12979
12929
  if (isNew === void 0) { isNew = false; }
12980
12930
  var isNotAuthorisedToUpdate = !isNew && this.isNotAuthorisedToUpdate(index);
@@ -13124,7 +13074,7 @@
13124
13074
  WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(i2__namespace$1.ScrollToService), i0__namespace.ɵɵdirectiveInject(ProfileNotifier)); };
13125
13075
  WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
13126
13076
  if (rf & 1) {
13127
- i0__namespace.ɵɵviewQuery(_c0$N, 1);
13077
+ i0__namespace.ɵɵviewQuery(_c0$O, 1);
13128
13078
  }
13129
13079
  if (rf & 2) {
13130
13080
  var _t = void 0;
@@ -13818,7 +13768,7 @@
13818
13768
  }], null, null);
13819
13769
  })();
13820
13770
 
13821
- var _c0$M = ["fileInput"];
13771
+ var _c0$N = ["fileInput"];
13822
13772
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
13823
13773
  if (rf & 1) {
13824
13774
  i0__namespace.ɵɵelementStart(0, "span", 12);
@@ -14112,7 +14062,7 @@
14112
14062
  WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(FileUploadStateService)); };
14113
14063
  WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14114
14064
  if (rf & 1) {
14115
- i0__namespace.ɵɵviewQuery(_c0$M, 1);
14065
+ i0__namespace.ɵɵviewQuery(_c0$N, 1);
14116
14066
  }
14117
14067
  if (rf & 2) {
14118
14068
  var _t = void 0;
@@ -14312,7 +14262,7 @@
14312
14262
  i0__namespace.ɵɵtextInterpolate(type_r5.label);
14313
14263
  }
14314
14264
  }
14315
- var _c0$L = function (a0) { return { "form-group-error": a0 }; };
14265
+ var _c0$M = function (a0) { return { "form-group-error": a0 }; };
14316
14266
  var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
14317
14267
  __extends(WriteDynamicListFieldComponent, _super);
14318
14268
  function WriteDynamicListFieldComponent() {
@@ -14361,7 +14311,7 @@
14361
14311
  i0__namespace.ɵɵelementEnd();
14362
14312
  }
14363
14313
  if (rf & 2) {
14364
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14314
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14365
14315
  i0__namespace.ɵɵadvance(1);
14366
14316
  i0__namespace.ɵɵproperty("for", ctx.id());
14367
14317
  i0__namespace.ɵɵadvance(1);
@@ -14511,7 +14461,7 @@
14511
14461
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14512
14462
  }
14513
14463
  }
14514
- var _c0$K = function (a0) { return { selected: a0 }; };
14464
+ var _c0$L = function (a0) { return { selected: a0 }; };
14515
14465
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14516
14466
  if (rf & 1) {
14517
14467
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14524,12 +14474,11 @@
14524
14474
  if (rf & 2) {
14525
14475
  var radioButton_r5 = ctx.$implicit;
14526
14476
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14527
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14477
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14528
14478
  i0__namespace.ɵɵadvance(1);
14529
- i0__namespace.ɵɵpropertyInterpolate("name", ctx_r4.id());
14530
- i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
14479
+ i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
14531
14480
  i0__namespace.ɵɵadvance(1);
14532
- i0__namespace.ɵɵproperty("for", ctx_r4.buildElementId(radioButton_r5.code));
14481
+ i0__namespace.ɵɵproperty("for", ctx_r4.createElementId(radioButton_r5.code));
14533
14482
  i0__namespace.ɵɵadvance(1);
14534
14483
  i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
14535
14484
  }
@@ -14558,8 +14507,8 @@
14558
14507
  this.dynamicRadioListControl = this.registerControl(new i2.FormControl(this.caseField.value));
14559
14508
  this.dynamicRadioListControl.setValue(this.caseField.value);
14560
14509
  };
14561
- WriteDynamicRadioListFieldComponent.prototype.buildElementId = function (name) {
14562
- return this.id() + "-" + name;
14510
+ WriteDynamicRadioListFieldComponent.prototype.createElementId = function (name) {
14511
+ return this.parent && this.parent.value ? this.parent.value.id + this.parent.value.value : _super.prototype.createElementId.call(this, name);
14563
14512
  };
14564
14513
  return WriteDynamicRadioListFieldComponent;
14565
14514
  }(AbstractFieldWriteComponent));
@@ -14689,7 +14638,7 @@
14689
14638
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14690
14639
  }
14691
14640
  }
14692
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14641
+ var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14693
14642
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14694
14643
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14695
14644
  __extends(WriteEmailFieldComponent, _super);
@@ -14714,7 +14663,7 @@
14714
14663
  i0__namespace.ɵɵelementEnd();
14715
14664
  }
14716
14665
  if (rf & 2) {
14717
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14666
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14718
14667
  i0__namespace.ɵɵadvance(1);
14719
14668
  i0__namespace.ɵɵproperty("for", ctx.id());
14720
14669
  i0__namespace.ɵɵadvance(1);
@@ -14846,7 +14795,7 @@
14846
14795
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
14847
14796
  }
14848
14797
  }
14849
- var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14798
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14850
14799
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
14851
14800
  __extends(WriteFixedListFieldComponent, _super);
14852
14801
  function WriteFixedListFieldComponent() {
@@ -14895,7 +14844,7 @@
14895
14844
  i0__namespace.ɵɵelementEnd();
14896
14845
  }
14897
14846
  if (rf & 2) {
14898
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
14847
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
14899
14848
  i0__namespace.ɵɵadvance(1);
14900
14849
  i0__namespace.ɵɵproperty("for", ctx.id());
14901
14850
  i0__namespace.ɵɵadvance(1);
@@ -15013,7 +14962,7 @@
15013
14962
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15014
14963
  }
15015
14964
  }
15016
- var _c0$H = function (a0) { return { selected: a0 }; };
14965
+ var _c0$I = function (a0) { return { selected: a0 }; };
15017
14966
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15018
14967
  if (rf & 1) {
15019
14968
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15026,7 +14975,7 @@
15026
14975
  if (rf & 2) {
15027
14976
  var radioButton_r4 = ctx.$implicit;
15028
14977
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15029
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
14978
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15030
14979
  i0__namespace.ɵɵadvance(1);
15031
14980
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15032
14981
  i0__namespace.ɵɵadvance(1);
@@ -15196,7 +15145,7 @@
15196
15145
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15197
15146
  }
15198
15147
  }
15199
- var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15148
+ var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15200
15149
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15201
15150
  if (rf & 1) {
15202
15151
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15208,7 +15157,7 @@
15208
15157
  if (rf & 2) {
15209
15158
  var judicialUser_r5 = ctx.$implicit;
15210
15159
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15211
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15160
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15212
15161
  i0__namespace.ɵɵadvance(1);
15213
15162
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15214
15163
  }
@@ -15998,7 +15947,7 @@
15998
15947
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
15999
15948
  }
16000
15949
  }
16001
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15950
+ var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16002
15951
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
16003
15952
  if (rf & 1) {
16004
15953
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -16016,7 +15965,7 @@
16016
15965
  }
16017
15966
  if (rf & 2) {
16018
15967
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
16019
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
15968
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
16020
15969
  i0__namespace.ɵɵadvance(3);
16021
15970
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
16022
15971
  }
@@ -16073,11 +16022,11 @@
16073
16022
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16074
16023
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16075
16024
  i0__namespace.ɵɵadvance(1);
16076
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
16025
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
16077
16026
  i0__namespace.ɵɵadvance(3);
16078
16027
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16079
16028
  i0__namespace.ɵɵadvance(2);
16080
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
16029
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
16081
16030
  i0__namespace.ɵɵadvance(5);
16082
16031
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16083
16032
  i0__namespace.ɵɵadvance(2);
@@ -16511,7 +16460,7 @@
16511
16460
  i0__namespace.ɵɵadvance(4);
16512
16461
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16513
16462
  i0__namespace.ɵɵadvance(4);
16514
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
16463
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
16515
16464
  i0__namespace.ɵɵadvance(1);
16516
16465
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16517
16466
  i0__namespace.ɵɵadvance(18);
@@ -17195,7 +17144,7 @@
17195
17144
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17196
17145
  }
17197
17146
  }
17198
- var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17147
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17199
17148
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17200
17149
  if (rf & 1) {
17201
17150
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17207,7 +17156,7 @@
17207
17156
  }
17208
17157
  if (rf & 2) {
17209
17158
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
17210
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17159
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17211
17160
  i0__namespace.ɵɵadvance(1);
17212
17161
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17213
17162
  i0__namespace.ɵɵadvance(2);
@@ -18149,7 +18098,7 @@
18149
18098
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18150
18099
  }
18151
18100
  }
18152
- var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18101
+ var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18153
18102
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18154
18103
  __extends(WriteMoneyGbpFieldComponent, _super);
18155
18104
  function WriteMoneyGbpFieldComponent() {
@@ -18179,7 +18128,7 @@
18179
18128
  i0__namespace.ɵɵelementEnd();
18180
18129
  }
18181
18130
  if (rf & 2) {
18182
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18131
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18183
18132
  i0__namespace.ɵɵadvance(1);
18184
18133
  i0__namespace.ɵɵproperty("for", ctx.id());
18185
18134
  i0__namespace.ɵɵadvance(1);
@@ -18327,7 +18276,7 @@
18327
18276
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18328
18277
  }
18329
18278
  }
18330
- var _c0$C = function (a0) { return { "error": a0 }; };
18279
+ var _c0$D = function (a0) { return { "error": a0 }; };
18331
18280
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18332
18281
  __extends(WriteMultiSelectListFieldComponent, _super);
18333
18282
  function WriteMultiSelectListFieldComponent() {
@@ -18391,7 +18340,7 @@
18391
18340
  i0__namespace.ɵɵelementEnd();
18392
18341
  }
18393
18342
  if (rf & 2) {
18394
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18343
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18395
18344
  i0__namespace.ɵɵadvance(3);
18396
18345
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18397
18346
  i0__namespace.ɵɵadvance(1);
@@ -18482,7 +18431,7 @@
18482
18431
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18483
18432
  }
18484
18433
  }
18485
- var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18434
+ var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18486
18435
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18487
18436
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18488
18437
  __extends(WriteNumberFieldComponent, _super);
@@ -18507,7 +18456,7 @@
18507
18456
  i0__namespace.ɵɵelementEnd();
18508
18457
  }
18509
18458
  if (rf & 2) {
18510
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
18459
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
18511
18460
  i0__namespace.ɵɵadvance(1);
18512
18461
  i0__namespace.ɵɵproperty("for", ctx.id());
18513
18462
  i0__namespace.ɵɵadvance(1);
@@ -18808,7 +18757,7 @@
18808
18757
  i0__namespace.ɵɵelementEnd();
18809
18758
  }
18810
18759
  }
18811
- var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
18760
+ var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
18812
18761
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
18813
18762
  if (rf & 1) {
18814
18763
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -18824,7 +18773,7 @@
18824
18773
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
18825
18774
  var tmp_0_0 = null;
18826
18775
  var tmp_2_0 = null;
18827
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
18776
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$B, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
18828
18777
  i0__namespace.ɵɵadvance(2);
18829
18778
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
18830
18779
  i0__namespace.ɵɵadvance(2);
@@ -19185,9 +19134,6 @@
19185
19134
  PaymentField.prototype.getRefundsUrl = function () {
19186
19135
  return this.appConfig.getRefundsUrl();
19187
19136
  };
19188
- PaymentField.prototype.getNotificationUrl = function () {
19189
- return this.appConfig.getNotificationUrl();
19190
- };
19191
19137
  PaymentField.prototype.getUserRoles = function () {
19192
19138
  var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
19193
19139
  if (!userDetails || !userDetails.hasOwnProperty('roles')) {
@@ -19213,12 +19159,12 @@
19213
19159
  return CasePaymentHistoryViewerFieldComponent;
19214
19160
  }(PaymentField));
19215
19161
  CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
19216
- CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 16, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19162
+ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 15, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19217
19163
  if (rf & 1) {
19218
19164
  i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
19219
19165
  }
19220
19166
  if (rf & 2) {
19221
- i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19167
+ i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19222
19168
  }
19223
19169
  }, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
19224
19170
  (function () {
@@ -19231,6 +19177,231 @@
19231
19177
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19232
19178
  })();
19233
19179
 
19180
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
19181
+ if (rf & 1) {
19182
+ i0__namespace.ɵɵelementStart(0, "div");
19183
+ i0__namespace.ɵɵtext(1);
19184
+ i0__namespace.ɵɵpipe(2, "ccdFixedList");
19185
+ i0__namespace.ɵɵelementEnd();
19186
+ }
19187
+ if (rf & 2) {
19188
+ var value_r1 = ctx.$implicit;
19189
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
19190
+ i0__namespace.ɵɵadvance(1);
19191
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
19192
+ }
19193
+ }
19194
+ var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19195
+ __extends(ReadDynamicMultiSelectListFieldComponent, _super);
19196
+ function ReadDynamicMultiSelectListFieldComponent() {
19197
+ return _super !== null && _super.apply(this, arguments) || this;
19198
+ }
19199
+ ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19200
+ /**
19201
+ *
19202
+ * Reassigning list_items from formatted_list when list_items is empty
19203
+ */
19204
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
19205
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
19206
+ }
19207
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19208
+ this.caseField.value = this.caseField.formatted_value.value;
19209
+ }
19210
+ _super.prototype.ngOnInit.call(this);
19211
+ };
19212
+ return ReadDynamicMultiSelectListFieldComponent;
19213
+ }(AbstractFieldReadComponent));
19214
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
19215
+ ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
19216
+ if (rf & 1) {
19217
+ i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
19218
+ }
19219
+ if (rf & 2) {
19220
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
19221
+ }
19222
+ }, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
19223
+ var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
19224
+ (function () {
19225
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
19226
+ type: i0.Component,
19227
+ args: [{
19228
+ selector: 'ccd-read-dynamic-multi-select-list-field',
19229
+ templateUrl: './read-dynamic-multi-select-list-field.html',
19230
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
19231
+ }]
19232
+ }], null, null);
19233
+ })();
19234
+
19235
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
19236
+ if (rf & 1) {
19237
+ i0__namespace.ɵɵelementStart(0, "span", 5);
19238
+ i0__namespace.ɵɵtext(1);
19239
+ i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
19240
+ i0__namespace.ɵɵelementEnd();
19241
+ }
19242
+ if (rf & 2) {
19243
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
19244
+ i0__namespace.ɵɵadvance(1);
19245
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
19246
+ }
19247
+ }
19248
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
19249
+ if (rf & 1) {
19250
+ i0__namespace.ɵɵelementStart(0, "span", 6);
19251
+ i0__namespace.ɵɵtext(1);
19252
+ i0__namespace.ɵɵelementEnd();
19253
+ }
19254
+ if (rf & 2) {
19255
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
19256
+ i0__namespace.ɵɵadvance(1);
19257
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
19258
+ }
19259
+ }
19260
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
19261
+ if (rf & 1) {
19262
+ i0__namespace.ɵɵelementStart(0, "span", 7);
19263
+ i0__namespace.ɵɵtext(1);
19264
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
19265
+ i0__namespace.ɵɵelementEnd();
19266
+ }
19267
+ if (rf & 2) {
19268
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
19269
+ i0__namespace.ɵɵadvance(1);
19270
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
19271
+ }
19272
+ }
19273
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
19274
+ if (rf & 1) {
19275
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
19276
+ i0__namespace.ɵɵelementContainerStart(0);
19277
+ i0__namespace.ɵɵelementStart(1, "div", 8);
19278
+ i0__namespace.ɵɵelementStart(2, "input", 9);
19279
+ i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
19280
+ i0__namespace.ɵɵelementEnd();
19281
+ i0__namespace.ɵɵelementStart(3, "label", 10);
19282
+ i0__namespace.ɵɵtext(4);
19283
+ i0__namespace.ɵɵelementEnd();
19284
+ i0__namespace.ɵɵelementEnd();
19285
+ i0__namespace.ɵɵelementContainerEnd();
19286
+ }
19287
+ if (rf & 2) {
19288
+ var checkbox_r4 = ctx.$implicit;
19289
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
19290
+ i0__namespace.ɵɵadvance(2);
19291
+ i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
19292
+ i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
19293
+ i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
19294
+ i0__namespace.ɵɵadvance(1);
19295
+ i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
19296
+ i0__namespace.ɵɵadvance(1);
19297
+ i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
19298
+ }
19299
+ }
19300
+ var _c0$A = function (a0) { return { "error": a0 }; };
19301
+ var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19302
+ __extends(WriteDynamicMultiSelectListFieldComponent, _super);
19303
+ function WriteDynamicMultiSelectListFieldComponent() {
19304
+ return _super !== null && _super.apply(this, arguments) || this;
19305
+ }
19306
+ WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19307
+ var _this = this;
19308
+ this.checkboxes = new i2.FormArray([]);
19309
+ this.setInitialCaseList();
19310
+ this.setInitialCaseFieldValue();
19311
+ // Initialise array with existing values
19312
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
19313
+ var values = this.caseField.value;
19314
+ values.forEach(function (value) {
19315
+ _this.checkboxes.push(new i2.FormControl(value));
19316
+ });
19317
+ }
19318
+ this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
19319
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
19320
+ };
19321
+ WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
19322
+ var _this = this;
19323
+ var target = event.target;
19324
+ if (!target || !target.value) {
19325
+ return;
19326
+ }
19327
+ var selectedListItem = this.getValueListItem(target.value);
19328
+ if (!this.isSelected(target.value)) {
19329
+ // Add a new control in the FormArray
19330
+ this.checkboxes.push(new i2.FormControl(selectedListItem));
19331
+ }
19332
+ else {
19333
+ // Remove the control from the FormArray
19334
+ this.checkboxes.controls.forEach(function (ctrl, i) {
19335
+ if (ctrl.value.code === target.value) {
19336
+ _this.checkboxes.removeAt(i);
19337
+ }
19338
+ });
19339
+ }
19340
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
19341
+ };
19342
+ WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
19343
+ if (this.checkboxes && this.checkboxes.controls) {
19344
+ return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
19345
+ }
19346
+ };
19347
+ WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
19348
+ return this.caseField.list_items.find(function (i) { return i.code === value; });
19349
+ };
19350
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
19351
+ var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
19352
+ var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
19353
+ if (!hasListItems && hasFormattedListItems) {
19354
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
19355
+ }
19356
+ };
19357
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
19358
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19359
+ this.caseField.value = this.caseField.formatted_value.value;
19360
+ }
19361
+ var isNull = this.caseField.value === undefined || this.caseField.value === '';
19362
+ if (isNull || !Array.isArray(this.caseField.value)) {
19363
+ this.caseField.value = [];
19364
+ }
19365
+ };
19366
+ return WriteDynamicMultiSelectListFieldComponent;
19367
+ }(AbstractFieldWriteComponent));
19368
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
19369
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵ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"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
19370
+ if (rf & 1) {
19371
+ i0__namespace.ɵɵelementStart(0, "div", 0);
19372
+ i0__namespace.ɵɵelementStart(1, "fieldset");
19373
+ i0__namespace.ɵɵelementStart(2, "legend");
19374
+ i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
19375
+ i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
19376
+ i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
19377
+ i0__namespace.ɵɵelementEnd();
19378
+ i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
19379
+ i0__namespace.ɵɵelementEnd();
19380
+ i0__namespace.ɵɵelementEnd();
19381
+ }
19382
+ if (rf & 2) {
19383
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
19384
+ i0__namespace.ɵɵadvance(3);
19385
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
19386
+ i0__namespace.ɵɵadvance(1);
19387
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
19388
+ i0__namespace.ɵɵadvance(1);
19389
+ i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
19390
+ i0__namespace.ɵɵadvance(1);
19391
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
19392
+ }
19393
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
19394
+ var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
19395
+ (function () {
19396
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
19397
+ type: i0.Component,
19398
+ args: [{
19399
+ selector: 'ccd-write-dynamic-multi-select-list-field',
19400
+ templateUrl: './write-dynamic-multi-select-list-field.html'
19401
+ }]
19402
+ }], null, null);
19403
+ })();
19404
+
19234
19405
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19235
19406
  __extends(ReadPhoneUKFieldComponent, _super);
19236
19407
  function ReadPhoneUKFieldComponent() {
@@ -19626,7 +19797,7 @@
19626
19797
  }
19627
19798
  if (rf & 2) {
19628
19799
  var ctx_r0 = i0__namespace.ɵɵnextContext();
19629
- i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
19800
+ i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
19630
19801
  }
19631
19802
  }
19632
19803
  var WaysToPayFieldComponent = /** @class */ (function (_super) {
@@ -19640,9 +19811,9 @@
19640
19811
  return WaysToPayFieldComponent;
19641
19812
  }(PaymentField));
19642
19813
  WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
19643
- WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
19814
+ WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
19644
19815
  if (rf & 1) {
19645
- i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
19816
+ i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 14, "ccpay-payment-lib", 0);
19646
19817
  }
19647
19818
  if (rf & 2) {
19648
19819
  i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
@@ -19863,7 +20034,7 @@
19863
20034
  function PaletteService() {
19864
20035
  var _b;
19865
20036
  this.componentLauncherRegistry = (_b = {},
19866
- _b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent, CaseFileViewFieldReadComponent],
20037
+ _b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent, CaseFileViewFieldComponent],
19867
20038
  _b[DisplayContextCustomParameter.LinkedCases] = [WriteLinkedCasesFieldComponent, ReadLinkedCasesFieldComponent],
19868
20039
  _b);
19869
20040
  }
@@ -19893,6 +20064,8 @@
19893
20064
  return write ? WriteFixedListFieldComponent : ReadFixedListFieldComponent;
19894
20065
  case 'DynamicRadioList':
19895
20066
  return write ? WriteDynamicRadioListFieldComponent : ReadDynamicRadioListFieldComponent;
20067
+ case 'DynamicMultiSelectList':
20068
+ return write ? WriteDynamicMultiSelectListFieldComponent : ReadDynamicMultiSelectListFieldComponent;
19896
20069
  case 'FixedRadioList':
19897
20070
  return write ? WriteFixedRadioListFieldComponent : ReadFixedRadioListFieldComponent;
19898
20071
  case 'Complex':
@@ -19962,7 +20135,7 @@
19962
20135
  })();
19963
20136
 
19964
20137
  var _c0$v = ["fieldContainer"];
19965
- var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
20138
+ var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
19966
20139
  var FieldReadComponent = /** @class */ (function (_super) {
19967
20140
  __extends(FieldReadComponent, _super);
19968
20141
  function FieldReadComponent(resolver, paletteService) {
@@ -20052,7 +20225,7 @@
20052
20225
  })();
20053
20226
 
20054
20227
  var _c0$u = ["fieldContainer"];
20055
- var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
20228
+ var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
20056
20229
  var FieldWriteComponent = /** @class */ (function (_super) {
20057
20230
  __extends(FieldWriteComponent, _super);
20058
20231
  function FieldWriteComponent(resolver, paletteService) {
@@ -25440,6 +25613,8 @@
25440
25613
  WriteDocumentFieldComponent,
25441
25614
  WriteDynamicListFieldComponent,
25442
25615
  WriteDynamicRadioListFieldComponent,
25616
+ WriteDynamicMultiSelectListFieldComponent,
25617
+ ReadDynamicMultiSelectListFieldComponent,
25443
25618
  WriteTextFieldComponent,
25444
25619
  WriteDateContainerFieldComponent,
25445
25620
  WriteTextAreaFieldComponent,
@@ -25463,12 +25638,18 @@
25463
25638
  WriteCollectionFieldComponent,
25464
25639
  // ComponentLauncher web components
25465
25640
  CaseFileViewFieldComponent,
25466
- CaseFileViewFieldReadComponent,
25467
25641
  CaseFileViewFolderComponent,
25468
25642
  CaseFileViewFolderSortComponent,
25469
25643
  CaseFileViewOverlayMenuComponent,
25470
25644
  CaseFileViewFolderDocumentActionsComponent,
25471
25645
  CaseFileViewFolderSelectorComponent,
25646
+ // component for dynamic list
25647
+ WriteDynamicMultiSelectListFieldComponent,
25648
+ WriteDynamicRadioListFieldComponent,
25649
+ WriteDynamicListFieldComponent,
25650
+ ReadDynamicMultiSelectListFieldComponent,
25651
+ ReadDynamicListFieldComponent,
25652
+ ReadDynamicRadioListFieldComponent,
25472
25653
  LinkedCasesToTableComponent,
25473
25654
  LinkedCasesFromTableComponent,
25474
25655
  BeforeYouStartComponent,
@@ -25599,6 +25780,8 @@
25599
25780
  WriteDocumentFieldComponent,
25600
25781
  WriteDynamicListFieldComponent,
25601
25782
  WriteDynamicRadioListFieldComponent,
25783
+ WriteDynamicMultiSelectListFieldComponent,
25784
+ ReadDynamicMultiSelectListFieldComponent,
25602
25785
  WriteTextFieldComponent,
25603
25786
  WriteDateContainerFieldComponent,
25604
25787
  WriteTextAreaFieldComponent,
@@ -25622,12 +25805,18 @@
25622
25805
  WriteCollectionFieldComponent,
25623
25806
  // ComponentLauncher web components
25624
25807
  CaseFileViewFieldComponent,
25625
- CaseFileViewFieldReadComponent,
25626
25808
  CaseFileViewFolderComponent,
25627
25809
  CaseFileViewFolderSortComponent,
25628
25810
  CaseFileViewOverlayMenuComponent,
25629
25811
  CaseFileViewFolderDocumentActionsComponent,
25630
25812
  CaseFileViewFolderSelectorComponent,
25813
+ // component for dynamic list
25814
+ WriteDynamicMultiSelectListFieldComponent,
25815
+ WriteDynamicRadioListFieldComponent,
25816
+ WriteDynamicListFieldComponent,
25817
+ ReadDynamicMultiSelectListFieldComponent,
25818
+ ReadDynamicListFieldComponent,
25819
+ ReadDynamicRadioListFieldComponent,
25631
25820
  LinkedCasesToTableComponent,
25632
25821
  LinkedCasesFromTableComponent,
25633
25822
  BeforeYouStartComponent,
@@ -25717,6 +25906,8 @@
25717
25906
  WriteDocumentFieldComponent,
25718
25907
  WriteDynamicListFieldComponent,
25719
25908
  WriteDynamicRadioListFieldComponent,
25909
+ WriteDynamicMultiSelectListFieldComponent,
25910
+ ReadDynamicMultiSelectListFieldComponent,
25720
25911
  WriteTextFieldComponent,
25721
25912
  WriteDateContainerFieldComponent,
25722
25913
  WriteTextAreaFieldComponent,
@@ -25740,12 +25931,18 @@
25740
25931
  WriteCollectionFieldComponent,
25741
25932
  // ComponentLauncher web components
25742
25933
  CaseFileViewFieldComponent,
25743
- CaseFileViewFieldReadComponent,
25744
25934
  CaseFileViewFolderComponent,
25745
25935
  CaseFileViewFolderSortComponent,
25746
25936
  CaseFileViewOverlayMenuComponent,
25747
25937
  CaseFileViewFolderDocumentActionsComponent,
25748
25938
  CaseFileViewFolderSelectorComponent,
25939
+ // component for dynamic list
25940
+ WriteDynamicMultiSelectListFieldComponent,
25941
+ WriteDynamicRadioListFieldComponent,
25942
+ WriteDynamicListFieldComponent,
25943
+ ReadDynamicMultiSelectListFieldComponent,
25944
+ ReadDynamicListFieldComponent,
25945
+ ReadDynamicRadioListFieldComponent,
25749
25946
  LinkedCasesToTableComponent,
25750
25947
  LinkedCasesFromTableComponent,
25751
25948
  BeforeYouStartComponent,
@@ -25871,8 +26068,7 @@
25871
26068
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
25872
26069
  i0__namespace.ɵɵsetComponentScope(
25873
26070
  // ComponentLauncher web components
25874
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
25875
- i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
26071
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.MediaViewerComponent], []);
25876
26072
  i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25877
26073
  i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesFromReasonValuePipe]);
25878
26074
  i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
@@ -35622,7 +35818,6 @@
35622
35818
  exports.CaseField = CaseField;
35623
35819
  exports.CaseFieldService = CaseFieldService;
35624
35820
  exports.CaseFileViewFieldComponent = CaseFileViewFieldComponent;
35625
- exports.CaseFileViewFieldReadComponent = CaseFileViewFieldReadComponent;
35626
35821
  exports.CaseFileViewFolderComponent = CaseFileViewFolderComponent;
35627
35822
  exports.CaseFileViewFolderDocumentActionsComponent = CaseFileViewFolderDocumentActionsComponent;
35628
35823
  exports.CaseFileViewFolderSelectorComponent = CaseFileViewFolderSelectorComponent;
@@ -35812,6 +36007,7 @@
35812
36007
  exports.ReadDateFieldComponent = ReadDateFieldComponent;
35813
36008
  exports.ReadDocumentFieldComponent = ReadDocumentFieldComponent;
35814
36009
  exports.ReadDynamicListFieldComponent = ReadDynamicListFieldComponent;
36010
+ exports.ReadDynamicMultiSelectListFieldComponent = ReadDynamicMultiSelectListFieldComponent;
35815
36011
  exports.ReadDynamicRadioListFieldComponent = ReadDynamicRadioListFieldComponent;
35816
36012
  exports.ReadEmailFieldComponent = ReadEmailFieldComponent;
35817
36013
  exports.ReadFieldsFilterPipe = ReadFieldsFilterPipe;
@@ -35888,6 +36084,7 @@
35888
36084
  exports.WriteDateFieldComponent = WriteDateFieldComponent;
35889
36085
  exports.WriteDocumentFieldComponent = WriteDocumentFieldComponent;
35890
36086
  exports.WriteDynamicListFieldComponent = WriteDynamicListFieldComponent;
36087
+ exports.WriteDynamicMultiSelectListFieldComponent = WriteDynamicMultiSelectListFieldComponent;
35891
36088
  exports.WriteDynamicRadioListFieldComponent = WriteDynamicRadioListFieldComponent;
35892
36089
  exports.WriteEmailFieldComponent = WriteEmailFieldComponent;
35893
36090
  exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;