@hmcts/ccd-case-ui-toolkit 6.14.1-v1 → 6.14.2-clear-validation-errors

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 (224) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +709 -747
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
  7. package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
  8. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
  9. package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
  10. package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
  11. package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
  12. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +5 -4
  13. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
  14. package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
  15. package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
  16. package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
  17. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
  18. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
  19. package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
  20. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
  21. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
  22. package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
  23. package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
  24. package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
  25. package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
  26. package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +2 -2
  27. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +3 -3
  28. package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
  29. package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
  30. package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
  31. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
  32. package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
  33. package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
  34. package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
  35. package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
  36. package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
  37. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  38. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  39. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
  40. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  41. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  42. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  43. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
  44. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  45. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  46. package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
  47. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
  48. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
  49. package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +2 -1
  50. package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
  51. package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
  52. package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
  53. package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
  54. package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
  55. package/esm2015/lib/shared/components/palette/palette.module.js +2 -2
  56. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  57. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  58. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  59. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
  60. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  61. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  62. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  63. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  64. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
  65. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
  66. package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
  67. package/esm2015/lib/shared/domain/case-details.model.js +2 -1
  68. package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
  69. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  70. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
  71. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  72. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
  73. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
  74. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
  75. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
  76. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
  77. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
  78. package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
  79. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  80. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  81. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  82. package/esm2015/lib/shared/domain/definition/case-field.model.js +2 -1
  83. package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
  84. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
  85. package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
  86. package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
  87. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  88. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  89. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  90. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  91. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
  92. package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
  93. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  94. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
  95. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  96. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  97. package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
  98. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  99. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  100. package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
  101. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  102. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  103. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  104. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  105. package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
  106. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  107. package/esm2015/lib/shared/services/fields/fields.utils.js +5 -4
  108. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
  109. package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
  110. package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
  111. package/esm2015/lib/shared/services/search/search.service.js +5 -10
  112. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  113. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  114. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +699 -731
  115. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  116. package/lib/app.config.d.ts.map +1 -1
  117. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  118. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  119. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  120. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
  121. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  122. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  123. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  124. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
  125. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  126. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  127. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  128. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  129. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  130. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  131. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  132. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  133. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  134. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  135. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  136. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  137. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  138. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  139. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  140. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  141. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  142. package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
  143. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  144. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  145. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  146. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  147. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  148. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  149. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  150. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  151. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  152. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  153. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  154. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  155. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  156. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  157. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  158. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  159. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  160. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  161. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  162. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  163. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  164. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  165. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  166. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  167. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  168. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  169. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  170. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  171. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  172. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  173. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  174. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  175. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  176. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  177. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  178. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  179. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  180. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  181. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  182. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  183. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  184. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  185. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  186. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  187. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  188. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  189. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  190. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  191. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  192. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  193. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  194. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  195. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  196. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  197. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  198. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  199. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  200. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  201. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  202. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  203. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  204. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  205. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  206. package/lib/shared/pipes/complex/index.d.ts +1 -1
  207. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  208. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  209. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  210. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  211. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  212. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  213. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  214. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  215. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  216. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  217. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  218. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  219. package/lib/shared/services/search/search.service.d.ts +0 -2
  220. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  221. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  222. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  223. package/package.json +2 -2
  224. package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
@@ -579,22 +579,22 @@ class DateInputComponent {
579
579
  }
580
580
  }
581
581
  dayId() {
582
- return this.id + '-day';
582
+ return `${this.id}-day`;
583
583
  }
584
584
  monthId() {
585
- return this.id + '-month';
585
+ return `${this.id}-month`;
586
586
  }
587
587
  yearId() {
588
- return this.id + '-year';
588
+ return `${this.id}-year`;
589
589
  }
590
590
  hourId() {
591
- return this.id + '-hour';
591
+ return `${this.id}-hour`;
592
592
  }
593
593
  minuteId() {
594
- return this.id + '-minute';
594
+ return `${this.id}-minute`;
595
595
  }
596
596
  secondId() {
597
- return this.id + '-second';
597
+ return `${this.id}-second`;
598
598
  }
599
599
  viewValue() {
600
600
  if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
@@ -609,7 +609,7 @@ class DateInputComponent {
609
609
  this.minute ? this.pad(this.minute) : '',
610
610
  this.second ? this.pad(this.second) : ''
611
611
  ].join(':');
612
- return date + 'T' + time + '.000';
612
+ return `${date}T${time}.000`;
613
613
  }
614
614
  else {
615
615
  return date;
@@ -1521,7 +1521,7 @@ class ActivityService {
1521
1521
  }
1522
1522
  static handleHttpError(response) {
1523
1523
  const error = HttpErrorService.convertToHttpError(response);
1524
- if (response.status && response.status !== error.status) {
1524
+ if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
1525
1525
  error.status = response.status;
1526
1526
  }
1527
1527
  return error;
@@ -1529,50 +1529,41 @@ class ActivityService {
1529
1529
  getOptions() {
1530
1530
  const userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
1531
1531
  const headers = new HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
1532
- const options = {
1532
+ return {
1533
1533
  headers,
1534
1534
  withCredentials: true,
1535
1535
  observe: 'body',
1536
1536
  };
1537
- return options;
1538
1537
  }
1539
1538
  getActivities(...caseId) {
1540
1539
  try {
1541
1540
  const options = this.getOptions();
1542
- const url = this.activityUrl() + `/cases/${caseId.join(',')}/activity`;
1541
+ const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
1543
1542
  return this.http
1544
1543
  .get(url, options, false, ActivityService.handleHttpError)
1545
1544
  .pipe(map(response => response));
1546
1545
  }
1547
1546
  catch (error) {
1548
- console.log('user may not be authenticated.' + error);
1547
+ console.log(`user may not be authenticated.${error}`);
1549
1548
  }
1550
1549
  }
1551
1550
  postActivity(caseId, activity) {
1552
1551
  try {
1553
1552
  const options = this.getOptions();
1554
- const url = this.activityUrl() + `/cases/${caseId}/activity`;
1553
+ const url = `${this.activityUrl()}/cases/${caseId}/activity`;
1555
1554
  const body = { activity };
1556
1555
  return this.http
1557
1556
  .post(url, body, options, false)
1558
1557
  .pipe(map(response => response));
1559
1558
  }
1560
1559
  catch (error) {
1561
- console.log('user may not be authenticated.' + error);
1560
+ console.log(`user may not be authenticated.${error}`);
1562
1561
  }
1563
1562
  }
1564
1563
  verifyUserIsAuthorized() {
1565
- if (this.sessionStorageService.getItem('userDetails') === undefined) {
1566
- return;
1567
- }
1568
- if (this.activityUrl() && this.userAuthorised === undefined) {
1564
+ if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
1569
1565
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
1570
- if ([401, 403].indexOf(error.status) > -1) {
1571
- this.userAuthorised = false;
1572
- }
1573
- else {
1574
- this.userAuthorised = true;
1575
- }
1566
+ this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
1576
1567
  });
1577
1568
  }
1578
1569
  }
@@ -1671,7 +1662,7 @@ class ActivityPollingService {
1671
1662
  requests.get(activity.caseId).next(activity);
1672
1663
  });
1673
1664
  }, (err) => {
1674
- console.log('error: ' + err);
1665
+ console.log(`error: ${err}`);
1675
1666
  Array.from(requests.values()).forEach((subject) => subject.error(err));
1676
1667
  }));
1677
1668
  });
@@ -1792,9 +1783,9 @@ class ActivityComponent {
1792
1783
  }
1793
1784
  generateDescription(prefix, suffix, namesArray, unknownCount) {
1794
1785
  let resultText = prefix;
1795
- resultText += namesArray.map(activityInfo => activityInfo.forename + ' ' + activityInfo.surname).join(', ');
1786
+ resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
1796
1787
  if (unknownCount > 0) {
1797
- resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
1788
+ resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
1798
1789
  resultText += (unknownCount > 1 ? 's' : '');
1799
1790
  }
1800
1791
  else {
@@ -1802,10 +1793,10 @@ class ActivityComponent {
1802
1793
  }
1803
1794
  if (suffix.length > 0) {
1804
1795
  if (namesArray.length + unknownCount > 1) {
1805
- resultText += ' are ' + suffix;
1796
+ resultText += ` are ${suffix}`;
1806
1797
  }
1807
1798
  else {
1808
- resultText += ' is ' + suffix;
1799
+ resultText += ` is ${suffix}`;
1809
1800
  }
1810
1801
  }
1811
1802
  return resultText;
@@ -2318,7 +2309,7 @@ class FormatTranslatorService {
2318
2309
  break;
2319
2310
  case 'n':
2320
2311
  case 'N':
2321
- maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2312
+ maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2322
2313
  break;
2323
2314
  case 'V':
2324
2315
  case 'O':
@@ -2441,9 +2432,9 @@ class DatePipe {
2441
2432
  resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
2442
2433
  if (match[4] && match[5] && match[6] && format !== 'short') {
2443
2434
  resultDate += ', ';
2444
- resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
2445
- resultDate += this.pad(offsetDate.getMinutes()) + ':';
2446
- resultDate += this.pad(offsetDate.getSeconds()) + ' ';
2435
+ resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
2436
+ resultDate += `${this.pad(offsetDate.getMinutes())}:`;
2437
+ resultDate += `${this.pad(offsetDate.getSeconds())} `;
2447
2438
  resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
2448
2439
  }
2449
2440
  }
@@ -2778,6 +2769,7 @@ PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
2778
2769
  }]
2779
2770
  }], null, null); })();
2780
2771
 
2772
+ // tslint:disable:variable-name
2781
2773
  class AddressModel {
2782
2774
  constructor() {
2783
2775
  this.AddressLine1 = '';
@@ -3049,6 +3041,7 @@ __decorate([
3049
3041
  __metadata("design:type", Array)
3050
3042
  ], CaseEventTrigger.prototype, "wizard_pages", void 0);
3051
3043
 
3044
+ // tslint:disable:variable-name
3052
3045
  class CaseViewEvent {
3053
3046
  }
3054
3047
 
@@ -3075,6 +3068,7 @@ __decorate([
3075
3068
  __metadata("design:type", Array)
3076
3069
  ], CaseType.prototype, "case_fields", void 0);
3077
3070
 
3071
+ // tslint:disable:variable-name
3078
3072
  class EventCaseField {
3079
3073
  }
3080
3074
 
@@ -3107,6 +3101,7 @@ __decorate([
3107
3101
  class CasePrintDocument {
3108
3102
  }
3109
3103
 
3104
+ // tslint:disable:variable-name
3110
3105
  class HRef {
3111
3106
  }
3112
3107
  class DocumentLinks {
@@ -3124,25 +3119,25 @@ class OrganisationConverter {
3124
3119
  static toSimpleAddress(organisationModel) {
3125
3120
  let simpleAddress = '';
3126
3121
  if (organisationModel.addressLine1) {
3127
- simpleAddress += organisationModel.addressLine1 + '<br>';
3122
+ simpleAddress += `${organisationModel.addressLine1}<br>`;
3128
3123
  }
3129
3124
  if (organisationModel.addressLine2) {
3130
- simpleAddress += organisationModel.addressLine2 + '<br>';
3125
+ simpleAddress += `${organisationModel.addressLine2}<br>`;
3131
3126
  }
3132
3127
  if (organisationModel.addressLine3) {
3133
- simpleAddress += organisationModel.addressLine3 + '<br>';
3128
+ simpleAddress += `${organisationModel.addressLine3}<br>`;
3134
3129
  }
3135
3130
  if (organisationModel.townCity) {
3136
- simpleAddress += organisationModel.townCity + '<br>';
3131
+ simpleAddress += `${organisationModel.townCity}<br>`;
3137
3132
  }
3138
3133
  if (organisationModel.county) {
3139
- simpleAddress += organisationModel.county + '<br>';
3134
+ simpleAddress += `${organisationModel.county}<br>`;
3140
3135
  }
3141
3136
  if (organisationModel.country) {
3142
- simpleAddress += organisationModel.country + '<br>';
3137
+ simpleAddress += `${organisationModel.country}<br>`;
3143
3138
  }
3144
3139
  if (organisationModel.postCode) {
3145
- simpleAddress += organisationModel.postCode + '<br>';
3140
+ simpleAddress += `${organisationModel.postCode}<br>`;
3146
3141
  }
3147
3142
  return simpleAddress;
3148
3143
  }
@@ -3225,20 +3220,15 @@ __decorate([
3225
3220
  __metadata("design:type", Array)
3226
3221
  ], SearchResultView.prototype, "results", void 0);
3227
3222
 
3223
+ // tslint:disable:variable-name
3228
3224
  class CaseDetails {
3229
3225
  }
3230
3226
 
3227
+ // tslint:disable:variable-name
3231
3228
  class CaseEventData {
3232
3229
  }
3233
3230
 
3234
3231
  class WorkbasketInputModel {
3235
- constructor(label, order, field, metadata, display_context_parameter) {
3236
- this.label = label;
3237
- this.order = order;
3238
- this.field = field;
3239
- this.metadata = metadata;
3240
- this.display_context_parameter = display_context_parameter;
3241
- }
3242
3232
  }
3243
3233
  class WorkbasketInput {
3244
3234
  }
@@ -3275,9 +3265,9 @@ class FieldsUtils {
3275
3265
  });
3276
3266
  return valueMap;
3277
3267
  }
3278
- static getType(elem) {
3279
- return Object.prototype.toString.call(elem).slice(8, -1);
3280
- }
3268
+ // public static getType(elem: any): string {
3269
+ // return Object.prototype.toString.call(elem).slice(8, -1);
3270
+ // }
3281
3271
  static isObject(elem) {
3282
3272
  return typeof elem === 'object' && elem !== null;
3283
3273
  }
@@ -3777,6 +3767,7 @@ FieldsUtils.LABEL_MERGE_FUNCTION = function mergeFunction(field, result) {
3777
3767
  const elements = (result[field.id] || field.value);
3778
3768
  if (elements) {
3779
3769
  elements.forEach((elem) => {
3770
+ // tslint:disable-next-line:switch-default
3780
3771
  switch (field.field_type.collection_field_type.type) {
3781
3772
  case 'MoneyGBP': {
3782
3773
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -3921,7 +3912,6 @@ class ConditionParser {
3921
3912
  if (!condition) {
3922
3913
  return null;
3923
3914
  }
3924
- ;
3925
3915
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
3926
3916
  return peg.parse(condition.trim(), {});
3927
3917
  }
@@ -3934,14 +3924,12 @@ class ConditionParser {
3934
3924
  if (!conditions || conditions.length === 0) {
3935
3925
  return true;
3936
3926
  }
3937
- ;
3938
3927
  const validJoinComparators = ['AND', 'OR'];
3939
- const result = conditions.reduce((accumulator, condition, index) => {
3928
+ return conditions.reduce((accumulator, condition, index) => {
3940
3929
  const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1);
3941
3930
  if (isJoinComparator(condition)) {
3942
3931
  return accumulator;
3943
3932
  }
3944
- ;
3945
3933
  let currentConditionResult = true;
3946
3934
  if (Array.isArray(condition)) {
3947
3935
  currentConditionResult = this.evaluate(fields, condition);
@@ -3958,9 +3946,9 @@ class ConditionParser {
3958
3946
  }
3959
3947
  return currentConditionResult;
3960
3948
  }, true);
3961
- return result;
3962
3949
  }
3963
3950
  static evaluateJoin(leftResult, comparator, rightResult) {
3951
+ // tslint:disable-next-line:switch-default
3964
3952
  switch (comparator) {
3965
3953
  case 'OR': return leftResult || rightResult;
3966
3954
  case 'AND': return leftResult && rightResult;
@@ -4050,8 +4038,7 @@ class ConditionParser {
4050
4038
  }
4051
4039
  }
4052
4040
  static unquoted(str) {
4053
- const res = str.replace(/^"|"$/g, '');
4054
- return res;
4041
+ return str.replace(/^"|"$/g, '');
4055
4042
  }
4056
4043
  static findValueForComplexCondition(fields, head, tail, path) {
4057
4044
  if (!fields) {
@@ -4163,8 +4150,8 @@ class ShowCondition {
4163
4150
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4164
4151
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4165
4152
  this.processedList.push(condition.fieldReference);
4166
- const regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4167
- return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4153
+ const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
4154
+ return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
4168
4155
  }
4169
4156
  else {
4170
4157
  return originalCondition;
@@ -4241,6 +4228,7 @@ class ShowCondition {
4241
4228
  }
4242
4229
  // Consider what type of field this is.
4243
4230
  const ft = caseField.field_type;
4231
+ // tslint:disable-next-line:switch-default
4244
4232
  switch (ft.type) {
4245
4233
  case 'Collection':
4246
4234
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -4686,14 +4674,14 @@ class FieldsPurger {
4686
4674
  const formFields = form.getRawValue();
4687
4675
  const currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
4688
4676
  currentPage.wizard_page_fields.forEach(wpf => {
4689
- const case_field = this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
4690
- if (this.hasShowConditionField(case_field, formFields)) {
4691
- const condition = new ShowCondition(case_field.show_condition);
4692
- if (this.isHidden(condition, formFields.data) && !(this.isReadonly(case_field))) {
4693
- this.resetField(form, case_field);
4677
+ const caseField = this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
4678
+ if (this.hasShowConditionField(caseField, formFields)) {
4679
+ const condition = new ShowCondition(caseField.show_condition);
4680
+ if (this.isHidden(condition, formFields.data) && !(this.isReadonly(caseField))) {
4681
+ this.resetField(form, caseField);
4694
4682
  }
4695
4683
  }
4696
- this.retainHiddenValueByFieldType(case_field, form);
4684
+ this.retainHiddenValueByFieldType(caseField, form);
4697
4685
  });
4698
4686
  }
4699
4687
  retainHiddenValueByFieldType(field, form) {
@@ -4724,13 +4712,13 @@ class FieldsPurger {
4724
4712
  hasShowConditionPage(wizardPage, formFields) {
4725
4713
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
4726
4714
  }
4727
- hasShowConditionField(case_field, formFields) {
4728
- return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
4715
+ hasShowConditionField(caseField, formFields) {
4716
+ return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
4729
4717
  }
4730
- getShowConditionKey(show_condition) {
4718
+ getShowConditionKey(showCondition) {
4731
4719
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
4732
4720
  // Also need to allow for conditions specified using the "CONTAINS" keyword
4733
- return show_condition.split(/!=|=|CONTAINS/)[0];
4721
+ return showCondition.split(/!=|=|CONTAINS/)[0];
4734
4722
  }
4735
4723
  resetField(form, field) {
4736
4724
  /**
@@ -4802,8 +4790,8 @@ class FieldsPurger {
4802
4790
  }
4803
4791
  resetPage(form, wizardPage) {
4804
4792
  wizardPage.wizard_page_fields.forEach(wpf => {
4805
- const case_field = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4806
- this.resetField(form, case_field);
4793
+ const caseField = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4794
+ this.resetField(form, caseField);
4807
4795
  });
4808
4796
  }
4809
4797
  getType(elem) {
@@ -4813,8 +4801,8 @@ class FieldsPurger {
4813
4801
  return this.getType(elem) === 'Object';
4814
4802
  }
4815
4803
  // TODO: call isReadOnly on CaseFields once we make it available
4816
- isReadonly(case_field) {
4817
- return case_field.display_context.toUpperCase() === 'READONLY';
4804
+ isReadonly(caseField) {
4805
+ return caseField.display_context.toUpperCase() === 'READONLY';
4818
4806
  }
4819
4807
  /**
4820
4808
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -4970,6 +4958,7 @@ class FieldTypeSanitiser {
4970
4958
  return;
4971
4959
  }
4972
4960
  caseFields.forEach(caseField => {
4961
+ // tslint:disable-next-line:switch-default
4973
4962
  switch (caseField.field_type.type) {
4974
4963
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
4975
4964
  this.convertArrayToDynamicListOutput(caseField, data);
@@ -5546,7 +5535,6 @@ class FormValueService {
5546
5535
  });
5547
5536
  }
5548
5537
  }
5549
- ;
5550
5538
  });
5551
5539
  }
5552
5540
  }
@@ -5960,7 +5948,7 @@ class AddressParser {
5960
5948
  return addressModel;
5961
5949
  }
5962
5950
  parseAddressLine1(classification, address) {
5963
- let addressLine = '';
5951
+ let addressLine;
5964
5952
  if (classification === AddressType.RD06) {
5965
5953
  addressLine =
5966
5954
  `${address.SUB_BUILDING_NAME} ${address.ORGANISATION_NAME} ${address.DEPARTMENT_NAME} ${address.PO_BOX_NUMBER}`;
@@ -5973,7 +5961,7 @@ class AddressParser {
5973
5961
  return this.removeNonAddressValues(addressLine);
5974
5962
  }
5975
5963
  parseAddressLine2(classification, address) {
5976
- let addressLine = '';
5964
+ let addressLine;
5977
5965
  if (classification === AddressType.RD06) {
5978
5966
  addressLine = `${address.BUILDING_NAME} `;
5979
5967
  }
@@ -5984,7 +5972,7 @@ class AddressParser {
5984
5972
  return this.removeNonAddressValues(addressLine);
5985
5973
  }
5986
5974
  parseAddressLine3(classification, address) {
5987
- let addressLine = '';
5975
+ let addressLine;
5988
5976
  if (classification === AddressType.RD06) {
5989
5977
  addressLine =
5990
5978
  `${address.BUILDING_NUMBER} ${address.THOROUGHFARE_NAME}`;
@@ -6012,7 +6000,7 @@ class AddressParser {
6012
6000
  return value.replace(new RegExp('^,', 'gi'), '');
6013
6001
  }
6014
6002
  prefixWithCommaIfPresent(value) {
6015
- return value ? ', ' + value : value;
6003
+ return value ? `, ${value}` : value;
6016
6004
  }
6017
6005
  }
6018
6006
 
@@ -6121,7 +6109,7 @@ class CaseFlagRefdataService {
6121
6109
  if (flagType) {
6122
6110
  url += `?flag-type=${flagType}`;
6123
6111
  }
6124
- if (welshRequired != null) {
6112
+ if (typeof welshRequired === 'boolean') {
6125
6113
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
6126
6114
  url.indexOf('?') > -1 ? url += '&' : url += '?';
6127
6115
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -6578,11 +6566,6 @@ RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBu
6578
6566
  type: Injectable
6579
6567
  }], null, null); })();
6580
6568
 
6581
- class HasLoadingState {
6582
- get isLoading() {
6583
- return;
6584
- }
6585
- }
6586
6569
  class LoadingService {
6587
6570
  constructor() {
6588
6571
  this.registered = new Map();
@@ -6603,7 +6586,7 @@ class LoadingService {
6603
6586
  }
6604
6587
  generateToken() {
6605
6588
  const timestamp = window.performance.now();
6606
- return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
6589
+ return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
6607
6590
  }
6608
6591
  }
6609
6592
  LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
@@ -6620,10 +6603,7 @@ class SearchService {
6620
6603
  this.loadingService = loadingService;
6621
6604
  }
6622
6605
  search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
6623
- const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
6624
- + `/jurisdictions/${jurisdictionId}`
6625
- + `/case-types/${caseTypeId}`
6626
- + `/cases`;
6606
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases`;
6627
6607
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6628
6608
  const loadingToken = this.loadingService.register();
6629
6609
  return this.httpService
@@ -6631,14 +6611,13 @@ class SearchService {
6631
6611
  .pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
6632
6612
  }
6633
6613
  searchCasesByIds(caseTypeId, filter, view, sort) {
6634
- const url = this.appConfig.getCaseDataUrl() +
6635
- `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6614
+ const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6636
6615
  const body = Object.assign(Object.assign({ sort }, filter), { size: this.appConfig.getPaginationPageSize() });
6637
6616
  const loadingToken = this.loadingService.register();
6638
6617
  return this.httpService.post(url, body).pipe(map((response) => response), finalize(() => this.loadingService.unregister(loadingToken)));
6639
6618
  }
6640
6619
  searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
6641
- const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6620
+ const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6642
6621
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6643
6622
  const body = {
6644
6623
  sort,
@@ -6681,9 +6660,8 @@ class SearchService {
6681
6660
  }
6682
6661
  }
6683
6662
  SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
6684
- SearchService.VIEW_SEARCH = 'SEARCH';
6663
+ // public static readonly VIEW_SEARCH = 'SEARCH';
6685
6664
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
6686
- SearchService.FIELD_PREFIX = 'case.';
6687
6665
  SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
6688
6666
  SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
6689
6667
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
@@ -6797,17 +6775,12 @@ class DefinitionsService {
6797
6775
  this.appConfig = appConfig;
6798
6776
  }
6799
6777
  getCaseTypes(jurisdictionId, access) {
6800
- const url = this.appConfig.getApiUrl()
6801
- + `/caseworkers/:uid`
6802
- + `/jurisdictions/${jurisdictionId}`
6803
- + `/case-types?access=${access}`;
6778
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types?access=${access}`;
6804
6779
  return this.http
6805
6780
  .get(url).pipe(map(response => response));
6806
6781
  }
6807
6782
  getJurisdictions(access) {
6808
- const url = this.appConfig.getApiUrl()
6809
- + `/caseworkers/:uid`
6810
- + `/jurisdictions?access=${access}`;
6783
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions?access=${access}`;
6811
6784
  return this.http
6812
6785
  .get(url)
6813
6786
  .pipe(map(response => response));
@@ -6879,8 +6852,8 @@ class SearchResultViewItemComparatorFactory {
6879
6852
  compare(a, b) {
6880
6853
  let fieldA = a.case_fields[fieldId];
6881
6854
  let fieldB = b.case_fields[fieldId];
6882
- fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
6883
- fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
6855
+ fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
6856
+ fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
6884
6857
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6885
6858
  }
6886
6859
  };
@@ -6890,8 +6863,8 @@ class SearchResultViewItemComparatorFactory {
6890
6863
  compare(a, b) {
6891
6864
  let fieldA = a.case_fields[fieldId];
6892
6865
  let fieldB = b.case_fields[fieldId];
6893
- fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
6894
- fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
6866
+ fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
6867
+ fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
6895
6868
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6896
6869
  }
6897
6870
  };
@@ -7120,31 +7093,31 @@ class WizardPageFieldToCaseFieldMapper {
7120
7093
  }
7121
7094
  processComplexFieldOverride(override, caseField, caseFields) {
7122
7095
  const caseFieldIds = override.complex_field_element_id.split('.');
7123
- let case_field_leaf;
7096
+ let caseFieldLeaf;
7124
7097
  const children = this.getCaseFieldChildren(caseField);
7125
7098
  if (children.length > 0) {
7126
7099
  const [_, ...tail] = caseFieldIds;
7127
- case_field_leaf = this.getCaseFieldLeaf(tail, children);
7100
+ caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
7128
7101
  }
7129
7102
  else {
7130
- case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7103
+ caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7131
7104
  }
7132
7105
  if (override.display_context !== 'HIDDEN') {
7133
- case_field_leaf.hidden = false;
7134
- case_field_leaf.display_context = override.display_context;
7106
+ caseFieldLeaf.hidden = false;
7107
+ caseFieldLeaf.display_context = override.display_context;
7135
7108
  if (override.label && override.label.length > 0) {
7136
- case_field_leaf.label = override.label;
7109
+ caseFieldLeaf.label = override.label;
7137
7110
  }
7138
7111
  if (override.hint_text && override.hint_text.length > 0) {
7139
- case_field_leaf.hint_text = override.hint_text;
7112
+ caseFieldLeaf.hint_text = override.hint_text;
7140
7113
  }
7141
7114
  if (override.show_condition && override.show_condition.length > 0) {
7142
- case_field_leaf.show_condition = override.show_condition;
7115
+ caseFieldLeaf.show_condition = override.show_condition;
7143
7116
  }
7144
7117
  }
7145
7118
  else {
7146
- case_field_leaf.hidden = true;
7147
- case_field_leaf.display_context = override.display_context;
7119
+ caseFieldLeaf.hidden = true;
7120
+ caseFieldLeaf.display_context = override.display_context;
7148
7121
  }
7149
7122
  }
7150
7123
  fixShowConditionPath(caseField, pathPrefix) {
@@ -7157,7 +7130,7 @@ class WizardPageFieldToCaseFieldMapper {
7157
7130
  });
7158
7131
  }
7159
7132
  preparePathPrefix(pathPrefix, caseField) {
7160
- return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
7133
+ return pathPrefix.length === 0 ? caseField : `${pathPrefix}.${caseField}`;
7161
7134
  }
7162
7135
  getCaseFieldLeaf(caseFieldId, caseFields) {
7163
7136
  const [head, ...tail] = caseFieldId;
@@ -7210,215 +7183,13 @@ WizardPageFieldToCaseFieldMapper.ɵprov = i0.ɵɵdefineInjectable({ token: Wizar
7210
7183
  }]
7211
7184
  }], null, null); })();
7212
7185
 
7213
- const MULTIPLE_TASKS_FOUND = 'More than one task found!';
7214
- class WorkAllocationService {
7215
- constructor(http, appConfig, errorService, alertService, sessionStorageService) {
7216
- this.http = http;
7217
- this.appConfig = appConfig;
7218
- this.errorService = errorService;
7219
- this.alertService = alertService;
7220
- this.sessionStorageService = sessionStorageService;
7221
- // Check to see if work allocation is enabled
7222
- }
7223
- /**
7224
- * Call the API to get tasks matching the search criteria.
7225
- * @param searchRequest The search parameters that specify which tasks to match.
7226
- */
7227
- searchTasks(searchRequest) {
7228
- // Do not need to check if WA enabled as parent method will do that
7229
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/searchForCompletable`;
7230
- return this.http
7231
- .post(url, { searchRequest }, null, false)
7232
- .pipe(map(response => response), catchError(error => {
7233
- this.errorService.setError(error);
7234
- // explicitly eat away 401 error and 400 error
7235
- if (error && error.status && (error.status === 401 || error.status === 400)) {
7236
- // do nothing
7237
- console.log('error status 401 or 400', error);
7238
- }
7239
- else {
7240
- return throwError(error);
7241
- }
7242
- }));
7243
- }
7244
- isWAEnabled(jurisdiction, caseType) {
7245
- this.features = this.appConfig.getWAServiceConfig();
7246
- let enabled = false;
7247
- if (!jurisdiction || !caseType) {
7248
- const caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
7249
- jurisdiction = caseInfo.jurisdiction;
7250
- caseType = caseInfo.caseType;
7251
- }
7252
- if (!this.features || !this.features.configurations) {
7253
- return false;
7254
- }
7255
- this.features.configurations.forEach(serviceConfig => {
7256
- if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
7257
- enabled = true;
7258
- }
7259
- });
7260
- return enabled;
7261
- }
7262
- /**
7263
- * Call the API to assign a task.
7264
- * @param taskId specifies which task should be assigned.
7265
- * @param userId specifies the user the task should be assigned to.
7266
- */
7267
- assignTask(taskId, userId) {
7268
- if (!this.isWAEnabled()) {
7269
- return of(null);
7270
- }
7271
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/assign`;
7272
- return this.http
7273
- .post(url, { userId })
7274
- .pipe(catchError(error => {
7275
- this.errorService.setError(error);
7276
- return throwError(error);
7277
- }));
7278
- }
7279
- /**
7280
- * Call the API to complete a task.
7281
- * @param taskId specifies which task should be completed.
7282
- */
7283
- completeTask(taskId) {
7284
- if (!this.isWAEnabled()) {
7285
- return of(null);
7286
- }
7287
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
7288
- return this.http
7289
- .post(url, {})
7290
- .pipe(catchError(error => {
7291
- this.errorService.setError(error);
7292
- // this will subscribe to get the user details and decide whether to display an error message
7293
- this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
7294
- this.handleTaskCompletionError(response);
7295
- });
7296
- return throwError(error);
7297
- }));
7298
- }
7299
- /**
7300
- * Call the API to assign and complete a task.
7301
- * @param taskId specifies which task should be completed.
7302
- */
7303
- assignAndCompleteTask(taskId) {
7304
- if (!this.isWAEnabled()) {
7305
- return of(null);
7306
- }
7307
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
7308
- return this.http
7309
- .post(url, {
7310
- completion_options: {
7311
- assign_and_complete: true
7312
- }
7313
- })
7314
- .pipe(catchError(error => {
7315
- this.errorService.setError(error);
7316
- // this will subscribe to get the user details and decide whether to display an error message
7317
- this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
7318
- this.handleTaskCompletionError(response);
7319
- });
7320
- return throwError(error);
7321
- }));
7322
- }
7323
- /**
7324
- * Handles the response from the observable to get the user details when task is completed.
7325
- * @param response is the response given from the observable which contains the user detaild.
7326
- */
7327
- handleTaskCompletionError(response) {
7328
- const userDetails = response;
7329
- if (this.userIsCaseworker(userDetails.userInfo.roles)) {
7330
- // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
7331
- this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
7332
- this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
7333
- }
7334
- }
7335
- /**
7336
- * Returns true if the user's role is equivalent to a caseworker.
7337
- * @param roles is the list of roles found from the current user.
7338
- */
7339
- userIsCaseworker(roles) {
7340
- const lowerCaseRoles = roles.map(role => role.toLowerCase());
7341
- // When/if lib & target permanently change to es2016, replace indexOf with includes
7342
- return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
7343
- || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
7344
- }
7345
- /**
7346
- * Look for open tasks for a case and event combination. There are 5 possible scenarios:
7347
- * 1. No tasks found => Success.
7348
- * 2. One task found => Mark as done => Success.
7349
- * 3. One task found => Mark as done throws error => Failure.
7350
- * 4. More than one task found => Failure.
7351
- * 5. Search call throws an error => Failure.
7352
- * @param ccdId The ID of the case to find tasks for.
7353
- * @param eventId The ID of the event to find tasks for.
7354
- */
7355
- completeAppropriateTask(ccdId, eventId, jurisdiction, caseTypeId) {
7356
- if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
7357
- return of(null);
7358
- }
7359
- const taskSearchParameter = {
7360
- ccdId,
7361
- eventId,
7362
- jurisdiction,
7363
- caseTypeId
7364
- };
7365
- return this.searchTasks(taskSearchParameter)
7366
- .pipe(map((response) => {
7367
- const tasks = response.tasks;
7368
- if (tasks && tasks.length > 0) {
7369
- if (tasks.length === 1) {
7370
- this.completeTask(tasks[0].id).subscribe();
7371
- }
7372
- else {
7373
- // This is a problem. Throw an appropriate error.
7374
- throw new Error(MULTIPLE_TASKS_FOUND);
7375
- }
7376
- }
7377
- return true; // All good. Nothing to see here.
7378
- }), catchError(error => {
7379
- // Simply rethrow it.
7380
- return throwError(error);
7381
- }));
7382
- }
7383
- /**
7384
- * Return tasks for case and event.
7385
- */
7386
- getTasksByCaseIdAndEventId(eventId, caseId, caseType, jurisdiction) {
7387
- const defaultPayload = {
7388
- task_required_for_event: false,
7389
- tasks: []
7390
- };
7391
- if (!this.isWAEnabled()) {
7392
- return of(defaultPayload);
7393
- }
7394
- return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/case/tasks/${caseId}/event/${eventId}/caseType/${caseType}/jurisdiction/${jurisdiction}`);
7395
- }
7396
- /**
7397
- * Call the API to get a task
7398
- */
7399
- getTask(taskId) {
7400
- if (!this.isWAEnabled()) {
7401
- return of({ task: null });
7402
- }
7403
- return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}`);
7404
- }
7405
- }
7406
- WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
7407
- WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
7408
- WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(AlertService), i0.ɵɵinject(SessionStorageService)); };
7409
- WorkAllocationService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
7410
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkAllocationService, [{
7411
- type: Injectable
7412
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null); })();
7413
-
7414
7186
  class CasesService {
7415
- constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
7187
+ constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
7416
7188
  this.http = http;
7417
7189
  this.appConfig = appConfig;
7418
7190
  this.orderService = orderService;
7419
7191
  this.errorService = errorService;
7420
7192
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
7421
- this.workAllocationService = workAllocationService;
7422
7193
  this.loadingService = loadingService;
7423
7194
  this.sessionStorageService = sessionStorageService;
7424
7195
  this.get = this.getCaseView;
@@ -7436,11 +7207,7 @@ class CasesService {
7436
7207
  });
7437
7208
  }
7438
7209
  getCaseView(jurisdictionId, caseTypeId, caseId) {
7439
- const url = this.appConfig.getApiUrl()
7440
- + `/caseworkers/:uid`
7441
- + `/jurisdictions/${jurisdictionId}`
7442
- + `/case-types/${caseTypeId}`
7443
- + `/cases/${caseId}`;
7210
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
7444
7211
  const loadingToken = this.loadingService.register();
7445
7212
  return this.http
7446
7213
  .get(url)
@@ -7489,7 +7256,7 @@ class CasesService {
7489
7256
  }
7490
7257
  createEvent(caseDetails, eventData) {
7491
7258
  const caseId = caseDetails.case_id;
7492
- const url = this.appConfig.getCaseDataUrl() + `/cases/${caseId}/events`;
7259
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
7493
7260
  const headers = new HttpHeaders()
7494
7261
  .set('experimental', 'true')
7495
7262
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -7502,9 +7269,8 @@ class CasesService {
7502
7269
  }));
7503
7270
  }
7504
7271
  validateCase(ctid, eventData, pageId) {
7505
- const pageIdString = pageId ? '?pageId=' + pageId : '';
7506
- const url = this.appConfig.getCaseDataUrl()
7507
- + `/case-types/${ctid}/validate${pageIdString}`;
7272
+ const pageIdString = pageId ? `?pageId=${pageId}` : '';
7273
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
7508
7274
  const headers = new HttpHeaders()
7509
7275
  .set('experimental', 'true')
7510
7276
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -7521,8 +7287,7 @@ class CasesService {
7521
7287
  if (eventData.ignore_warning) {
7522
7288
  ignoreWarning = 'true';
7523
7289
  }
7524
- const url = this.appConfig.getCaseDataUrl()
7525
- + `/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7290
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7526
7291
  const headers = new HttpHeaders()
7527
7292
  .set('experimental', 'true')
7528
7293
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -7535,9 +7300,7 @@ class CasesService {
7535
7300
  }));
7536
7301
  }
7537
7302
  getPrintDocuments(caseId) {
7538
- const url = this.appConfig.getCaseDataUrl()
7539
- + `/cases/${caseId}`
7540
- + `/documents`;
7303
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
7541
7304
  const headers = new HttpHeaders()
7542
7305
  .set('experimental', 'true')
7543
7306
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -7550,7 +7313,7 @@ class CasesService {
7550
7313
  }));
7551
7314
  }
7552
7315
  buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
7553
- let url = this.appConfig.getCaseDataUrl() + `/internal`;
7316
+ let url = `${this.appConfig.getCaseDataUrl()}/internal`;
7554
7317
  if (Draft.isDraft(caseId)) {
7555
7318
  url += `/drafts/${caseId}`
7556
7319
  + `/event-trigger`
@@ -7644,11 +7407,11 @@ CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd
7644
7407
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
7645
7408
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
7646
7409
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
7647
- CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService)); };
7410
+ CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService)); };
7648
7411
  CasesService.ɵprov = i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
7649
7412
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
7650
7413
  type: Injectable
7651
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7414
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7652
7415
 
7653
7416
  class EventTriggerService {
7654
7417
  constructor() {
@@ -8222,7 +7985,7 @@ class PageValidationService {
8222
7985
  isHidden(caseField, editForm, path) {
8223
7986
  const formFields = editForm.getRawValue();
8224
7987
  const condition = ShowCondition.getInstance(caseField.show_condition);
8225
- if (path && path.indexOf('_' + caseField.id + '_') === -1) {
7988
+ if (path && path.indexOf(`_${caseField.id}_`) === -1) {
8226
7989
  path = `${path}${caseField.id}`;
8227
7990
  }
8228
7991
  return !condition.match(formFields.data, path);
@@ -8251,33 +8014,234 @@ PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationSe
8251
8014
  type: Injectable
8252
8015
  }], function () { return [{ type: CaseFieldService }]; }, null); })();
8253
8016
 
8254
- class CaseEditComponent {
8255
- constructor(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
8256
- this.fb = fb;
8257
- this.router = router;
8258
- this.route = route;
8259
- this.fieldsUtils = fieldsUtils;
8260
- this.fieldsPurger = fieldsPurger;
8261
- this.registrarService = registrarService;
8262
- this.wizardFactory = wizardFactory;
8017
+ const MULTIPLE_TASKS_FOUND = 'More than one task found!';
8018
+ class WorkAllocationService {
8019
+ constructor(http, appConfig, errorService, alertService, sessionStorageService) {
8020
+ this.http = http;
8021
+ this.appConfig = appConfig;
8022
+ this.errorService = errorService;
8023
+ this.alertService = alertService;
8263
8024
  this.sessionStorageService = sessionStorageService;
8264
- this.windowsService = windowsService;
8265
- this.cancelled = new EventEmitter();
8266
- this.submitted = new EventEmitter();
8025
+ // Check to see if work allocation is enabled
8267
8026
  }
8268
- ngOnInit() {
8269
- this.wizard = this.wizardFactory.create(this.eventTrigger);
8270
- this.initialUrl = this.sessionStorageService.getItem('eventUrl');
8271
- this.isPageRefreshed = JSON.parse(this.sessionStorageService.getItem('isPageRefreshed'));
8272
- this.checkPageRefresh();
8273
- if (this.router.url && !this.isPageRefreshed) {
8274
- this.sessionStorageService.setItem('eventUrl', this.router.url);
8275
- }
8276
- this.form = this.fb.group({
8277
- data: new FormGroup({}),
8278
- event: this.fb.group({
8279
- id: [this.eventTrigger.id, Validators.required],
8280
- summary: [''],
8027
+ /**
8028
+ * Call the API to get tasks matching the search criteria.
8029
+ * @param searchRequest The search parameters that specify which tasks to match.
8030
+ */
8031
+ searchTasks(searchRequest) {
8032
+ // Do not need to check if WA enabled as parent method will do that
8033
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/searchForCompletable`;
8034
+ return this.http
8035
+ .post(url, { searchRequest }, null, false)
8036
+ .pipe(map(response => response), catchError(error => {
8037
+ this.errorService.setError(error);
8038
+ // explicitly eat away 401 error and 400 error
8039
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
8040
+ // do nothing
8041
+ console.log('error status 401 or 400', error);
8042
+ }
8043
+ else {
8044
+ return throwError(error);
8045
+ }
8046
+ }));
8047
+ }
8048
+ isWAEnabled(jurisdiction, caseType) {
8049
+ this.features = this.appConfig.getWAServiceConfig();
8050
+ let enabled = false;
8051
+ if (!jurisdiction || !caseType) {
8052
+ const caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
8053
+ jurisdiction = caseInfo.jurisdiction;
8054
+ caseType = caseInfo.caseType;
8055
+ }
8056
+ if (!this.features || !this.features.configurations) {
8057
+ return false;
8058
+ }
8059
+ this.features.configurations.forEach(serviceConfig => {
8060
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
8061
+ enabled = true;
8062
+ }
8063
+ });
8064
+ return enabled;
8065
+ }
8066
+ /**
8067
+ * Call the API to assign a task.
8068
+ * @param taskId specifies which task should be assigned.
8069
+ * @param userId specifies the user the task should be assigned to.
8070
+ */
8071
+ assignTask(taskId, userId) {
8072
+ if (!this.isWAEnabled()) {
8073
+ return of(null);
8074
+ }
8075
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/assign`;
8076
+ return this.http
8077
+ .post(url, { userId })
8078
+ .pipe(catchError(error => {
8079
+ this.errorService.setError(error);
8080
+ return throwError(error);
8081
+ }));
8082
+ }
8083
+ /**
8084
+ * Call the API to complete a task.
8085
+ * @param taskId specifies which task should be completed.
8086
+ */
8087
+ completeTask(taskId) {
8088
+ if (!this.isWAEnabled()) {
8089
+ return of(null);
8090
+ }
8091
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
8092
+ return this.http
8093
+ .post(url, {})
8094
+ .pipe(catchError(error => {
8095
+ this.errorService.setError(error);
8096
+ // this will subscribe to get the user details and decide whether to display an error message
8097
+ this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
8098
+ this.handleTaskCompletionError(response);
8099
+ });
8100
+ return throwError(error);
8101
+ }));
8102
+ }
8103
+ /**
8104
+ * Call the API to assign and complete a task.
8105
+ * @param taskId specifies which task should be completed.
8106
+ */
8107
+ assignAndCompleteTask(taskId) {
8108
+ if (!this.isWAEnabled()) {
8109
+ return of(null);
8110
+ }
8111
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
8112
+ return this.http
8113
+ .post(url, {
8114
+ completion_options: {
8115
+ assign_and_complete: true
8116
+ }
8117
+ })
8118
+ .pipe(catchError(error => {
8119
+ this.errorService.setError(error);
8120
+ // this will subscribe to get the user details and decide whether to display an error message
8121
+ this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
8122
+ this.handleTaskCompletionError(response);
8123
+ });
8124
+ return throwError(error);
8125
+ }));
8126
+ }
8127
+ /**
8128
+ * Handles the response from the observable to get the user details when task is completed.
8129
+ * @param response is the response given from the observable which contains the user detaild.
8130
+ */
8131
+ handleTaskCompletionError(response) {
8132
+ const userDetails = response;
8133
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
8134
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
8135
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
8136
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
8137
+ }
8138
+ }
8139
+ /**
8140
+ * Returns true if the user's role is equivalent to a caseworker.
8141
+ * @param roles is the list of roles found from the current user.
8142
+ */
8143
+ userIsCaseworker(roles) {
8144
+ const lowerCaseRoles = roles.map(role => role.toLowerCase());
8145
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
8146
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
8147
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
8148
+ }
8149
+ /**
8150
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
8151
+ * 1. No tasks found => Success.
8152
+ * 2. One task found => Mark as done => Success.
8153
+ * 3. One task found => Mark as done throws error => Failure.
8154
+ * 4. More than one task found => Failure.
8155
+ * 5. Search call throws an error => Failure.
8156
+ * @param ccdId The ID of the case to find tasks for.
8157
+ * @param eventId The ID of the event to find tasks for.
8158
+ */
8159
+ completeAppropriateTask(ccdId, eventId, jurisdiction, caseTypeId) {
8160
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
8161
+ return of(null);
8162
+ }
8163
+ const taskSearchParameter = {
8164
+ ccdId,
8165
+ eventId,
8166
+ jurisdiction,
8167
+ caseTypeId
8168
+ };
8169
+ return this.searchTasks(taskSearchParameter)
8170
+ .pipe(map((response) => {
8171
+ const tasks = response.tasks;
8172
+ if (tasks && tasks.length > 0) {
8173
+ if (tasks.length === 1) {
8174
+ this.completeTask(tasks[0].id).subscribe();
8175
+ }
8176
+ else {
8177
+ // This is a problem. Throw an appropriate error.
8178
+ throw new Error(MULTIPLE_TASKS_FOUND);
8179
+ }
8180
+ }
8181
+ return true; // All good. Nothing to see here.
8182
+ }), catchError(error => {
8183
+ // Simply rethrow it.
8184
+ return throwError(error);
8185
+ }));
8186
+ }
8187
+ /**
8188
+ * Return tasks for case and event.
8189
+ */
8190
+ getTasksByCaseIdAndEventId(eventId, caseId, caseType, jurisdiction) {
8191
+ const defaultPayload = {
8192
+ task_required_for_event: false,
8193
+ tasks: []
8194
+ };
8195
+ if (!this.isWAEnabled()) {
8196
+ return of(defaultPayload);
8197
+ }
8198
+ return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/case/tasks/${caseId}/event/${eventId}/caseType/${caseType}/jurisdiction/${jurisdiction}`);
8199
+ }
8200
+ /**
8201
+ * Call the API to get a task
8202
+ */
8203
+ getTask(taskId) {
8204
+ if (!this.isWAEnabled()) {
8205
+ return of({ task: null });
8206
+ }
8207
+ return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}`);
8208
+ }
8209
+ }
8210
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
8211
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
8212
+ WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(AlertService), i0.ɵɵinject(SessionStorageService)); };
8213
+ WorkAllocationService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
8214
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkAllocationService, [{
8215
+ type: Injectable
8216
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null); })();
8217
+
8218
+ class CaseEditComponent {
8219
+ constructor(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
8220
+ this.fb = fb;
8221
+ this.router = router;
8222
+ this.route = route;
8223
+ this.fieldsUtils = fieldsUtils;
8224
+ this.fieldsPurger = fieldsPurger;
8225
+ this.registrarService = registrarService;
8226
+ this.wizardFactory = wizardFactory;
8227
+ this.sessionStorageService = sessionStorageService;
8228
+ this.windowsService = windowsService;
8229
+ this.cancelled = new EventEmitter();
8230
+ this.submitted = new EventEmitter();
8231
+ }
8232
+ ngOnInit() {
8233
+ this.wizard = this.wizardFactory.create(this.eventTrigger);
8234
+ this.initialUrl = this.sessionStorageService.getItem('eventUrl');
8235
+ this.isPageRefreshed = JSON.parse(this.sessionStorageService.getItem('isPageRefreshed'));
8236
+ this.checkPageRefresh();
8237
+ if (this.router.url && !this.isPageRefreshed) {
8238
+ this.sessionStorageService.setItem('eventUrl', this.router.url);
8239
+ }
8240
+ this.form = this.fb.group({
8241
+ data: new FormGroup({}),
8242
+ event: this.fb.group({
8243
+ id: [this.eventTrigger.id, Validators.required],
8244
+ summary: [''],
8281
8245
  description: ['']
8282
8246
  })
8283
8247
  });
@@ -9076,7 +9040,7 @@ class CaseEditPageComponent {
9076
9040
  const label = casefield.label || 'Field';
9077
9041
  let id = casefield.id;
9078
9042
  if (fieldElement['component'] && fieldElement['component'].parent) {
9079
- if (fieldElement['component'].idPrefix.indexOf('_' + id + '_') === -1) {
9043
+ if (fieldElement['component'].idPrefix.indexOf(`_${id}_`) === -1) {
9080
9044
  id = `${fieldElement['component'].idPrefix}${id}`;
9081
9045
  }
9082
9046
  else {
@@ -9205,8 +9169,8 @@ class CaseEditPageComponent {
9205
9169
  }
9206
9170
  }
9207
9171
  callbackErrorsNotify(errorContext) {
9208
- this.ignoreWarning = errorContext.ignore_warning;
9209
- this.triggerText = errorContext.trigger_text;
9172
+ this.ignoreWarning = errorContext.ignoreWarning;
9173
+ this.triggerText = errorContext.triggerText;
9210
9174
  }
9211
9175
  next() {
9212
9176
  this.resetErrors();
@@ -9251,6 +9215,7 @@ class CaseEditPageComponent {
9251
9215
  else {
9252
9216
  this.caseEdit.cancelled.emit();
9253
9217
  }
9218
+ this.caseEditDataService.clearFormValidationErrors();
9254
9219
  }
9255
9220
  submitting() {
9256
9221
  return this.isSubmitting;
@@ -9518,12 +9483,12 @@ class CallbackErrorsComponent {
9518
9483
  buildCallbackErrorsContext() {
9519
9484
  const errorContext = new CallbackErrorsContext();
9520
9485
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
9521
- errorContext.ignore_warning = true;
9522
- errorContext.trigger_text = this.triggerTextIgnore;
9486
+ errorContext.ignoreWarning = true;
9487
+ errorContext.triggerText = this.triggerTextIgnore;
9523
9488
  }
9524
9489
  else {
9525
- errorContext.ignore_warning = false;
9526
- errorContext.trigger_text = this.triggerTextContinue;
9490
+ errorContext.ignoreWarning = false;
9491
+ errorContext.triggerText = this.triggerTextContinue;
9527
9492
  }
9528
9493
  return errorContext;
9529
9494
  }
@@ -9562,7 +9527,7 @@ CallbackErrorsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CallbackErrorsCom
9562
9527
 
9563
9528
  class AddressOption {
9564
9529
  constructor(addressModel, description) {
9565
- if (description == null) {
9530
+ if (description === null) {
9566
9531
  this.value = addressModel;
9567
9532
  this.description = this.getDescription();
9568
9533
  }
@@ -9571,13 +9536,10 @@ class AddressOption {
9571
9536
  }
9572
9537
  }
9573
9538
  getDescription() {
9574
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
9575
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
9576
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
9577
- + ', ' + this.value.PostTown);
9539
+ return this.removeInitialCommaIfPresent(`${this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1}${this.prefixWithCommaIfPresent(this.value.AddressLine2)}${this.prefixWithCommaIfPresent(this.value.AddressLine3)}, ${this.value.PostTown}`);
9578
9540
  }
9579
9541
  prefixWithCommaIfPresent(value) {
9580
- return value ? ', ' + value : value;
9542
+ return value ? `, ${value}` : value;
9581
9543
  }
9582
9544
  removeInitialCommaIfPresent(value) {
9583
9545
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -9965,7 +9927,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
9965
9927
  this.missingPostcode = false;
9966
9928
  const postcode = this.postcode.value;
9967
9929
  this.caseField.value = null;
9968
- this.addressOptions = new Array();
9930
+ this.addressOptions = [];
9969
9931
  this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe(result => {
9970
9932
  result.forEach(address => {
9971
9933
  this.addressOptions.push(new AddressOption(address, null));
@@ -10008,7 +9970,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10008
9970
  let hasAddress = false;
10009
9971
  if (address) {
10010
9972
  Object.keys(address).forEach((key) => {
10011
- if (address[key] != null) {
9973
+ if (address[key] !== null) {
10012
9974
  hasAddress = true;
10013
9975
  }
10014
9976
  });
@@ -10031,7 +9993,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10031
9993
  }
10032
9994
  defaultLabel(numberOfAddresses) {
10033
9995
  return numberOfAddresses === 0 ? 'No address found'
10034
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
9996
+ : `${numberOfAddresses}${numberOfAddresses === 1 ? ' address ' : ' addresses '}found`;
10035
9997
  }
10036
9998
  setFormValue() {
10037
9999
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -11560,6 +11522,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11560
11522
  this.formArray.removeAt(index);
11561
11523
  }
11562
11524
  resetIds(index) {
11525
+ var _a, _b;
11563
11526
  for (let i = index; i < this.collItems.length; i++) {
11564
11527
  const counter = i + 1;
11565
11528
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -11569,16 +11532,15 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11569
11532
  && this.collItems[i].caseField.id === counter.toString()) {
11570
11533
  this.collItems[i].caseField.id = i.toString();
11571
11534
  }
11572
- const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
11573
- const idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
11535
+ const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11536
+ const idPrefix1Current = idPrefix1.replace(`_${i.toString()}`, `_${counter.toString()}`);
11574
11537
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
11575
11538
  this.collItems[i].prefix = idPrefix1;
11576
11539
  }
11577
- const idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
11578
- && this.collItems[i].container['component'].idPrefix ? true : false;
11540
+ const idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
11579
11541
  const idPrefix2 = idPrefixAvailable ?
11580
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
11581
- const idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
11542
+ this.collItems[i].container['component'].idPrefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11543
+ const idPrefix2current = idPrefix2.replace(`_${i.toString()}`, `_${counter.toString()}`);
11582
11544
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
11583
11545
  this.collItems[i].container['component'].idPrefix = idPrefix2;
11584
11546
  }
@@ -12492,39 +12454,248 @@ const ɵWriteDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInh
12492
12454
  }]
12493
12455
  }], null, null); })();
12494
12456
 
12495
- class DynamicRadioListPipe {
12457
+ class FixedListPipe {
12496
12458
  transform(value, items) {
12497
- /**
12498
- *
12499
- * If value is object with element `value.code`, use code instead.
12500
- */
12501
- if (value && value.value && value.value.code) {
12502
- value = value.value.code;
12459
+ if (!!items) {
12460
+ const item = items.find(i => i.code === value);
12461
+ return item ? item.label : FixedListPipe.EMPTY;
12462
+ }
12463
+ else {
12464
+ return FixedListPipe.EMPTY;
12503
12465
  }
12504
- const item = items.find(i => i.code === value);
12505
- return item ? item.label : DynamicRadioListPipe.EMPTY;
12506
12466
  }
12507
12467
  }
12508
- DynamicRadioListPipe.EMPTY = '';
12509
- DynamicRadioListPipe.ɵfac = function DynamicRadioListPipe_Factory(t) { return new (t || DynamicRadioListPipe)(); };
12510
- DynamicRadioListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdDynamicRadioList", type: DynamicRadioListPipe, pure: true });
12511
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicRadioListPipe, [{
12468
+ FixedListPipe.EMPTY = '';
12469
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
12470
+ FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
12471
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedListPipe, [{
12512
12472
  type: Pipe,
12513
12473
  args: [{
12514
- name: 'ccdDynamicRadioList'
12474
+ name: 'ccdFixedList'
12515
12475
  }]
12516
12476
  }], null, null); })();
12517
12477
 
12518
- class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
12519
- ngOnInit() {
12520
- /**
12521
- *
12522
- * Reassigning list_items from formatted_list when list_items is empty
12523
- */
12524
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12525
- this.caseField.list_items = this.caseField.formatted_value.list_items;
12526
- }
12527
- /**
12478
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
12479
+ i0.ɵɵelementStart(0, "div");
12480
+ i0.ɵɵtext(1);
12481
+ i0.ɵɵpipe(2, "ccdFixedList");
12482
+ i0.ɵɵelementEnd();
12483
+ } if (rf & 2) {
12484
+ const value_r1 = ctx.$implicit;
12485
+ const ctx_r0 = i0.ɵɵnextContext();
12486
+ i0.ɵɵadvance(1);
12487
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
12488
+ } }
12489
+ class ReadDynamicMultiSelectListFieldComponent extends AbstractFieldReadComponent {
12490
+ ngOnInit() {
12491
+ /**
12492
+ *
12493
+ * Reassigning list_items from formatted_list when list_items is empty
12494
+ */
12495
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12496
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
12497
+ }
12498
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12499
+ this.caseField.value = this.caseField.formatted_value.value;
12500
+ }
12501
+ super.ngOnInit();
12502
+ }
12503
+ }
12504
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
12505
+ ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
12506
+ i0.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
12507
+ } if (rf & 2) {
12508
+ i0.ɵɵproperty("ngForOf", ctx.caseField.value);
12509
+ } }, directives: [i1.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
12510
+ const ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
12511
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
12512
+ type: Component,
12513
+ args: [{
12514
+ selector: 'ccd-read-dynamic-multi-select-list-field',
12515
+ templateUrl: './read-dynamic-multi-select-list-field.html',
12516
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
12517
+ }]
12518
+ }], null, null); })();
12519
+
12520
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12521
+ i0.ɵɵelementStart(0, "span", 5);
12522
+ i0.ɵɵtext(1);
12523
+ i0.ɵɵpipe(2, "ccdFieldLabel");
12524
+ i0.ɵɵelementEnd();
12525
+ } if (rf & 2) {
12526
+ const ctx_r0 = i0.ɵɵnextContext();
12527
+ i0.ɵɵadvance(1);
12528
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
12529
+ } }
12530
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12531
+ i0.ɵɵelementStart(0, "span", 6);
12532
+ i0.ɵɵtext(1);
12533
+ i0.ɵɵelementEnd();
12534
+ } if (rf & 2) {
12535
+ const ctx_r1 = i0.ɵɵnextContext();
12536
+ i0.ɵɵadvance(1);
12537
+ i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
12538
+ } }
12539
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
12540
+ i0.ɵɵelementStart(0, "span", 7);
12541
+ i0.ɵɵtext(1);
12542
+ i0.ɵɵpipe(2, "ccdFirstError");
12543
+ i0.ɵɵelementEnd();
12544
+ } if (rf & 2) {
12545
+ const ctx_r2 = i0.ɵɵnextContext();
12546
+ i0.ɵɵadvance(1);
12547
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
12548
+ } }
12549
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
12550
+ const _r6 = i0.ɵɵgetCurrentView();
12551
+ i0.ɵɵelementContainerStart(0);
12552
+ i0.ɵɵelementStart(1, "div", 8);
12553
+ i0.ɵɵelementStart(2, "input", 9);
12554
+ i0.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
12555
+ i0.ɵɵelementEnd();
12556
+ i0.ɵɵelementStart(3, "label", 10);
12557
+ i0.ɵɵtext(4);
12558
+ i0.ɵɵelementEnd();
12559
+ i0.ɵɵelementEnd();
12560
+ i0.ɵɵelementContainerEnd();
12561
+ } if (rf & 2) {
12562
+ const checkbox_r4 = ctx.$implicit;
12563
+ const ctx_r3 = i0.ɵɵnextContext();
12564
+ i0.ɵɵadvance(2);
12565
+ i0.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
12566
+ i0.ɵɵpropertyInterpolate("name", ctx_r3.id());
12567
+ i0.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
12568
+ i0.ɵɵadvance(1);
12569
+ i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
12570
+ i0.ɵɵadvance(1);
12571
+ i0.ɵɵtextInterpolate(checkbox_r4.label);
12572
+ } }
12573
+ const _c0$L = function (a0) { return { "error": a0 }; };
12574
+ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
12575
+ ngOnInit() {
12576
+ this.checkboxes = new FormArray([]);
12577
+ this.setInitialCaseList();
12578
+ this.setInitialCaseFieldValue();
12579
+ // Initialise array with existing values
12580
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
12581
+ const values = this.caseField.value;
12582
+ values.forEach(value => {
12583
+ this.checkboxes.push(new FormControl(value));
12584
+ });
12585
+ }
12586
+ this.dynamicListFormControl = this.registerControl(new FormControl(this.checkboxes.value));
12587
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
12588
+ }
12589
+ onCheckChange(event) {
12590
+ const target = event.target;
12591
+ if (!target || !target.value) {
12592
+ return;
12593
+ }
12594
+ const selectedListItem = this.getValueListItem(target.value);
12595
+ if (!this.isSelected(target.value)) {
12596
+ // Add a new control in the FormArray
12597
+ this.checkboxes.push(new FormControl(selectedListItem));
12598
+ }
12599
+ else {
12600
+ // Remove the control from the FormArray
12601
+ this.checkboxes.controls.forEach((ctrl, i) => {
12602
+ if (ctrl.value.code === target.value) {
12603
+ this.checkboxes.removeAt(i);
12604
+ }
12605
+ });
12606
+ }
12607
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
12608
+ }
12609
+ isSelected(code) {
12610
+ if (this.checkboxes && this.checkboxes.controls) {
12611
+ return this.checkboxes.controls.find(control => control.value.code === code);
12612
+ }
12613
+ }
12614
+ getValueListItem(value) {
12615
+ return this.caseField.list_items.find(i => i.code === value);
12616
+ }
12617
+ setInitialCaseList() {
12618
+ const hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
12619
+ const hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
12620
+ if (!hasListItems && hasFormattedListItems) {
12621
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
12622
+ }
12623
+ }
12624
+ setInitialCaseFieldValue() {
12625
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12626
+ this.caseField.value = this.caseField.formatted_value.value;
12627
+ }
12628
+ const isNull = this.caseField.value === undefined || this.caseField.value === '';
12629
+ if (isNull || !Array.isArray(this.caseField.value)) {
12630
+ this.caseField.value = [];
12631
+ }
12632
+ }
12633
+ }
12634
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
12635
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
12636
+ i0.ɵɵelementStart(0, "div", 0);
12637
+ i0.ɵɵelementStart(1, "fieldset");
12638
+ i0.ɵɵelementStart(2, "legend");
12639
+ i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
12640
+ i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
12641
+ i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
12642
+ i0.ɵɵelementEnd();
12643
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
12644
+ i0.ɵɵelementEnd();
12645
+ i0.ɵɵelementEnd();
12646
+ } if (rf & 2) {
12647
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
12648
+ i0.ɵɵadvance(3);
12649
+ i0.ɵɵproperty("ngIf", ctx.caseField.label);
12650
+ i0.ɵɵadvance(1);
12651
+ i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
12652
+ i0.ɵɵadvance(1);
12653
+ i0.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
12654
+ i0.ɵɵadvance(1);
12655
+ i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
12656
+ } }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12657
+ const ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
12658
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
12659
+ type: Component,
12660
+ args: [{
12661
+ selector: 'ccd-write-dynamic-multi-select-list-field',
12662
+ templateUrl: './write-dynamic-multi-select-list-field.html'
12663
+ }]
12664
+ }], null, null); })();
12665
+
12666
+ class DynamicRadioListPipe {
12667
+ transform(value, items) {
12668
+ /**
12669
+ *
12670
+ * If value is object with element `value.code`, use code instead.
12671
+ */
12672
+ if (value && value.value && value.value.code) {
12673
+ value = value.value.code;
12674
+ }
12675
+ const item = items.find(i => i.code === value);
12676
+ return item ? item.label : DynamicRadioListPipe.EMPTY;
12677
+ }
12678
+ }
12679
+ DynamicRadioListPipe.EMPTY = '';
12680
+ DynamicRadioListPipe.ɵfac = function DynamicRadioListPipe_Factory(t) { return new (t || DynamicRadioListPipe)(); };
12681
+ DynamicRadioListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdDynamicRadioList", type: DynamicRadioListPipe, pure: true });
12682
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicRadioListPipe, [{
12683
+ type: Pipe,
12684
+ args: [{
12685
+ name: 'ccdDynamicRadioList'
12686
+ }]
12687
+ }], null, null); })();
12688
+
12689
+ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
12690
+ ngOnInit() {
12691
+ /**
12692
+ *
12693
+ * Reassigning list_items from formatted_list when list_items is empty
12694
+ */
12695
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12696
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
12697
+ }
12698
+ /**
12528
12699
  *
12529
12700
  * Seems formatted_value can also be empty for DynamicRadioList's. Reassigning list_items from value.list_items in that case
12530
12701
  */
@@ -12586,7 +12757,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
12586
12757
  i0.ɵɵadvance(1);
12587
12758
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
12588
12759
  } }
12589
- const _c0$L = function (a0) { return { selected: a0 }; };
12760
+ const _c0$K = function (a0) { return { selected: a0 }; };
12590
12761
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
12591
12762
  i0.ɵɵelementStart(0, "div", 10);
12592
12763
  i0.ɵɵelement(1, "input", 11);
@@ -12597,7 +12768,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
12597
12768
  } if (rf & 2) {
12598
12769
  const radioButton_r5 = ctx.$implicit;
12599
12770
  const ctx_r4 = i0.ɵɵnextContext();
12600
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12771
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12601
12772
  i0.ɵɵadvance(1);
12602
12773
  i0.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
12603
12774
  i0.ɵɵadvance(1);
@@ -12730,7 +12901,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12730
12901
  i0.ɵɵadvance(1);
12731
12902
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
12732
12903
  } }
12733
- const _c0$K = function (a0) { return { "form-group-error": a0 }; };
12904
+ const _c0$J = function (a0) { return { "form-group-error": a0 }; };
12734
12905
  const _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
12735
12906
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
12736
12907
  ngOnInit() {
@@ -12748,7 +12919,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
12748
12919
  i0.ɵɵelement(5, "input", 5);
12749
12920
  i0.ɵɵelementEnd();
12750
12921
  } if (rf & 2) {
12751
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
12922
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
12752
12923
  i0.ɵɵadvance(1);
12753
12924
  i0.ɵɵproperty("for", ctx.id());
12754
12925
  i0.ɵɵadvance(1);
@@ -12769,27 +12940,6 @@ const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInherited
12769
12940
  }]
12770
12941
  }], null, null); })();
12771
12942
 
12772
- class FixedListPipe {
12773
- transform(value, items) {
12774
- if (!!items) {
12775
- const item = items.find(i => i.code === value);
12776
- return item ? item.label : FixedListPipe.EMPTY;
12777
- }
12778
- else {
12779
- return FixedListPipe.EMPTY;
12780
- }
12781
- }
12782
- }
12783
- FixedListPipe.EMPTY = '';
12784
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
12785
- FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
12786
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedListPipe, [{
12787
- type: Pipe,
12788
- args: [{
12789
- name: 'ccdFixedList'
12790
- }]
12791
- }], null, null); })();
12792
-
12793
12943
  class ReadFixedListFieldComponent extends AbstractFieldReadComponent {
12794
12944
  }
12795
12945
  ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
@@ -12850,7 +13000,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
12850
13000
  i0.ɵɵadvance(1);
12851
13001
  i0.ɵɵtextInterpolate(type_r4.label);
12852
13002
  } }
12853
- const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13003
+ const _c0$I = function (a0) { return { "form-group-error": a0 }; };
12854
13004
  class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
12855
13005
  get listItems() {
12856
13006
  if (this.caseField) {
@@ -12888,7 +13038,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
12888
13038
  i0.ɵɵelementEnd();
12889
13039
  i0.ɵɵelementEnd();
12890
13040
  } if (rf & 2) {
12891
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13041
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
12892
13042
  i0.ɵɵadvance(1);
12893
13043
  i0.ɵɵproperty("for", ctx.id());
12894
13044
  i0.ɵɵadvance(1);
@@ -12979,7 +13129,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
12979
13129
  i0.ɵɵadvance(1);
12980
13130
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
12981
13131
  } }
12982
- const _c0$I = function (a0) { return { selected: a0 }; };
13132
+ const _c0$H = function (a0) { return { selected: a0 }; };
12983
13133
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
12984
13134
  i0.ɵɵelementStart(0, "div", 9);
12985
13135
  i0.ɵɵelement(1, "input", 10);
@@ -12990,7 +13140,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
12990
13140
  } if (rf & 2) {
12991
13141
  const radioButton_r4 = ctx.$implicit;
12992
13142
  const ctx_r3 = i0.ɵɵnextContext();
12993
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13143
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
12994
13144
  i0.ɵɵadvance(1);
12995
13145
  i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
12996
13146
  i0.ɵɵadvance(1);
@@ -13121,7 +13271,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
13121
13271
  i0.ɵɵadvance(1);
13122
13272
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
13123
13273
  } }
13124
- const _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
13274
+ const _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
13125
13275
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
13126
13276
  const _r7 = i0.ɵɵgetCurrentView();
13127
13277
  i0.ɵɵelementStart(0, "mat-option", 11);
@@ -13131,7 +13281,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
13131
13281
  } if (rf & 2) {
13132
13282
  const judicialUser_r5 = ctx.$implicit;
13133
13283
  const ctx_r3 = i0.ɵɵnextContext();
13134
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13284
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13135
13285
  i0.ɵɵadvance(1);
13136
13286
  i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
13137
13287
  } }
@@ -13350,7 +13500,7 @@ class LinkedCasesService {
13350
13500
  casesResponse.push(this.mapResponse(result));
13351
13501
  });
13352
13502
  });
13353
- const caseLinks = casesResponse.map(item => {
13503
+ this.linkedCases = casesResponse.map(item => {
13354
13504
  return {
13355
13505
  caseReference: item.caseReference,
13356
13506
  caseName: item.caseName,
@@ -13364,7 +13514,6 @@ class LinkedCasesService {
13364
13514
  }),
13365
13515
  };
13366
13516
  });
13367
- this.linkedCases = caseLinks;
13368
13517
  this.serverLinkedApiError = null;
13369
13518
  }, err => {
13370
13519
  this.serverLinkedApiError = {
@@ -13827,7 +13976,7 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
13827
13976
  i0.ɵɵadvance(3);
13828
13977
  i0.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
13829
13978
  } }
13830
- const _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
13979
+ const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
13831
13980
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
13832
13981
  i0.ɵɵelementStart(0, "div", 35);
13833
13982
  i0.ɵɵelementStart(1, "h3", 22);
@@ -13843,7 +13992,7 @@ function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
13843
13992
  i0.ɵɵelementEnd();
13844
13993
  } if (rf & 2) {
13845
13994
  const ctx_r7 = i0.ɵɵnextContext(2);
13846
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
13995
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
13847
13996
  i0.ɵɵadvance(3);
13848
13997
  i0.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
13849
13998
  } }
@@ -13894,11 +14043,11 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
13894
14043
  const ctx_r0 = i0.ɵɵnextContext();
13895
14044
  i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
13896
14045
  i0.ɵɵadvance(1);
13897
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
14046
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
13898
14047
  i0.ɵɵadvance(3);
13899
14048
  i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
13900
14049
  i0.ɵɵadvance(2);
13901
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
14050
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
13902
14051
  i0.ɵɵadvance(5);
13903
14052
  i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
13904
14053
  i0.ɵɵadvance(2);
@@ -14309,7 +14458,7 @@ LinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkCasesComponent, se
14309
14458
  i0.ɵɵadvance(4);
14310
14459
  i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
14311
14460
  i0.ɵɵadvance(4);
14312
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
14461
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
14313
14462
  i0.ɵɵadvance(1);
14314
14463
  i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
14315
14464
  i0.ɵɵadvance(18);
@@ -14918,7 +15067,7 @@ function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1)
14918
15067
  i0.ɵɵadvance(1);
14919
15068
  i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
14920
15069
  } }
14921
- const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15070
+ const _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
14922
15071
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
14923
15072
  i0.ɵɵelementStart(0, "div", 7);
14924
15073
  i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
@@ -14928,7 +15077,7 @@ function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
14928
15077
  i0.ɵɵelementEnd();
14929
15078
  } if (rf & 2) {
14930
15079
  const ctx_r1 = i0.ɵɵnextContext(2);
14931
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
15080
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
14932
15081
  i0.ɵɵadvance(1);
14933
15082
  i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
14934
15083
  i0.ɵɵadvance(2);
@@ -15087,6 +15236,7 @@ UnLinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UnLinkCasesComponent
15087
15236
  type: Output
15088
15237
  }] }); })();
15089
15238
 
15239
+ // tslint:disable:variable-name
15090
15240
  class LinkCaseReason {
15091
15241
  }
15092
15242
  class CCDCaseLinkType {
@@ -15197,7 +15347,7 @@ class ReadLinkedCasesFieldComponent {
15197
15347
  this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(field => field.id === 'caseLinks');
15198
15348
  }
15199
15349
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
15200
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15350
+ const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15201
15351
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15202
15352
  next: reasons => {
15203
15353
  this.reasonListLoaded = true;
@@ -15432,7 +15582,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15432
15582
  }
15433
15583
  }
15434
15584
  getLinkedCaseReasons() {
15435
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15585
+ const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15436
15586
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15437
15587
  next: reasons => {
15438
15588
  // Sort in ascending order
@@ -15490,8 +15640,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15490
15640
  getLinkedCases() {
15491
15641
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
15492
15642
  const caseViewFiltered = caseView.tabs.filter(tab => {
15493
- const linkField = tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
15494
- return linkField;
15643
+ return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
15495
15644
  });
15496
15645
  if (caseViewFiltered) {
15497
15646
  const caseLinkFieldValue = caseViewFiltered.map(filtered => { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(field => field.id === 'caseLinks')[0].value; });
@@ -15747,7 +15896,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15747
15896
  i0.ɵɵadvance(1);
15748
15897
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
15749
15898
  } }
15750
- const _c0$E = function (a0) { return { "form-group-error": a0 }; };
15899
+ const _c0$D = function (a0) { return { "form-group-error": a0 }; };
15751
15900
  class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
15752
15901
  ngOnInit() {
15753
15902
  this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15770,7 +15919,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
15770
15919
  i0.ɵɵelementEnd();
15771
15920
  i0.ɵɵelementEnd();
15772
15921
  } if (rf & 2) {
15773
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15922
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15774
15923
  i0.ɵɵadvance(1);
15775
15924
  i0.ɵɵproperty("for", ctx.id());
15776
15925
  i0.ɵɵadvance(1);
@@ -15887,7 +16036,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
15887
16036
  i0.ɵɵadvance(1);
15888
16037
  i0.ɵɵtextInterpolate(checkbox_r4.label);
15889
16038
  } }
15890
- const _c0$D = function (a0) { return { "error": a0 }; };
16039
+ const _c0$C = function (a0) { return { "error": a0 }; };
15891
16040
  class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
15892
16041
  ngOnInit() {
15893
16042
  this.checkboxes = new FormArray([]);
@@ -15942,7 +16091,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
15942
16091
  i0.ɵɵelementEnd();
15943
16092
  i0.ɵɵelementEnd();
15944
16093
  } if (rf & 2) {
15945
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16094
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
15946
16095
  i0.ɵɵadvance(3);
15947
16096
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
15948
16097
  i0.ɵɵadvance(1);
@@ -16011,7 +16160,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
16011
16160
  i0.ɵɵadvance(1);
16012
16161
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16013
16162
  } }
16014
- const _c0$C = function (a0) { return { "form-group-error": a0 }; };
16163
+ const _c0$B = function (a0) { return { "form-group-error": a0 }; };
16015
16164
  const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16016
16165
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
16017
16166
  ngOnInit() {
@@ -16029,7 +16178,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
16029
16178
  i0.ɵɵelement(5, "input", 5);
16030
16179
  i0.ɵɵelementEnd();
16031
16180
  } if (rf & 2) {
16032
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
16181
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16033
16182
  i0.ɵɵadvance(1);
16034
16183
  i0.ɵɵproperty("for", ctx.id());
16035
16184
  i0.ɵɵadvance(1);
@@ -16279,7 +16428,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_div_4_Template(rf, ct
16279
16428
  i0.ɵɵelementEnd();
16280
16429
  i0.ɵɵelementEnd();
16281
16430
  } }
16282
- const _c0$B = function (a0) { return { "scroll-container ": a0 }; };
16431
+ const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16283
16432
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { if (rf & 1) {
16284
16433
  i0.ɵɵelementStart(0, "div", 26);
16285
16434
  i0.ɵɵpipe(1, "async");
@@ -16293,7 +16442,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { i
16293
16442
  const ctx_r2 = i0.ɵɵnextContext(2);
16294
16443
  let tmp_0_0 = null;
16295
16444
  let tmp_2_0 = null;
16296
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$B, ((tmp_0_0 = i0.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16445
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16297
16446
  i0.ɵɵadvance(2);
16298
16447
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16299
16448
  i0.ɵɵadvance(2);
@@ -16646,194 +16795,6 @@ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Ca
16646
16795
  }]
16647
16796
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null); })();
16648
16797
 
16649
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
16650
- i0.ɵɵelementStart(0, "div");
16651
- i0.ɵɵtext(1);
16652
- i0.ɵɵpipe(2, "ccdFixedList");
16653
- i0.ɵɵelementEnd();
16654
- } if (rf & 2) {
16655
- const value_r1 = ctx.$implicit;
16656
- const ctx_r0 = i0.ɵɵnextContext();
16657
- i0.ɵɵadvance(1);
16658
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
16659
- } }
16660
- class ReadDynamicMultiSelectListFieldComponent extends AbstractFieldReadComponent {
16661
- ngOnInit() {
16662
- /**
16663
- *
16664
- * Reassigning list_items from formatted_list when list_items is empty
16665
- */
16666
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
16667
- this.caseField.list_items = this.caseField.formatted_value.list_items;
16668
- }
16669
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
16670
- this.caseField.value = this.caseField.formatted_value.value;
16671
- }
16672
- super.ngOnInit();
16673
- }
16674
- }
16675
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
16676
- ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
16677
- i0.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
16678
- } if (rf & 2) {
16679
- i0.ɵɵproperty("ngForOf", ctx.caseField.value);
16680
- } }, directives: [i1.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
16681
- const ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
16682
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
16683
- type: Component,
16684
- args: [{
16685
- selector: 'ccd-read-dynamic-multi-select-list-field',
16686
- templateUrl: './read-dynamic-multi-select-list-field.html',
16687
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
16688
- }]
16689
- }], null, null); })();
16690
-
16691
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
16692
- i0.ɵɵelementStart(0, "span", 5);
16693
- i0.ɵɵtext(1);
16694
- i0.ɵɵpipe(2, "ccdFieldLabel");
16695
- i0.ɵɵelementEnd();
16696
- } if (rf & 2) {
16697
- const ctx_r0 = i0.ɵɵnextContext();
16698
- i0.ɵɵadvance(1);
16699
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
16700
- } }
16701
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
16702
- i0.ɵɵelementStart(0, "span", 6);
16703
- i0.ɵɵtext(1);
16704
- i0.ɵɵelementEnd();
16705
- } if (rf & 2) {
16706
- const ctx_r1 = i0.ɵɵnextContext();
16707
- i0.ɵɵadvance(1);
16708
- i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
16709
- } }
16710
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
16711
- i0.ɵɵelementStart(0, "span", 7);
16712
- i0.ɵɵtext(1);
16713
- i0.ɵɵpipe(2, "ccdFirstError");
16714
- i0.ɵɵelementEnd();
16715
- } if (rf & 2) {
16716
- const ctx_r2 = i0.ɵɵnextContext();
16717
- i0.ɵɵadvance(1);
16718
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
16719
- } }
16720
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
16721
- const _r6 = i0.ɵɵgetCurrentView();
16722
- i0.ɵɵelementContainerStart(0);
16723
- i0.ɵɵelementStart(1, "div", 8);
16724
- i0.ɵɵelementStart(2, "input", 9);
16725
- i0.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
16726
- i0.ɵɵelementEnd();
16727
- i0.ɵɵelementStart(3, "label", 10);
16728
- i0.ɵɵtext(4);
16729
- i0.ɵɵelementEnd();
16730
- i0.ɵɵelementEnd();
16731
- i0.ɵɵelementContainerEnd();
16732
- } if (rf & 2) {
16733
- const checkbox_r4 = ctx.$implicit;
16734
- const ctx_r3 = i0.ɵɵnextContext();
16735
- i0.ɵɵadvance(2);
16736
- i0.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
16737
- i0.ɵɵpropertyInterpolate("name", ctx_r3.id());
16738
- i0.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
16739
- i0.ɵɵadvance(1);
16740
- i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
16741
- i0.ɵɵadvance(1);
16742
- i0.ɵɵtextInterpolate(checkbox_r4.label);
16743
- } }
16744
- const _c0$A = function (a0) { return { "error": a0 }; };
16745
- class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
16746
- ngOnInit() {
16747
- this.checkboxes = new FormArray([]);
16748
- this.setInitialCaseList();
16749
- this.setInitialCaseFieldValue();
16750
- // Initialise array with existing values
16751
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
16752
- const values = this.caseField.value;
16753
- values.forEach(value => {
16754
- this.checkboxes.push(new FormControl(value));
16755
- });
16756
- }
16757
- this.dynamicListFormControl = this.registerControl(new FormControl(this.checkboxes.value));
16758
- this.dynamicListFormControl.setValue(this.checkboxes.value);
16759
- }
16760
- onCheckChange(event) {
16761
- const target = event.target;
16762
- if (!target || !target.value) {
16763
- return;
16764
- }
16765
- const selectedListItem = this.getValueListItem(target.value);
16766
- if (!this.isSelected(target.value)) {
16767
- // Add a new control in the FormArray
16768
- this.checkboxes.push(new FormControl(selectedListItem));
16769
- }
16770
- else {
16771
- // Remove the control from the FormArray
16772
- this.checkboxes.controls.forEach((ctrl, i) => {
16773
- if (ctrl.value.code === target.value) {
16774
- this.checkboxes.removeAt(i);
16775
- }
16776
- });
16777
- }
16778
- this.dynamicListFormControl.setValue(this.checkboxes.value);
16779
- }
16780
- isSelected(code) {
16781
- if (this.checkboxes && this.checkboxes.controls) {
16782
- return this.checkboxes.controls.find(control => control.value.code === code);
16783
- }
16784
- }
16785
- getValueListItem(value) {
16786
- return this.caseField.list_items.find(i => i.code === value);
16787
- }
16788
- setInitialCaseList() {
16789
- const hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
16790
- const hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
16791
- if (!hasListItems && hasFormattedListItems) {
16792
- this.caseField.list_items = this.caseField.formatted_value.list_items;
16793
- }
16794
- }
16795
- setInitialCaseFieldValue() {
16796
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
16797
- this.caseField.value = this.caseField.formatted_value.value;
16798
- }
16799
- const isNull = this.caseField.value === undefined || this.caseField.value === '';
16800
- if (isNull || !Array.isArray(this.caseField.value)) {
16801
- this.caseField.value = [];
16802
- }
16803
- }
16804
- }
16805
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
16806
- WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
16807
- i0.ɵɵelementStart(0, "div", 0);
16808
- i0.ɵɵelementStart(1, "fieldset");
16809
- i0.ɵɵelementStart(2, "legend");
16810
- i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
16811
- i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
16812
- i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
16813
- i0.ɵɵelementEnd();
16814
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
16815
- i0.ɵɵelementEnd();
16816
- i0.ɵɵelementEnd();
16817
- } if (rf & 2) {
16818
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
16819
- i0.ɵɵadvance(3);
16820
- i0.ɵɵproperty("ngIf", ctx.caseField.label);
16821
- i0.ɵɵadvance(1);
16822
- i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
16823
- i0.ɵɵadvance(1);
16824
- i0.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
16825
- i0.ɵɵadvance(1);
16826
- i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
16827
- } }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
16828
- const ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
16829
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
16830
- type: Component,
16831
- args: [{
16832
- selector: 'ccd-write-dynamic-multi-select-list-field',
16833
- templateUrl: './write-dynamic-multi-select-list-field.html'
16834
- }]
16835
- }], null, null); })();
16836
-
16837
16798
  class ReadPhoneUKFieldComponent extends AbstractFieldReadComponent {
16838
16799
  }
16839
16800
  ReadPhoneUKFieldComponent.ɵfac = function ReadPhoneUKFieldComponent_Factory(t) { return ɵReadPhoneUKFieldComponent_BaseFactory(t || ReadPhoneUKFieldComponent); };
@@ -16984,7 +16945,7 @@ class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
16984
16945
  autoGrow(event) {
16985
16946
  if (this.browserService.isIEOrEdge()) {
16986
16947
  event.target.style.height = 'auto';
16987
- event.target.style.height = event.target.scrollHeight + 'px';
16948
+ event.target.style.height = `${event.target.scrollHeight}px`;
16988
16949
  event.target.scrollTop = event.target.scrollHeight;
16989
16950
  }
16990
16951
  }
@@ -17170,6 +17131,7 @@ class YesNoService {
17170
17131
  return YesNoService.EMPTY;
17171
17132
  }
17172
17133
  isYes(value) {
17134
+ // tslint:disable-next-line:switch-default
17173
17135
  switch (typeof (value)) {
17174
17136
  case 'boolean':
17175
17137
  return value;
@@ -17179,6 +17141,7 @@ class YesNoService {
17179
17141
  return false;
17180
17142
  }
17181
17143
  isNo(value) {
17144
+ // tslint:disable-next-line:switch-default
17182
17145
  switch (typeof (value)) {
17183
17146
  case 'boolean':
17184
17147
  return !value;
@@ -18000,6 +17963,7 @@ CaseFileViewFolderSortComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileV
18000
17963
  class CaseFileViewCategory {
18001
17964
  }
18002
17965
 
17966
+ // tslint:disable:variable-name
18003
17967
  class CaseFileViewDocument {
18004
17968
  }
18005
17969
 
@@ -19210,7 +19174,7 @@ class SelectFlagLocationComponent {
19210
19174
  // is expected not to have a party name)
19211
19175
  if (this.flagsData) {
19212
19176
  this.filteredFlagsData =
19213
- this.flagsData.filter(f => f.flags.partyName != null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19177
+ this.flagsData.filter(f => f.flags.partyName !== null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19214
19178
  }
19215
19179
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
19216
19180
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -20378,18 +20342,19 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
20378
20342
  field.value = { CaseReference: value };
20379
20343
  return field;
20380
20344
  }
20381
- toCaseField(id, label, field_type, value) {
20345
+ toCaseField(id, label, fieldType, value) {
20382
20346
  return plainToClassFromExist(new CaseField(), {
20383
20347
  id,
20384
20348
  label,
20385
20349
  display_context: 'READONLY',
20386
20350
  value,
20387
- field_type
20351
+ field_type: fieldType
20388
20352
  });
20389
20353
  }
20390
20354
  sortRowsByColumns(column) {
20391
20355
  const shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
20392
20356
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
20357
+ // tslint:disable-next-line:switch-default
20393
20358
  switch (this.columnsHorizontalLabel[column].type.type) {
20394
20359
  case 'Number':
20395
20360
  case 'MoneyGBP': {
@@ -21366,6 +21331,7 @@ MarkdownComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MarkdownComponent, sele
21366
21331
  class FeeValue {
21367
21332
  }
21368
21333
 
21334
+ // tslint:disable:variable-name
21369
21335
  class Fee {
21370
21336
  }
21371
21337
 
@@ -21970,7 +21936,7 @@ CcdTabFieldsPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdTabFields", type: CcdTab
21970
21936
 
21971
21937
  class CcdPageFieldsPipe {
21972
21938
  transform(page, dataFormGroup) {
21973
- const complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
21939
+ const complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
21974
21940
  const control = dataFormGroup.controls['data'].get(key);
21975
21941
  return control['caseField'];
21976
21942
  }).filter(field => {
@@ -21989,7 +21955,7 @@ class CcdPageFieldsPipe {
21989
21955
  field_type: {
21990
21956
  id: page.id,
21991
21957
  type: 'Complex',
21992
- complex_fields
21958
+ complex_fields: complexFields
21993
21959
  }
21994
21960
  });
21995
21961
  }
@@ -22148,11 +22114,11 @@ class CollectionCreateCheckerService {
22148
22114
  }
22149
22115
  return childrenCaseFields;
22150
22116
  }
22151
- isComplex(case_field) {
22152
- return case_field.field_type.type === 'Complex';
22117
+ isComplex(caseField) {
22118
+ return caseField.field_type.type === 'Complex';
22153
22119
  }
22154
- isCollection(case_field) {
22155
- return case_field.field_type.type === 'Collection';
22120
+ isCollection(caseField) {
22121
+ return caseField.field_type.type === 'Collection';
22156
22122
  }
22157
22123
  hasCreateAccess(caseField, role) {
22158
22124
  return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
@@ -23266,7 +23232,7 @@ class CaseEditSubmitComponent {
23266
23232
  if (caseField.field_type.type === 'Complex') {
23267
23233
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
23268
23234
  // handle both null and undefined values
23269
- if (caseField.value != null) {
23235
+ if (caseField.value !== null) {
23270
23236
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
23271
23237
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
23272
23238
  // parent)
@@ -23328,8 +23294,8 @@ class CaseEditSubmitComponent {
23328
23294
  this.caseEdit.navigateToPage(pageId);
23329
23295
  }
23330
23296
  callbackErrorsNotify(errorContext) {
23331
- this.ignoreWarning = errorContext.ignore_warning;
23332
- this.triggerText = errorContext.trigger_text;
23297
+ this.ignoreWarning = errorContext.ignoreWarning;
23298
+ this.triggerText = errorContext.triggerText;
23333
23299
  }
23334
23300
  summaryCaseField(field) {
23335
23301
  if (null === this.editForm.get('data').get(field.id)) {
@@ -23882,6 +23848,7 @@ class CaseEventCompletionComponent {
23882
23848
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
23883
23849
  ]
23884
23850
  });
23851
+ // tslint:disable-next-line:switch-default
23885
23852
  switch (portalType) {
23886
23853
  case EventCompletionPortalTypes.TaskCancelled:
23887
23854
  this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -24352,27 +24319,27 @@ class PaginationComponent {
24352
24319
  this.screenReaderCurrentLabel = `You're on page`;
24353
24320
  this.pageChange = new EventEmitter();
24354
24321
  this.pageBoundsCorrection = new EventEmitter();
24355
- this._directionLinks = true;
24356
- this._autoHide = false;
24357
- this._responsive = false;
24322
+ this.pDirectionLinks = true;
24323
+ this.pAutoHide = false;
24324
+ this.pResponsive = false;
24358
24325
  }
24359
24326
  get directionLinks() {
24360
- return this._directionLinks;
24327
+ return this.pDirectionLinks;
24361
24328
  }
24362
24329
  set directionLinks(value) {
24363
- this._directionLinks = coerceToBoolean(value);
24330
+ this.pDirectionLinks = coerceToBoolean(value);
24364
24331
  }
24365
24332
  get autoHide() {
24366
- return this._autoHide;
24333
+ return this.pAutoHide;
24367
24334
  }
24368
24335
  set autoHide(value) {
24369
- this._autoHide = coerceToBoolean(value);
24336
+ this.pAutoHide = coerceToBoolean(value);
24370
24337
  }
24371
24338
  get responsive() {
24372
- return this._responsive;
24339
+ return this.pResponsive;
24373
24340
  }
24374
24341
  set responsive(value) {
24375
- this._responsive = coerceToBoolean(value);
24342
+ this.pResponsive = coerceToBoolean(value);
24376
24343
  }
24377
24344
  }
24378
24345
  PaginationComponent.ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
@@ -25033,7 +25000,7 @@ class WorkbasketFiltersComponent {
25033
25000
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
25034
25001
  workbasketInputs.forEach(item => {
25035
25002
  if (item.field.elementPath) {
25036
- item.field.id = item.field.id + '.' + item.field.elementPath;
25003
+ item.field.id = `${item.field.id}.${item.field.elementPath}`;
25037
25004
  }
25038
25005
  item.field.label = item.label;
25039
25006
  if (formValue) {
@@ -25085,7 +25052,7 @@ class WorkbasketFiltersComponent {
25085
25052
  const value = formGroupLS[key];
25086
25053
  // Clear the filter form group control values if it has a value in local storage
25087
25054
  // The regionList form group control value should be ignored as it always contain the latest value
25088
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
25055
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
25089
25056
  this.formGroup.get(key).setValue(null);
25090
25057
  }
25091
25058
  }
@@ -26104,7 +26071,7 @@ class CaseEventTriggerComponent {
26104
26071
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
26105
26072
  if (this.activityPollingService.isEnabled) {
26106
26073
  this.ngZone.runOutsideAngular(() => {
26107
- this.activitySubscription = this.postEditActivity().subscribe((_resolved) => {
26074
+ this.activitySubscription = this.postEditActivity().subscribe(() => {
26108
26075
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
26109
26076
  });
26110
26077
  });
@@ -26950,8 +26917,8 @@ class CaseFullAccessViewComponent {
26950
26917
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
26951
26918
  }
26952
26919
  callbackErrorsNotify(callbackErrorsContext) {
26953
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
26954
- this.triggerText = callbackErrorsContext.trigger_text;
26920
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
26921
+ this.triggerText = callbackErrorsContext.triggerText;
26955
26922
  }
26956
26923
  isDraft() {
26957
26924
  return Draft.isDraft(this.caseDetails.case_id);
@@ -27218,7 +27185,7 @@ class PrintUrlPipe {
27218
27185
  * or the empty string
27219
27186
  */
27220
27187
  transform(remoteUrl) {
27221
- if (remoteUrl && remoteUrl.length > 0) {
27188
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
27222
27189
  let printServiceUrlPathname;
27223
27190
  /**
27224
27191
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -27234,7 +27201,7 @@ class PrintUrlPipe {
27234
27201
  printServiceUrlPathname = urlParser.pathname;
27235
27202
  if (printServiceUrlPathname[0] !== '/') {
27236
27203
  // Fix for IE11; it returns the pathname without leading slash
27237
- printServiceUrlPathname = '/' + printServiceUrlPathname;
27204
+ printServiceUrlPathname = `/${printServiceUrlPathname}`;
27238
27205
  }
27239
27206
  }
27240
27207
  else {
@@ -27411,10 +27378,10 @@ class CaseViewerComponent {
27411
27378
  }
27412
27379
  setUserAccessType(caseDetails) {
27413
27380
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
27414
- const access_process = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
27415
- const access_granted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27416
- this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27417
- this.userAccessType = access_process ? access_process.value : null;
27381
+ const accessProcess = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
27382
+ const accessGranted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27383
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27384
+ this.userAccessType = accessProcess ? accessProcess.value : null;
27418
27385
  }
27419
27386
  }
27420
27387
  isDataLoaded() {
@@ -28579,11 +28546,11 @@ class CaseChallengedAccessRequestComponent {
28579
28546
  };
28580
28547
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId, challengedAccessRequest)
28581
28548
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
28582
- .subscribe(_response => {
28549
+ .subscribe(() => {
28583
28550
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
28584
28551
  // Angular 7.2!
28585
28552
  this.router.navigate(['success'], { relativeTo: this.route });
28586
- }, _error => {
28553
+ }, () => {
28587
28554
  // Navigate to error page
28588
28555
  });
28589
28556
  }
@@ -28597,7 +28564,7 @@ class CaseChallengedAccessRequestComponent {
28597
28564
  }
28598
28565
  }
28599
28566
  inputEmpty(input) {
28600
- return input.value == null || input.value.trim().length === 0;
28567
+ return input.value === null || input.value.trim().length === 0;
28601
28568
  }
28602
28569
  }
28603
28570
  CaseChallengedAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -29183,11 +29150,11 @@ class CaseSpecificAccessRequestComponent {
29183
29150
  };
29184
29151
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId, specificAccessRequest)
29185
29152
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
29186
- .subscribe(_response => {
29153
+ .subscribe(() => {
29187
29154
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
29188
29155
  // Angular 7.2
29189
29156
  this.router.navigate(['success'], { relativeTo: this.route });
29190
- }, _error => {
29157
+ }, () => {
29191
29158
  // Navigate to error page
29192
29159
  });
29193
29160
  }
@@ -29202,7 +29169,7 @@ class CaseSpecificAccessRequestComponent {
29202
29169
  }
29203
29170
  }
29204
29171
  inputEmpty(input) {
29205
- return input.value == null || input.value.trim().length === 0;
29172
+ return input.value === null || input.value.trim().length === 0;
29206
29173
  }
29207
29174
  }
29208
29175
  CaseSpecificAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -30044,7 +30011,7 @@ class SearchFiltersComponent {
30044
30011
  }
30045
30012
  searchInputs.forEach(item => {
30046
30013
  if (item.field.elementPath) {
30047
- item.field.id = item.field.id + '.' + item.field.elementPath;
30014
+ item.field.id = `${item.field.id}.${item.field.elementPath}`;
30048
30015
  }
30049
30016
  item.field.label = item.label;
30050
30017
  if (formValueObject) {
@@ -30298,7 +30265,7 @@ function SearchResultComponent_table_0_div_4_Template(rf, ctx) { if (rf & 1) {
30298
30265
  } if (rf & 2) {
30299
30266
  const ctx_r3 = i0.ɵɵnextContext(2);
30300
30267
  i0.ɵɵadvance(6);
30301
- i0.ɵɵtextInterpolate1(" The total size of the result set is ", i0.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.total_results_count), ". Only the first 10,000 records are available for display. ");
30268
+ i0.ɵɵtextInterpolate1(" The total size of the result set is ", i0.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.totalResultsCount), ". Only the first 10,000 records are available for display. ");
30302
30269
  } }
30303
30270
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) { if (rf & 1) {
30304
30271
  i0.ɵɵelementStart(0, "div", 15);
@@ -30756,7 +30723,7 @@ class SearchResultComponent {
30756
30723
  }
30757
30724
  }
30758
30725
  get resultTotal() {
30759
- const total = this.paginationMetadata.total_results_count;
30726
+ const total = this.paginationMetadata.totalResultsCount;
30760
30727
  const maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
30761
30728
  this.paginationLimitEnforced = maximumResultReached;
30762
30729
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -30901,7 +30868,7 @@ class SearchResultComponent {
30901
30868
  return col;
30902
30869
  }
30903
30870
  hasResults() {
30904
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
30871
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
30905
30872
  }
30906
30873
  hasDrafts() {
30907
30874
  return this.resultView.hasDrafts();
@@ -31000,7 +30967,7 @@ class SearchResultComponent {
31000
30967
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
31001
30968
  }
31002
30969
  getTotalResults() {
31003
- const total = this.paginationMetadata.total_results_count + this.draftsCount;
30970
+ const total = this.paginationMetadata.totalResultsCount + this.draftsCount;
31004
30971
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
31005
30972
  }
31006
30973
  prepareCaseLinkUrl(caseId) {
@@ -31145,6 +31112,7 @@ SearchResultModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
31145
31112
  }], null, null); })();
31146
31113
  i0.ɵɵsetComponentScope(SearchResultComponent, [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1.DecimalPipe, i1$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
31147
31114
 
31115
+ // tslint:disable:variable-name
31148
31116
  class ComplexFieldOverride {
31149
31117
  }
31150
31118
 
@@ -31163,24 +31131,24 @@ class CaseFieldBuilder {
31163
31131
  this.caseField.id = id;
31164
31132
  return this;
31165
31133
  }
31166
- withFieldType(field_type) {
31167
- this.caseField.field_type = field_type;
31134
+ withFieldType(fieldType) {
31135
+ this.caseField.field_type = fieldType;
31168
31136
  return this;
31169
31137
  }
31170
- withDisplayContext(display_context) {
31171
- this.caseField.display_context = display_context;
31138
+ withDisplayContext(displayContext) {
31139
+ this.caseField.display_context = displayContext;
31172
31140
  return this;
31173
31141
  }
31174
- withDisplayContextParameter(display_context_parameter) {
31175
- this.caseField.display_context_parameter = display_context_parameter;
31142
+ withDisplayContextParameter(displayContextParameter) {
31143
+ this.caseField.display_context_parameter = displayContextParameter;
31176
31144
  return this;
31177
31145
  }
31178
31146
  withHidden(hidden) {
31179
31147
  this.caseField.hidden = hidden;
31180
31148
  return this;
31181
31149
  }
31182
- withHintText(hint_text) {
31183
- this.caseField.hint_text = hint_text;
31150
+ withHintText(hintText) {
31151
+ this.caseField.hint_text = hintText;
31184
31152
  return this;
31185
31153
  }
31186
31154
  withLabel(label) {
@@ -31191,12 +31159,12 @@ class CaseFieldBuilder {
31191
31159
  this.caseField.order = order;
31192
31160
  return this;
31193
31161
  }
31194
- withSecurityLabel(security_label) {
31195
- this.caseField.security_label = security_label;
31162
+ withSecurityLabel(securityLabel) {
31163
+ this.caseField.security_label = securityLabel;
31196
31164
  return this;
31197
31165
  }
31198
- withShowCondition(show_condition) {
31199
- this.caseField.show_condition = show_condition;
31166
+ withShowCondition(showCondition) {
31167
+ this.caseField.show_condition = showCondition;
31200
31168
  return this;
31201
31169
  }
31202
31170
  withShowSummaryContentOption(option) {
@@ -31223,19 +31191,19 @@ const textFieldType = () => {
31223
31191
  complex_fields: []
31224
31192
  };
31225
31193
  };
31226
- const createCaseEventTrigger = (id, name, case_id, show_summary, case_fields, wizard_pages = [], can_save_draft = false) => {
31194
+ const createCaseEventTrigger = (id, name, caseId, showSummary, caseFields, wizardPages = [], canSaveDraft = false) => {
31227
31195
  const eventTrigger = new CaseEventTrigger();
31228
31196
  eventTrigger.id = id;
31229
31197
  eventTrigger.name = name;
31230
- eventTrigger.case_id = case_id;
31231
- eventTrigger.show_summary = show_summary;
31232
- eventTrigger.wizard_pages = wizard_pages;
31198
+ eventTrigger.case_id = caseId;
31199
+ eventTrigger.show_summary = showSummary;
31200
+ eventTrigger.wizard_pages = wizardPages;
31233
31201
  eventTrigger.event_token = 'test-token';
31234
- eventTrigger.case_fields = case_fields;
31235
- eventTrigger.can_save_draft = can_save_draft;
31202
+ eventTrigger.case_fields = caseFields;
31203
+ eventTrigger.can_save_draft = canSaveDraft;
31236
31204
  return eventTrigger;
31237
31205
  };
31238
- const aCaseField = (id, label, type, display_context, show_summary_content_option, typeComplexFields = [], retain_hidden_value, hidden) => {
31206
+ const aCaseField = (id, label, type, displayContext, showSummaryContentOption, typeComplexFields = [], retainHiddenValue, hidden) => {
31239
31207
  return ({
31240
31208
  id: id || 'personFirstName',
31241
31209
  field_type: {
@@ -31243,10 +31211,10 @@ const aCaseField = (id, label, type, display_context, show_summary_content_optio
31243
31211
  type: type || 'Text',
31244
31212
  complex_fields: typeComplexFields || []
31245
31213
  },
31246
- display_context: display_context || 'OPTIONAL',
31214
+ display_context: displayContext || 'OPTIONAL',
31247
31215
  label: label || 'First name',
31248
- show_summary_content_option,
31249
- retain_hidden_value: retain_hidden_value || false,
31216
+ show_summary_content_option: showSummaryContentOption,
31217
+ retain_hidden_value: retainHiddenValue || false,
31250
31218
  hidden: hidden || false
31251
31219
  });
31252
31220
  };
@@ -31284,59 +31252,59 @@ const createHiddenComplexFieldOverride = (id) => {
31284
31252
  complexFieldOverride.display_context = 'HIDDEN';
31285
31253
  return complexFieldOverride;
31286
31254
  };
31287
- const createCaseField = (id, label, hint, fieldType, display_context, order = undefined, show_condition = undefined, ACLs = undefined, hidden) => {
31255
+ const createCaseField = (id, label, hint, fieldType, displayContext, order = undefined, showCondition = undefined, acls = undefined, hidden) => {
31288
31256
  return CaseFieldBuilder.create()
31289
31257
  .withId(id || 'personFirstName')
31290
31258
  .withFieldType(fieldType || textFieldType())
31291
- .withDisplayContext(display_context || 'OPTIONAL')
31259
+ .withDisplayContext(displayContext || 'OPTIONAL')
31292
31260
  .withLabel(label || 'First name')
31293
31261
  .withHintText(hint || 'First name hint text')
31294
31262
  .withShowSummaryContentOption(0)
31295
31263
  .withOrder(order)
31296
- .withShowCondition(show_condition || undefined)
31297
- .withACLs(ACLs)
31264
+ .withShowCondition(showCondition || undefined)
31265
+ .withACLs(acls)
31298
31266
  .withHidden(hidden || false)
31299
31267
  .build();
31300
31268
  };
31301
- const newCaseField = (id, label, hint, fieldType, display_context, order = undefined) => {
31269
+ const newCaseField = (id, label, hint, fieldType, displayContext, order = undefined) => {
31302
31270
  return CaseFieldBuilder.create()
31303
31271
  .withId(id || 'personFirstName')
31304
31272
  .withFieldType(fieldType || textFieldType())
31305
- .withDisplayContext(display_context || 'OPTIONAL')
31273
+ .withDisplayContext(displayContext || 'OPTIONAL')
31306
31274
  .withHintText(hint || 'First name hint text')
31307
31275
  .withLabel(label || 'First name')
31308
31276
  .withOrder(order)
31309
31277
  .withShowSummaryContentOption(0);
31310
31278
  };
31311
- const createFieldType = (typeId, type, complex_fields = [], collection_field_type = undefined) => {
31279
+ const createFieldType = (typeId, type, complexFields = [], collectionFieldType = undefined) => {
31312
31280
  return {
31313
31281
  id: typeId || 'Text',
31314
31282
  type: type || 'Text',
31315
- complex_fields: complex_fields || [],
31316
- collection_field_type: collection_field_type || undefined
31283
+ complex_fields: complexFields || [],
31284
+ collection_field_type: collectionFieldType || undefined
31317
31285
  };
31318
31286
  };
31319
31287
  const createFixedListFieldType = (typeId, fixedListItems = []) => {
31320
31288
  return {
31321
- id: 'FixedList-' + typeId,
31289
+ id: `FixedList-${typeId}`,
31322
31290
  type: 'FixedList',
31323
31291
  fixed_list_items: fixedListItems || []
31324
31292
  };
31325
31293
  };
31326
31294
  const createMultiSelectListFieldType = (typeId, fixedListItems = []) => {
31327
31295
  return {
31328
- id: 'MultiSelectList-' + typeId,
31296
+ id: `MultiSelectList-${typeId}`,
31329
31297
  type: 'MultiSelectList',
31330
31298
  fixed_list_items: fixedListItems || []
31331
31299
  };
31332
31300
  };
31333
- const createACL = (role, create, read, update, _delete) => {
31301
+ const createACL = (role, aclCreate, aclRead, aclUpdate, aclDelete) => {
31334
31302
  return ({
31335
31303
  role: role || 'roleX',
31336
- create,
31337
- read,
31338
- update,
31339
- delete: _delete
31304
+ create: aclCreate,
31305
+ read: aclRead,
31306
+ update: aclUpdate,
31307
+ delete: aclDelete
31340
31308
  });
31341
31309
  };
31342
31310
 
@@ -31383,5 +31351,5 @@ class TestRouteSnapshotBuilder {
31383
31351
  * Generated bundle index. Do not edit.
31384
31352
  */
31385
31353
 
31386
- export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
31354
+ export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
31387
31355
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map