@hmcts/ccd-case-ui-toolkit 6.10.6-angular-upgrade-r4 → 6.10.7-rollback-case-link

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 (118) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +240 -2881
  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/shared/commons/case-edit-data/case-edit-data.service.js +1 -9
  6. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
  7. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +1 -28
  8. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
  9. package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
  10. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +4 -4
  11. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +4 -4
  12. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +3 -4
  13. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +26 -25
  14. package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
  15. package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
  16. package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
  17. package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
  18. package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
  19. package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
  20. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  21. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
  22. package/esm2015/lib/shared/pipes/index.js +1 -2
  23. package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
  24. package/esm2015/lib/shared/services/fields/fields.utils.js +1 -7
  25. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +233 -2585
  26. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  27. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
  28. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  29. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
  30. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  31. package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -7
  32. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  33. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
  34. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  35. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  36. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  37. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.d.ts.map +1 -1
  38. package/lib/shared/components/palette/case-link/index.d.ts +0 -3
  39. package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
  40. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
  41. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
  42. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
  43. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
  44. package/lib/shared/components/palette/palette.module.d.ts +58 -67
  45. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  46. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  47. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
  48. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
  49. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  50. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  51. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  52. package/lib/shared/pipes/index.d.ts +0 -1
  53. package/lib/shared/pipes/index.d.ts.map +1 -1
  54. package/lib/shared/pipes/pipes.module.d.ts +2 -3
  55. package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
  56. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  57. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  58. package/package.json +1 -1
  59. package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
  60. package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
  61. package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
  62. package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
  63. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
  64. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
  65. package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
  66. package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
  67. package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
  68. package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
  69. package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
  70. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
  71. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
  72. package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
  73. package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
  74. package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
  75. package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
  76. package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
  77. package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
  78. package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
  79. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
  80. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
  81. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
  82. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
  83. package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
  84. package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
  85. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
  86. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
  87. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
  88. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
  89. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
  90. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
  91. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
  92. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
  93. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
  94. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
  95. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
  96. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
  97. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
  98. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
  99. package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
  100. package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
  101. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
  102. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
  103. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
  104. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
  105. package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
  106. package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
  107. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
  108. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
  109. package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
  110. package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
  111. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
  112. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
  113. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
  114. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
  115. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
  116. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
  117. package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
  118. package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('underscore'), require('moment'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@angular-material-components/datetime-picker'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@hmcts/ccpay-web-component'), require('@hmcts/media-viewer'), require('@nicky-lenaers/ngx-scroll-to'), require('ngx-md'), require('@angular-material-components/moment-adapter'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
3
3
  typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'underscore', 'moment', 'util', '@edium/fsm', '@angular/material/dialog', '@angular-material-components/datetime-picker', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/autocomplete', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@hmcts/ccpay-web-component', '@hmcts/media-viewer', '@nicky-lenaers/ngx-scroll-to', 'ngx-md', '@angular-material-components/moment-adapter', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i12, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
- })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i12, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i11, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
+ })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i11, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -42,7 +42,7 @@
42
42
  var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
43
43
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
44
44
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
45
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
45
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
46
46
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
47
47
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
48
48
  var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
@@ -118,7 +118,7 @@
118
118
  i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
119
119
  }
120
120
  }
121
- var _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
121
+ var _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
122
122
  var _c1$r = ["[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$r, 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$Y);
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$X = [[["", "headerNavigation", ""]]];
211
211
  var _c1$q = ["[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$q, 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$X);
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$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
286
286
  var _c1$p = ["[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$p, 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$W);
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$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
441
441
  var _c1$o = ["[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$o, 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$V);
451
451
  i0__namespace.ɵɵelementStart(0, "div", 0);
452
452
  i0__namespace.ɵɵprojection(1);
453
453
  i0__namespace.ɵɵprojection(2, 1);
@@ -794,7 +794,7 @@
794
794
  return typeof state === "function" ? receiver === state : state.has(receiver);
795
795
  }
796
796
 
797
- var _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
797
+ var _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
798
798
  function DateInputComponent_div_16_Template(rf, ctx) {
799
799
  if (rf & 1) {
800
800
  var _r8_1 = i0__namespace.ɵɵgetCurrentView();
@@ -812,7 +812,7 @@
812
812
  i0__namespace.ɵɵadvance(1);
813
813
  i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
814
814
  i0__namespace.ɵɵadvance(2);
815
- 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));
815
+ i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r3.isInvalid));
816
816
  }
817
817
  }
818
818
  function DateInputComponent_div_17_Template(rf, ctx) {
@@ -832,7 +832,7 @@
832
832
  i0__namespace.ɵɵadvance(1);
833
833
  i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
834
834
  i0__namespace.ɵɵadvance(2);
835
- 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));
835
+ i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r4.isInvalid));
836
836
  }
837
837
  }
838
838
  function DateInputComponent_div_18_Template(rf, ctx) {
@@ -852,7 +852,7 @@
852
852
  i0__namespace.ɵɵadvance(1);
853
853
  i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
854
854
  i0__namespace.ɵɵadvance(2);
855
- 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));
855
+ i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r5.isInvalid));
856
856
  }
857
857
  }
858
858
  var DateInputComponent = /** @class */ (function () {
@@ -1086,15 +1086,15 @@
1086
1086
  i0__namespace.ɵɵadvance(2);
1087
1087
  i0__namespace.ɵɵproperty("for", ctx.dayId());
1088
1088
  i0__namespace.ɵɵadvance(2);
1089
- i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
1089
+ i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$U, ctx.isInvalid));
1090
1090
  i0__namespace.ɵɵadvance(3);
1091
1091
  i0__namespace.ɵɵproperty("for", ctx.monthId());
1092
1092
  i0__namespace.ɵɵadvance(2);
1093
- i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
1093
+ i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$U, ctx.isInvalid));
1094
1094
  i0__namespace.ɵɵadvance(3);
1095
1095
  i0__namespace.ɵɵproperty("for", ctx.yearId());
1096
1096
  i0__namespace.ɵɵadvance(2);
1097
- i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
1097
+ i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$U, ctx.isInvalid));
1098
1098
  i0__namespace.ɵɵadvance(2);
1099
1099
  i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
1100
1100
  i0__namespace.ɵɵadvance(1);
@@ -1175,7 +1175,7 @@
1175
1175
  i0__namespace.ɵɵelementContainerEnd();
1176
1176
  }
1177
1177
  }
1178
- var _c0$V = ["*"];
1178
+ var _c0$T = ["*"];
1179
1179
  exports.AlertMessageType = void 0;
1180
1180
  (function (AlertMessageType) {
1181
1181
  AlertMessageType["WARNING"] = "warning";
@@ -1196,7 +1196,7 @@
1196
1196
  AlertComponent.TYPE_ERROR = 'error';
1197
1197
  AlertComponent.TYPE_INFORMATION = 'information';
1198
1198
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
1199
- 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) {
1199
+ AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, 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) {
1200
1200
  if (rf & 1) {
1201
1201
  i0__namespace.ɵɵprojectionDef();
1202
1202
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -1471,7 +1471,7 @@
1471
1471
  }] });
1472
1472
  })();
1473
1473
 
1474
- var _c0$U = function (a0) { return { "js-hidden": a0 }; };
1474
+ var _c0$S = function (a0) { return { "js-hidden": a0 }; };
1475
1475
  var _c1$n = ["*"];
1476
1476
  var TabComponent = /** @class */ (function () {
1477
1477
  function TabComponent() {
@@ -1487,7 +1487,7 @@
1487
1487
  i0__namespace.ɵɵelementEnd();
1488
1488
  }
1489
1489
  if (rf & 2) {
1490
- i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1490
+ i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
1491
1491
  i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
1492
1492
  }
1493
1493
  }, 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}}"] });
@@ -1510,7 +1510,7 @@
1510
1510
  }] });
1511
1511
  })();
1512
1512
 
1513
- var _c0$T = ["tab"];
1513
+ var _c0$R = ["tab"];
1514
1514
  var _c1$m = function () { return ["."]; };
1515
1515
  var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1516
1516
  function TabsComponent_li_2_Template(rf, ctx) {
@@ -1564,7 +1564,7 @@
1564
1564
  }
1565
1565
  }, viewQuery: function TabsComponent_Query(rf, ctx) {
1566
1566
  if (rf & 1) {
1567
- i0__namespace.ɵɵviewQuery(_c0$T, 1);
1567
+ i0__namespace.ɵɵviewQuery(_c0$R, 1);
1568
1568
  }
1569
1569
  if (rf & 2) {
1570
1570
  var _t = void 0;
@@ -1643,7 +1643,7 @@
1643
1643
  }], null, null);
1644
1644
  })();
1645
1645
 
1646
- var _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1646
+ var _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1647
1647
  var ActivityBannerComponent = /** @class */ (function () {
1648
1648
  function ActivityBannerComponent() {
1649
1649
  }
@@ -1664,7 +1664,7 @@
1664
1664
  i0__namespace.ɵɵelementEnd();
1665
1665
  }
1666
1666
  if (rf & 2) {
1667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1667
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1668
1668
  i0__namespace.ɵɵadvance(2);
1669
1669
  i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
1670
1670
  i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
@@ -3036,14 +3036,6 @@
3036
3036
  if (!field || !field.field_type || !field.field_type.type) {
3037
3037
  return false;
3038
3038
  }
3039
- // Case link tab spacing alignment fix
3040
- // This Pipe needs to be re-visited
3041
- // to make it more generic to support and fix alignments issues for multiple tabs
3042
- if (field.field_type.collection_field_type &&
3043
- field.field_type.collection_field_type.id &&
3044
- field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
3045
- return true;
3046
- }
3047
3039
  if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
3048
3040
  if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
3049
3041
  return false;
@@ -3054,7 +3046,6 @@
3054
3046
  };
3055
3047
  return IsCompoundPipe;
3056
3048
  }());
3057
- IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
3058
3049
  IsCompoundPipe.COMPOUND_TYPES = [
3059
3050
  'Complex',
3060
3051
  'Label',
@@ -3919,12 +3910,6 @@
3919
3910
  FieldsUtils.isCollectionWithValue = function (pageFormFields) {
3920
3911
  return pageFormFields[0]['value'] !== undefined;
3921
3912
  };
3922
- FieldsUtils.isLinkedCasesCaseField = function (caseField) {
3923
- if (!caseField) {
3924
- return false;
3925
- }
3926
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3927
- };
3928
3913
  FieldsUtils.cloneObject = function (obj) {
3929
3914
  return Object.assign({}, obj);
3930
3915
  };
@@ -4864,9 +4849,7 @@
4864
4849
  };
4865
4850
  AbstractFormFieldComponent.prototype.addControlToFormGroup = function (control, parent, replace) {
4866
4851
  if (replace) {
4867
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4868
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4869
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4852
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4870
4853
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4871
4854
  }
4872
4855
  else {
@@ -8459,34 +8442,6 @@
8459
8442
  return rxjs.throwError(error);
8460
8443
  }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8461
8444
  };
8462
- /**
8463
- * TODO: Gets case link responses
8464
- * @returns case link responses
8465
- */
8466
- CasesService.prototype.getCaseLinkResponses = function () {
8467
- var _this = this;
8468
- var headers = new i1$2.HttpHeaders()
8469
- .set('experimental', 'true')
8470
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
8471
- .set('Content-Type', 'application/json');
8472
- var loadingToken = this.loadingService.register();
8473
- return this.http
8474
- .get('assets/getCaseReasons.json', { headers: headers, observe: 'body' })
8475
- .pipe(operators.map(function (reasons) {
8476
- return reasons.sort(function (reasonA, reasonB) { return reasonA.value_en > reasonB.value_en ? 1 : -1; });
8477
- }), operators.catchError(function (error) {
8478
- _this.errorService.setError(error);
8479
- return rxjs.throwError(error);
8480
- }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8481
- };
8482
- CasesService.prototype.getLinkedCases = function (caseId) {
8483
- var url = this.appConfig.getCaseDataStoreApiUrl() + "/" + caseId;
8484
- return this.http
8485
- .get(url)
8486
- .pipe(operators.catchError(function (error) {
8487
- return rxjs.throwError(error);
8488
- }));
8489
- };
8490
8445
  CasesService.prototype.getEventTrigger = function (caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8491
8446
  var _this = this;
8492
8447
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
@@ -9290,8 +9245,7 @@
9290
9245
  .filter(function (caseField) { return !_this.isHidden(caseField, editForm); })
9291
9246
  .every(function (caseField) {
9292
9247
  var theControl = editForm.controls['data'].get(caseField.id);
9293
- return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl) &&
9294
- _this.checkCaseLinksCollectionField(caseField, theControl);
9248
+ return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl);
9295
9249
  });
9296
9250
  };
9297
9251
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
@@ -9319,13 +9273,6 @@
9319
9273
  PageValidationService.prototype.checkMandatoryField = function (caseField, theControl) {
9320
9274
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
9321
9275
  };
9322
- PageValidationService.prototype.checkCaseLinksCollectionField = function (caseField, theControl) {
9323
- if (caseField && caseField.id === 'caseLinks') {
9324
- return theControl && theControl.value && Array.isArray(theControl.value) &&
9325
- theControl.value.length ? true : false;
9326
- }
9327
- return true;
9328
- };
9329
9276
  return PageValidationService;
9330
9277
  }());
9331
9278
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0__namespace.ɵɵinject(CaseFieldService)); };
@@ -9836,12 +9783,10 @@
9836
9783
  function CaseEditDataService() {
9837
9784
  this.title$ = new rxjs.BehaviorSubject(null);
9838
9785
  this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
9839
- this.linkError$ = new rxjs.BehaviorSubject(null);
9840
9786
  this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
9841
9787
  this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
9842
9788
  this.caseTitle$ = this.title$.asObservable();
9843
9789
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
9844
- this.caseLinkError$ = this.linkError$.asObservable();
9845
9790
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
9846
9791
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
9847
9792
  }
@@ -9851,18 +9796,12 @@
9851
9796
  CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
9852
9797
  this.eventTriggerName$.next(triggerName);
9853
9798
  };
9854
- CaseEditDataService.prototype.setCaseLinkError = function (error) {
9855
- this.linkError$.next(error);
9856
- };
9857
9799
  CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
9858
9800
  this.formValidationErrors$.next(validationErrors);
9859
9801
  };
9860
9802
  CaseEditDataService.prototype.clearFormValidationErrors = function () {
9861
9803
  this.formValidationErrors$.next([]);
9862
9804
  };
9863
- CaseEditDataService.prototype.clearCaseLinkError = function () {
9864
- this.linkError$.next(null);
9865
- };
9866
9805
  CaseEditDataService.prototype.addFormValidationError = function (validationError) {
9867
9806
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
9868
9807
  };
@@ -10284,27 +10223,18 @@
10284
10223
  _this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
10285
10224
  fieldElement.markAsDirty();
10286
10225
  }
10287
- else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10288
- _this.validationErrors.push({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10289
- }
10290
10226
  else if (fieldElement.invalid) {
10291
10227
  if (casefield.isComplex()) {
10292
10228
  _this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id_1);
10293
10229
  }
10294
10230
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
10295
- if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10296
- _this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10297
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
10298
- }
10299
- else {
10300
- var fieldArray = fieldElement;
10301
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10302
- id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10303
- }
10304
- fieldArray.controls.forEach(function (c) {
10305
- _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10306
- });
10231
+ var fieldArray = fieldElement;
10232
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10233
+ id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10307
10234
  }
10235
+ fieldArray.controls.forEach(function (c) {
10236
+ _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10237
+ });
10308
10238
  }
10309
10239
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
10310
10240
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -10571,7 +10501,6 @@
10571
10501
  CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
10572
10502
  var _this = this;
10573
10503
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
10574
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
10575
10504
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
10576
10505
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
10577
10506
  next: function (validationErrors) { return _this.validationErrors = validationErrors; }
@@ -11099,10 +11028,6 @@
11099
11028
  };
11100
11029
  ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
11101
11030
  if (ignoreLabels === void 0) { ignoreLabels = false; }
11102
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
11103
- if (field.id === 'caseLinks') {
11104
- return true;
11105
- }
11106
11031
  // We shouldn't ditch labels.
11107
11032
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
11108
11033
  return true;
@@ -11390,163 +11315,6 @@
11390
11315
  }], null, null);
11391
11316
  })();
11392
11317
 
11393
- var LinkedCasesService = /** @class */ (function () {
11394
- function LinkedCasesService(jurisdictionService, searchService) {
11395
- var _this = this;
11396
- this.jurisdictionService = jurisdictionService;
11397
- this.searchService = searchService;
11398
- this.caseFieldValue = [];
11399
- this.isLinkedCasesEventTrigger = false;
11400
- this.linkCaseReasons = [];
11401
- this.linkedCases = [];
11402
- this.initialCaseLinks = [];
11403
- this.editMode = false;
11404
- this.jurisdictionsResponse = [];
11405
- this.serverError = null;
11406
- this.serverLinkedApiError = null;
11407
- this.isServerReasonCodeError = false;
11408
- this.caseJurisdictionID = null;
11409
- this.groupLinkedCasesByCaseType = function (arrObj, key) {
11410
- return arrObj.reduce(function (rv, x) {
11411
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
11412
- return rv;
11413
- }, {});
11414
- };
11415
- this.jurisdictionService.getJurisdictions().subscribe(function (jurisdictions) {
11416
- _this.jurisdictionsResponse = jurisdictions;
11417
- }, function (error) {
11418
- _this.serverJurisdictionError = true;
11419
- });
11420
- }
11421
- LinkedCasesService.prototype.constructElasticSearchQuery = function (caseIds, size) {
11422
- return {
11423
- query: {
11424
- terms: {
11425
- reference: caseIds,
11426
- },
11427
- },
11428
- size: size,
11429
- };
11430
- };
11431
- LinkedCasesService.prototype.mapResponse = function (esSearchCasesResponse) {
11432
- var caseInfo = this.caseFieldValue.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
11433
- return caseInfo && {
11434
- caseReference: esSearchCasesResponse.case_id,
11435
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
11436
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
11437
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
11438
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
11439
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
11440
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
11441
- };
11442
- };
11443
- LinkedCasesService.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
11444
- return rxjs.forkJoin(searchCasesResponse);
11445
- };
11446
- LinkedCasesService.prototype.getAllLinkedCaseInformation = function () {
11447
- var _this = this;
11448
- var searchCasesResponse = [];
11449
- var linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
11450
- Object.keys(linkedCaseIds).forEach(function (key) {
11451
- var esQuery = _this.constructElasticSearchQuery(linkedCaseIds[key], 100);
11452
- var query = _this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
11453
- searchCasesResponse.push(query);
11454
- });
11455
- if (searchCasesResponse.length) {
11456
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
11457
- var casesResponse = [];
11458
- searchCases.forEach(function (response) {
11459
- response.results.forEach(function (result) {
11460
- casesResponse.push(_this.mapResponse(result));
11461
- });
11462
- });
11463
- var caseLinks = casesResponse.map(function (item) {
11464
- return {
11465
- caseReference: item.caseReference,
11466
- caseName: item.caseName,
11467
- caseService: item.service,
11468
- caseType: item.caseType,
11469
- unlink: false,
11470
- reasons: item.reasons && item.reasons.map(function (reason) {
11471
- return {
11472
- reasonCode: reason
11473
- };
11474
- }),
11475
- };
11476
- });
11477
- _this.linkedCases = caseLinks;
11478
- _this.serverLinkedApiError = null;
11479
- }, function (err) {
11480
- _this.serverLinkedApiError = {
11481
- id: 'backendError', message: 'Some case information is not available at the moment'
11482
- };
11483
- });
11484
- }
11485
- };
11486
- LinkedCasesService.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
11487
- var _this = this;
11488
- var selectedJurisdiction = this.jurisdictionsResponse &&
11489
- this.jurisdictionsResponse.find(function (item) { return item.id === _this.caseDetails.case_type.jurisdiction.id; });
11490
- var selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(function (item) { return item.id === _this.caseDetails.case_type.id; });
11491
- var state = selectedCaseType && selectedCaseType.states.find(function (item) { return item.id === fieldValue; });
11492
- switch (fieldName) {
11493
- case 'JURISDICTION':
11494
- return selectedJurisdiction && selectedJurisdiction.description;
11495
- case 'CASE_TYPE':
11496
- return selectedCaseType && selectedCaseType.name;
11497
- case 'CASE_TYPE_DESCRIPTION':
11498
- return selectedCaseType && selectedCaseType.description;
11499
- case 'STATE':
11500
- return state && state.name || fieldValue;
11501
- case 'STATE_DESCRIPTION':
11502
- return state && state.description || fieldValue;
11503
- default:
11504
- break;
11505
- }
11506
- };
11507
- LinkedCasesService.prototype.getCaseName = function (searchCasesResponse) {
11508
- var caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
11509
- var tabs = searchCasesResponse.tabs.filter(function (tab) {
11510
- var caseNameHmctsInternalField = tab.fields.find(function (field) { return field.id === 'caseNameHmctsInternal'; });
11511
- if (caseNameHmctsInternalField) {
11512
- caseName = caseNameHmctsInternalField.value;
11513
- }
11514
- });
11515
- return caseName;
11516
- };
11517
- return LinkedCasesService;
11518
- }());
11519
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
11520
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0__namespace.ɵɵinject(JurisdictionService), i0__namespace.ɵɵinject(SearchService)); };
11521
- LinkedCasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
11522
- (function () {
11523
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesService, [{
11524
- type: i0.Injectable
11525
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null);
11526
- })();
11527
-
11528
- var LinkCasesReasonValuePipe = /** @class */ (function () {
11529
- function LinkCasesReasonValuePipe(linkedCasesService) {
11530
- this.linkedCasesService = linkedCasesService;
11531
- }
11532
- LinkCasesReasonValuePipe.prototype.transform = function (reasonCode) {
11533
- var reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
11534
- this.linkedCasesService.linkCaseReasons.find(function (reason) { return reason.key === reasonCode; });
11535
- return reasonCodeMapping && reasonCodeMapping.value_en;
11536
- };
11537
- return LinkCasesReasonValuePipe;
11538
- }());
11539
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
11540
- LinkCasesReasonValuePipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
11541
- (function () {
11542
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
11543
- type: i0.Pipe,
11544
- args: [{
11545
- name: 'ccdLinkCasesReasonValue'
11546
- }]
11547
- }], function () { return [{ type: LinkedCasesService }]; }, null);
11548
- })();
11549
-
11550
11318
  var SortOrder;
11551
11319
  (function (SortOrder) {
11552
11320
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -11587,8 +11355,7 @@
11587
11355
  CcdCYAPageLabelFilterPipe,
11588
11356
  ReadFieldsFilterPipe,
11589
11357
  CcdTabFieldsPipe,
11590
- CcdPageFieldsPipe,
11591
- LinkCasesReasonValuePipe
11358
+ CcdPageFieldsPipe
11592
11359
  ];
11593
11360
  var PipesModule = /** @class */ (function () {
11594
11361
  function PipesModule() {
@@ -11608,16 +11375,14 @@
11608
11375
  CcdCYAPageLabelFilterPipe,
11609
11376
  ReadFieldsFilterPipe,
11610
11377
  CcdTabFieldsPipe,
11611
- CcdPageFieldsPipe,
11612
- LinkCasesReasonValuePipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11378
+ CcdPageFieldsPipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11613
11379
  SortSearchResultPipe,
11614
11380
  CcdCaseTitlePipe,
11615
11381
  CcdCollectionTableCaseFieldsFilterPipe,
11616
11382
  CcdCYAPageLabelFilterPipe,
11617
11383
  ReadFieldsFilterPipe,
11618
11384
  CcdTabFieldsPipe,
11619
- CcdPageFieldsPipe,
11620
- LinkCasesReasonValuePipe] });
11385
+ CcdPageFieldsPipe] });
11621
11386
  })();
11622
11387
  (function () {
11623
11388
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PipesModule, [{
@@ -11677,7 +11442,7 @@
11677
11442
  return AddressOption;
11678
11443
  }());
11679
11444
 
11680
- var _c0$R = ["writeComplexFieldComponent"];
11445
+ var _c0$P = ["writeComplexFieldComponent"];
11681
11446
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
11682
11447
  if (rf & 1) {
11683
11448
  i0__namespace.ɵɵelementStart(0, "span", 14);
@@ -11891,7 +11656,7 @@
11891
11656
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
11892
11657
  WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11893
11658
  if (rf & 1) {
11894
- i0__namespace.ɵɵviewQuery(_c0$R, 1);
11659
+ i0__namespace.ɵɵviewQuery(_c0$P, 1);
11895
11660
  i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
11896
11661
  }
11897
11662
  if (rf & 2) {
@@ -11993,7 +11758,7 @@
11993
11758
  if (rf & 2) {
11994
11759
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
11995
11760
  i0__namespace.ɵɵadvance(1);
11996
- 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);
11761
+ 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");
11997
11762
  }
11998
11763
  }
11999
11764
  function CaseFileViewFieldComponent_div_1_Template(rf, ctx) {
@@ -12011,7 +11776,7 @@
12011
11776
  i0__namespace.ɵɵelementEnd();
12012
11777
  i0__namespace.ɵɵelement(6, "div", 9);
12013
11778
  i0__namespace.ɵɵelementStart(7, "div", 10);
12014
- i0__namespace.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
11779
+ i0__namespace.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
12015
11780
  i0__namespace.ɵɵelementEnd();
12016
11781
  i0__namespace.ɵɵelementEnd();
12017
11782
  i0__namespace.ɵɵelementEnd();
@@ -12092,7 +11857,7 @@
12092
11857
  }());
12093
11858
  CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
12094
11859
  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)); };
12095
- 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"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
11860
+ 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) {
12096
11861
  if (rf & 1) {
12097
11862
  i0__namespace.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
12098
11863
  i0__namespace.ɵɵtemplate(1, CaseFileViewFieldComponent_div_1_Template, 9, 3, "div", 1);
@@ -12135,7 +11900,7 @@
12135
11900
  if (rf & 2) {
12136
11901
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12137
11902
  i0__namespace.ɵɵadvance(1);
12138
- 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);
11903
+ 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");
12139
11904
  }
12140
11905
  }
12141
11906
  function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) {
@@ -12153,7 +11918,7 @@
12153
11918
  i0__namespace.ɵɵelementEnd();
12154
11919
  i0__namespace.ɵɵelement(6, "div", 9);
12155
11920
  i0__namespace.ɵɵelementStart(7, "div", 10);
12156
- i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
11921
+ i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
12157
11922
  i0__namespace.ɵɵelementEnd();
12158
11923
  i0__namespace.ɵɵelementEnd();
12159
11924
  i0__namespace.ɵɵelementEnd();
@@ -12176,7 +11941,7 @@
12176
11941
  return CaseFileViewFieldReadComponent;
12177
11942
  }(CaseFileViewFieldComponent));
12178
11943
  CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
12179
- 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"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
11944
+ 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) {
12180
11945
  if (rf & 1) {
12181
11946
  i0__namespace.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
12182
11947
  i0__namespace.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
@@ -12551,7 +12316,7 @@
12551
12316
  i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
12552
12317
  }
12553
12318
  }
12554
- var _c0$Q = function (a0) { return { "form-group-error": a0 }; };
12319
+ var _c0$O = function (a0) { return { "form-group-error": a0 }; };
12555
12320
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
12556
12321
  if (rf & 1) {
12557
12322
  i0__namespace.ɵɵelementStart(0, "div", 8);
@@ -12572,7 +12337,7 @@
12572
12337
  i0__namespace.ɵɵadvance(1);
12573
12338
  i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
12574
12339
  i0__namespace.ɵɵadvance(1);
12575
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
12340
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
12576
12341
  i0__namespace.ɵɵadvance(1);
12577
12342
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
12578
12343
  i0__namespace.ɵɵadvance(1);
@@ -12958,8 +12723,8 @@
12958
12723
 
12959
12724
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
12960
12725
  if (rf & 1) {
12961
- i0__namespace.ɵɵelementStart(0, "a", 2);
12962
- i0__namespace.ɵɵelementStart(1, "span", 3);
12726
+ i0__namespace.ɵɵelementStart(0, "a", 1);
12727
+ i0__namespace.ɵɵelementStart(1, "span", 2);
12963
12728
  i0__namespace.ɵɵtext(2);
12964
12729
  i0__namespace.ɵɵpipe(3, "ccdCaseReference");
12965
12730
  i0__namespace.ɵɵelementEnd();
@@ -12972,60 +12737,38 @@
12972
12737
  i0__namespace.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0__namespace.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
12973
12738
  }
12974
12739
  }
12975
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) {
12976
- if (rf & 1) {
12977
- i0__namespace.ɵɵelementContainerStart(0);
12978
- i0__namespace.ɵɵelement(1, "ccd-read-linked-cases", 4);
12979
- i0__namespace.ɵɵelementContainerEnd();
12980
- }
12981
- if (rf & 2) {
12982
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12983
- i0__namespace.ɵɵadvance(1);
12984
- i0__namespace.ɵɵproperty("caseField", ctx_r1.caseField);
12985
- }
12986
- }
12987
12740
  var ReadCaseLinkFieldComponent = /** @class */ (function (_super) {
12988
12741
  __extends(ReadCaseLinkFieldComponent, _super);
12989
12742
  function ReadCaseLinkFieldComponent() {
12990
- var _this = _super.apply(this, __spread(arguments)) || this;
12991
- _this.paletteContext = exports.PaletteContext;
12992
- return _this;
12743
+ return _super !== null && _super.apply(this, arguments) || this;
12993
12744
  }
12994
12745
  ReadCaseLinkFieldComponent.prototype.hasReference = function () {
12995
12746
  return this.caseField.value && this.caseField.value.CaseReference;
12996
12747
  };
12997
- ReadCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
12998
- return (this.caseField.field_type &&
12999
- this.caseField.field_type.type === 'Collection' &&
13000
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13001
- };
13002
12748
  return ReadCaseLinkFieldComponent;
13003
12749
  }(AbstractFieldReadComponent));
13004
12750
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
13005
- ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["target", "_blank", 3, "href", 4, "ngIf"], [4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"], [3, "caseField"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) {
12751
+ ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) {
13006
12752
  if (rf & 1) {
13007
12753
  i0__namespace.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
13008
- i0__namespace.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
13009
12754
  }
13010
12755
  if (rf & 2) {
13011
12756
  i0__namespace.ɵɵproperty("ngIf", ctx.hasReference());
13012
- i0__namespace.ɵɵadvance(1);
13013
- i0__namespace.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
13014
12757
  }
13015
- }, encapsulation: 2 });
12758
+ }, directives: [i1__namespace.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
13016
12759
  var ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
13017
12760
  (function () {
13018
12761
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
13019
12762
  type: i0.Component,
13020
12763
  args: [{
13021
12764
  selector: 'ccd-read-case-link-field',
13022
- templateUrl: 'read-case-link-field.html',
12765
+ templateUrl: 'read-case-link-field.html'
13023
12766
  }]
13024
12767
  }], null, null);
13025
12768
  })();
13026
12769
 
13027
- var _c0$P = ["writeComplexFieldComponent"];
13028
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) {
12770
+ var _c0$N = ["writeComplexFieldComponent"];
12771
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
13029
12772
  if (rf & 1) {
13030
12773
  i0__namespace.ɵɵelementStart(0, "span", 6);
13031
12774
  i0__namespace.ɵɵtext(1);
@@ -13033,77 +12776,56 @@
13033
12776
  i0__namespace.ɵɵelementEnd();
13034
12777
  }
13035
12778
  if (rf & 2) {
13036
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12779
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
13037
12780
  i0__namespace.ɵɵadvance(1);
13038
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
12781
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
13039
12782
  }
13040
12783
  }
13041
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) {
12784
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) {
13042
12785
  if (rf & 1) {
13043
12786
  i0__namespace.ɵɵelementStart(0, "span", 7);
13044
12787
  i0__namespace.ɵɵtext(1);
13045
12788
  i0__namespace.ɵɵelementEnd();
13046
12789
  }
13047
12790
  if (rf & 2) {
13048
- var ctx_r3 = i0__namespace.ɵɵnextContext(2);
13049
- i0__namespace.ɵɵadvance(1);
13050
- i0__namespace.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
13051
- }
13052
- }
13053
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) {
13054
- if (rf & 1) {
13055
- i0__namespace.ɵɵelementStart(0, "div", 1);
13056
- i0__namespace.ɵɵelementStart(1, "label", 2);
13057
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
13058
- i0__namespace.ɵɵelementEnd();
13059
- i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
13060
- i0__namespace.ɵɵelement(4, "input", 5);
13061
- i0__namespace.ɵɵelementEnd();
13062
- }
13063
- if (rf & 2) {
13064
- var ctx_r0 = i0__namespace.ɵɵnextContext();
13065
- i0__namespace.ɵɵadvance(1);
13066
- i0__namespace.ɵɵproperty("for", ctx_r0.id());
13067
- i0__namespace.ɵɵadvance(1);
13068
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.label);
13069
- i0__namespace.ɵɵadvance(1);
13070
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
12791
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
13071
12792
  i0__namespace.ɵɵadvance(1);
13072
- i0__namespace.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
12793
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
13073
12794
  }
13074
12795
  }
13075
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) {
12796
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
13076
12797
  if (rf & 1) {
13077
- var _r5_1 = i0__namespace.ɵɵgetCurrentView();
13078
- i0__namespace.ɵɵelementStart(0, "div", 1);
13079
- i0__namespace.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
13080
- i0__namespace.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
13081
- i0__namespace.ɵɵelementEnd();
12798
+ i0__namespace.ɵɵelementStart(0, "span", 8);
12799
+ i0__namespace.ɵɵtext(1);
12800
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
13082
12801
  i0__namespace.ɵɵelementEnd();
13083
12802
  }
13084
12803
  if (rf & 2) {
13085
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12804
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
13086
12805
  i0__namespace.ɵɵadvance(1);
13087
- i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
12806
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
13088
12807
  }
13089
12808
  }
12809
+ var _c1$k = function (a0) { return { "form-group-error": a0 }; };
13090
12810
  var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
13091
12811
  __extends(WriteCaseLinkFieldComponent, _super);
13092
- function WriteCaseLinkFieldComponent(linkedCasesService) {
13093
- var _this = _super.call(this) || this;
13094
- _this.linkedCasesService = linkedCasesService;
13095
- _this.caseFields = [];
13096
- return _this;
12812
+ function WriteCaseLinkFieldComponent() {
12813
+ return _super !== null && _super.apply(this, arguments) || this;
13097
12814
  }
13098
12815
  WriteCaseLinkFieldComponent.prototype.ngOnInit = function () {
13099
12816
  var e_1, _a;
13100
- this.formArray = this.registerControl(new i2.FormArray([]), true);
13101
- this.formArray['caseField'] = this.caseField;
13102
- if (!this.hasCaseLinkCollection()) {
12817
+ if (this.caseField.value) {
13103
12818
  this.caseLinkGroup = this.registerControl(new i2.FormGroup({
13104
12819
  CaseReference: new i2.FormControl(this.caseField.value.CaseReference, i2.Validators.required),
13105
12820
  }), true);
13106
12821
  }
12822
+ else {
12823
+ this.caseLinkGroup = this.registerControl(new i2.FormGroup({
12824
+ CaseReference: new i2.FormControl(null, i2.Validators.required),
12825
+ }), true);
12826
+ }
12827
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
12828
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
13107
12829
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
13108
12830
  // field uses the Complex type, it is meant to be treated as one field
13109
12831
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -13121,18 +12843,23 @@
13121
12843
  finally { if (e_1) throw e_1.error; }
13122
12844
  }
13123
12845
  }
13124
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
13125
12846
  };
13126
- WriteCaseLinkFieldComponent.prototype.submitLinkedCases = function () {
13127
- var formGroup = this.formGroup;
13128
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
13129
- var unlinkedCaseRefereneIds_1 = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
13130
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
13131
- .filter(function (item) { return unlinkedCaseRefereneIds_1.indexOf(item.id) === -1; });
13132
- }
13133
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
13134
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
13135
- }
12847
+ WriteCaseLinkFieldComponent.prototype.caseReferenceValidator = function () {
12848
+ var _this = this;
12849
+ return function (control) {
12850
+ if (control.value) {
12851
+ if (_this.validCaseReference(control.value)) {
12852
+ return null;
12853
+ }
12854
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12855
+ }
12856
+ else {
12857
+ if (control.touched) {
12858
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12859
+ }
12860
+ }
12861
+ return null;
12862
+ };
13136
12863
  };
13137
12864
  WriteCaseLinkFieldComponent.prototype.validCaseReference = function (valueString) {
13138
12865
  if (!valueString) {
@@ -13140,36 +12867,43 @@
13140
12867
  }
13141
12868
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
13142
12869
  };
13143
- WriteCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13144
- return (this.caseField.field_type &&
13145
- this.caseField.field_type.type === 'Collection' &&
13146
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13147
- };
13148
12870
  return WriteCaseLinkFieldComponent;
13149
12871
  }(AbstractFieldWriteComponent));
13150
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
12872
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
13151
12873
  WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
13152
12874
  if (rf & 1) {
13153
- i0__namespace.ɵɵviewQuery(_c0$P, 1);
12875
+ i0__namespace.ɵɵviewQuery(_c0$N, 1);
13154
12876
  }
13155
12877
  if (rf & 2) {
13156
12878
  var _t = void 0;
13157
12879
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
13158
12880
  }
13159
- }, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [3, "caseFields", "caseField", "formGroup", "isLinkedCasesJourney", "onLinkedCasesSelected"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
12881
+ }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
13160
12882
  if (rf & 1) {
13161
- i0__namespace.ɵɵelementContainerStart(0);
13162
- i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
13163
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
13164
- i0__namespace.ɵɵelementContainerEnd();
12883
+ i0__namespace.ɵɵelementStart(0, "div", 0);
12884
+ i0__namespace.ɵɵelementStart(1, "label", 1);
12885
+ i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
12886
+ i0__namespace.ɵɵelementEnd();
12887
+ i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
12888
+ i0__namespace.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
12889
+ i0__namespace.ɵɵelement(5, "input", 5);
12890
+ i0__namespace.ɵɵelementEnd();
13165
12891
  }
13166
12892
  if (rf & 2) {
12893
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12894
+ i0__namespace.ɵɵadvance(1);
12895
+ i0__namespace.ɵɵproperty("for", ctx.id());
12896
+ i0__namespace.ɵɵadvance(1);
12897
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
12898
+ i0__namespace.ɵɵadvance(1);
12899
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
13167
12900
  i0__namespace.ɵɵadvance(1);
13168
- i0__namespace.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
12901
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
13169
12902
  i0__namespace.ɵɵadvance(1);
13170
- i0__namespace.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
12903
+ i0__namespace.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
13171
12904
  }
13172
- }, encapsulation: 2 });
12905
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12906
+ var ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
13173
12907
  (function () {
13174
12908
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
13175
12909
  type: i0.Component,
@@ -13177,17 +12911,13 @@
13177
12911
  selector: 'ccd-write-case-link-field',
13178
12912
  templateUrl: 'write-case-link-field.html'
13179
12913
  }]
13180
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
13181
- type: i0.Input
13182
- }], formGroup: [{
13183
- type: i0.Input
13184
- }], writeComplexFieldComponent: [{
12914
+ }], null, { writeComplexFieldComponent: [{
13185
12915
  type: i0.ViewChild,
13186
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
12916
+ args: ['writeComplexFieldComponent']
13187
12917
  }] });
13188
12918
  })();
13189
12919
 
13190
- 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 }; };
12920
+ var _c0$M = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
13191
12921
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
13192
12922
  if (rf & 1) {
13193
12923
  i0__namespace.ɵɵelementStart(0, "tbody");
@@ -13202,10 +12932,10 @@
13202
12932
  if (rf & 2) {
13203
12933
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
13204
12934
  i0__namespace.ɵɵadvance(4);
13205
- 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);
12935
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$M, 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);
13206
12936
  }
13207
12937
  }
13208
- var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12938
+ var _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
13209
12939
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
13210
12940
  if (rf & 1) {
13211
12941
  i0__namespace.ɵɵelementStart(0, "tr");
@@ -13219,7 +12949,7 @@
13219
12949
  var i_r5 = ctx.index;
13220
12950
  var ctx_r3 = i0__namespace.ɵɵnextContext(3);
13221
12951
  i0__namespace.ɵɵadvance(2);
13222
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$k, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12952
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$j, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
13223
12953
  }
13224
12954
  }
13225
12955
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13353,7 +13083,7 @@
13353
13083
  }], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
13354
13084
  })();
13355
13085
 
13356
- var _c0$N = ["collectionItem"];
13086
+ var _c0$L = ["collectionItem"];
13357
13087
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
13358
13088
  if (rf & 1) {
13359
13089
  i0__namespace.ɵɵelementStart(0, "span", 9);
@@ -13766,7 +13496,7 @@
13766
13496
  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)); };
13767
13497
  WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
13768
13498
  if (rf & 1) {
13769
- i0__namespace.ɵɵviewQuery(_c0$N, 1);
13499
+ i0__namespace.ɵɵviewQuery(_c0$L, 1);
13770
13500
  }
13771
13501
  if (rf & 2) {
13772
13502
  var _t = void 0;
@@ -14354,7 +14084,7 @@
14354
14084
  }], null, null);
14355
14085
  })();
14356
14086
 
14357
- var _c0$M = ["fileInput"];
14087
+ var _c0$K = ["fileInput"];
14358
14088
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
14359
14089
  if (rf & 1) {
14360
14090
  i0__namespace.ɵɵelementStart(0, "span", 12);
@@ -14388,7 +14118,7 @@
14388
14118
  i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
14389
14119
  }
14390
14120
  }
14391
- var _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
14121
+ var _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
14392
14122
  var WriteDocumentFieldComponent = /** @class */ (function (_super) {
14393
14123
  __extends(WriteDocumentFieldComponent, _super);
14394
14124
  function WriteDocumentFieldComponent(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
@@ -14648,7 +14378,7 @@
14648
14378
  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)); };
14649
14379
  WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14650
14380
  if (rf & 1) {
14651
- i0__namespace.ɵɵviewQuery(_c0$M, 1);
14381
+ i0__namespace.ɵɵviewQuery(_c0$K, 1);
14652
14382
  }
14653
14383
  if (rf & 2) {
14654
14384
  var _t = void 0;
@@ -14690,7 +14420,7 @@
14690
14420
  i0__namespace.ɵɵelementEnd();
14691
14421
  }
14692
14422
  if (rf & 2) {
14693
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
14423
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
14694
14424
  i0__namespace.ɵɵadvance(1);
14695
14425
  i0__namespace.ɵɵproperty("for", ctx.id());
14696
14426
  i0__namespace.ɵɵadvance(1);
@@ -14848,7 +14578,7 @@
14848
14578
  i0__namespace.ɵɵtextInterpolate(type_r5.label);
14849
14579
  }
14850
14580
  }
14851
- var _c0$L = function (a0) { return { "form-group-error": a0 }; };
14581
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14852
14582
  var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
14853
14583
  __extends(WriteDynamicListFieldComponent, _super);
14854
14584
  function WriteDynamicListFieldComponent() {
@@ -14897,7 +14627,7 @@
14897
14627
  i0__namespace.ɵɵelementEnd();
14898
14628
  }
14899
14629
  if (rf & 2) {
14900
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14630
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14901
14631
  i0__namespace.ɵɵadvance(1);
14902
14632
  i0__namespace.ɵɵproperty("for", ctx.id());
14903
14633
  i0__namespace.ɵɵadvance(1);
@@ -15047,7 +14777,7 @@
15047
14777
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
15048
14778
  }
15049
14779
  }
15050
- var _c0$K = function (a0) { return { selected: a0 }; };
14780
+ var _c0$I = function (a0) { return { selected: a0 }; };
15051
14781
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15052
14782
  if (rf & 1) {
15053
14783
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -15060,7 +14790,7 @@
15060
14790
  if (rf & 2) {
15061
14791
  var radioButton_r5 = ctx.$implicit;
15062
14792
  var ctx_r4 = i0__namespace.ɵɵnextContext();
15063
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14793
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
15064
14794
  i0__namespace.ɵɵadvance(1);
15065
14795
  i0__namespace.ɵɵpropertyInterpolate("name", ctx_r4.id());
15066
14796
  i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
@@ -15070,7 +14800,7 @@
15070
14800
  i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
15071
14801
  }
15072
14802
  }
15073
- var _c1$i = function (a0) { return { "form-group-error": a0 }; };
14803
+ var _c1$h = function (a0) { return { "form-group-error": a0 }; };
15074
14804
  var WriteDynamicRadioListFieldComponent = /** @class */ (function (_super) {
15075
14805
  __extends(WriteDynamicRadioListFieldComponent, _super);
15076
14806
  function WriteDynamicRadioListFieldComponent() {
@@ -15118,7 +14848,7 @@
15118
14848
  i0__namespace.ɵɵelementEnd();
15119
14849
  }
15120
14850
  if (rf & 2) {
15121
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14851
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15122
14852
  i0__namespace.ɵɵadvance(3);
15123
14853
  i0__namespace.ɵɵproperty("for", ctx.id());
15124
14854
  i0__namespace.ɵɵadvance(1);
@@ -15225,8 +14955,8 @@
15225
14955
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
15226
14956
  }
15227
14957
  }
15228
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
15229
- var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14958
+ var _c0$H = function (a0) { return { "form-group-error": a0 }; };
14959
+ var _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
15230
14960
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
15231
14961
  __extends(WriteEmailFieldComponent, _super);
15232
14962
  function WriteEmailFieldComponent() {
@@ -15250,7 +14980,7 @@
15250
14980
  i0__namespace.ɵɵelementEnd();
15251
14981
  }
15252
14982
  if (rf & 2) {
15253
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14983
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15254
14984
  i0__namespace.ɵɵadvance(1);
15255
14985
  i0__namespace.ɵɵproperty("for", ctx.id());
15256
14986
  i0__namespace.ɵɵadvance(1);
@@ -15260,7 +14990,7 @@
15260
14990
  i0__namespace.ɵɵadvance(1);
15261
14991
  i0__namespace.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15262
14992
  i0__namespace.ɵɵadvance(1);
15263
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$h, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14993
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$g, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15264
14994
  }
15265
14995
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15266
14996
  var ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
@@ -15382,7 +15112,7 @@
15382
15112
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
15383
15113
  }
15384
15114
  }
15385
- var _c0$I = function (a0) { return { "form-group-error": a0 }; };
15115
+ var _c0$G = function (a0) { return { "form-group-error": a0 }; };
15386
15116
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
15387
15117
  __extends(WriteFixedListFieldComponent, _super);
15388
15118
  function WriteFixedListFieldComponent() {
@@ -15431,7 +15161,7 @@
15431
15161
  i0__namespace.ɵɵelementEnd();
15432
15162
  }
15433
15163
  if (rf & 2) {
15434
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15164
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15435
15165
  i0__namespace.ɵɵadvance(1);
15436
15166
  i0__namespace.ɵɵproperty("for", ctx.id());
15437
15167
  i0__namespace.ɵɵadvance(1);
@@ -15549,7 +15279,7 @@
15549
15279
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15550
15280
  }
15551
15281
  }
15552
- var _c0$H = function (a0) { return { selected: a0 }; };
15282
+ var _c0$F = function (a0) { return { selected: a0 }; };
15553
15283
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15554
15284
  if (rf & 1) {
15555
15285
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15562,7 +15292,7 @@
15562
15292
  if (rf & 2) {
15563
15293
  var radioButton_r4 = ctx.$implicit;
15564
15294
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15565
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15295
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15566
15296
  i0__namespace.ɵɵadvance(1);
15567
15297
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15568
15298
  i0__namespace.ɵɵadvance(1);
@@ -15571,7 +15301,7 @@
15571
15301
  i0__namespace.ɵɵtextInterpolate(radioButton_r4.label);
15572
15302
  }
15573
15303
  }
15574
- var _c1$g = function (a0) { return { "form-group-error": a0 }; };
15304
+ var _c1$f = function (a0) { return { "form-group-error": a0 }; };
15575
15305
  var WriteFixedRadioListFieldComponent = /** @class */ (function (_super) {
15576
15306
  __extends(WriteFixedRadioListFieldComponent, _super);
15577
15307
  function WriteFixedRadioListFieldComponent() {
@@ -15602,7 +15332,7 @@
15602
15332
  i0__namespace.ɵɵelementEnd();
15603
15333
  }
15604
15334
  if (rf & 2) {
15605
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15335
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15606
15336
  i0__namespace.ɵɵadvance(3);
15607
15337
  i0__namespace.ɵɵproperty("for", ctx.id());
15608
15338
  i0__namespace.ɵɵadvance(1);
@@ -15732,7 +15462,7 @@
15732
15462
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15733
15463
  }
15734
15464
  }
15735
- var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15465
+ var _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
15736
15466
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15737
15467
  if (rf & 1) {
15738
15468
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15744,7 +15474,7 @@
15744
15474
  if (rf & 2) {
15745
15475
  var judicialUser_r5 = ctx.$implicit;
15746
15476
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15747
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15477
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15748
15478
  i0__namespace.ɵɵadvance(1);
15749
15479
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15750
15480
  }
@@ -16091,7 +15821,7 @@
16091
15821
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
16092
15822
  }
16093
15823
  }
16094
- var _c0$F = function (a0) { return { "form-group-error": a0 }; };
15824
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16095
15825
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
16096
15826
  __extends(WriteMoneyGbpFieldComponent, _super);
16097
15827
  function WriteMoneyGbpFieldComponent() {
@@ -16121,7 +15851,7 @@
16121
15851
  i0__namespace.ɵɵelementEnd();
16122
15852
  }
16123
15853
  if (rf & 2) {
16124
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15854
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16125
15855
  i0__namespace.ɵɵadvance(1);
16126
15856
  i0__namespace.ɵɵproperty("for", ctx.id());
16127
15857
  i0__namespace.ɵɵadvance(1);
@@ -16269,7 +15999,7 @@
16269
15999
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
16270
16000
  }
16271
16001
  }
16272
- var _c0$E = function (a0) { return { "error": a0 }; };
16002
+ var _c0$C = function (a0) { return { "error": a0 }; };
16273
16003
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
16274
16004
  __extends(WriteMultiSelectListFieldComponent, _super);
16275
16005
  function WriteMultiSelectListFieldComponent() {
@@ -16333,7 +16063,7 @@
16333
16063
  i0__namespace.ɵɵelementEnd();
16334
16064
  }
16335
16065
  if (rf & 2) {
16336
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16066
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16337
16067
  i0__namespace.ɵɵadvance(3);
16338
16068
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
16339
16069
  i0__namespace.ɵɵadvance(1);
@@ -16424,8 +16154,8 @@
16424
16154
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16425
16155
  }
16426
16156
  }
16427
- var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16428
- var _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
16157
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
16158
+ var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16429
16159
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
16430
16160
  __extends(WriteNumberFieldComponent, _super);
16431
16161
  function WriteNumberFieldComponent() {
@@ -16449,7 +16179,7 @@
16449
16179
  i0__namespace.ɵɵelementEnd();
16450
16180
  }
16451
16181
  if (rf & 2) {
16452
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
16182
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16453
16183
  i0__namespace.ɵɵadvance(1);
16454
16184
  i0__namespace.ɵɵproperty("for", ctx.id());
16455
16185
  i0__namespace.ɵɵadvance(1);
@@ -16459,7 +16189,7 @@
16459
16189
  i0__namespace.ɵɵadvance(1);
16460
16190
  i0__namespace.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
16461
16191
  i0__namespace.ɵɵadvance(1);
16462
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16192
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16463
16193
  }
16464
16194
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.NumberValueAccessor, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
16465
16195
  var ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
@@ -16750,7 +16480,7 @@
16750
16480
  i0__namespace.ɵɵelementEnd();
16751
16481
  }
16752
16482
  }
16753
- var _c0$C = function (a0) { return { "scroll-container ": a0 }; };
16483
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16754
16484
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
16755
16485
  if (rf & 1) {
16756
16486
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -16766,7 +16496,7 @@
16766
16496
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
16767
16497
  var tmp_0_0 = null;
16768
16498
  var tmp_2_0 = null;
16769
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$C, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16499
+ 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));
16770
16500
  i0__namespace.ɵɵadvance(2);
16771
16501
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16772
16502
  i0__namespace.ɵɵadvance(2);
@@ -17238,8 +16968,8 @@
17238
16968
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
17239
16969
  }
17240
16970
  }
17241
- var _c0$B = function (a0) { return { "form-group-error": a0 }; };
17242
- var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16971
+ var _c0$z = function (a0) { return { "form-group-error": a0 }; };
16972
+ var _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
17243
16973
  var WritePhoneUKFieldComponent = /** @class */ (function (_super) {
17244
16974
  __extends(WritePhoneUKFieldComponent, _super);
17245
16975
  function WritePhoneUKFieldComponent() {
@@ -17263,7 +16993,7 @@
17263
16993
  i0__namespace.ɵɵelementEnd();
17264
16994
  }
17265
16995
  if (rf & 2) {
17266
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
16996
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
17267
16997
  i0__namespace.ɵɵadvance(1);
17268
16998
  i0__namespace.ɵɵproperty("for", ctx.id());
17269
16999
  i0__namespace.ɵɵadvance(1);
@@ -17273,7 +17003,7 @@
17273
17003
  i0__namespace.ɵɵadvance(1);
17274
17004
  i0__namespace.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
17275
17005
  i0__namespace.ɵɵadvance(1);
17276
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17006
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17277
17007
  }
17278
17008
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17279
17009
  var ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
@@ -17355,8 +17085,8 @@
17355
17085
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
17356
17086
  }
17357
17087
  }
17358
- var _c0$A = function (a0) { return { "form-group-error": a0 }; };
17359
- var _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
17088
+ var _c0$y = function (a0) { return { "form-group-error": a0 }; };
17089
+ var _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
17360
17090
  var WriteTextAreaFieldComponent = /** @class */ (function (_super) {
17361
17091
  __extends(WriteTextAreaFieldComponent, _super);
17362
17092
  function WriteTextAreaFieldComponent(browserService) {
@@ -17391,7 +17121,7 @@
17391
17121
  i0__namespace.ɵɵelementEnd();
17392
17122
  }
17393
17123
  if (rf & 2) {
17394
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17124
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17395
17125
  i0__namespace.ɵɵadvance(1);
17396
17126
  i0__namespace.ɵɵproperty("for", ctx.id());
17397
17127
  i0__namespace.ɵɵadvance(1);
@@ -17401,7 +17131,7 @@
17401
17131
  i0__namespace.ɵɵadvance(1);
17402
17132
  i0__namespace.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
17403
17133
  i0__namespace.ɵɵadvance(1);
17404
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
17134
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
17405
17135
  }
17406
17136
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17407
17137
  (function () {
@@ -17483,8 +17213,8 @@
17483
17213
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
17484
17214
  }
17485
17215
  }
17486
- var _c0$z = function (a0) { return { "form-group-error": a0 }; };
17487
- var _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
17216
+ var _c0$x = function (a0) { return { "form-group-error": a0 }; };
17217
+ var _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
17488
17218
  var WriteTextFieldComponent = /** @class */ (function (_super) {
17489
17219
  __extends(WriteTextFieldComponent, _super);
17490
17220
  function WriteTextFieldComponent() {
@@ -17513,7 +17243,7 @@
17513
17243
  i0__namespace.ɵɵelementEnd();
17514
17244
  }
17515
17245
  if (rf & 2) {
17516
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17246
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17517
17247
  i0__namespace.ɵɵadvance(1);
17518
17248
  i0__namespace.ɵɵproperty("for", ctx.id());
17519
17249
  i0__namespace.ɵɵadvance(1);
@@ -17523,7 +17253,7 @@
17523
17253
  i0__namespace.ɵɵadvance(1);
17524
17254
  i0__namespace.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
17525
17255
  i0__namespace.ɵɵadvance(1);
17526
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
17256
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
17527
17257
  }
17528
17258
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17529
17259
  var ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteTextFieldComponent);
@@ -17721,7 +17451,7 @@
17721
17451
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
17722
17452
  }
17723
17453
  }
17724
- var _c0$y = function (a0) { return { selected: a0 }; };
17454
+ var _c0$w = function (a0) { return { selected: a0 }; };
17725
17455
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
17726
17456
  if (rf & 1) {
17727
17457
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -17734,7 +17464,7 @@
17734
17464
  if (rf & 2) {
17735
17465
  var value_r4 = ctx.$implicit;
17736
17466
  var ctx_r3 = i0__namespace.ɵɵnextContext();
17737
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
17467
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
17738
17468
  i0__namespace.ɵɵadvance(1);
17739
17469
  i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
17740
17470
  i0__namespace.ɵɵattribute("name", ctx_r3.id());
@@ -17744,7 +17474,7 @@
17744
17474
  i0__namespace.ɵɵtextInterpolate(value_r4);
17745
17475
  }
17746
17476
  }
17747
- var _c1$b = function (a0) { return { "form-group-error": a0 }; };
17477
+ var _c1$a = function (a0) { return { "form-group-error": a0 }; };
17748
17478
  var WriteYesNoFieldComponent = /** @class */ (function (_super) {
17749
17479
  __extends(WriteYesNoFieldComponent, _super);
17750
17480
  function WriteYesNoFieldComponent(yesNoService) {
@@ -17775,7 +17505,7 @@
17775
17505
  i0__namespace.ɵɵelementEnd();
17776
17506
  }
17777
17507
  if (rf & 2) {
17778
- i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17508
+ i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17779
17509
  i0__namespace.ɵɵadvance(3);
17780
17510
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
17781
17511
  i0__namespace.ɵɵadvance(1);
@@ -17839,25 +17569,17 @@
17839
17569
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
17840
17570
  case 'OrderSummary':
17841
17571
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
17572
+ case 'CaseLink':
17573
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17842
17574
  case 'Organisation':
17843
17575
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
17844
17576
  case 'JudicialUser':
17845
17577
  return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
17846
- case 'CaseLink':
17847
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17848
17578
  default:
17849
17579
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
17850
17580
  }
17851
17581
  case 'Collection':
17852
- switch (caseField.field_type.collection_field_type.id) {
17853
- case 'CaseLink':
17854
- if (caseField.id === 'caseLinks') {
17855
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17856
- }
17857
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17858
- default:
17859
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17860
- }
17582
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17861
17583
  case 'MultiSelectList':
17862
17584
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
17863
17585
  case 'Document':
@@ -17897,7 +17619,7 @@
17897
17619
  }], null, null);
17898
17620
  })();
17899
17621
 
17900
- var _c0$x = ["fieldContainer"];
17622
+ var _c0$v = ["fieldContainer"];
17901
17623
  var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
17902
17624
  var FieldReadComponent = /** @class */ (function (_super) {
17903
17625
  __extends(FieldReadComponent, _super);
@@ -17946,7 +17668,7 @@
17946
17668
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
17947
17669
  FieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) {
17948
17670
  if (rf & 1) {
17949
- i0__namespace.ɵɵviewQuery(_c0$x, 1, i0.ViewContainerRef);
17671
+ i0__namespace.ɵɵviewQuery(_c0$v, 1, i0.ViewContainerRef);
17950
17672
  }
17951
17673
  if (rf & 2) {
17952
17674
  var _t = void 0;
@@ -17987,7 +17709,7 @@
17987
17709
  }] });
17988
17710
  })();
17989
17711
 
17990
- var _c0$w = ["fieldContainer"];
17712
+ var _c0$u = ["fieldContainer"];
17991
17713
  var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
17992
17714
  var FieldWriteComponent = /** @class */ (function (_super) {
17993
17715
  __extends(FieldWriteComponent, _super);
@@ -18035,7 +17757,7 @@
18035
17757
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
18036
17758
  FieldWriteComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) {
18037
17759
  if (rf & 1) {
18038
- i0__namespace.ɵɵviewQuery(_c0$w, 3, i0.ViewContainerRef);
17760
+ i0__namespace.ɵɵviewQuery(_c0$u, 3, i0.ViewContainerRef);
18039
17761
  }
18040
17762
  if (rf & 2) {
18041
17763
  var _t = void 0;
@@ -18098,7 +17820,7 @@
18098
17820
  i0__namespace.ɵɵprojection(0);
18099
17821
  }
18100
17822
  }
18101
- var _c0$v = ["*"];
17823
+ var _c0$t = ["*"];
18102
17824
  var FieldReadLabelComponent = /** @class */ (function (_super) {
18103
17825
  __extends(FieldReadLabelComponent, _super);
18104
17826
  function FieldReadLabelComponent() {
@@ -18136,7 +17858,7 @@
18136
17858
  return FieldReadLabelComponent;
18137
17859
  }(AbstractFieldReadComponent));
18138
17860
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
18139
- FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$v, decls: 4, vars: 5, consts: [[3, "hidden"], ["class", "case-field", 4, "ngIf", "ngIfElse"], ["caseFieldValue", ""], [1, "case-field"], [1, "case-field__label"], [1, "case-field__value"], [4, "ngTemplateOutlet"]], template: function FieldReadLabelComponent_Template(rf, ctx) {
17861
+ FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$t, decls: 4, vars: 5, consts: [[3, "hidden"], ["class", "case-field", 4, "ngIf", "ngIfElse"], ["caseFieldValue", ""], [1, "case-field"], [1, "case-field__label"], [1, "case-field__value"], [4, "ngTemplateOutlet"]], template: function FieldReadLabelComponent_Template(rf, ctx) {
18140
17862
  if (rf & 1) {
18141
17863
  i0__namespace.ɵɵprojectionDef();
18142
17864
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -18170,16 +17892,16 @@
18170
17892
  }] });
18171
17893
  })();
18172
17894
 
18173
- function CaseFileViewFolderSelectorComponent_ng_container_5_ng_container_1_Template(rf, ctx) {
17895
+ function CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template(rf, ctx) {
18174
17896
  if (rf & 1) {
18175
17897
  i0__namespace.ɵɵelementContainer(0);
18176
17898
  }
18177
17899
  }
18178
- var _c0$u = function (a0) { return { cat: a0, level: 1 }; };
18179
- function CaseFileViewFolderSelectorComponent_ng_container_5_Template(rf, ctx) {
17900
+ var _c0$s = function (a0) { return { cat: a0, level: 1 }; };
17901
+ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
18180
17902
  if (rf & 1) {
18181
17903
  i0__namespace.ɵɵelementContainerStart(0);
18182
- i0__namespace.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
17904
+ i0__namespace.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 8);
18183
17905
  i0__namespace.ɵɵelementContainerEnd();
18184
17906
  }
18185
17907
  if (rf & 2) {
@@ -18187,7 +17909,7 @@
18187
17909
  i0__namespace.ɵɵnextContext();
18188
17910
  var _r1 = i0__namespace.ɵɵreference(13);
18189
17911
  i0__namespace.ɵɵadvance(1);
18190
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$u, cat_r3));
17912
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$s, cat_r3));
18191
17913
  }
18192
17914
  }
18193
17915
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) {
@@ -18195,7 +17917,7 @@
18195
17917
  i0__namespace.ɵɵelementContainer(0);
18196
17918
  }
18197
17919
  }
18198
- var _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
17920
+ var _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
18199
17921
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
18200
17922
  if (rf & 1) {
18201
17923
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18208,7 +17930,7 @@
18208
17930
  i0__namespace.ɵɵnextContext();
18209
17931
  var _r1 = i0__namespace.ɵɵreference(13);
18210
17932
  i0__namespace.ɵɵadvance(1);
18211
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
17933
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
18212
17934
  }
18213
17935
  }
18214
17936
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -18222,7 +17944,7 @@
18222
17944
  i0__namespace.ɵɵelement(3, "img", 12);
18223
17945
  i0__namespace.ɵɵtext(4);
18224
17946
  i0__namespace.ɵɵelementEnd();
18225
- i0__namespace.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container", 2);
17947
+ i0__namespace.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container", 3);
18226
17948
  i0__namespace.ɵɵelementEnd();
18227
17949
  }
18228
17950
  if (rf & 2) {
@@ -18318,46 +18040,47 @@
18318
18040
  return CaseFileViewFolderSelectorComponent;
18319
18041
  }());
18320
18042
  CaseFileViewFolderSelectorComponent.ɵfac = function CaseFileViewFolderSelectorComponent_Factory(t) { return new (t || CaseFileViewFolderSelectorComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialogRef), i0__namespace.ɵɵdirectiveInject(i1$3.MAT_DIALOG_DATA)); };
18321
- CaseFileViewFolderSelectorComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], [1, "close", 3, "click"], ["folder", ""], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "name", "id", "click"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) {
18043
+ CaseFileViewFolderSelectorComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "close", 3, "click"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], ["folder", ""], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "name", "id", "click"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) {
18322
18044
  if (rf & 1) {
18323
- i0__namespace.ɵɵelementStart(0, "h2", 0);
18324
- i0__namespace.ɵɵtext(1, "Move File");
18045
+ i0__namespace.ɵɵelementStart(0, "div", 0);
18046
+ i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_0_listener() { return ctx.cancel(); });
18325
18047
  i0__namespace.ɵɵelementEnd();
18326
- i0__namespace.ɵɵelementStart(2, "p");
18327
- i0__namespace.ɵɵtext(3);
18048
+ i0__namespace.ɵɵelementStart(1, "h2", 1);
18049
+ i0__namespace.ɵɵtext(2, "Move File");
18328
18050
  i0__namespace.ɵɵelementEnd();
18329
- i0__namespace.ɵɵelementStart(4, "div", 1);
18330
- i0__namespace.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_container_5_Template, 2, 4, "ng-container", 2);
18051
+ i0__namespace.ɵɵelementStart(3, "p");
18052
+ i0__namespace.ɵɵtext(4);
18331
18053
  i0__namespace.ɵɵelementEnd();
18332
- i0__namespace.ɵɵelementStart(6, "div", 3);
18333
- i0__namespace.ɵɵelementStart(7, "button", 4);
18334
- i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_7_listener() { return ctx.save(); });
18335
- i0__namespace.ɵɵtext(8, "Save");
18054
+ i0__namespace.ɵɵelementStart(5, "div", 2);
18055
+ i0__namespace.ɵɵtemplate(6, CaseFileViewFolderSelectorComponent_ng_container_6_Template, 2, 4, "ng-container", 3);
18336
18056
  i0__namespace.ɵɵelementEnd();
18337
- i0__namespace.ɵɵelementStart(9, "a", 5);
18338
- i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_a_click_9_listener() { return ctx.cancel(); });
18339
- i0__namespace.ɵɵtext(10, "Cancel");
18057
+ i0__namespace.ɵɵelementStart(7, "div", 4);
18058
+ i0__namespace.ɵɵelementStart(8, "button", 5);
18059
+ i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_8_listener() { return ctx.save(); });
18060
+ i0__namespace.ɵɵtext(9, "Save");
18340
18061
  i0__namespace.ɵɵelementEnd();
18062
+ i0__namespace.ɵɵelementStart(10, "a", 6);
18063
+ i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_a_click_10_listener() { return ctx.cancel(); });
18064
+ i0__namespace.ɵɵtext(11, "Cancel");
18341
18065
  i0__namespace.ɵɵelementEnd();
18342
- i0__namespace.ɵɵelementStart(11, "div", 6);
18343
- i0__namespace.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_11_listener() { return ctx.cancel(); });
18344
18066
  i0__namespace.ɵɵelementEnd();
18345
18067
  i0__namespace.ɵɵtemplate(12, CaseFileViewFolderSelectorComponent_ng_template_12_Template, 6, 5, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
18346
18068
  }
18347
18069
  if (rf & 2) {
18348
- i0__namespace.ɵɵadvance(3);
18070
+ i0__namespace.ɵɵadvance(4);
18349
18071
  i0__namespace.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
18350
18072
  i0__namespace.ɵɵadvance(2);
18351
18073
  i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
18352
18074
  }
18353
- }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: ["[_nghost-%COMP%]{position:relative;display:block}.folders[_ngcontent-%COMP%]{margin-bottom:20px}.folder[_ngcontent-%COMP%]{display:none;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin:0 0 -1px}.folders[_ngcontent-%COMP%] > .folder[_ngcontent-%COMP%], input[_ngcontent-%COMP%]:checked ~ .folder[_ngcontent-%COMP%]{display:block}.iconImg[_ngcontent-%COMP%]{position:relative;display:inline-block;height:28px}.folder[_ngcontent-%COMP%] > .folder[_ngcontent-%COMP%]{margin-left:20px}.folder[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:before{top:3px}.folder[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{top:13px}p[_ngcontent-%COMP%]{font-weight:700}button[_ngcontent-%COMP%]{margin-right:20px}.close[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel[_ngcontent-%COMP%], .close[_ngcontent-%COMP%]{cursor:pointer}"] });
18075
+ }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
18354
18076
  (function () {
18355
18077
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
18356
18078
  type: i0.Component,
18357
18079
  args: [{
18358
18080
  selector: 'xui-case-file-view-folder-selector',
18359
18081
  templateUrl: './case-file-view-folder-selector.component.html',
18360
- styleUrls: ['./case-file-view-folder-selector.component.scss']
18082
+ styleUrls: ['./case-file-view-folder-selector.component.scss'],
18083
+ encapsulation: i0.ViewEncapsulation.None
18361
18084
  }]
18362
18085
  }], function () {
18363
18086
  return [{ type: i1__namespace$3.MatDialogRef }, { type: undefined, decorators: [{
@@ -18428,8 +18151,8 @@
18428
18151
  i0__namespace.ɵɵproperty("ngForOf", ctx_r1.menuItems);
18429
18152
  }
18430
18153
  }
18431
- var _c0$t = [[["", "trigger", ""]]];
18432
- var _c1$9 = ["[trigger]"];
18154
+ var _c0$r = [[["", "trigger", ""]]];
18155
+ var _c1$8 = ["[trigger]"];
18433
18156
  var CaseFileViewOverlayMenuComponent = /** @class */ (function () {
18434
18157
  function CaseFileViewOverlayMenuComponent() {
18435
18158
  this.title = '';
@@ -18444,9 +18167,9 @@
18444
18167
  return CaseFileViewOverlayMenuComponent;
18445
18168
  }());
18446
18169
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
18447
- CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
18170
+ CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
18448
18171
  if (rf & 1) {
18449
- i0__namespace.ɵɵprojectionDef(_c0$t);
18172
+ i0__namespace.ɵɵprojectionDef(_c0$r);
18450
18173
  i0__namespace.ɵɵelementStart(0, "div");
18451
18174
  i0__namespace.ɵɵelementStart(1, "button", 0, 1);
18452
18175
  i0__namespace.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -18909,7 +18632,7 @@
18909
18632
  return Object.assign(documentTreeNode, node);
18910
18633
  }
18911
18634
  var filteredData = this.documentTreeData;
18912
- if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 2) {
18635
+ if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 0) {
18913
18636
  filteredData = this.documentTreeData.map(copy).filter(function filterTreeData(node) {
18914
18637
  if (node.name && node.name.toLowerCase().includes(searchTerm) && node.type === DocumentTreeNodeType.DOCUMENT) {
18915
18638
  return true;
@@ -18991,7 +18714,6 @@
18991
18714
  CaseFileViewFolderComponent.prototype.openMoveDialog = function (node) {
18992
18715
  var _this = this;
18993
18716
  var dialogRef = this.dialog.open(CaseFileViewFolderSelectorComponent, {
18994
- width: '570px',
18995
18717
  data: { categories: this.categories, document: node }
18996
18718
  });
18997
18719
  dialogRef.afterClosed().subscribe(function (newCatId) {
@@ -19017,7 +18739,7 @@
19017
18739
  }());
19018
18740
  CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
19019
18741
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
19020
- CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 3;
18742
+ CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
19021
18743
  CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog)); };
19022
18744
  CaseFileViewFolderComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) {
19023
18745
  if (rf & 1) {
@@ -19294,8 +19016,8 @@
19294
19016
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
19295
19017
  }
19296
19018
  }
19297
- var _c0$s = function (a0) { return { "form-group-error": a0 }; };
19298
- var _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
19019
+ var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19020
+ var _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
19299
19021
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) {
19300
19022
  if (rf & 1) {
19301
19023
  i0__namespace.ɵɵelementStart(0, "div", 15);
@@ -19311,11 +19033,11 @@
19311
19033
  if (rf & 2) {
19312
19034
  var ctx_r2 = i0__namespace.ɵɵnextContext();
19313
19035
  i0__namespace.ɵɵadvance(1);
19314
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
19036
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
19315
19037
  i0__namespace.ɵɵadvance(3);
19316
19038
  i0__namespace.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
19317
19039
  i0__namespace.ɵɵadvance(1);
19318
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19040
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19319
19041
  }
19320
19042
  }
19321
19043
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) {
@@ -19473,7 +19195,7 @@
19473
19195
  if (rf & 2) {
19474
19196
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19475
19197
  i0__namespace.ɵɵadvance(1);
19476
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19198
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19477
19199
  i0__namespace.ɵɵadvance(4);
19478
19200
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
19479
19201
  i0__namespace.ɵɵadvance(1);
@@ -19585,7 +19307,7 @@
19585
19307
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
19586
19308
  }
19587
19309
  }
19588
- var _c0$r = function (a0) { return { "form-group-error": a0 }; };
19310
+ var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19589
19311
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) {
19590
19312
  if (rf & 1) {
19591
19313
  i0__namespace.ɵɵelementStart(0, "div", 25);
@@ -19602,7 +19324,7 @@
19602
19324
  if (rf & 2) {
19603
19325
  var ctx_r5 = i0__namespace.ɵɵnextContext();
19604
19326
  i0__namespace.ɵɵadvance(1);
19605
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19327
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19606
19328
  i0__namespace.ɵɵadvance(2);
19607
19329
  i0__namespace.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
19608
19330
  i0__namespace.ɵɵadvance(1);
@@ -19777,7 +19499,7 @@
19777
19499
  var _r2 = i0__namespace.ɵɵreference(12);
19778
19500
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19779
19501
  i0__namespace.ɵɵadvance(1);
19780
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19502
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19781
19503
  i0__namespace.ɵɵadvance(2);
19782
19504
  i0__namespace.ɵɵproperty("for", ctx.languageSearchTermControlName);
19783
19505
  i0__namespace.ɵɵadvance(1);
@@ -19911,7 +19633,7 @@
19911
19633
  i0__namespace.ɵɵelementEnd();
19912
19634
  }
19913
19635
  }
19914
- var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19636
+ var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19915
19637
  var SelectFlagLocationComponent = /** @class */ (function () {
19916
19638
  function SelectFlagLocationComponent() {
19917
19639
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20000,7 +19722,7 @@
20000
19722
  if (rf & 2) {
20001
19723
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20002
19724
  i0__namespace.ɵɵadvance(1);
20003
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
19725
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20004
19726
  i0__namespace.ɵɵadvance(4);
20005
19727
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
20006
19728
  i0__namespace.ɵɵadvance(1);
@@ -20064,7 +19786,7 @@
20064
19786
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
20065
19787
  }
20066
19788
  }
20067
- var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19789
+ var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20068
19790
  var AddCommentsComponent = /** @class */ (function () {
20069
19791
  function AddCommentsComponent() {
20070
19792
  this.optional = false;
@@ -20145,7 +19867,7 @@
20145
19867
  if (rf & 2) {
20146
19868
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20147
19869
  i0__namespace.ɵɵadvance(2);
20148
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
19870
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
20149
19871
  i0__namespace.ɵɵadvance(2);
20150
19872
  i0__namespace.ɵɵproperty("for", ctx.flagCommentsControlName);
20151
19873
  i0__namespace.ɵɵadvance(1);
@@ -20225,7 +19947,7 @@
20225
19947
  i0__namespace.ɵɵelementEnd();
20226
19948
  }
20227
19949
  }
20228
- var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19950
+ var _c0$m = function (a0) { return { "form-group-error": a0 }; };
20229
19951
  var ManageCaseFlagsComponent = /** @class */ (function () {
20230
19952
  function ManageCaseFlagsComponent() {
20231
19953
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20385,7 +20107,7 @@
20385
20107
  if (rf & 2) {
20386
20108
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20387
20109
  i0__namespace.ɵɵadvance(1);
20388
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20110
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
20389
20111
  i0__namespace.ɵɵadvance(4);
20390
20112
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
20391
20113
  i0__namespace.ɵɵadvance(1);
@@ -20455,8 +20177,8 @@
20455
20177
  i0__namespace.ɵɵelementEnd();
20456
20178
  }
20457
20179
  }
20458
- var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20459
- var _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
20180
+ var _c0$l = function (a0) { return { "form-group-error": a0 }; };
20181
+ var _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
20460
20182
  var UpdateFlagComponent = /** @class */ (function () {
20461
20183
  function UpdateFlagComponent() {
20462
20184
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20577,7 +20299,7 @@
20577
20299
  if (rf & 2) {
20578
20300
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20579
20301
  i0__namespace.ɵɵadvance(2);
20580
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
20302
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
20581
20303
  i0__namespace.ɵɵadvance(2);
20582
20304
  i0__namespace.ɵɵproperty("for", ctx.updateFlagControlName);
20583
20305
  i0__namespace.ɵɵadvance(1);
@@ -20593,7 +20315,7 @@
20593
20315
  i0__namespace.ɵɵadvance(3);
20594
20316
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
20595
20317
  i0__namespace.ɵɵadvance(6);
20596
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20318
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20597
20319
  i0__namespace.ɵɵadvance(1);
20598
20320
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
20599
20321
  i0__namespace.ɵɵadvance(2);
@@ -20721,2309 +20443,6 @@
20721
20443
  }] });
20722
20444
  })();
20723
20445
 
20724
- exports.LinkedCasesPages = void 0;
20725
- (function (LinkedCasesPages) {
20726
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
20727
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
20728
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
20729
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
20730
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
20731
- })(exports.LinkedCasesPages || (exports.LinkedCasesPages = {}));
20732
- exports.LinkedCasesErrorMessages = void 0;
20733
- (function (LinkedCasesErrorMessages) {
20734
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
20735
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
20736
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
20737
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
20738
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
20739
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
20740
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
20741
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
20742
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
20743
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
20744
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
20745
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
20746
- })(exports.LinkedCasesErrorMessages || (exports.LinkedCasesErrorMessages = {}));
20747
- exports.LinkedCasesEventTriggers = void 0;
20748
- (function (LinkedCasesEventTriggers) {
20749
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
20750
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
20751
- })(exports.LinkedCasesEventTriggers || (exports.LinkedCasesEventTriggers = {}));
20752
- exports.Patterns = void 0;
20753
- (function (Patterns) {
20754
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
20755
- })(exports.Patterns || (exports.Patterns = {}));
20756
-
20757
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) {
20758
- if (rf & 1) {
20759
- i0__namespace.ɵɵelementStart(0, "p", 5);
20760
- i0__namespace.ɵɵelementStart(1, "span", 6);
20761
- i0__namespace.ɵɵtext(2, "Error:");
20762
- i0__namespace.ɵɵelementEnd();
20763
- i0__namespace.ɵɵtext(3);
20764
- i0__namespace.ɵɵelementEnd();
20765
- }
20766
- if (rf & 2) {
20767
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
20768
- i0__namespace.ɵɵadvance(3);
20769
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
20770
- }
20771
- }
20772
- function BeforeYouStartComponent_div_1_Template(rf, ctx) {
20773
- if (rf & 1) {
20774
- var _r4_1 = i0__namespace.ɵɵgetCurrentView();
20775
- i0__namespace.ɵɵelementStart(0, "div");
20776
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20777
- i0__namespace.ɵɵtext(2, "There is a problem");
20778
- i0__namespace.ɵɵelementEnd();
20779
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
20780
- i0__namespace.ɵɵelementStart(4, "p", 3);
20781
- i0__namespace.ɵɵelementStart(5, "a", 4);
20782
- i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.onBack(); });
20783
- i0__namespace.ɵɵtext(6, "Go back to the Linked cases tab");
20784
- i0__namespace.ɵɵelementEnd();
20785
- i0__namespace.ɵɵelementEnd();
20786
- i0__namespace.ɵɵelementEnd();
20787
- }
20788
- if (rf & 2) {
20789
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20790
- i0__namespace.ɵɵadvance(3);
20791
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
20792
- }
20793
- }
20794
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) {
20795
- if (rf & 1) {
20796
- i0__namespace.ɵɵelementStart(0, "div", 11);
20797
- i0__namespace.ɵɵelementStart(1, "p", 3);
20798
- i0__namespace.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
20799
- i0__namespace.ɵɵelementEnd();
20800
- i0__namespace.ɵɵelementStart(3, "p", 3);
20801
- i0__namespace.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
20802
- i0__namespace.ɵɵelementEnd();
20803
- i0__namespace.ɵɵelementEnd();
20804
- }
20805
- }
20806
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) {
20807
- if (rf & 1) {
20808
- i0__namespace.ɵɵelementStart(0, "div", 12);
20809
- i0__namespace.ɵɵelementStart(1, "p", 3);
20810
- i0__namespace.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
20811
- i0__namespace.ɵɵelementEnd();
20812
- i0__namespace.ɵɵelementEnd();
20813
- }
20814
- }
20815
- function BeforeYouStartComponent_div_2_Template(rf, ctx) {
20816
- if (rf & 1) {
20817
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20818
- i0__namespace.ɵɵelementStart(0, "div");
20819
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20820
- i0__namespace.ɵɵtext(2, "Before you start");
20821
- i0__namespace.ɵɵelementEnd();
20822
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
20823
- i0__namespace.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
20824
- i0__namespace.ɵɵelementStart(5, "div", 9);
20825
- i0__namespace.ɵɵelementStart(6, "button", 10);
20826
- i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
20827
- i0__namespace.ɵɵtext(7, "Next");
20828
- i0__namespace.ɵɵelementEnd();
20829
- i0__namespace.ɵɵelementEnd();
20830
- i0__namespace.ɵɵelementEnd();
20831
- }
20832
- if (rf & 2) {
20833
- var ctx_r1 = i0__namespace.ɵɵnextContext();
20834
- i0__namespace.ɵɵadvance(3);
20835
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
20836
- i0__namespace.ɵɵadvance(1);
20837
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
20838
- }
20839
- }
20840
- var BeforeYouStartComponent = /** @class */ (function () {
20841
- function BeforeYouStartComponent(router, linkedCasesService) {
20842
- this.router = router;
20843
- this.linkedCasesService = linkedCasesService;
20844
- this.linkedCasesStateEmitter = new i0.EventEmitter();
20845
- this.isLinkCasesJourney = false;
20846
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
20847
- // re-initiate the state based on the casefield value
20848
- var linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(function (item) { return item; }).map(function (item) { return item.id; });
20849
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(function (item) { return linkedCaseRefereneIds.indexOf(item.caseReference) !== -1; });
20850
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
20851
- }
20852
- BeforeYouStartComponent.prototype.onNext = function () {
20853
- this.linkedCasesStateEmitter.emit({
20854
- currentLinkedCasesPage: exports.LinkedCasesPages.BEFORE_YOU_START,
20855
- errorMessages: this.errorMessages,
20856
- navigateToNextPage: true
20857
- });
20858
- };
20859
- BeforeYouStartComponent.prototype.onBack = function () {
20860
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
20861
- window.location.hash = 'Linked cases';
20862
- });
20863
- };
20864
- return BeforeYouStartComponent;
20865
- }());
20866
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
20867
- BeforeYouStartComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BeforeYouStartComponent, selectors: [["ccd-linked-cases-before-you-start"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 3, vars: 2, consts: [[4, "ngIf"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "link-cases-journey", 4, "ngIf"], ["id", "manage-link-cases-journey", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], ["id", "link-cases-journey"], ["id", "manage-link-cases-journey"]], template: function BeforeYouStartComponent_Template(rf, ctx) {
20868
- if (rf & 1) {
20869
- i0__namespace.ɵɵelementStart(0, "div");
20870
- i0__namespace.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
20871
- i0__namespace.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
20872
- i0__namespace.ɵɵelementEnd();
20873
- }
20874
- if (rf & 2) {
20875
- i0__namespace.ɵɵadvance(1);
20876
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
20877
- i0__namespace.ɵɵadvance(1);
20878
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
20879
- }
20880
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
20881
- (function () {
20882
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BeforeYouStartComponent, [{
20883
- type: i0.Component,
20884
- args: [{
20885
- selector: 'ccd-linked-cases-before-you-start',
20886
- templateUrl: './before-you-start.component.html'
20887
- }]
20888
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
20889
- type: i0.Output
20890
- }] });
20891
- })();
20892
-
20893
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) {
20894
- if (rf & 1) {
20895
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20896
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20897
- i0__namespace.ɵɵelementStart(1, "td", 14);
20898
- i0__namespace.ɵɵtext(2);
20899
- i0__namespace.ɵɵelement(3, "br");
20900
- i0__namespace.ɵɵtext(4);
20901
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
20902
- i0__namespace.ɵɵelementEnd();
20903
- i0__namespace.ɵɵelementStart(6, "td", 14);
20904
- i0__namespace.ɵɵelementStart(7, "a", 15);
20905
- i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_table_4_tr_9_Template_a_click_7_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.onChange(); });
20906
- i0__namespace.ɵɵtext(8, "Change");
20907
- i0__namespace.ɵɵelementEnd();
20908
- i0__namespace.ɵɵelementEnd();
20909
- i0__namespace.ɵɵelementEnd();
20910
- }
20911
- if (rf & 2) {
20912
- var case_r6 = ctx.$implicit;
20913
- i0__namespace.ɵɵadvance(2);
20914
- i0__namespace.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
20915
- i0__namespace.ɵɵadvance(2);
20916
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
20917
- }
20918
- }
20919
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) {
20920
- if (rf & 1) {
20921
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20922
- i0__namespace.ɵɵelementStart(1, "td", 16);
20923
- i0__namespace.ɵɵtext(2, " None ");
20924
- i0__namespace.ɵɵelementEnd();
20925
- i0__namespace.ɵɵelementEnd();
20926
- }
20927
- }
20928
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) {
20929
- if (rf & 1) {
20930
- i0__namespace.ɵɵelementStart(0, "table", 13);
20931
- i0__namespace.ɵɵelementStart(1, "caption", 5);
20932
- i0__namespace.ɵɵtext(2, "Cases to unlink");
20933
- i0__namespace.ɵɵelementEnd();
20934
- i0__namespace.ɵɵelementStart(3, "thead", 6);
20935
- i0__namespace.ɵɵelementStart(4, "tr", 7);
20936
- i0__namespace.ɵɵelementStart(5, "th", 8);
20937
- i0__namespace.ɵɵtext(6, "Case name and number");
20938
- i0__namespace.ɵɵelementEnd();
20939
- i0__namespace.ɵɵelement(7, "th", 8);
20940
- i0__namespace.ɵɵelementEnd();
20941
- i0__namespace.ɵɵelementEnd();
20942
- i0__namespace.ɵɵelementStart(8, "tbody", 10);
20943
- i0__namespace.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
20944
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
20945
- i0__namespace.ɵɵelementEnd();
20946
- i0__namespace.ɵɵelementEnd();
20947
- }
20948
- if (rf & 2) {
20949
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20950
- i0__namespace.ɵɵadvance(9);
20951
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
20952
- i0__namespace.ɵɵadvance(1);
20953
- i0__namespace.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
20954
- }
20955
- }
20956
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) {
20957
- if (rf & 1) {
20958
- i0__namespace.ɵɵelement(0, "th", 8);
20959
- }
20960
- }
20961
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) {
20962
- if (rf & 1) {
20963
- i0__namespace.ɵɵelement(0, "br");
20964
- }
20965
- }
20966
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) {
20967
- if (rf & 1) {
20968
- i0__namespace.ɵɵelementStart(0, "span");
20969
- i0__namespace.ɵɵtext(1);
20970
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
20971
- i0__namespace.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
20972
- i0__namespace.ɵɵelementEnd();
20973
- }
20974
- if (rf & 2) {
20975
- var reason_r12 = ctx.$implicit;
20976
- var isLast_r13 = ctx.last;
20977
- i0__namespace.ɵɵadvance(1);
20978
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
20979
- i0__namespace.ɵɵadvance(2);
20980
- i0__namespace.ɵɵproperty("ngIf", !isLast_r13);
20981
- }
20982
- }
20983
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) {
20984
- if (rf & 1) {
20985
- var _r16_1 = i0__namespace.ɵɵgetCurrentView();
20986
- i0__namespace.ɵɵelementStart(0, "td", 14);
20987
- i0__namespace.ɵɵelementStart(1, "a", 15);
20988
- i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_tr_17_td_10_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.onChange(); });
20989
- i0__namespace.ɵɵtext(2, "Change");
20990
- i0__namespace.ɵɵelementEnd();
20991
- i0__namespace.ɵɵelementEnd();
20992
- }
20993
- }
20994
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) {
20995
- if (rf & 1) {
20996
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20997
- i0__namespace.ɵɵelementStart(1, "td", 14);
20998
- i0__namespace.ɵɵelementStart(2, "span");
20999
- i0__namespace.ɵɵtext(3);
21000
- i0__namespace.ɵɵelement(4, "br");
21001
- i0__namespace.ɵɵtext(5);
21002
- i0__namespace.ɵɵpipe(6, "ccdCaseReference");
21003
- i0__namespace.ɵɵelementEnd();
21004
- i0__namespace.ɵɵelementEnd();
21005
- i0__namespace.ɵɵelementStart(7, "td", 14);
21006
- i0__namespace.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
21007
- i0__namespace.ɵɵelementEnd();
21008
- i0__namespace.ɵɵelement(9, "td", 14);
21009
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
21010
- i0__namespace.ɵɵelementEnd();
21011
- }
21012
- if (rf & 2) {
21013
- var case_r9 = ctx.$implicit;
21014
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21015
- i0__namespace.ɵɵadvance(3);
21016
- i0__namespace.ɵɵtextInterpolate1("", case_r9.caseName, " ");
21017
- i0__namespace.ɵɵadvance(2);
21018
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
21019
- i0__namespace.ɵɵadvance(3);
21020
- i0__namespace.ɵɵproperty("ngForOf", case_r9.reasons);
21021
- i0__namespace.ɵɵadvance(2);
21022
- i0__namespace.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
21023
- }
21024
- }
21025
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) {
21026
- if (rf & 1) {
21027
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21028
- i0__namespace.ɵɵelementStart(1, "td", 20);
21029
- i0__namespace.ɵɵtext(2, " None ");
21030
- i0__namespace.ɵɵelementEnd();
21031
- i0__namespace.ɵɵelementEnd();
21032
- }
21033
- }
21034
- var CheckYourAnswersComponent = /** @class */ (function () {
21035
- function CheckYourAnswersComponent(linkedCasesService) {
21036
- this.linkedCasesService = linkedCasesService;
21037
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21038
- }
21039
- CheckYourAnswersComponent.prototype.ngOnInit = function () {
21040
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
21041
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
21042
- this.linkedCases = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return !linkedCase.unlink; });
21043
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
21044
- };
21045
- CheckYourAnswersComponent.prototype.onChange = function () {
21046
- this.linkedCasesService.editMode = true;
21047
- this.linkedCasesStateEmitter.emit({
21048
- currentLinkedCasesPage: exports.LinkedCasesPages.CHECK_YOUR_ANSWERS,
21049
- navigateToPreviousPage: true,
21050
- navigateToNextPage: true
21051
- });
21052
- };
21053
- return CheckYourAnswersComponent;
21054
- }());
21055
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21056
- CheckYourAnswersComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CheckYourAnswersComponent, selectors: [["ccd-linked-cases-check-your-answers"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 19, vars: 5, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["id", "cases-to-unlink-table", "class", "govuk-table", 4, "ngIf"], ["id", "linked-cases-table", 1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header"], ["scope", "col", "class", "govuk-table__header", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], ["id", "cases-to-unlink-table", 1, "govuk-table"], [1, "govuk-table__cell"], ["href", "javascript:void(0)", 1, "govuk-link", "govuk-link--no-visited-state", "float-right", 3, "click"], ["colspan", "2", 1, "govuk-table__cell"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__cell", 4, "ngIf"], [4, "ngIf"], ["colspan", "4", 1, "govuk-table__cell"]], template: function CheckYourAnswersComponent_Template(rf, ctx) {
21057
- if (rf & 1) {
21058
- i0__namespace.ɵɵelementStart(0, "div", 0);
21059
- i0__namespace.ɵɵelementStart(1, "div", 1);
21060
- i0__namespace.ɵɵelementStart(2, "h1", 2);
21061
- i0__namespace.ɵɵtext(3, "Check your answers");
21062
- i0__namespace.ɵɵelementEnd();
21063
- i0__namespace.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
21064
- i0__namespace.ɵɵelementStart(5, "table", 4);
21065
- i0__namespace.ɵɵelementStart(6, "caption", 5);
21066
- i0__namespace.ɵɵtext(7);
21067
- i0__namespace.ɵɵelementEnd();
21068
- i0__namespace.ɵɵelementStart(8, "thead", 6);
21069
- i0__namespace.ɵɵelementStart(9, "tr", 7);
21070
- i0__namespace.ɵɵelementStart(10, "th", 8);
21071
- i0__namespace.ɵɵtext(11, "Case name and number");
21072
- i0__namespace.ɵɵelementEnd();
21073
- i0__namespace.ɵɵelementStart(12, "th", 8);
21074
- i0__namespace.ɵɵtext(13, "Reasons for case link");
21075
- i0__namespace.ɵɵelementEnd();
21076
- i0__namespace.ɵɵelement(14, "th", 8);
21077
- i0__namespace.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
21078
- i0__namespace.ɵɵelementEnd();
21079
- i0__namespace.ɵɵelementEnd();
21080
- i0__namespace.ɵɵelementStart(16, "tbody", 10);
21081
- i0__namespace.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
21082
- i0__namespace.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
21083
- i0__namespace.ɵɵelementEnd();
21084
- i0__namespace.ɵɵelementEnd();
21085
- i0__namespace.ɵɵelementEnd();
21086
- i0__namespace.ɵɵelementEnd();
21087
- }
21088
- if (rf & 2) {
21089
- i0__namespace.ɵɵadvance(4);
21090
- i0__namespace.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
21091
- i0__namespace.ɵɵadvance(3);
21092
- i0__namespace.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
21093
- i0__namespace.ɵɵadvance(8);
21094
- i0__namespace.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
21095
- i0__namespace.ɵɵadvance(2);
21096
- i0__namespace.ɵɵproperty("ngForOf", ctx.linkedCases);
21097
- i0__namespace.ɵɵadvance(1);
21098
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCases.length);
21099
- }
21100
- }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
21101
- (function () {
21102
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CheckYourAnswersComponent, [{
21103
- type: i0.Component,
21104
- args: [{
21105
- selector: 'ccd-linked-cases-check-your-answers',
21106
- templateUrl: './check-your-answers.component.html',
21107
- styleUrls: ['./check-your-answers.component.scss']
21108
- }]
21109
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21110
- type: i0.Output
21111
- }] });
21112
- })();
21113
-
21114
- var ValidatorsUtils = /** @class */ (function () {
21115
- function ValidatorsUtils() {
21116
- }
21117
- ValidatorsUtils.prototype.numberLengthValidator = function (inputLength) {
21118
- return function (control) {
21119
- return control.value.length !== inputLength ? { isValid: false } : null;
21120
- };
21121
- };
21122
- ValidatorsUtils.prototype.formArraySelectedValidator = function () {
21123
- return function (control) {
21124
- return control.value.every(function (option) { return !option.selected; }) ? { isValid: false } : null;
21125
- };
21126
- };
21127
- ValidatorsUtils.prototype.regexPattern = function (regexPattern) {
21128
- return function (control) {
21129
- var regex = new RegExp(regexPattern);
21130
- return regex.test(control.value) ? null : { isValid: false };
21131
- };
21132
- };
21133
- return ValidatorsUtils;
21134
- }());
21135
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
21136
- ValidatorsUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
21137
- (function () {
21138
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidatorsUtils, [{
21139
- type: i0.Injectable,
21140
- args: [{ providedIn: 'root' }]
21141
- }], null, null);
21142
- })();
21143
-
21144
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) {
21145
- if (rf & 1) {
21146
- i0__namespace.ɵɵelementStart(0, "span", 28);
21147
- i0__namespace.ɵɵelementStart(1, "span", 29);
21148
- i0__namespace.ɵɵtext(2, "Error:");
21149
- i0__namespace.ɵɵelementEnd();
21150
- i0__namespace.ɵɵtext(3);
21151
- i0__namespace.ɵɵelementEnd();
21152
- }
21153
- if (rf & 2) {
21154
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21155
- i0__namespace.ɵɵadvance(3);
21156
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
21157
- }
21158
- }
21159
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) {
21160
- if (rf & 1) {
21161
- i0__namespace.ɵɵelementStart(0, "span", 28);
21162
- i0__namespace.ɵɵelementStart(1, "span", 29);
21163
- i0__namespace.ɵɵtext(2, "Error:");
21164
- i0__namespace.ɵɵelementEnd();
21165
- i0__namespace.ɵɵtext(3);
21166
- i0__namespace.ɵɵelementEnd();
21167
- }
21168
- if (rf & 2) {
21169
- var ctx_r5 = i0__namespace.ɵɵnextContext(2);
21170
- i0__namespace.ɵɵadvance(3);
21171
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
21172
- }
21173
- }
21174
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) {
21175
- if (rf & 1) {
21176
- i0__namespace.ɵɵelementStart(0, "div", 30);
21177
- i0__namespace.ɵɵelement(1, "input", 31);
21178
- i0__namespace.ɵɵelementStart(2, "label", 32);
21179
- i0__namespace.ɵɵtext(3);
21180
- i0__namespace.ɵɵelementEnd();
21181
- i0__namespace.ɵɵelementEnd();
21182
- }
21183
- if (rf & 2) {
21184
- var reason_r8 = ctx.$implicit;
21185
- var pos_r9 = ctx.index;
21186
- i0__namespace.ɵɵproperty("formGroupName", pos_r9);
21187
- i0__namespace.ɵɵadvance(1);
21188
- i0__namespace.ɵɵpropertyInterpolate("id", reason_r8.key);
21189
- i0__namespace.ɵɵproperty("value", reason_r8.value_en);
21190
- i0__namespace.ɵɵadvance(1);
21191
- i0__namespace.ɵɵpropertyInterpolate("for", reason_r8.key);
21192
- i0__namespace.ɵɵadvance(1);
21193
- i0__namespace.ɵɵtextInterpolate(reason_r8.value_en);
21194
- }
21195
- }
21196
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) {
21197
- if (rf & 1) {
21198
- i0__namespace.ɵɵelementStart(0, "span", 28);
21199
- i0__namespace.ɵɵelementStart(1, "span", 29);
21200
- i0__namespace.ɵɵtext(2, "Error:");
21201
- i0__namespace.ɵɵelementEnd();
21202
- i0__namespace.ɵɵtext(3);
21203
- i0__namespace.ɵɵelementEnd();
21204
- }
21205
- if (rf & 2) {
21206
- var ctx_r7 = i0__namespace.ɵɵnextContext(2);
21207
- i0__namespace.ɵɵadvance(3);
21208
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
21209
- }
21210
- }
21211
- var _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
21212
- function LinkCasesComponent_div_8_Template(rf, ctx) {
21213
- if (rf & 1) {
21214
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
21215
- i0__namespace.ɵɵelementStart(0, "div", 21);
21216
- i0__namespace.ɵɵelementStart(1, "h3", 22);
21217
- i0__namespace.ɵɵtext(2, "Enter case reference");
21218
- i0__namespace.ɵɵelementEnd();
21219
- i0__namespace.ɵɵelementStart(3, "div", 5);
21220
- i0__namespace.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
21221
- i0__namespace.ɵɵelement(5, "input", 23);
21222
- i0__namespace.ɵɵelementEnd();
21223
- i0__namespace.ɵɵelementStart(6, "h3", 22);
21224
- i0__namespace.ɵɵtext(7, "Why should these cases be linked?");
21225
- i0__namespace.ɵɵelementEnd();
21226
- i0__namespace.ɵɵelementStart(8, "div", 24);
21227
- i0__namespace.ɵɵtext(9, " Select all that apply. ");
21228
- i0__namespace.ɵɵelementEnd();
21229
- i0__namespace.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
21230
- i0__namespace.ɵɵelementStart(11, "div", 25);
21231
- i0__namespace.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
21232
- i0__namespace.ɵɵelementEnd();
21233
- i0__namespace.ɵɵelement(13, "br");
21234
- i0__namespace.ɵɵelement(14, "br");
21235
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
21236
- i0__namespace.ɵɵelementStart(16, "button", 27);
21237
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
21238
- i0__namespace.ɵɵtext(17, "Propose case link");
21239
- i0__namespace.ɵɵelementEnd();
21240
- i0__namespace.ɵɵelementEnd();
21241
- }
21242
- if (rf & 2) {
21243
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21244
- i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
21245
- i0__namespace.ɵɵadvance(3);
21246
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
21247
- i0__namespace.ɵɵadvance(1);
21248
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
21249
- i0__namespace.ɵɵadvance(6);
21250
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
21251
- i0__namespace.ɵɵadvance(1);
21252
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
21253
- i0__namespace.ɵɵadvance(1);
21254
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
21255
- i0__namespace.ɵɵadvance(3);
21256
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
21257
- }
21258
- }
21259
- function LinkCasesComponent_span_13_Template(rf, ctx) {
21260
- if (rf & 1) {
21261
- i0__namespace.ɵɵelementStart(0, "span", 28);
21262
- i0__namespace.ɵɵelementStart(1, "span", 29);
21263
- i0__namespace.ɵɵtext(2, "Error:");
21264
- i0__namespace.ɵɵelementEnd();
21265
- i0__namespace.ɵɵtext(3);
21266
- i0__namespace.ɵɵelementEnd();
21267
- }
21268
- if (rf & 2) {
21269
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21270
- i0__namespace.ɵɵadvance(3);
21271
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
21272
- }
21273
- }
21274
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
21275
- if (rf & 1) {
21276
- i0__namespace.ɵɵelementStart(0, "span");
21277
- i0__namespace.ɵɵtext(1);
21278
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21279
- i0__namespace.ɵɵelement(3, "br");
21280
- i0__namespace.ɵɵelementEnd();
21281
- }
21282
- if (rf & 2) {
21283
- var reason_r15 = ctx.$implicit;
21284
- i0__namespace.ɵɵadvance(1);
21285
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
21286
- }
21287
- }
21288
- var _c1$6 = function (a0) { return { "table-group-error": a0 }; };
21289
- function LinkCasesComponent_tr_31_Template(rf, ctx) {
21290
- if (rf & 1) {
21291
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
21292
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21293
- i0__namespace.ɵɵelementStart(1, "td", 33);
21294
- i0__namespace.ɵɵelement(2, "div", 34);
21295
- i0__namespace.ɵɵelementStart(3, "span");
21296
- i0__namespace.ɵɵtext(4);
21297
- i0__namespace.ɵɵelement(5, "br");
21298
- i0__namespace.ɵɵtext(6);
21299
- i0__namespace.ɵɵpipe(7, "ccdCaseReference");
21300
- i0__namespace.ɵɵelementEnd();
21301
- i0__namespace.ɵɵelementEnd();
21302
- i0__namespace.ɵɵelementStart(8, "td", 35);
21303
- i0__namespace.ɵɵtext(9);
21304
- i0__namespace.ɵɵelementEnd();
21305
- i0__namespace.ɵɵelementStart(10, "td", 33);
21306
- i0__namespace.ɵɵtext(11);
21307
- i0__namespace.ɵɵelementEnd();
21308
- i0__namespace.ɵɵelementStart(12, "td", 35);
21309
- i0__namespace.ɵɵtext(13);
21310
- i0__namespace.ɵɵelementEnd();
21311
- i0__namespace.ɵɵelementStart(14, "td", 33);
21312
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
21313
- i0__namespace.ɵɵelementEnd();
21314
- i0__namespace.ɵɵelementStart(16, "td", 33);
21315
- i0__namespace.ɵɵelementStart(17, "a", 37);
21316
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { i0__namespace.ɵɵrestoreView(_r17_1); var pos_r13 = ctx.index; var case_r12 = ctx.$implicit; var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onSelectedLinkedCaseRemove(pos_r13, case_r12.caseReference); });
21317
- i0__namespace.ɵɵtext(18, "Remove");
21318
- i0__namespace.ɵɵelementEnd();
21319
- i0__namespace.ɵɵelementEnd();
21320
- i0__namespace.ɵɵelementEnd();
21321
- }
21322
- if (rf & 2) {
21323
- var case_r12 = ctx.$implicit;
21324
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21325
- i0__namespace.ɵɵadvance(2);
21326
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
21327
- i0__namespace.ɵɵadvance(2);
21328
- i0__namespace.ɵɵtextInterpolate1("", case_r12.caseName, " ");
21329
- i0__namespace.ɵɵadvance(2);
21330
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
21331
- i0__namespace.ɵɵadvance(2);
21332
- i0__namespace.ɵɵproperty("title", case_r12.caseTypeDescription);
21333
- i0__namespace.ɵɵadvance(1);
21334
- i0__namespace.ɵɵtextInterpolate(case_r12.caseType);
21335
- i0__namespace.ɵɵadvance(2);
21336
- i0__namespace.ɵɵtextInterpolate(case_r12.caseService);
21337
- i0__namespace.ɵɵadvance(1);
21338
- i0__namespace.ɵɵproperty("title", case_r12.caseStateDescription);
21339
- i0__namespace.ɵɵadvance(1);
21340
- i0__namespace.ɵɵtextInterpolate(case_r12.caseState);
21341
- i0__namespace.ɵɵadvance(2);
21342
- i0__namespace.ɵɵproperty("ngForOf", case_r12.reasons);
21343
- i0__namespace.ɵɵadvance(2);
21344
- i0__namespace.ɵɵattribute("id", case_r12.caseReference);
21345
- }
21346
- }
21347
- function LinkCasesComponent_tr_32_Template(rf, ctx) {
21348
- if (rf & 1) {
21349
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21350
- i0__namespace.ɵɵelementStart(1, "td", 38);
21351
- i0__namespace.ɵɵtext(2, " None ");
21352
- i0__namespace.ɵɵelementEnd();
21353
- i0__namespace.ɵɵelementEnd();
21354
- }
21355
- }
21356
- var LinkCasesComponent = /** @class */ (function () {
21357
- function LinkCasesComponent(casesService, fb, validatorsUtils, linkedCasesService) {
21358
- this.casesService = casesService;
21359
- this.fb = fb;
21360
- this.validatorsUtils = validatorsUtils;
21361
- this.linkedCasesService = linkedCasesService;
21362
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21363
- this.errorMessages = [];
21364
- this.selectedCases = [];
21365
- this.linkCaseReasons = [];
21366
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
21367
- }
21368
- LinkCasesComponent.prototype.ngOnInit = function () {
21369
- this.caseId = this.linkedCasesService.caseId;
21370
- this.caseName = this.linkedCasesService.caseName;
21371
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
21372
- this.initForm();
21373
- if (this.linkedCasesService.editMode) {
21374
- // this may have includes the currently added one but yet to be submitted.
21375
- this.selectedCases = this.linkedCasesService.linkedCases;
21376
- }
21377
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
21378
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
21379
- }
21380
- };
21381
- LinkCasesComponent.prototype.initForm = function () {
21382
- this.linkCaseForm = this.fb.group({
21383
- caseNumber: ['', [i2.Validators.minLength(16), this.validatorsUtils.regexPattern(exports.Patterns.CASE_REF)]],
21384
- reasonType: this.getReasonTypeFormArray,
21385
- });
21386
- };
21387
- Object.defineProperty(LinkCasesComponent.prototype, "getReasonTypeFormArray", {
21388
- get: function () {
21389
- var _this = this;
21390
- return this.fb.array(this.linkCaseReasons.map(function (val) { return _this.fb.group({
21391
- key: [val.key],
21392
- value_en: [val.value_en],
21393
- value_cy: [val.value_cy],
21394
- hint_text_en: [val.hint_text_en],
21395
- hint_text_cy: [val.hint_text_cy],
21396
- lov_order: [val.lov_order],
21397
- parent_key: [val.parent_key],
21398
- selected: [!!val.selected],
21399
- }); }), this.validatorsUtils.formArraySelectedValidator());
21400
- },
21401
- enumerable: false,
21402
- configurable: true
21403
- });
21404
- LinkCasesComponent.prototype.submitCaseInfo = function () {
21405
- this.errorMessages = [];
21406
- this.caseReasonError = null;
21407
- this.caseNumberError = null;
21408
- this.caseSelectionError = null;
21409
- this.noSelectedCaseError = null;
21410
- if (this.linkCaseForm.valid &&
21411
- !this.isCaseSelected(this.selectedCases) &&
21412
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
21413
- !this.isCaseSelectedSameAsCurrentCase()) {
21414
- this.getCaseInfo();
21415
- }
21416
- else {
21417
- this.showErrorInfo();
21418
- }
21419
- };
21420
- LinkCasesComponent.prototype.isCaseSelected = function (linkedCases) {
21421
- if (linkedCases.length === 0) {
21422
- return false;
21423
- }
21424
- var caseNumber = this.linkCaseForm.value.caseNumber;
21425
- return !!linkedCases.find(function (caseLink) { return caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''); });
21426
- };
21427
- LinkCasesComponent.prototype.isCaseSelectedSameAsCurrentCase = function () {
21428
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
21429
- };
21430
- LinkCasesComponent.prototype.showErrorInfo = function () {
21431
- if (this.linkCaseForm.controls.caseNumber.invalid) {
21432
- this.caseNumberError = exports.LinkedCasesErrorMessages.CaseNumberError;
21433
- this.errorMessages.push({
21434
- title: 'dummy-case-number',
21435
- description: exports.LinkedCasesErrorMessages.CaseNumberError,
21436
- fieldId: 'caseNumber',
21437
- });
21438
- }
21439
- if (this.linkCaseForm.controls.reasonType.invalid) {
21440
- this.caseReasonError = exports.LinkedCasesErrorMessages.ReasonSelectionError;
21441
- this.errorMessages.push({
21442
- title: 'dummy-case-reason',
21443
- description: exports.LinkedCasesErrorMessages.ReasonSelectionError,
21444
- fieldId: 'caseReason',
21445
- });
21446
- }
21447
- if (this.isCaseSelected(this.selectedCases)) {
21448
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CaseProposedError;
21449
- this.errorMessages.push({
21450
- title: 'dummy-case-number',
21451
- description: exports.LinkedCasesErrorMessages.CaseProposedError,
21452
- fieldId: 'caseNumber',
21453
- });
21454
- }
21455
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
21456
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CasesLinkedError;
21457
- this.errorMessages.push({
21458
- title: 'dummy-case-number',
21459
- description: exports.LinkedCasesErrorMessages.CasesLinkedError,
21460
- fieldId: 'caseNumber',
21461
- });
21462
- }
21463
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
21464
- this.errorMessages.push({
21465
- title: 'dummy-case-number',
21466
- description: exports.LinkedCasesErrorMessages.ProposedCaseWithIn,
21467
- fieldId: 'caseNumber',
21468
- });
21469
- }
21470
- window.scrollTo(0, 0);
21471
- this.emitLinkedCasesState(false);
21472
- };
21473
- LinkCasesComponent.prototype.getCaseInfo = function () {
21474
- var _this = this;
21475
- var caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
21476
- this.casesService
21477
- .getCaseViewV2(caseNumberData)
21478
- .subscribe(function (caseView) {
21479
- _this.linkedCasesService.caseDetails = caseView;
21480
- var caseLink = {
21481
- caseReference: caseView.case_id,
21482
- reasons: _this.getSelectedCaseReasons(),
21483
- createdDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21484
- caseType: caseView.case_type.name || '',
21485
- caseTypeDescription: caseView.case_type.description || '',
21486
- caseState: caseView.state.name || '',
21487
- caseStateDescription: caseView.state.description || '',
21488
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
21489
- caseName: _this.linkedCasesService.getCaseName(caseView),
21490
- };
21491
- var ccdApiCaseLinkData = {
21492
- CaseReference: caseView.case_id,
21493
- CaseType: caseView.case_type.id,
21494
- CreatedDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21495
- ReasonForLink: _this.getSelectedCCDTypeCaseReason()
21496
- };
21497
- if (!_this.linkedCasesService.caseFieldValue) {
21498
- _this.linkedCasesService.caseFieldValue = [];
21499
- }
21500
- _this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
21501
- _this.selectedCases.push(caseLink);
21502
- _this.initForm();
21503
- _this.emitLinkedCasesState(false);
21504
- }, function (error) {
21505
- _this.caseNumberError = exports.LinkedCasesErrorMessages.CaseCheckAgainError;
21506
- _this.errorMessages.push({
21507
- title: 'dummy-case-number',
21508
- description: exports.LinkedCasesErrorMessages.CaseCheckAgainError,
21509
- fieldId: 'caseNumber',
21510
- });
21511
- _this.emitLinkedCasesState(false);
21512
- window.scrollTo(0, 0);
21513
- return rxjs.throwError(error);
21514
- });
21515
- };
21516
- // Return linked cases state and error messages to the parent
21517
- LinkCasesComponent.prototype.emitLinkedCasesState = function (isNavigateToNextPage) {
21518
- this.linkedCasesStateEmitter.emit({
21519
- currentLinkedCasesPage: exports.LinkedCasesPages.LINK_CASE,
21520
- errorMessages: this.errorMessages,
21521
- navigateToNextPage: isNavigateToNextPage,
21522
- });
21523
- };
21524
- LinkCasesComponent.prototype.getSelectedCaseReasons = function () {
21525
- var selectedReasons = [];
21526
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21527
- if (selectedReason.selected) {
21528
- selectedReasons.push({
21529
- reasonCode: selectedReason.key
21530
- });
21531
- }
21532
- });
21533
- return selectedReasons;
21534
- };
21535
- LinkCasesComponent.prototype.getSelectedCCDTypeCaseReason = function () {
21536
- var selectedReasons = [];
21537
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21538
- if (selectedReason.selected) {
21539
- selectedReasons.push({
21540
- value: {
21541
- Reason: selectedReason.key,
21542
- }
21543
- });
21544
- }
21545
- });
21546
- return selectedReasons;
21547
- };
21548
- LinkCasesComponent.prototype.onSelectedLinkedCaseRemove = function (pos, selectedCaseReference) {
21549
- var caseFieldValue = this.linkedCasesService.caseFieldValue || [];
21550
- var updatedItems = caseFieldValue.filter(function (item) { return item.value && item.value.CaseReference !== selectedCaseReference; });
21551
- if (updatedItems) {
21552
- this.linkedCasesService.caseFieldValue = updatedItems;
21553
- }
21554
- this.selectedCases.splice(pos, 1);
21555
- };
21556
- LinkCasesComponent.prototype.onNext = function () {
21557
- this.errorMessages = [];
21558
- this.caseReasonError = null;
21559
- this.caseNumberError = null;
21560
- this.caseSelectionError = null;
21561
- this.noSelectedCaseError = null;
21562
- var navigateToNextPage = true;
21563
- if (this.selectedCases.length) {
21564
- this.linkedCasesService.linkedCases = this.selectedCases;
21565
- }
21566
- else {
21567
- this.noSelectedCaseError = exports.LinkedCasesErrorMessages.CaseSelectionError;
21568
- this.errorMessages.push({
21569
- title: 'dummy-case-selection',
21570
- description: exports.LinkedCasesErrorMessages.CaseSelectionError,
21571
- fieldId: 'caseReason',
21572
- });
21573
- navigateToNextPage = false;
21574
- }
21575
- this.emitLinkedCasesState(navigateToNextPage);
21576
- };
21577
- return LinkCasesComponent;
21578
- }());
21579
- LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(ValidatorsUtils), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21580
- LinkCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 36, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes", 3, "ngClass"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) {
21581
- if (rf & 1) {
21582
- i0__namespace.ɵɵelementStart(0, "div", 0);
21583
- i0__namespace.ɵɵelementStart(1, "div", 1);
21584
- i0__namespace.ɵɵelementStart(2, "div");
21585
- i0__namespace.ɵɵelementStart(3, "span", 2);
21586
- i0__namespace.ɵɵtext(4);
21587
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
21588
- i0__namespace.ɵɵelementEnd();
21589
- i0__namespace.ɵɵelementStart(6, "h1", 3);
21590
- i0__namespace.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
21591
- i0__namespace.ɵɵelementEnd();
21592
- i0__namespace.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
21593
- i0__namespace.ɵɵelement(9, "hr");
21594
- i0__namespace.ɵɵelement(10, "br");
21595
- i0__namespace.ɵɵelement(11, "br");
21596
- i0__namespace.ɵɵelementStart(12, "div", 5);
21597
- i0__namespace.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
21598
- i0__namespace.ɵɵelementStart(14, "table", 7);
21599
- i0__namespace.ɵɵelementStart(15, "caption", 8);
21600
- i0__namespace.ɵɵtext(16, "Proposed case links ");
21601
- i0__namespace.ɵɵelementEnd();
21602
- i0__namespace.ɵɵelementStart(17, "thead", 9);
21603
- i0__namespace.ɵɵelementStart(18, "tr", 10);
21604
- i0__namespace.ɵɵelementStart(19, "th", 11);
21605
- i0__namespace.ɵɵtext(20, "Case name and number");
21606
- i0__namespace.ɵɵelementEnd();
21607
- i0__namespace.ɵɵelementStart(21, "th", 12);
21608
- i0__namespace.ɵɵtext(22, "Case type ");
21609
- i0__namespace.ɵɵelementEnd();
21610
- i0__namespace.ɵɵelementStart(23, "th", 13);
21611
- i0__namespace.ɵɵtext(24, "Service");
21612
- i0__namespace.ɵɵelementEnd();
21613
- i0__namespace.ɵɵelementStart(25, "th", 13);
21614
- i0__namespace.ɵɵtext(26, "State");
21615
- i0__namespace.ɵɵelementEnd();
21616
- i0__namespace.ɵɵelementStart(27, "th", 14);
21617
- i0__namespace.ɵɵtext(28, "Reasons for case link");
21618
- i0__namespace.ɵɵelementEnd();
21619
- i0__namespace.ɵɵelement(29, "th", 15);
21620
- i0__namespace.ɵɵelementEnd();
21621
- i0__namespace.ɵɵelementEnd();
21622
- i0__namespace.ɵɵelementStart(30, "tbody", 16);
21623
- i0__namespace.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
21624
- i0__namespace.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
21625
- i0__namespace.ɵɵelementEnd();
21626
- i0__namespace.ɵɵelementEnd();
21627
- i0__namespace.ɵɵelementEnd();
21628
- i0__namespace.ɵɵelementStart(33, "div", 19);
21629
- i0__namespace.ɵɵelementStart(34, "button", 20);
21630
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
21631
- i0__namespace.ɵɵtext(35, "Next");
21632
- i0__namespace.ɵɵelementEnd();
21633
- i0__namespace.ɵɵelementEnd();
21634
- i0__namespace.ɵɵelementEnd();
21635
- i0__namespace.ɵɵelementEnd();
21636
- i0__namespace.ɵɵelementEnd();
21637
- }
21638
- if (rf & 2) {
21639
- i0__namespace.ɵɵadvance(4);
21640
- i0__namespace.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0__namespace.ɵɵpipeBind1(5, 7, ctx.caseId), "");
21641
- i0__namespace.ɵɵadvance(4);
21642
- i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
21643
- i0__namespace.ɵɵadvance(4);
21644
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
21645
- i0__namespace.ɵɵadvance(1);
21646
- i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
21647
- i0__namespace.ɵɵadvance(18);
21648
- i0__namespace.ɵɵproperty("ngForOf", ctx.selectedCases);
21649
- i0__namespace.ɵɵadvance(1);
21650
- i0__namespace.ɵɵproperty("ngIf", !ctx.selectedCases.length);
21651
- }
21652
- }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}"] });
21653
- (function () {
21654
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesComponent, [{
21655
- type: i0.Component,
21656
- args: [{
21657
- selector: 'ccd-link-cases',
21658
- styleUrls: ['./link-cases.component.scss'],
21659
- templateUrl: './link-cases.component.html',
21660
- }]
21661
- }], function () { return [{ type: CasesService }, { type: i2__namespace.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21662
- type: i0.Output
21663
- }] });
21664
- })();
21665
-
21666
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) {
21667
- if (rf & 1) {
21668
- var _r3_1 = i0__namespace.ɵɵgetCurrentView();
21669
- i0__namespace.ɵɵelementStart(0, "a", 2);
21670
- i0__namespace.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r3_1); var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.onClick(); });
21671
- i0__namespace.ɵɵtext(1);
21672
- i0__namespace.ɵɵelementEnd();
21673
- }
21674
- if (rf & 2) {
21675
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21676
- i0__namespace.ɵɵadvance(1);
21677
- i0__namespace.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
21678
- }
21679
- }
21680
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) {
21681
- if (rf & 1) {
21682
- i0__namespace.ɵɵelementStart(0, "span");
21683
- i0__namespace.ɵɵtext(1);
21684
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21685
- i0__namespace.ɵɵelement(3, "br");
21686
- i0__namespace.ɵɵelementEnd();
21687
- }
21688
- if (rf & 2) {
21689
- var reason_r11 = ctx.$implicit;
21690
- i0__namespace.ɵɵadvance(1);
21691
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
21692
- }
21693
- }
21694
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) {
21695
- if (rf & 1) {
21696
- i0__namespace.ɵɵelementStart(0, "td", 14);
21697
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
21698
- i0__namespace.ɵɵelementEnd();
21699
- }
21700
- if (rf & 2) {
21701
- var details_r9 = ctx.$implicit;
21702
- i0__namespace.ɵɵadvance(1);
21703
- i0__namespace.ɵɵproperty("ngForOf", details_r9.reasons);
21704
- }
21705
- }
21706
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
21707
- if (rf & 1) {
21708
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21709
- i0__namespace.ɵɵelementStart(1, "td", 11);
21710
- i0__namespace.ɵɵelementStart(2, "p", 12);
21711
- i0__namespace.ɵɵelementStart(3, "a", 13);
21712
- i0__namespace.ɵɵelementStart(4, "span");
21713
- i0__namespace.ɵɵtext(5);
21714
- i0__namespace.ɵɵelement(6, "br");
21715
- i0__namespace.ɵɵtext(7);
21716
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21717
- i0__namespace.ɵɵelementEnd();
21718
- i0__namespace.ɵɵelementEnd();
21719
- i0__namespace.ɵɵelementEnd();
21720
- i0__namespace.ɵɵelementEnd();
21721
- i0__namespace.ɵɵelementStart(9, "td", 14);
21722
- i0__namespace.ɵɵelementStart(10, "span", 15);
21723
- i0__namespace.ɵɵtext(11);
21724
- i0__namespace.ɵɵelementEnd();
21725
- i0__namespace.ɵɵelementEnd();
21726
- i0__namespace.ɵɵelementStart(12, "td", 14);
21727
- i0__namespace.ɵɵelementStart(13, "span");
21728
- i0__namespace.ɵɵtext(14);
21729
- i0__namespace.ɵɵelementEnd();
21730
- i0__namespace.ɵɵelementEnd();
21731
- i0__namespace.ɵɵelementStart(15, "td", 14);
21732
- i0__namespace.ɵɵelementStart(16, "span", 15);
21733
- i0__namespace.ɵɵtext(17);
21734
- i0__namespace.ɵɵelementEnd();
21735
- i0__namespace.ɵɵelementEnd();
21736
- i0__namespace.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
21737
- i0__namespace.ɵɵelementEnd();
21738
- }
21739
- if (rf & 2) {
21740
- var case_r7 = ctx.$implicit;
21741
- i0__namespace.ɵɵadvance(3);
21742
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21743
- i0__namespace.ɵɵadvance(2);
21744
- i0__namespace.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
21745
- i0__namespace.ɵɵadvance(2);
21746
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
21747
- i0__namespace.ɵɵadvance(3);
21748
- i0__namespace.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
21749
- i0__namespace.ɵɵadvance(1);
21750
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdCaseType);
21751
- i0__namespace.ɵɵadvance(3);
21752
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
21753
- i0__namespace.ɵɵadvance(2);
21754
- i0__namespace.ɵɵproperty("title", case_r7.stateDescription);
21755
- i0__namespace.ɵɵadvance(1);
21756
- i0__namespace.ɵɵtextInterpolate(case_r7.state);
21757
- i0__namespace.ɵɵadvance(1);
21758
- i0__namespace.ɵɵproperty("ngForOf", case_r7.linkDetails);
21759
- }
21760
- }
21761
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) {
21762
- if (rf & 1) {
21763
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21764
- i0__namespace.ɵɵelementStart(1, "td", 18);
21765
- i0__namespace.ɵɵtext(2, " None ");
21766
- i0__namespace.ɵɵelementEnd();
21767
- i0__namespace.ɵɵelementEnd();
21768
- }
21769
- }
21770
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) {
21771
- if (rf & 1) {
21772
- i0__namespace.ɵɵelementStart(0, "tbody", 8);
21773
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
21774
- i0__namespace.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
21775
- i0__namespace.ɵɵelementEnd();
21776
- }
21777
- if (rf & 2) {
21778
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21779
- i0__namespace.ɵɵadvance(1);
21780
- i0__namespace.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
21781
- i0__namespace.ɵɵadvance(1);
21782
- i0__namespace.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
21783
- }
21784
- }
21785
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) {
21786
- if (rf & 1) {
21787
- i0__namespace.ɵɵelementStart(0, "table", 3);
21788
- i0__namespace.ɵɵelementStart(1, "thead", 4);
21789
- i0__namespace.ɵɵelementStart(2, "tr", 5);
21790
- i0__namespace.ɵɵelementStart(3, "th", 6);
21791
- i0__namespace.ɵɵtext(4, "Case name and number");
21792
- i0__namespace.ɵɵelementEnd();
21793
- i0__namespace.ɵɵelementStart(5, "th", 6);
21794
- i0__namespace.ɵɵtext(6, "Case type ");
21795
- i0__namespace.ɵɵelementEnd();
21796
- i0__namespace.ɵɵelementStart(7, "th", 6);
21797
- i0__namespace.ɵɵtext(8, "Service");
21798
- i0__namespace.ɵɵelementEnd();
21799
- i0__namespace.ɵɵelementStart(9, "th", 6);
21800
- i0__namespace.ɵɵtext(10, "State");
21801
- i0__namespace.ɵɵelementEnd();
21802
- i0__namespace.ɵɵelementStart(11, "th", 6);
21803
- i0__namespace.ɵɵtext(12, "Reasons for case link");
21804
- i0__namespace.ɵɵelementEnd();
21805
- i0__namespace.ɵɵelementEnd();
21806
- i0__namespace.ɵɵelementEnd();
21807
- i0__namespace.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
21808
- i0__namespace.ɵɵelementEnd();
21809
- }
21810
- if (rf & 2) {
21811
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21812
- i0__namespace.ɵɵadvance(13);
21813
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
21814
- }
21815
- }
21816
- exports.PageType = void 0;
21817
- (function (PageType) {
21818
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
21819
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
21820
- })(exports.PageType || (exports.PageType = {}));
21821
- var LinkedCasesFromTableComponent = /** @class */ (function () {
21822
- function LinkedCasesFromTableComponent(route, casesService, linkedCasesService) {
21823
- this.route = route;
21824
- this.casesService = casesService;
21825
- this.linkedCasesService = linkedCasesService;
21826
- this.notifyAPIFailure = new i0.EventEmitter(false);
21827
- this.pageType = exports.PageType;
21828
- this.getLinkedCasesResponse = [];
21829
- this.showHideLinkText = 'Show';
21830
- this.noLinkedCases = true;
21831
- this.isServerError = false;
21832
- }
21833
- LinkedCasesFromTableComponent.prototype.ngAfterViewInit = function () {
21834
- var labelField = document.getElementsByClassName('case-viewer-label');
21835
- if (labelField && labelField.length) {
21836
- labelField[0].replaceWith('');
21837
- }
21838
- };
21839
- LinkedCasesFromTableComponent.prototype.ngOnInit = function () {
21840
- this.fetchPageData();
21841
- if (this.route.snapshot.data.case) {
21842
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
21843
- }
21844
- };
21845
- LinkedCasesFromTableComponent.prototype.fetchPageData = function () {
21846
- var _this = this;
21847
- this.caseId = this.route.snapshot.data.case.case_id;
21848
- this.getLinkedCases().subscribe(function (response) {
21849
- _this.isServerError = false;
21850
- _this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(function (item) {
21851
- var mappedCasetype = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
21852
- var mappedCasetypeDescription = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
21853
- var mappedCaseState = _this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
21854
- var mappedCaseStateDescription = _this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
21855
- var mappedCaseService = _this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
21856
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
21857
- });
21858
- _this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
21859
- }, function (err) {
21860
- _this.isServerError = true;
21861
- _this.notifyAPIFailure.emit(true);
21862
- });
21863
- };
21864
- LinkedCasesFromTableComponent.prototype.getLinkedCases = function () {
21865
- return this.casesService.getLinkedCases(this.caseId);
21866
- };
21867
- LinkedCasesFromTableComponent.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
21868
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
21869
- };
21870
- LinkedCasesFromTableComponent.prototype.onClick = function () {
21871
- this.showHideLinkText = this.showHideLinkText === 'Show'
21872
- ? 'Hide'
21873
- : 'Show';
21874
- };
21875
- return LinkedCasesFromTableComponent;
21876
- }());
21877
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
21878
- LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21879
- LinkedCasesFromTableComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 2, vars: 2, consts: [["id", "show-hide-link", "class", "govuk-link", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "table to display cases linked from", 4, "ngIf"], ["id", "show-hide-link", "href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["aria-describedby", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) {
21880
- if (rf & 1) {
21881
- i0__namespace.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
21882
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
21883
- }
21884
- if (rf & 2) {
21885
- i0__namespace.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
21886
- i0__namespace.ɵɵadvance(1);
21887
- i0__namespace.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
21888
- }
21889
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
21890
- (function () {
21891
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
21892
- type: i0.Component,
21893
- args: [{
21894
- selector: 'ccd-linked-cases-from-table',
21895
- templateUrl: './linked-cases-from-table.component.html',
21896
- styleUrls: ['./linked-cases-from-table.component.scss']
21897
- }]
21898
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
21899
- type: i0.Input
21900
- }], notifyAPIFailure: [{
21901
- type: i0.Output
21902
- }] });
21903
- })();
21904
-
21905
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) {
21906
- if (rf & 1) {
21907
- i0__namespace.ɵɵelementStart(0, "a", 16);
21908
- i0__namespace.ɵɵtext(1);
21909
- i0__namespace.ɵɵelementEnd();
21910
- }
21911
- if (rf & 2) {
21912
- var case_r3 = i0__namespace.ɵɵnextContext(3).$implicit;
21913
- var ctx_r9 = i0__namespace.ɵɵnextContext(2);
21914
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21915
- i0__namespace.ɵɵadvance(1);
21916
- i0__namespace.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
21917
- }
21918
- }
21919
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) {
21920
- if (rf & 1) {
21921
- i0__namespace.ɵɵelement(0, "br");
21922
- }
21923
- }
21924
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) {
21925
- if (rf & 1) {
21926
- i0__namespace.ɵɵelementStart(0, "span");
21927
- i0__namespace.ɵɵtext(1);
21928
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21929
- i0__namespace.ɵɵelementStart(3, "span");
21930
- i0__namespace.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
21931
- i0__namespace.ɵɵelementEnd();
21932
- i0__namespace.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
21933
- i0__namespace.ɵɵelementEnd();
21934
- }
21935
- if (rf & 2) {
21936
- var reason_r6 = ctx.$implicit;
21937
- var isLast_r8 = ctx.last;
21938
- var ctx_r5 = i0__namespace.ɵɵnextContext(4);
21939
- i0__namespace.ɵɵadvance(1);
21940
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 3, reason_r6), "");
21941
- i0__namespace.ɵɵadvance(3);
21942
- i0__namespace.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
21943
- i0__namespace.ɵɵadvance(1);
21944
- i0__namespace.ɵɵproperty("ngIf", !isLast_r8);
21945
- }
21946
- }
21947
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) {
21948
- if (rf & 1) {
21949
- i0__namespace.ɵɵelementStart(0, "td");
21950
- i0__namespace.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
21951
- i0__namespace.ɵɵelementEnd();
21952
- }
21953
- if (rf & 2) {
21954
- var case_r3 = i0__namespace.ɵɵnextContext().$implicit;
21955
- i0__namespace.ɵɵadvance(1);
21956
- i0__namespace.ɵɵproperty("ngForOf", case_r3.reasons);
21957
- }
21958
- }
21959
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) {
21960
- if (rf & 1) {
21961
- i0__namespace.ɵɵelementStart(0, "tr", 4);
21962
- i0__namespace.ɵɵelementStart(1, "td");
21963
- i0__namespace.ɵɵelementStart(2, "p", 9);
21964
- i0__namespace.ɵɵelementStart(3, "a", 10);
21965
- i0__namespace.ɵɵelementStart(4, "span", 11);
21966
- i0__namespace.ɵɵtext(5);
21967
- i0__namespace.ɵɵelement(6, "br");
21968
- i0__namespace.ɵɵtext(7);
21969
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21970
- i0__namespace.ɵɵelementEnd();
21971
- i0__namespace.ɵɵelementEnd();
21972
- i0__namespace.ɵɵelementEnd();
21973
- i0__namespace.ɵɵelementEnd();
21974
- i0__namespace.ɵɵelementStart(9, "td");
21975
- i0__namespace.ɵɵelementStart(10, "span", 12);
21976
- i0__namespace.ɵɵtext(11);
21977
- i0__namespace.ɵɵelementEnd();
21978
- i0__namespace.ɵɵelementEnd();
21979
- i0__namespace.ɵɵelementStart(12, "td");
21980
- i0__namespace.ɵɵelementStart(13, "span");
21981
- i0__namespace.ɵɵtext(14);
21982
- i0__namespace.ɵɵelementEnd();
21983
- i0__namespace.ɵɵelementEnd();
21984
- i0__namespace.ɵɵelementStart(15, "td");
21985
- i0__namespace.ɵɵelementStart(16, "span", 12);
21986
- i0__namespace.ɵɵtext(17);
21987
- i0__namespace.ɵɵelementEnd();
21988
- i0__namespace.ɵɵelementEnd();
21989
- i0__namespace.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
21990
- i0__namespace.ɵɵelementEnd();
21991
- }
21992
- if (rf & 2) {
21993
- var case_r3 = ctx.$implicit;
21994
- i0__namespace.ɵɵadvance(3);
21995
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21996
- i0__namespace.ɵɵadvance(2);
21997
- i0__namespace.ɵɵtextInterpolate1("", case_r3.caseName, " ");
21998
- i0__namespace.ɵɵadvance(2);
21999
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
22000
- i0__namespace.ɵɵadvance(3);
22001
- i0__namespace.ɵɵproperty("title", case_r3.caseTypeDescription);
22002
- i0__namespace.ɵɵadvance(1);
22003
- i0__namespace.ɵɵtextInterpolate(case_r3.caseType);
22004
- i0__namespace.ɵɵadvance(3);
22005
- i0__namespace.ɵɵtextInterpolate(case_r3.service);
22006
- i0__namespace.ɵɵadvance(2);
22007
- i0__namespace.ɵɵproperty("title", case_r3.stateDescription);
22008
- i0__namespace.ɵɵadvance(1);
22009
- i0__namespace.ɵɵtextInterpolate(case_r3.state);
22010
- i0__namespace.ɵɵadvance(1);
22011
- i0__namespace.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
22012
- }
22013
- }
22014
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) {
22015
- if (rf & 1) {
22016
- i0__namespace.ɵɵelementStart(0, "tr", 4);
22017
- i0__namespace.ɵɵelementStart(1, "td", 17);
22018
- i0__namespace.ɵɵtext(2, " None ");
22019
- i0__namespace.ɵɵelementEnd();
22020
- i0__namespace.ɵɵelementEnd();
22021
- }
22022
- }
22023
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) {
22024
- if (rf & 1) {
22025
- i0__namespace.ɵɵelementStart(0, "table", 3);
22026
- i0__namespace.ɵɵelementStart(1, "thead");
22027
- i0__namespace.ɵɵelementStart(2, "tr", 4);
22028
- i0__namespace.ɵɵelementStart(3, "th", 5);
22029
- i0__namespace.ɵɵtext(4, "Case name and number");
22030
- i0__namespace.ɵɵelementEnd();
22031
- i0__namespace.ɵɵelementStart(5, "th", 5);
22032
- i0__namespace.ɵɵtext(6, "Case type ");
22033
- i0__namespace.ɵɵelementEnd();
22034
- i0__namespace.ɵɵelementStart(7, "th", 5);
22035
- i0__namespace.ɵɵtext(8, "Service");
22036
- i0__namespace.ɵɵelementEnd();
22037
- i0__namespace.ɵɵelementStart(9, "th", 5);
22038
- i0__namespace.ɵɵtext(10, "State");
22039
- i0__namespace.ɵɵelementEnd();
22040
- i0__namespace.ɵɵelementStart(11, "th", 5);
22041
- i0__namespace.ɵɵtext(12, "Reasons for case link");
22042
- i0__namespace.ɵɵelementEnd();
22043
- i0__namespace.ɵɵelementEnd();
22044
- i0__namespace.ɵɵelementEnd();
22045
- i0__namespace.ɵɵelementStart(13, "tbody", 6);
22046
- i0__namespace.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
22047
- i0__namespace.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
22048
- i0__namespace.ɵɵelementEnd();
22049
- i0__namespace.ɵɵelementEnd();
22050
- }
22051
- if (rf & 2) {
22052
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22053
- i0__namespace.ɵɵadvance(14);
22054
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
22055
- i0__namespace.ɵɵadvance(1);
22056
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
22057
- }
22058
- }
22059
- var LinkedCasesToTableComponent = /** @class */ (function () {
22060
- function LinkedCasesToTableComponent(route, linkedCasesService, casesService) {
22061
- this.route = route;
22062
- this.linkedCasesService = linkedCasesService;
22063
- this.casesService = casesService;
22064
- this.notifyAPIFailure = new i0.EventEmitter(false);
22065
- this.linkedCasesFromResponse = [];
22066
- this.isServerError = false;
22067
- this.jurisdictionsResponse = [];
22068
- }
22069
- LinkedCasesToTableComponent.prototype.ngAfterViewInit = function () {
22070
- var labelField = document.getElementsByClassName('govuk-heading-l');
22071
- if (labelField && labelField.length) {
22072
- labelField[0].replaceWith('');
22073
- }
22074
- labelField = document.getElementsByClassName('heading-h2');
22075
- if (labelField && labelField.length) {
22076
- labelField[0].replaceWith('');
22077
- }
22078
- };
22079
- LinkedCasesToTableComponent.prototype.ngOnInit = function () {
22080
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
22081
- this.getAllLinkedCaseInformation();
22082
- if (this.route.snapshot.data.case) {
22083
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
22084
- }
22085
- };
22086
- LinkedCasesToTableComponent.prototype.getCaseRefereneLink = function (caseRef) {
22087
- return caseRef.slice(this.caseId.length - 4);
22088
- };
22089
- LinkedCasesToTableComponent.prototype.sortLinkedCasesByReasonCode = function (searchCasesResponse) {
22090
- var topLevelresultArray = [];
22091
- var secondLevelresultArray = [];
22092
- searchCasesResponse.forEach(function (item) {
22093
- var reasons = item && item.reasons || [];
22094
- var consolidatedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE; });
22095
- var progressedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE; });
22096
- var arrayItem;
22097
- if (progressedStateReason) {
22098
- arrayItem = Object.assign({}, item);
22099
- topLevelresultArray.push(arrayItem);
22100
- }
22101
- else if (consolidatedStateReason) {
22102
- arrayItem = Object.assign({}, item);
22103
- secondLevelresultArray = __spread([Object.assign({}, item)], secondLevelresultArray);
22104
- }
22105
- else {
22106
- arrayItem = Object.assign({}, item);
22107
- secondLevelresultArray.push(Object.assign({}, item));
22108
- }
22109
- });
22110
- return topLevelresultArray.concat(secondLevelresultArray);
22111
- };
22112
- LinkedCasesToTableComponent.prototype.getAllLinkedCaseInformation = function () {
22113
- var _this = this;
22114
- var searchCasesResponse = [];
22115
- var caseFieldValue = this.caseField ? this.caseField.value : [];
22116
- // Generate the list of observables
22117
- caseFieldValue.forEach(function (fieldValue) {
22118
- if (fieldValue && fieldValue.id) {
22119
- searchCasesResponse.push(_this.casesService.getCaseViewV2(fieldValue.id));
22120
- }
22121
- });
22122
- if (searchCasesResponse.length) {
22123
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22124
- var casesResponse = [];
22125
- searchCases.forEach(function (response) {
22126
- casesResponse.push(_this.mapResponse(response));
22127
- });
22128
- _this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
22129
- _this.isLoaded = true;
22130
- var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
22131
- return {
22132
- caseReference: item.caseReference,
22133
- caseName: item.caseName,
22134
- caseService: item.service,
22135
- caseType: item.caseType,
22136
- unlink: false,
22137
- reasons: item.reasons && item.reasons.map(function (reason) {
22138
- return {
22139
- reasonCode: reason
22140
- };
22141
- }),
22142
- };
22143
- });
22144
- _this.linkedCasesService.initialCaseLinks = caseLinks;
22145
- _this.linkedCasesService.linkedCases = caseLinks;
22146
- _this.isServerError = false;
22147
- }, function (err) {
22148
- _this.isServerError = true;
22149
- _this.notifyAPIFailure.emit(true);
22150
- });
22151
- }
22152
- };
22153
- LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22154
- return rxjs.forkJoin(searchCasesResponse);
22155
- };
22156
- LinkedCasesToTableComponent.prototype.hasLeadCaseOrConsolidated = function (reasonCode) {
22157
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
22158
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
22159
- };
22160
- LinkedCasesToTableComponent.prototype.mapResponse = function (esSearchCasesResponse) {
22161
- var caseInfo = this.caseField.value.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
22162
- return caseInfo && {
22163
- caseReference: esSearchCasesResponse.case_id,
22164
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
22165
- caseType: esSearchCasesResponse.case_type.name || '',
22166
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
22167
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
22168
- state: esSearchCasesResponse.state.name || '',
22169
- stateDescription: esSearchCasesResponse.state.description || '',
22170
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
22171
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
22172
- };
22173
- };
22174
- return LinkedCasesToTableComponent;
22175
- }());
22176
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
22177
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
22178
- LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CasesService)); };
22179
- LinkedCasesToTableComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-describedby", "table to display cases linked TO", 4, "ngIf"], ["aria-describedby", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) {
22180
- if (rf & 1) {
22181
- i0__namespace.ɵɵelementStart(0, "div", 0);
22182
- i0__namespace.ɵɵelementStart(1, "div", 1);
22183
- i0__namespace.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
22184
- i0__namespace.ɵɵelementEnd();
22185
- i0__namespace.ɵɵelementEnd();
22186
- }
22187
- if (rf & 2) {
22188
- i0__namespace.ɵɵadvance(2);
22189
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
22190
- }
22191
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
22192
- (function () {
22193
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
22194
- type: i0.Component,
22195
- args: [{
22196
- selector: 'ccd-linked-cases-to-table',
22197
- templateUrl: './linked-cases-to-table.component.html',
22198
- styleUrls: ['./linked-cases-to-table.component.scss']
22199
- }]
22200
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
22201
- type: i0.Input
22202
- }], notifyAPIFailure: [{
22203
- type: i0.Output
22204
- }] });
22205
- })();
22206
-
22207
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) {
22208
- if (rf & 1) {
22209
- i0__namespace.ɵɵelementStart(0, "h1", 9);
22210
- i0__namespace.ɵɵtext(1, "There is a problem");
22211
- i0__namespace.ɵɵelementEnd();
22212
- }
22213
- }
22214
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) {
22215
- if (rf & 1) {
22216
- i0__namespace.ɵɵelementStart(0, "p", 10);
22217
- i0__namespace.ɵɵelementStart(1, "span", 11);
22218
- i0__namespace.ɵɵtext(2, "Error:");
22219
- i0__namespace.ɵɵelementEnd();
22220
- i0__namespace.ɵɵtext(3);
22221
- i0__namespace.ɵɵelementEnd();
22222
- }
22223
- if (rf & 2) {
22224
- var ctx_r1 = i0__namespace.ɵɵnextContext();
22225
- i0__namespace.ɵɵadvance(3);
22226
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
22227
- }
22228
- }
22229
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) {
22230
- if (rf & 1) {
22231
- i0__namespace.ɵɵelementStart(0, "p", 5);
22232
- i0__namespace.ɵɵtext(1, "There are no cases linked to this one.");
22233
- i0__namespace.ɵɵelementEnd();
22234
- }
22235
- }
22236
- var NoLinkedCasesComponent = /** @class */ (function () {
22237
- function NoLinkedCasesComponent(router, linkedCasesService) {
22238
- this.router = router;
22239
- this.linkedCasesService = linkedCasesService;
22240
- }
22241
- NoLinkedCasesComponent.prototype.onBack = function () {
22242
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
22243
- window.location.hash = 'Linked cases';
22244
- });
22245
- };
22246
- return NoLinkedCasesComponent;
22247
- }());
22248
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22249
- NoLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NoLinkedCasesComponent, selectors: [["ccd-no-linked-cases"]], decls: 12, vars: 3, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["class", "govuk-heading-xl", 4, "ngIf"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf", "ngIfElse"], ["noLinkedCases", ""], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-button-group"], ["type", "button", "id", "back-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function NoLinkedCasesComponent_Template(rf, ctx) {
22250
- if (rf & 1) {
22251
- i0__namespace.ɵɵelementStart(0, "div", 0);
22252
- i0__namespace.ɵɵelementStart(1, "div", 1);
22253
- i0__namespace.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
22254
- i0__namespace.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
22255
- i0__namespace.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
22256
- i0__namespace.ɵɵelementStart(6, "p", 5);
22257
- i0__namespace.ɵɵelementStart(7, "a", 6);
22258
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
22259
- i0__namespace.ɵɵtext(8, "Go back to the Linked cases tab");
22260
- i0__namespace.ɵɵelementEnd();
22261
- i0__namespace.ɵɵelementEnd();
22262
- i0__namespace.ɵɵelementStart(9, "div", 7);
22263
- i0__namespace.ɵɵelementStart(10, "button", 8);
22264
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
22265
- i0__namespace.ɵɵtext(11, "Back");
22266
- i0__namespace.ɵɵelementEnd();
22267
- i0__namespace.ɵɵelementEnd();
22268
- i0__namespace.ɵɵelementEnd();
22269
- i0__namespace.ɵɵelementEnd();
22270
- }
22271
- if (rf & 2) {
22272
- var _r2 = i0__namespace.ɵɵreference(5);
22273
- i0__namespace.ɵɵadvance(2);
22274
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
22275
- i0__namespace.ɵɵadvance(1);
22276
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
22277
- }
22278
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
22279
- (function () {
22280
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoLinkedCasesComponent, [{
22281
- type: i0.Component,
22282
- args: [{
22283
- selector: 'ccd-no-linked-cases',
22284
- templateUrl: './no-linked-cases.component.html'
22285
- }]
22286
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, null);
22287
- })();
22288
-
22289
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) {
22290
- if (rf & 1) {
22291
- i0__namespace.ɵɵelementStart(0, "p", 11);
22292
- i0__namespace.ɵɵelementStart(1, "span", 12);
22293
- i0__namespace.ɵɵtext(2, "Error:");
22294
- i0__namespace.ɵɵelementEnd();
22295
- i0__namespace.ɵɵtext(3);
22296
- i0__namespace.ɵɵelementEnd();
22297
- }
22298
- if (rf & 2) {
22299
- var ctx_r2 = i0__namespace.ɵɵnextContext(3);
22300
- i0__namespace.ɵɵadvance(3);
22301
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
22302
- }
22303
- }
22304
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) {
22305
- if (rf & 1) {
22306
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
22307
- i0__namespace.ɵɵelementStart(0, "div", 13);
22308
- i0__namespace.ɵɵelementStart(1, "input", 14);
22309
- i0__namespace.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(3); return ctx_r5.onChange($event.target); });
22310
- i0__namespace.ɵɵelementEnd();
22311
- i0__namespace.ɵɵelementStart(2, "label", 15);
22312
- i0__namespace.ɵɵtext(3);
22313
- i0__namespace.ɵɵpipe(4, "ccdCaseReference");
22314
- i0__namespace.ɵɵelementEnd();
22315
- i0__namespace.ɵɵelementEnd();
22316
- }
22317
- if (rf & 2) {
22318
- var case_r4 = ctx.$implicit;
22319
- i0__namespace.ɵɵadvance(1);
22320
- i0__namespace.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
22321
- i0__namespace.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
22322
- i0__namespace.ɵɵadvance(1);
22323
- i0__namespace.ɵɵpropertyInterpolate("for", case_r4.caseReference);
22324
- i0__namespace.ɵɵadvance(1);
22325
- i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
22326
- }
22327
- }
22328
- var _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
22329
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
22330
- if (rf & 1) {
22331
- i0__namespace.ɵɵelementStart(0, "div", 7);
22332
- i0__namespace.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
22333
- i0__namespace.ɵɵelementStart(2, "div", 9);
22334
- i0__namespace.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
22335
- i0__namespace.ɵɵelementEnd();
22336
- i0__namespace.ɵɵelementEnd();
22337
- }
22338
- if (rf & 2) {
22339
- var ctx_r1 = i0__namespace.ɵɵnextContext(2);
22340
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
22341
- i0__namespace.ɵɵadvance(1);
22342
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
22343
- i0__namespace.ɵɵadvance(2);
22344
- i0__namespace.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
22345
- }
22346
- }
22347
- function UnLinkCasesComponent_div_0_Template(rf, ctx) {
22348
- if (rf & 1) {
22349
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
22350
- i0__namespace.ɵɵelementStart(0, "div", 1);
22351
- i0__namespace.ɵɵelementStart(1, "div", 2);
22352
- i0__namespace.ɵɵelementStart(2, "h1", 3);
22353
- i0__namespace.ɵɵtext(3, "Select the cases you want to unlink from this case");
22354
- i0__namespace.ɵɵelementEnd();
22355
- i0__namespace.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
22356
- i0__namespace.ɵɵelementStart(5, "div", 5);
22357
- i0__namespace.ɵɵelementStart(6, "button", 6);
22358
- i0__namespace.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
22359
- i0__namespace.ɵɵtext(7, "Next");
22360
- i0__namespace.ɵɵelementEnd();
22361
- i0__namespace.ɵɵelementEnd();
22362
- i0__namespace.ɵɵelementEnd();
22363
- i0__namespace.ɵɵelementEnd();
22364
- }
22365
- if (rf & 2) {
22366
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22367
- i0__namespace.ɵɵadvance(4);
22368
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
22369
- }
22370
- }
22371
- var UnLinkCasesComponent = /** @class */ (function () {
22372
- function UnLinkCasesComponent(caseEdit, fb, casesService, linkedCasesService) {
22373
- this.caseEdit = caseEdit;
22374
- this.fb = fb;
22375
- this.casesService = casesService;
22376
- this.linkedCasesService = linkedCasesService;
22377
- this.linkedCasesStateEmitter = new i0.EventEmitter();
22378
- this.notifyAPIFailure = new i0.EventEmitter(false);
22379
- this.linkedCases = [];
22380
- this.errorMessages = [];
22381
- this.isServerError = false;
22382
- }
22383
- UnLinkCasesComponent.prototype.ngOnInit = function () {
22384
- this.getLinkedCases();
22385
- };
22386
- UnLinkCasesComponent.prototype.getLinkedCases = function () {
22387
- var _this = this;
22388
- this.caseId = this.linkedCasesService.caseId;
22389
- if (this.linkedCasesService.linkedCases.length > 0) {
22390
- this.linkedCases = this.linkedCasesService.linkedCases;
22391
- this.getAllLinkedCaseInformation();
22392
- }
22393
- else {
22394
- this.casesService.getCaseViewV2(this.caseId).subscribe(function (caseView) {
22395
- var linkedCasesTab = caseView.tabs.find(function (tab) { return tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID; });
22396
- if (linkedCasesTab) {
22397
- var linkedCases = linkedCasesTab.fields[0].value;
22398
- _this.linkedCases = linkedCases;
22399
- _this.linkedCasesService.linkedCases = linkedCases;
22400
- _this.getAllLinkedCaseInformation();
22401
- }
22402
- });
22403
- }
22404
- };
22405
- UnLinkCasesComponent.prototype.getAllLinkedCaseInformation = function () {
22406
- var _this = this;
22407
- var searchCasesResponse = [];
22408
- this.linkedCases.forEach(function (linkedCase) {
22409
- searchCasesResponse.push(_this.casesService.getCaseViewV2(linkedCase.caseReference));
22410
- });
22411
- if (searchCasesResponse.length) {
22412
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22413
- searchCases.forEach(function (response) {
22414
- var linkedCaseFromList = _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; });
22415
- if (linkedCaseFromList) {
22416
- var caseName = _this.linkedCasesService.getCaseName(response);
22417
- _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; }).caseName = caseName;
22418
- }
22419
- });
22420
- _this.initForm();
22421
- _this.linkedCasesService.linkedCases = _this.linkedCases;
22422
- _this.isServerError = false;
22423
- }, function (err) {
22424
- _this.isServerError = true;
22425
- _this.notifyAPIFailure.emit(true);
22426
- });
22427
- }
22428
- };
22429
- UnLinkCasesComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22430
- return rxjs.forkJoin(searchCasesResponse);
22431
- };
22432
- UnLinkCasesComponent.prototype.initForm = function () {
22433
- this.unlinkCaseForm = this.fb.group({
22434
- linkedCases: this.getLinkedCasesFormArray
22435
- });
22436
- };
22437
- Object.defineProperty(UnLinkCasesComponent.prototype, "getLinkedCasesFormArray", {
22438
- get: function () {
22439
- var _this = this;
22440
- var formFieldArray = this.linkedCases.map(function (val) { return _this.fb.group({
22441
- caseReference: val.caseReference,
22442
- reasons: val.reasons,
22443
- createdDateTime: val.createdDateTime,
22444
- caseType: val.caseType,
22445
- caseState: val.caseState,
22446
- caseService: val.caseService,
22447
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
22448
- unlink: val.unlink
22449
- }); });
22450
- return this.fb.array(formFieldArray);
22451
- },
22452
- enumerable: false,
22453
- configurable: true
22454
- });
22455
- UnLinkCasesComponent.prototype.onChange = function (caseSelected) {
22456
- this.resetErrorMessages();
22457
- var selectedCase = this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === caseSelected.value; });
22458
- if (selectedCase) {
22459
- selectedCase.unlink = caseSelected.checked ? true : false;
22460
- }
22461
- };
22462
- UnLinkCasesComponent.prototype.onNext = function () {
22463
- this.resetErrorMessages();
22464
- var navigateToNextPage = true;
22465
- var casesMarkedToUnlink = this.linkedCases.find(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
22466
- if (!casesMarkedToUnlink) {
22467
- this.errorMessages.push({
22468
- title: 'case-selection',
22469
- description: exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError,
22470
- fieldId: "case-reference-" + this.linkedCases[0].caseReference
22471
- });
22472
- this.unlinkErrorMessage = exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError;
22473
- navigateToNextPage = false;
22474
- }
22475
- var unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
22476
- var updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(function (item) { return unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1; });
22477
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(updatedLinkedCases || []) });
22478
- // Return linked cases state and error messages to the parent
22479
- this.linkedCasesStateEmitter.emit({
22480
- currentLinkedCasesPage: exports.LinkedCasesPages.UNLINK_CASE,
22481
- errorMessages: this.errorMessages,
22482
- navigateToNextPage: navigateToNextPage
22483
- });
22484
- };
22485
- UnLinkCasesComponent.prototype.resetErrorMessages = function () {
22486
- this.errorMessages = [];
22487
- this.unlinkErrorMessage = null;
22488
- };
22489
- return UnLinkCasesComponent;
22490
- }());
22491
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
22492
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
22493
- UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22494
- UnLinkCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: UnLinkCasesComponent, selectors: [["ccd-unlink-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter", notifyAPIFailure: "notifyAPIFailure" }, decls: 1, vars: 1, consts: [["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["class", "govuk-form-group form-group", 3, "ngClass", "formGroup", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-form-group", "form-group", 3, "ngClass", "formGroup"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item"], ["formArrayName", "linkedCases", "name", "linkedCases", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value", "checked", "change"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"]], template: function UnLinkCasesComponent_Template(rf, ctx) {
22495
- if (rf & 1) {
22496
- i0__namespace.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
22497
- }
22498
- if (rf & 2) {
22499
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
22500
- }
22501
- }, directives: [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, i2__namespace.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
22502
- (function () {
22503
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UnLinkCasesComponent, [{
22504
- type: i0.Component,
22505
- args: [{
22506
- selector: 'ccd-unlink-cases',
22507
- templateUrl: './unlink-cases.component.html'
22508
- }]
22509
- }], function () { return [{ type: CaseEditComponent }, { type: i2__namespace.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
22510
- type: i0.Output
22511
- }], notifyAPIFailure: [{
22512
- type: i0.Output
22513
- }] });
22514
- })();
22515
-
22516
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) {
22517
- if (rf & 1) {
22518
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22519
- i0__namespace.ɵɵelementStart(0, "div", 7);
22520
- i0__namespace.ɵɵelementStart(1, "ul", 8);
22521
- i0__namespace.ɵɵelementStart(2, "li");
22522
- i0__namespace.ɵɵelementStart(3, "a", 9);
22523
- i0__namespace.ɵɵlistener("click", function WriteLinkedCasesComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
22524
- i0__namespace.ɵɵtext(4);
22525
- i0__namespace.ɵɵelementEnd();
22526
- i0__namespace.ɵɵelementEnd();
22527
- i0__namespace.ɵɵelementEnd();
22528
- i0__namespace.ɵɵelementEnd();
22529
- }
22530
- if (rf & 2) {
22531
- var errorMessage_r7 = ctx.$implicit;
22532
- i0__namespace.ɵɵadvance(4);
22533
- i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
22534
- }
22535
- }
22536
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) {
22537
- if (rf & 1) {
22538
- i0__namespace.ɵɵelementStart(0, "div", 4);
22539
- i0__namespace.ɵɵelementStart(1, "h2", 5);
22540
- i0__namespace.ɵɵtext(2, " There is a problem ");
22541
- i0__namespace.ɵɵelementEnd();
22542
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
22543
- i0__namespace.ɵɵelementEnd();
22544
- }
22545
- if (rf & 2) {
22546
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22547
- i0__namespace.ɵɵadvance(3);
22548
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
22549
- }
22550
- }
22551
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) {
22552
- if (rf & 1) {
22553
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22554
- i0__namespace.ɵɵelementContainerStart(0);
22555
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
22556
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
22557
- i0__namespace.ɵɵelementEnd();
22558
- i0__namespace.ɵɵelementContainerEnd();
22559
- }
22560
- }
22561
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) {
22562
- if (rf & 1) {
22563
- var _r13_1 = i0__namespace.ɵɵgetCurrentView();
22564
- i0__namespace.ɵɵelementContainerStart(0);
22565
- i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
22566
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r13_1); var ctx_r12 = i0__namespace.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
22567
- i0__namespace.ɵɵelementEnd();
22568
- i0__namespace.ɵɵelementContainerEnd();
22569
- }
22570
- }
22571
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) {
22572
- if (rf & 1) {
22573
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
22574
- i0__namespace.ɵɵelementContainerStart(0);
22575
- i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
22576
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
22577
- i0__namespace.ɵɵelementEnd();
22578
- i0__namespace.ɵɵelementContainerEnd();
22579
- }
22580
- }
22581
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) {
22582
- if (rf & 1) {
22583
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
22584
- i0__namespace.ɵɵelementContainerStart(0);
22585
- i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
22586
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
22587
- i0__namespace.ɵɵelementEnd();
22588
- i0__namespace.ɵɵelementContainerEnd();
22589
- }
22590
- }
22591
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22592
- if (rf & 1) {
22593
- var _r19_1 = i0__namespace.ɵɵgetCurrentView();
22594
- i0__namespace.ɵɵelementContainerStart(0);
22595
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
22596
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
22597
- i0__namespace.ɵɵelementEnd();
22598
- i0__namespace.ɵɵelementContainerEnd();
22599
- }
22600
- }
22601
- var WriteLinkedCasesComponent = /** @class */ (function (_super) {
22602
- __extends(WriteLinkedCasesComponent, _super);
22603
- function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
22604
- var _this = _super.call(this) || this;
22605
- _this.caseEdit = caseEdit;
22606
- _this.appConfig = appConfig;
22607
- _this.commonDataService = commonDataService;
22608
- _this.casesService = casesService;
22609
- _this.linkedCasesService = linkedCasesService;
22610
- _this.caseEditDataService = caseEditDataService;
22611
- _this.onLinkedCasesSelected = new i0.EventEmitter();
22612
- _this.isLinkedCasesJourney = false;
22613
- _this.linkedCasesPages = exports.LinkedCasesPages;
22614
- _this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
22615
- _this.linkedCases = [];
22616
- _this.errorMessages = [];
22617
- return _this;
22618
- }
22619
- WriteLinkedCasesComponent.prototype.ngOnInit = function () {
22620
- var _this = this;
22621
- this.caseEditDataService.clearFormValidationErrors();
22622
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
22623
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
22624
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
22625
- this.linkedCasesService.editMode = false;
22626
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22627
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22628
- next: function (reasons) {
22629
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22630
- }
22631
- });
22632
- this.getLinkedCases();
22633
- this.caseEditDataService.caseEventTriggerName$.subscribe({
22634
- next: function (name) {
22635
- _this.linkedCasesService.isLinkedCasesEventTrigger
22636
- = (name === exports.LinkedCasesEventTriggers.LINK_CASES);
22637
- }
22638
- });
22639
- };
22640
- WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22641
- var labelField = document.getElementsByClassName('govuk-heading-l');
22642
- if (labelField && labelField.length) {
22643
- labelField[0].replaceWith('');
22644
- }
22645
- labelField = document.getElementsByClassName('heading-h2');
22646
- if (labelField && labelField.length) {
22647
- labelField[0].replaceWith('');
22648
- }
22649
- };
22650
- WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
22651
- var _this = this;
22652
- this.errorMessages = [];
22653
- this.caseEditDataService.clearFormValidationErrors();
22654
- if (linkedCasesState.navigateToNextPage) {
22655
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
22656
- this.setContinueButtonValidationErrorMessage();
22657
- this.proceedToNextPage();
22658
- }
22659
- else {
22660
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
22661
- linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
22662
- _this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
22663
- });
22664
- }
22665
- }
22666
- };
22667
- WriteLinkedCasesComponent.prototype.isAtFinalState = function () {
22668
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22669
- };
22670
- WriteLinkedCasesComponent.prototype.setContinueButtonValidationErrorMessage = function () {
22671
- var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
22672
- ? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
22673
- : exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
22674
- var buttonId = this.linkedCasesService.linkedCases.length === 0
22675
- ? 'back-button'
22676
- : 'next-button';
22677
- this.caseEditDataService.setCaseLinkError({
22678
- componentId: buttonId,
22679
- errorMessage: errorMessage
22680
- });
22681
- };
22682
- WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
22683
- if (this.isAtFinalPage()) {
22684
- // Continue button event must be allowed in final page
22685
- this.caseEditDataService.clearCaseLinkError();
22686
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
22687
- this.formGroup.updateValueAndValidity();
22688
- // update form value
22689
- this.onLinkedCasesSelected.emit();
22690
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(this.linkedCasesService.caseFieldValue) });
22691
- }
22692
- };
22693
- WriteLinkedCasesComponent.prototype.isAtFinalPage = function () {
22694
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22695
- };
22696
- WriteLinkedCasesComponent.prototype.getNextPage = function (linkedCasesState) {
22697
- if ((this.linkedCasesPage === exports.LinkedCasesPages.BEFORE_YOU_START) ||
22698
- (linkedCasesState.currentLinkedCasesPage === exports.LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
22699
- return this.isLinkedCasesJourney
22700
- ? exports.LinkedCasesPages.LINK_CASE
22701
- : exports.LinkedCasesPages.UNLINK_CASE;
22702
- }
22703
- return exports.LinkedCasesPages.CHECK_YOUR_ANSWERS;
22704
- };
22705
- WriteLinkedCasesComponent.prototype.getLinkedCases = function () {
22706
- var _this = this;
22707
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
22708
- var caseViewFiltered = caseView.tabs.filter(function (tab) {
22709
- var linkField = tab.fields.some(function (_a) {
22710
- var field_type = _a.field_type;
22711
- return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
22712
- });
22713
- return linkField;
22714
- });
22715
- if (caseViewFiltered) {
22716
- var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { return filtered.fields.length && filtered.fields[0].value; });
22717
- _this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
22718
- _this.linkedCasesService.getAllLinkedCaseInformation();
22719
- }
22720
- // Initialise the first page to display
22721
- _this.linkedCasesPage = _this.linkedCasesService.isLinkedCasesEventTrigger ||
22722
- (_this.linkedCasesService.caseFieldValue && _this.linkedCasesService.caseFieldValue.length > 0
22723
- && !_this.linkedCasesService.serverLinkedApiError)
22724
- ? exports.LinkedCasesPages.BEFORE_YOU_START
22725
- : exports.LinkedCasesPages.NO_LINKED_CASES;
22726
- // Initialise the error to be displayed when clicked on Continue button
22727
- _this.setContinueButtonValidationErrorMessage();
22728
- });
22729
- };
22730
- WriteLinkedCasesComponent.prototype.navigateToErrorElement = function (elementId) {
22731
- if (elementId) {
22732
- var htmlElement = document.getElementById(elementId);
22733
- if (htmlElement) {
22734
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
22735
- htmlElement.focus();
22736
- }
22737
- }
22738
- };
22739
- return WriteLinkedCasesComponent;
22740
- }(AbstractFieldWriteComponent));
22741
- WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
22742
- WriteLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesComponent_Template(rf, ctx) {
22743
- if (rf & 1) {
22744
- i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
22745
- i0__namespace.ɵɵelementStart(1, "div", 1);
22746
- i0__namespace.ɵɵelementStart(2, "div", 2);
22747
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
22748
- i0__namespace.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
22749
- i0__namespace.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
22750
- i0__namespace.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
22751
- i0__namespace.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
22752
- i0__namespace.ɵɵelementEnd();
22753
- i0__namespace.ɵɵelementEnd();
22754
- }
22755
- if (rf & 2) {
22756
- i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
22757
- i0__namespace.ɵɵadvance(1);
22758
- i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
22759
- i0__namespace.ɵɵadvance(1);
22760
- i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
22761
- i0__namespace.ɵɵadvance(1);
22762
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
22763
- i0__namespace.ɵɵadvance(1);
22764
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
22765
- i0__namespace.ɵɵadvance(1);
22766
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
22767
- i0__namespace.ɵɵadvance(1);
22768
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
22769
- i0__namespace.ɵɵadvance(1);
22770
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
22771
- }
22772
- }, encapsulation: 2 });
22773
- (function () {
22774
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
22775
- type: i0.Component,
22776
- args: [{
22777
- selector: 'ccd-write-linked-cases',
22778
- templateUrl: './write-linked-cases.component.html'
22779
- }]
22780
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
22781
- type: i0.Input
22782
- }], caseField: [{
22783
- type: i0.Input
22784
- }], onLinkedCasesSelected: [{
22785
- type: i0.Output
22786
- }], isLinkedCasesJourney: [{
22787
- type: i0.Input
22788
- }], formGroup: [{
22789
- type: i0.Input
22790
- }] });
22791
- })();
22792
-
22793
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22794
- if (rf & 1) {
22795
- i0__namespace.ɵɵelementContainer(0);
22796
- }
22797
- }
22798
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) {
22799
- if (rf & 1) {
22800
- i0__namespace.ɵɵelementContainer(0);
22801
- }
22802
- }
22803
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) {
22804
- if (rf & 1) {
22805
- i0__namespace.ɵɵelementContainer(0);
22806
- }
22807
- }
22808
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) {
22809
- if (rf & 1) {
22810
- i0__namespace.ɵɵelementContainer(0);
22811
- }
22812
- }
22813
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) {
22814
- if (rf & 1) {
22815
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22816
- i0__namespace.ɵɵelementStart(0, "div", 8);
22817
- i0__namespace.ɵɵelementStart(1, "p", 9);
22818
- i0__namespace.ɵɵtext(2);
22819
- i0__namespace.ɵɵelementEnd();
22820
- i0__namespace.ɵɵelementStart(3, "span", 10);
22821
- i0__namespace.ɵɵelementStart(4, "a", 11);
22822
- i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_16_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var ctx_r8 = i0__namespace.ɵɵnextContext(); return ctx_r8.reloadCurrentRoute(); });
22823
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22824
- i0__namespace.ɵɵelementEnd();
22825
- i0__namespace.ɵɵelementEnd();
22826
- i0__namespace.ɵɵelementEnd();
22827
- }
22828
- if (rf & 2) {
22829
- var ctx_r5 = i0__namespace.ɵɵnextContext();
22830
- i0__namespace.ɵɵadvance(2);
22831
- i0__namespace.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
22832
- }
22833
- }
22834
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) {
22835
- if (rf & 1) {
22836
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22837
- i0__namespace.ɵɵelementStart(0, "div", 8);
22838
- i0__namespace.ɵɵelementStart(1, "p", 9);
22839
- i0__namespace.ɵɵtext(2);
22840
- i0__namespace.ɵɵelementEnd();
22841
- i0__namespace.ɵɵelementStart(3, "span", 10);
22842
- i0__namespace.ɵɵelementStart(4, "a", 11);
22843
- i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_18_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.reloadCurrentRoute(); });
22844
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22845
- i0__namespace.ɵɵelementEnd();
22846
- i0__namespace.ɵɵelementEnd();
22847
- i0__namespace.ɵɵelementEnd();
22848
- }
22849
- if (rf & 2) {
22850
- var ctx_r7 = i0__namespace.ɵɵnextContext();
22851
- i0__namespace.ɵɵadvance(2);
22852
- i0__namespace.ɵɵtextInterpolate(ctx_r7.serverError.message);
22853
- }
22854
- }
22855
- var ReadLinkedCasesComponent = /** @class */ (function () {
22856
- function ReadLinkedCasesComponent(router, linkedCasesService, appConfig, commonDataService) {
22857
- this.router = router;
22858
- this.linkedCasesService = linkedCasesService;
22859
- this.appConfig = appConfig;
22860
- this.commonDataService = commonDataService;
22861
- this.reasonListLoaded = false;
22862
- this.reload = false;
22863
- this.serverError = null;
22864
- this.serverLinkedApiError = null;
22865
- this.isServerReasonCodeError = false;
22866
- this.isServerJurisdictionError = false;
22867
- this.isServerLinkedFromError = false;
22868
- this.isServerLinkedToError = false;
22869
- }
22870
- ReadLinkedCasesComponent.prototype.ngOnInit = function () {
22871
- var _this = this;
22872
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
22873
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22874
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22875
- next: function (reasons) {
22876
- _this.reasonListLoaded = true;
22877
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22878
- },
22879
- error: function (error) {
22880
- _this.isServerReasonCodeError = true;
22881
- _this.linkedCasesService.isServerReasonCodeError = true;
22882
- }
22883
- });
22884
- this.serverLinkedApiError = {
22885
- id: 'backendError', message: 'Some case information is not available at the moment'
22886
- };
22887
- this.serverError = {
22888
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
22889
- };
22890
- };
22891
- ReadLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22892
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
22893
- var labelField = document.getElementsByClassName('govuk-heading-l');
22894
- if (labelField && labelField.length) {
22895
- labelField[0].replaceWith('');
22896
- }
22897
- labelField = document.getElementsByClassName('heading-h2');
22898
- if (labelField && labelField.length) {
22899
- labelField[0].replaceWith('');
22900
- }
22901
- labelField = document.getElementsByClassName('case-viewer-label');
22902
- if (labelField && labelField.length) {
22903
- labelField[0].replaceWith('');
22904
- }
22905
- };
22906
- ReadLinkedCasesComponent.prototype.reloadCurrentRoute = function () {
22907
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
22908
- window.location.hash = 'Linked cases';
22909
- });
22910
- };
22911
- ReadLinkedCasesComponent.prototype.getFailureLinkedToNotification = function (evt) {
22912
- this.isServerLinkedToError = true;
22913
- };
22914
- ReadLinkedCasesComponent.prototype.getFailureLinkedFromNotification = function (evt) {
22915
- this.isServerLinkedFromError = true;
22916
- };
22917
- return ReadLinkedCasesComponent;
22918
- }());
22919
- ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService)); };
22920
- ReadLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadLinkedCasesComponent, selectors: [["ccd-read-linked-cases"]], inputs: { caseField: "caseField" }, decls: 20, vars: 10, consts: [[1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "caseField", "notifyAPIFailure"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], ["singleApiError", ""], ["multiApisError", ""], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "javascript:void(0)", "id", "reload-linked-cases-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesComponent_Template(rf, ctx) {
22921
- if (rf & 1) {
22922
- i0__namespace.ɵɵelementStart(0, "div");
22923
- i0__namespace.ɵɵelementStart(1, "div", 0);
22924
- i0__namespace.ɵɵelementStart(2, "h1", 1);
22925
- i0__namespace.ɵɵtext(3, "Linked cases");
22926
- i0__namespace.ɵɵelementEnd();
22927
- i0__namespace.ɵɵelementStart(4, "label", 2);
22928
- i0__namespace.ɵɵtext(5, "This case is linked to");
22929
- i0__namespace.ɵɵelementEnd();
22930
- i0__namespace.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
22931
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
22932
- i0__namespace.ɵɵelementEnd();
22933
- i0__namespace.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
22934
- i0__namespace.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
22935
- i0__namespace.ɵɵelementEnd();
22936
- i0__namespace.ɵɵelementStart(9, "div", 5);
22937
- i0__namespace.ɵɵelementStart(10, "label", 2);
22938
- i0__namespace.ɵɵtext(11, "This case is linked from");
22939
- i0__namespace.ɵɵelementEnd();
22940
- i0__namespace.ɵɵelement(12, "br");
22941
- i0__namespace.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
22942
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
22943
- i0__namespace.ɵɵelementEnd();
22944
- i0__namespace.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
22945
- i0__namespace.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
22946
- i0__namespace.ɵɵelementEnd();
22947
- i0__namespace.ɵɵelementEnd();
22948
- i0__namespace.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0__namespace.ɵɵtemplateRefExtractor);
22949
- i0__namespace.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
22950
- }
22951
- if (rf & 2) {
22952
- var _r4 = i0__namespace.ɵɵreference(17);
22953
- var _r6 = i0__namespace.ɵɵreference(19);
22954
- i0__namespace.ɵɵadvance(6);
22955
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22956
- i0__namespace.ɵɵadvance(1);
22957
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22958
- i0__namespace.ɵɵadvance(1);
22959
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22960
- i0__namespace.ɵɵadvance(5);
22961
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22962
- i0__namespace.ɵɵadvance(1);
22963
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22964
- i0__namespace.ɵɵadvance(1);
22965
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22966
- }
22967
- }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
22968
- (function () {
22969
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
22970
- type: i0.Component,
22971
- args: [{
22972
- selector: 'ccd-read-linked-cases',
22973
- templateUrl: './read-linked-cases.component.html',
22974
- styleUrls: ['./read-linked-cases.component.scss']
22975
- }]
22976
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
22977
- type: i0.Input
22978
- }] });
22979
- })();
22980
-
22981
- var LinkCaseReason = /** @class */ (function () {
22982
- function LinkCaseReason() {
22983
- }
22984
- return LinkCaseReason;
22985
- }());
22986
- var CCDCaseLinkType = /** @class */ (function () {
22987
- function CCDCaseLinkType() {
22988
- }
22989
- return CCDCaseLinkType;
22990
- }());
22991
- var CaseLink = /** @class */ (function () {
22992
- function CaseLink() {
22993
- }
22994
- return CaseLink;
22995
- }());
22996
- var LinkReason = /** @class */ (function () {
22997
- function LinkReason() {
22998
- }
22999
- return LinkReason;
23000
- }());
23001
- var LinkedCasesResponse = /** @class */ (function () {
23002
- function LinkedCasesResponse() {
23003
- }
23004
- return LinkedCasesResponse;
23005
- }());
23006
- var CaseLinkResponse = /** @class */ (function () {
23007
- function CaseLinkResponse() {
23008
- }
23009
- return CaseLinkResponse;
23010
- }());
23011
- var LinkDetails = /** @class */ (function () {
23012
- function LinkDetails() {
23013
- }
23014
- return LinkDetails;
23015
- }());
23016
- var Terms = /** @class */ (function () {
23017
- function Terms() {
23018
- }
23019
- return Terms;
23020
- }());
23021
- var ESQueryType = /** @class */ (function () {
23022
- function ESQueryType() {
23023
- }
23024
- return ESQueryType;
23025
- }());
23026
-
23027
20446
  var CollectionCreateCheckerService = /** @class */ (function () {
23028
20447
  function CollectionCreateCheckerService() {
23029
20448
  }
@@ -25068,7 +22487,6 @@
25068
22487
  ReadComplexFieldTableComponent,
25069
22488
  ReadComplexFieldCollectionTableComponent,
25070
22489
  ReadCaseFlagFieldComponent,
25071
- ReadLinkedCasesComponent,
25072
22490
  // Write
25073
22491
  WriteJudicialUserFieldComponent,
25074
22492
  WriteAddressFieldComponent,
@@ -25104,15 +22522,7 @@
25104
22522
  CaseFileViewFolderSortComponent,
25105
22523
  CaseFileViewOverlayMenuComponent,
25106
22524
  CaseFileViewFolderDocumentActionsComponent,
25107
- CaseFileViewFolderSelectorComponent,
25108
- LinkedCasesToTableComponent,
25109
- LinkedCasesFromTableComponent,
25110
- BeforeYouStartComponent,
25111
- LinkCasesComponent,
25112
- CheckYourAnswersComponent,
25113
- WriteLinkedCasesComponent,
25114
- UnLinkCasesComponent,
25115
- NoLinkedCasesComponent
22525
+ CaseFileViewFolderSelectorComponent
25116
22526
  ];
25117
22527
  var PaletteModule = /** @class */ (function () {
25118
22528
  function PaletteModule() {
@@ -25131,7 +22541,6 @@
25131
22541
  FileUploadStateService,
25132
22542
  FileUploadProgressGuard,
25133
22543
  WindowService,
25134
- LinkedCasesService,
25135
22544
  CommonDataService,
25136
22545
  JurisdictionService,
25137
22546
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25163,7 +22572,7 @@
25163
22572
  i3.PaymentLibModule,
25164
22573
  i2$1.ScrollToModule.forRoot(),
25165
22574
  i1$3.MatDialogModule,
25166
- i12.MediaViewerModule,
22575
+ i11.MediaViewerModule,
25167
22576
  LoadingModule
25168
22577
  ], i4.NgxMatDatetimePickerModule,
25169
22578
  i4.NgxMatNativeDateModule,
@@ -25227,7 +22636,6 @@
25227
22636
  ReadComplexFieldTableComponent,
25228
22637
  ReadComplexFieldCollectionTableComponent,
25229
22638
  ReadCaseFlagFieldComponent,
25230
- ReadLinkedCasesComponent,
25231
22639
  // Write
25232
22640
  WriteJudicialUserFieldComponent,
25233
22641
  WriteAddressFieldComponent,
@@ -25263,15 +22671,7 @@
25263
22671
  CaseFileViewFolderSortComponent,
25264
22672
  CaseFileViewOverlayMenuComponent,
25265
22673
  CaseFileViewFolderDocumentActionsComponent,
25266
- CaseFileViewFolderSelectorComponent,
25267
- LinkedCasesToTableComponent,
25268
- LinkedCasesFromTableComponent,
25269
- BeforeYouStartComponent,
25270
- LinkCasesComponent,
25271
- CheckYourAnswersComponent,
25272
- WriteLinkedCasesComponent,
25273
- UnLinkCasesComponent,
25274
- NoLinkedCasesComponent], imports: [i1.CommonModule,
22674
+ CaseFileViewFolderSelectorComponent], imports: [i1.CommonModule,
25275
22675
  i1$1.RouterModule,
25276
22676
  i2.FormsModule,
25277
22677
  i2.ReactiveFormsModule,
@@ -25296,7 +22696,7 @@
25296
22696
  i7.CdkTreeModule,
25297
22697
  i1$4.OverlayModule,
25298
22698
  i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
25299
- i12.MediaViewerModule,
22699
+ i11.MediaViewerModule,
25300
22700
  LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
25301
22701
  i4.NgxMatNativeDateModule,
25302
22702
  i4.NgxMatTimepickerModule,
@@ -25345,7 +22745,6 @@
25345
22745
  ReadComplexFieldTableComponent,
25346
22746
  ReadComplexFieldCollectionTableComponent,
25347
22747
  ReadCaseFlagFieldComponent,
25348
- ReadLinkedCasesComponent,
25349
22748
  // Write
25350
22749
  WriteJudicialUserFieldComponent,
25351
22750
  WriteAddressFieldComponent,
@@ -25381,15 +22780,7 @@
25381
22780
  CaseFileViewFolderSortComponent,
25382
22781
  CaseFileViewOverlayMenuComponent,
25383
22782
  CaseFileViewFolderDocumentActionsComponent,
25384
- CaseFileViewFolderSelectorComponent,
25385
- LinkedCasesToTableComponent,
25386
- LinkedCasesFromTableComponent,
25387
- BeforeYouStartComponent,
25388
- LinkCasesComponent,
25389
- CheckYourAnswersComponent,
25390
- WriteLinkedCasesComponent,
25391
- UnLinkCasesComponent,
25392
- NoLinkedCasesComponent] });
22783
+ CaseFileViewFolderSelectorComponent] });
25393
22784
  })();
25394
22785
  (function () {
25395
22786
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaletteModule, [{
@@ -25423,7 +22814,7 @@
25423
22814
  i3.PaymentLibModule,
25424
22815
  i2$1.ScrollToModule.forRoot(),
25425
22816
  i1$3.MatDialogModule,
25426
- i12.MediaViewerModule,
22817
+ i11.MediaViewerModule,
25427
22818
  LoadingModule
25428
22819
  ],
25429
22820
  declarations: __spread([
@@ -25459,7 +22850,6 @@
25459
22850
  FileUploadStateService,
25460
22851
  FileUploadProgressGuard,
25461
22852
  WindowService,
25462
- LinkedCasesService,
25463
22853
  CommonDataService,
25464
22854
  JurisdictionService,
25465
22855
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25478,7 +22868,6 @@
25478
22868
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1__namespace.NgForOf, ReadOrderSummaryRowComponent,
25479
22869
  ReadMoneyGbpFieldComponent], []);
25480
22870
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
25481
- i0__namespace.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1__namespace.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
25482
22871
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, ReadComplexFieldRawComponent,
25483
22872
  ReadComplexFieldCollectionTableComponent, i1__namespace.NgSwitchDefault, ReadComplexFieldTableComponent], []);
25484
22873
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1__namespace.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
@@ -25486,7 +22875,6 @@
25486
22875
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1__namespace.NgForOf, i1__namespace.NgIf, FieldReadComponent,
25487
22876
  ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1__namespace.KeyValuePipe, IsCompoundPipe]);
25488
22877
  i0__namespace.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, CaseFlagSummaryListComponent, i1__namespace.NgSwitchDefault, i1__namespace.NgForOf, i1__namespace.NgIf, CaseFlagTableComponent], []);
25489
- i0__namespace.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1__namespace.NgIf, LinkedCasesFromTableComponent], []);
25490
22878
  i0__namespace.ɵɵsetComponentScope(WriteAddressFieldComponent, [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, i2__namespace.SelectControlValueAccessor, i1__namespace.NgForOf, i2__namespace.NgSelectOption, i2__namespace.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25491
22879
  i0__namespace.ɵɵsetComponentScope(WriteComplexFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, FieldWriteComponent], [FieldLabelPipe, IsReadOnlyPipe]);
25492
22880
  i0__namespace.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1__namespace.NgClass, i1__namespace.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
@@ -25501,21 +22889,11 @@
25501
22889
  WriteOrganisationComplexFieldComponent], [i1__namespace.AsyncPipe]);
25502
22890
  i0__namespace.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
25503
22891
  i0__namespace.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1__namespace.NgIf, DatetimePickerComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, WriteDateFieldComponent], []);
25504
- i0__namespace.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, WriteLinkedCasesComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25505
22892
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
25506
22893
  i0__namespace.ɵɵsetComponentScope(
25507
22894
  // ComponentLauncher web components
25508
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25509
- i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25510
- i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25511
- i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25512
- 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]);
25513
- i0__namespace.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25514
- i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
25515
- NoLinkedCasesComponent,
25516
- LinkCasesComponent,
25517
- UnLinkCasesComponent,
25518
- CheckYourAnswersComponent], []);
22895
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
22896
+ i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
25519
22897
 
25520
22898
  var Confirmation = /** @class */ (function () {
25521
22899
  function Confirmation(caseId, status, header, body) {
@@ -35213,10 +32591,8 @@
35213
32591
  exports.AuthService = AuthService;
35214
32592
  exports.Banner = Banner;
35215
32593
  exports.BannersService = BannersService;
35216
- exports.BeforeYouStartComponent = BeforeYouStartComponent;
35217
32594
  exports.BodyComponent = BodyComponent;
35218
32595
  exports.BrowserService = BrowserService;
35219
- exports.CCDCaseLinkType = CCDCaseLinkType;
35220
32596
  exports.CallbackErrorsComponent = CallbackErrorsComponent;
35221
32597
  exports.CallbackErrorsContext = CallbackErrorsContext;
35222
32598
  exports.CaseAccessUtils = CaseAccessUtils;
@@ -35256,8 +32632,6 @@
35256
32632
  exports.CaseHeaderComponent = CaseHeaderComponent;
35257
32633
  exports.CaseHeaderModule = CaseHeaderModule;
35258
32634
  exports.CaseHistoryViewerFieldComponent = CaseHistoryViewerFieldComponent;
35259
- exports.CaseLink = CaseLink;
35260
- exports.CaseLinkResponse = CaseLinkResponse;
35261
32635
  exports.CaseListComponent = CaseListComponent;
35262
32636
  exports.CaseListFiltersComponent = CaseListFiltersComponent;
35263
32637
  exports.CaseListFiltersModule = CaseListFiltersModule;
@@ -35290,7 +32664,6 @@
35290
32664
  exports.CcdCollectionTableCaseFieldsFilterPipe = CcdCollectionTableCaseFieldsFilterPipe;
35291
32665
  exports.CcdPageFieldsPipe = CcdPageFieldsPipe;
35292
32666
  exports.CcdTabFieldsPipe = CcdTabFieldsPipe;
35293
- exports.CheckYourAnswersComponent = CheckYourAnswersComponent;
35294
32667
  exports.ConditionalShowFormDirective = ConditionalShowFormDirective;
35295
32668
  exports.ConditionalShowModule = ConditionalShowModule;
35296
32669
  exports.ConditionalShowRegistrarService = ConditionalShowRegistrarService;
@@ -35320,7 +32693,6 @@
35320
32693
  exports.DraftService = DraftService;
35321
32694
  exports.DynamicListPipe = DynamicListPipe;
35322
32695
  exports.DynamicRadioListPipe = DynamicRadioListPipe;
35323
- exports.ESQueryType = ESQueryType;
35324
32696
  exports.Embedded = Embedded;
35325
32697
  exports.ErrorMessageComponent = ErrorMessageComponent;
35326
32698
  exports.ErrorNotifierService = ErrorNotifierService;
@@ -35378,14 +32750,6 @@
35378
32750
  exports.LabelFieldComponent = LabelFieldComponent;
35379
32751
  exports.LabelSubstitutorDirective = LabelSubstitutorDirective;
35380
32752
  exports.LabelSubstitutorModule = LabelSubstitutorModule;
35381
- exports.LinkCaseReason = LinkCaseReason;
35382
- exports.LinkCasesComponent = LinkCasesComponent;
35383
- exports.LinkCasesReasonValuePipe = LinkCasesReasonValuePipe;
35384
- exports.LinkDetails = LinkDetails;
35385
- exports.LinkReason = LinkReason;
35386
- exports.LinkedCasesFromTableComponent = LinkedCasesFromTableComponent;
35387
- exports.LinkedCasesResponse = LinkedCasesResponse;
35388
- exports.LinkedCasesToTableComponent = LinkedCasesToTableComponent;
35389
32753
  exports.LoadingModule = LoadingModule;
35390
32754
  exports.LoadingService = LoadingService;
35391
32755
  exports.LoadingSpinnerComponent = LoadingSpinnerComponent;
@@ -35399,7 +32763,6 @@
35399
32763
  exports.NavigationComponent = NavigationComponent;
35400
32764
  exports.NavigationItemComponent = NavigationItemComponent;
35401
32765
  exports.NavigationNotifierService = NavigationNotifierService;
35402
- exports.NoLinkedCasesComponent = NoLinkedCasesComponent;
35403
32766
  exports.NoTasksAvailableComponent = NoTasksAvailableComponent;
35404
32767
  exports.NotificationBannerComponent = NotificationBannerComponent;
35405
32768
  exports.OrderService = OrderService;
@@ -35436,7 +32799,6 @@
35436
32799
  exports.ReadFixedListFieldComponent = ReadFixedListFieldComponent;
35437
32800
  exports.ReadFixedRadioListFieldComponent = ReadFixedRadioListFieldComponent;
35438
32801
  exports.ReadJudicialUserFieldComponent = ReadJudicialUserFieldComponent;
35439
- exports.ReadLinkedCasesComponent = ReadLinkedCasesComponent;
35440
32802
  exports.ReadMoneyGbpFieldComponent = ReadMoneyGbpFieldComponent;
35441
32803
  exports.ReadMultiSelectListFieldComponent = ReadMultiSelectListFieldComponent;
35442
32804
  exports.ReadNumberFieldComponent = ReadNumberFieldComponent;
@@ -35480,9 +32842,7 @@
35480
32842
  exports.TaskCancelledComponent = TaskCancelledComponent;
35481
32843
  exports.TaskConflictComponent = TaskConflictComponent;
35482
32844
  exports.TaskUnassignedComponent = TaskUnassignedComponent;
35483
- exports.Terms = Terms;
35484
32845
  exports.TestRouteSnapshotBuilder = TestRouteSnapshotBuilder;
35485
- exports.UnLinkCasesComponent = UnLinkCasesComponent;
35486
32846
  exports.UnsupportedFieldComponent = UnsupportedFieldComponent;
35487
32847
  exports.UpdateFlagComponent = UpdateFlagComponent;
35488
32848
  exports.WaysToPayFieldComponent = WaysToPayFieldComponent;
@@ -35511,7 +32871,6 @@
35511
32871
  exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
35512
32872
  exports.WriteFixedRadioListFieldComponent = WriteFixedRadioListFieldComponent;
35513
32873
  exports.WriteJudicialUserFieldComponent = WriteJudicialUserFieldComponent;
35514
- exports.WriteLinkedCasesComponent = WriteLinkedCasesComponent;
35515
32874
  exports.WriteMoneyGbpFieldComponent = WriteMoneyGbpFieldComponent;
35516
32875
  exports.WriteMultiSelectListFieldComponent = WriteMultiSelectListFieldComponent;
35517
32876
  exports.WriteNumberFieldComponent = WriteNumberFieldComponent;