@hmcts/ccd-case-ui-toolkit 6.14.6-date-grey-bar → 6.14.6-infinite-tab-loop-fix

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 (231) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +782 -730
  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 +3 -2
  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 +4 -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 +1 -2
  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 +1 -2
  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 +1 -2
  20. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +22 -11
  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 +1 -2
  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 +33 -20
  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 +7 -4
  37. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  38. package/esm2015/lib/shared/components/palette/base-field/field-read-label.component.js +1 -1
  39. package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +1 -1
  40. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
  41. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  42. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
  43. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  44. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  45. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  46. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +3 -4
  47. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  48. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  49. package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
  50. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +1 -1
  51. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
  52. package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +1 -2
  53. package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
  54. package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +3 -2
  55. package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +4 -3
  56. package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +1 -2
  57. package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
  58. package/esm2015/lib/shared/components/palette/palette.module.js +4 -4
  59. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  60. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  61. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  62. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +1 -3
  63. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  64. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  65. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  66. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  67. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +3 -4
  68. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +8 -4
  69. package/esm2015/lib/shared/domain/addresses/address.model.js +1 -2
  70. package/esm2015/lib/shared/domain/case-details.model.js +1 -2
  71. package/esm2015/lib/shared/domain/case-event-data.model.js +1 -2
  72. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  73. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +1 -2
  74. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  75. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +1 -2
  76. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +1 -2
  77. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +1 -2
  78. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +1 -2
  79. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +1 -2
  80. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +1 -2
  81. package/esm2015/lib/shared/domain/case-view/case-view.model.js +1 -2
  82. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  83. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  84. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  85. package/esm2015/lib/shared/domain/definition/case-field.model.js +1 -2
  86. package/esm2015/lib/shared/domain/definition/case-type.model.js +1 -2
  87. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +1 -2
  88. package/esm2015/lib/shared/domain/definition/field-type.model.js +1 -2
  89. package/esm2015/lib/shared/domain/document/document-data.model.js +1 -2
  90. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  91. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  92. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  93. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  94. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +1 -2
  95. package/esm2015/lib/shared/domain/search/search-result-view.model.js +1 -2
  96. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  97. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +8 -1
  98. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  99. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  100. package/esm2015/lib/shared/pipes/complex/{ccd-page-fields.pipe.js → cdd-page-fields.pipe.js} +3 -3
  101. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  102. package/esm2015/lib/shared/pipes/index.js +2 -1
  103. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  104. package/esm2015/lib/shared/services/activity/activity.service.js +18 -9
  105. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  106. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  107. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  108. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  109. package/esm2015/lib/shared/services/definitions/definitions.service.js +8 -3
  110. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  111. package/esm2015/lib/shared/services/fields/fields.utils.js +4 -5
  112. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +1 -2
  113. package/esm2015/lib/shared/services/form/form-value.service.js +2 -1
  114. package/esm2015/lib/shared/services/loading/loading.service.js +7 -2
  115. package/esm2015/lib/shared/services/search/search.service.js +10 -5
  116. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  117. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  118. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +756 -710
  119. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  120. package/lib/app.config.d.ts.map +1 -1
  121. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  122. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  123. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  124. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
  125. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  126. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  127. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  128. 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
  129. 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
  130. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  131. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  132. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  133. package/lib/shared/components/case-editor/services/cases.service.d.ts +3 -1
  134. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  135. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  136. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  137. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  138. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  139. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +6 -2
  140. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  141. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  142. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  143. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  144. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  145. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  146. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  147. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  148. package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
  149. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  150. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  151. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  152. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  153. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  154. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  155. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  156. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  157. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  158. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  159. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  160. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  161. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  162. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  163. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  164. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  165. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  166. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  167. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  168. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  169. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  170. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  171. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  172. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  173. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  174. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  175. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  176. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  177. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  178. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  179. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  180. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  181. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  182. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  183. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  184. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  185. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  186. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +2 -1
  187. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  188. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  189. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  190. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  191. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  192. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  193. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  194. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  195. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  196. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  197. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  198. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  199. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  200. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  201. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  202. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  203. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +1 -0
  204. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  205. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  206. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  207. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  208. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  209. package/lib/shared/pipes/complex/{ccd-page-fields.pipe.d.ts → cdd-page-fields.pipe.d.ts} +1 -1
  210. package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +1 -0
  211. package/lib/shared/pipes/complex/index.d.ts +1 -1
  212. package/lib/shared/pipes/index.d.ts +1 -0
  213. package/lib/shared/pipes/index.d.ts.map +1 -1
  214. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  215. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  216. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  217. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  218. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  219. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  220. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  221. package/lib/shared/services/fields/fields.utils.d.ts +1 -0
  222. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  223. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  224. package/lib/shared/services/loading/loading.service.d.ts +4 -1
  225. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  226. package/lib/shared/services/search/search.service.d.ts +2 -0
  227. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  228. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  229. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  230. package/package.json +2 -2
  231. package/lib/shared/pipes/complex/ccd-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 === null || response === void 0 ? void 0 : response.status) !== error.status) {
1524
+ if (response.status && response.status !== error.status) {
1525
1525
  error.status = response.status;
1526
1526
  }
1527
1527
  return error;
@@ -1529,41 +1529,50 @@ 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
- return {
1532
+ const options = {
1533
1533
  headers,
1534
1534
  withCredentials: true,
1535
1535
  observe: 'body',
1536
1536
  };
1537
+ return options;
1537
1538
  }
1538
1539
  getActivities(...caseId) {
1539
1540
  try {
1540
1541
  const options = this.getOptions();
1541
- const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
1542
+ const url = this.activityUrl() + `/cases/${caseId.join(',')}/activity`;
1542
1543
  return this.http
1543
1544
  .get(url, options, false, ActivityService.handleHttpError)
1544
1545
  .pipe(map(response => response));
1545
1546
  }
1546
1547
  catch (error) {
1547
- console.log(`user may not be authenticated.${error}`);
1548
+ console.log('user may not be authenticated.' + error);
1548
1549
  }
1549
1550
  }
1550
1551
  postActivity(caseId, activity) {
1551
1552
  try {
1552
1553
  const options = this.getOptions();
1553
- const url = `${this.activityUrl()}/cases/${caseId}/activity`;
1554
+ const url = this.activityUrl() + `/cases/${caseId}/activity`;
1554
1555
  const body = { activity };
1555
1556
  return this.http
1556
1557
  .post(url, body, options, false)
1557
1558
  .pipe(map(response => response));
1558
1559
  }
1559
1560
  catch (error) {
1560
- console.log(`user may not be authenticated.${error}`);
1561
+ console.log('user may not be authenticated.' + error);
1561
1562
  }
1562
1563
  }
1563
1564
  verifyUserIsAuthorized() {
1564
- if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
1565
+ if (this.sessionStorageService.getItem('userDetails') === undefined) {
1566
+ return;
1567
+ }
1568
+ if (this.activityUrl() && this.userAuthorised === undefined) {
1565
1569
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
1566
- this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
1570
+ if ([401, 403].indexOf(error.status) > -1) {
1571
+ this.userAuthorised = false;
1572
+ }
1573
+ else {
1574
+ this.userAuthorised = true;
1575
+ }
1567
1576
  });
1568
1577
  }
1569
1578
  }
@@ -1662,7 +1671,7 @@ class ActivityPollingService {
1662
1671
  requests.get(activity.caseId).next(activity);
1663
1672
  });
1664
1673
  }, (err) => {
1665
- console.log(`error: ${err}`);
1674
+ console.log('error: ' + err);
1666
1675
  Array.from(requests.values()).forEach((subject) => subject.error(err));
1667
1676
  }));
1668
1677
  });
@@ -1783,9 +1792,9 @@ class ActivityComponent {
1783
1792
  }
1784
1793
  generateDescription(prefix, suffix, namesArray, unknownCount) {
1785
1794
  let resultText = prefix;
1786
- resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
1795
+ resultText += namesArray.map(activityInfo => activityInfo.forename + ' ' + activityInfo.surname).join(', ');
1787
1796
  if (unknownCount > 0) {
1788
- resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
1797
+ resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
1789
1798
  resultText += (unknownCount > 1 ? 's' : '');
1790
1799
  }
1791
1800
  else {
@@ -1793,10 +1802,10 @@ class ActivityComponent {
1793
1802
  }
1794
1803
  if (suffix.length > 0) {
1795
1804
  if (namesArray.length + unknownCount > 1) {
1796
- resultText += ` are ${suffix}`;
1805
+ resultText += ' are ' + suffix;
1797
1806
  }
1798
1807
  else {
1799
- resultText += ` is ${suffix}`;
1808
+ resultText += ' is ' + suffix;
1800
1809
  }
1801
1810
  }
1802
1811
  return resultText;
@@ -2309,7 +2318,7 @@ class FormatTranslatorService {
2309
2318
  break;
2310
2319
  case 'n':
2311
2320
  case 'N':
2312
- maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2321
+ maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2313
2322
  break;
2314
2323
  case 'V':
2315
2324
  case 'O':
@@ -2432,9 +2441,9 @@ class DatePipe {
2432
2441
  resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
2433
2442
  if (match[4] && match[5] && match[6] && format !== 'short') {
2434
2443
  resultDate += ', ';
2435
- resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
2436
- resultDate += `${this.pad(offsetDate.getMinutes())}:`;
2437
- resultDate += `${this.pad(offsetDate.getSeconds())} `;
2444
+ resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
2445
+ resultDate += this.pad(offsetDate.getMinutes()) + ':';
2446
+ resultDate += this.pad(offsetDate.getSeconds()) + ' ';
2438
2447
  resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
2439
2448
  }
2440
2449
  }
@@ -2769,7 +2778,6 @@ PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
2769
2778
  }]
2770
2779
  }], null, null); })();
2771
2780
 
2772
- // tslint:disable:variable-name
2773
2781
  class AddressModel {
2774
2782
  constructor() {
2775
2783
  this.AddressLine1 = '';
@@ -3041,7 +3049,6 @@ __decorate([
3041
3049
  __metadata("design:type", Array)
3042
3050
  ], CaseEventTrigger.prototype, "wizard_pages", void 0);
3043
3051
 
3044
- // tslint:disable:variable-name
3045
3052
  class CaseViewEvent {
3046
3053
  }
3047
3054
 
@@ -3068,7 +3075,6 @@ __decorate([
3068
3075
  __metadata("design:type", Array)
3069
3076
  ], CaseType.prototype, "case_fields", void 0);
3070
3077
 
3071
- // tslint:disable:variable-name
3072
3078
  class EventCaseField {
3073
3079
  }
3074
3080
 
@@ -3101,7 +3107,6 @@ __decorate([
3101
3107
  class CasePrintDocument {
3102
3108
  }
3103
3109
 
3104
- // tslint:disable:variable-name
3105
3110
  class HRef {
3106
3111
  }
3107
3112
  class DocumentLinks {
@@ -3119,25 +3124,25 @@ class OrganisationConverter {
3119
3124
  static toSimpleAddress(organisationModel) {
3120
3125
  let simpleAddress = '';
3121
3126
  if (organisationModel.addressLine1) {
3122
- simpleAddress += `${organisationModel.addressLine1}<br>`;
3127
+ simpleAddress += organisationModel.addressLine1 + '<br>';
3123
3128
  }
3124
3129
  if (organisationModel.addressLine2) {
3125
- simpleAddress += `${organisationModel.addressLine2}<br>`;
3130
+ simpleAddress += organisationModel.addressLine2 + '<br>';
3126
3131
  }
3127
3132
  if (organisationModel.addressLine3) {
3128
- simpleAddress += `${organisationModel.addressLine3}<br>`;
3133
+ simpleAddress += organisationModel.addressLine3 + '<br>';
3129
3134
  }
3130
3135
  if (organisationModel.townCity) {
3131
- simpleAddress += `${organisationModel.townCity}<br>`;
3136
+ simpleAddress += organisationModel.townCity + '<br>';
3132
3137
  }
3133
3138
  if (organisationModel.county) {
3134
- simpleAddress += `${organisationModel.county}<br>`;
3139
+ simpleAddress += organisationModel.county + '<br>';
3135
3140
  }
3136
3141
  if (organisationModel.country) {
3137
- simpleAddress += `${organisationModel.country}<br>`;
3142
+ simpleAddress += organisationModel.country + '<br>';
3138
3143
  }
3139
3144
  if (organisationModel.postCode) {
3140
- simpleAddress += `${organisationModel.postCode}<br>`;
3145
+ simpleAddress += organisationModel.postCode + '<br>';
3141
3146
  }
3142
3147
  return simpleAddress;
3143
3148
  }
@@ -3220,15 +3225,20 @@ __decorate([
3220
3225
  __metadata("design:type", Array)
3221
3226
  ], SearchResultView.prototype, "results", void 0);
3222
3227
 
3223
- // tslint:disable:variable-name
3224
3228
  class CaseDetails {
3225
3229
  }
3226
3230
 
3227
- // tslint:disable:variable-name
3228
3231
  class CaseEventData {
3229
3232
  }
3230
3233
 
3231
3234
  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
+ }
3232
3242
  }
3233
3243
  class WorkbasketInput {
3234
3244
  }
@@ -3265,9 +3275,9 @@ class FieldsUtils {
3265
3275
  });
3266
3276
  return valueMap;
3267
3277
  }
3268
- // public static getType(elem: any): string {
3269
- // return Object.prototype.toString.call(elem).slice(8, -1);
3270
- // }
3278
+ static getType(elem) {
3279
+ return Object.prototype.toString.call(elem).slice(8, -1);
3280
+ }
3271
3281
  static isObject(elem) {
3272
3282
  return typeof elem === 'object' && elem !== null;
3273
3283
  }
@@ -3767,7 +3777,6 @@ FieldsUtils.LABEL_MERGE_FUNCTION = function mergeFunction(field, result) {
3767
3777
  const elements = (result[field.id] || field.value);
3768
3778
  if (elements) {
3769
3779
  elements.forEach((elem) => {
3770
- // tslint:disable-next-line:switch-default
3771
3780
  switch (field.field_type.collection_field_type.type) {
3772
3781
  case 'MoneyGBP': {
3773
3782
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -3912,6 +3921,7 @@ class ConditionParser {
3912
3921
  if (!condition) {
3913
3922
  return null;
3914
3923
  }
3924
+ ;
3915
3925
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
3916
3926
  return peg.parse(condition.trim(), {});
3917
3927
  }
@@ -3924,12 +3934,14 @@ class ConditionParser {
3924
3934
  if (!conditions || conditions.length === 0) {
3925
3935
  return true;
3926
3936
  }
3937
+ ;
3927
3938
  const validJoinComparators = ['AND', 'OR'];
3928
- return conditions.reduce((accumulator, condition, index) => {
3939
+ const result = conditions.reduce((accumulator, condition, index) => {
3929
3940
  const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1);
3930
3941
  if (isJoinComparator(condition)) {
3931
3942
  return accumulator;
3932
3943
  }
3944
+ ;
3933
3945
  let currentConditionResult = true;
3934
3946
  if (Array.isArray(condition)) {
3935
3947
  currentConditionResult = this.evaluate(fields, condition);
@@ -3946,9 +3958,9 @@ class ConditionParser {
3946
3958
  }
3947
3959
  return currentConditionResult;
3948
3960
  }, true);
3961
+ return result;
3949
3962
  }
3950
3963
  static evaluateJoin(leftResult, comparator, rightResult) {
3951
- // tslint:disable-next-line:switch-default
3952
3964
  switch (comparator) {
3953
3965
  case 'OR': return leftResult || rightResult;
3954
3966
  case 'AND': return leftResult && rightResult;
@@ -4038,7 +4050,8 @@ class ConditionParser {
4038
4050
  }
4039
4051
  }
4040
4052
  static unquoted(str) {
4041
- return str.replace(/^"|"$/g, '');
4053
+ const res = str.replace(/^"|"$/g, ''); // NOSONAR
4054
+ return res;
4042
4055
  }
4043
4056
  static findValueForComplexCondition(fields, head, tail, path) {
4044
4057
  if (!fields) {
@@ -4150,8 +4163,8 @@ class ShowCondition {
4150
4163
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4151
4164
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4152
4165
  this.processedList.push(condition.fieldReference);
4153
- const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
4154
- return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
4166
+ const regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4167
+ return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4155
4168
  }
4156
4169
  else {
4157
4170
  return originalCondition;
@@ -4228,7 +4241,6 @@ class ShowCondition {
4228
4241
  }
4229
4242
  // Consider what type of field this is.
4230
4243
  const ft = caseField.field_type;
4231
- // tslint:disable-next-line:switch-default
4232
4244
  switch (ft.type) {
4233
4245
  case 'Collection':
4234
4246
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -4674,14 +4686,14 @@ class FieldsPurger {
4674
4686
  const formFields = form.getRawValue();
4675
4687
  const currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
4676
4688
  currentPage.wizard_page_fields.forEach(wpf => {
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);
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);
4682
4694
  }
4683
4695
  }
4684
- this.retainHiddenValueByFieldType(caseField, form);
4696
+ this.retainHiddenValueByFieldType(case_field, form);
4685
4697
  });
4686
4698
  }
4687
4699
  retainHiddenValueByFieldType(field, form) {
@@ -4712,13 +4724,13 @@ class FieldsPurger {
4712
4724
  hasShowConditionPage(wizardPage, formFields) {
4713
4725
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
4714
4726
  }
4715
- hasShowConditionField(caseField, formFields) {
4716
- return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
4727
+ hasShowConditionField(case_field, formFields) {
4728
+ return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
4717
4729
  }
4718
- getShowConditionKey(showCondition) {
4730
+ getShowConditionKey(show_condition) {
4719
4731
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
4720
4732
  // Also need to allow for conditions specified using the "CONTAINS" keyword
4721
- return showCondition.split(/!=|=|CONTAINS/)[0];
4733
+ return show_condition.split(/!=|=|CONTAINS/)[0];
4722
4734
  }
4723
4735
  resetField(form, field) {
4724
4736
  /**
@@ -4790,8 +4802,8 @@ class FieldsPurger {
4790
4802
  }
4791
4803
  resetPage(form, wizardPage) {
4792
4804
  wizardPage.wizard_page_fields.forEach(wpf => {
4793
- const caseField = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4794
- this.resetField(form, caseField);
4805
+ const case_field = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4806
+ this.resetField(form, case_field);
4795
4807
  });
4796
4808
  }
4797
4809
  getType(elem) {
@@ -4801,8 +4813,8 @@ class FieldsPurger {
4801
4813
  return this.getType(elem) === 'Object';
4802
4814
  }
4803
4815
  // TODO: call isReadOnly on CaseFields once we make it available
4804
- isReadonly(caseField) {
4805
- return caseField.display_context.toUpperCase() === 'READONLY';
4816
+ isReadonly(case_field) {
4817
+ return case_field.display_context.toUpperCase() === 'READONLY';
4806
4818
  }
4807
4819
  /**
4808
4820
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -4958,7 +4970,6 @@ class FieldTypeSanitiser {
4958
4970
  return;
4959
4971
  }
4960
4972
  caseFields.forEach(caseField => {
4961
- // tslint:disable-next-line:switch-default
4962
4973
  switch (caseField.field_type.type) {
4963
4974
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
4964
4975
  this.convertArrayToDynamicListOutput(caseField, data);
@@ -5535,6 +5546,7 @@ class FormValueService {
5535
5546
  });
5536
5547
  }
5537
5548
  }
5549
+ ;
5538
5550
  });
5539
5551
  }
5540
5552
  }
@@ -5948,7 +5960,7 @@ class AddressParser {
5948
5960
  return addressModel;
5949
5961
  }
5950
5962
  parseAddressLine1(classification, address) {
5951
- let addressLine;
5963
+ let addressLine = '';
5952
5964
  if (classification === AddressType.RD06) {
5953
5965
  addressLine =
5954
5966
  `${address.SUB_BUILDING_NAME} ${address.ORGANISATION_NAME} ${address.DEPARTMENT_NAME} ${address.PO_BOX_NUMBER}`;
@@ -5961,7 +5973,7 @@ class AddressParser {
5961
5973
  return this.removeNonAddressValues(addressLine);
5962
5974
  }
5963
5975
  parseAddressLine2(classification, address) {
5964
- let addressLine;
5976
+ let addressLine = '';
5965
5977
  if (classification === AddressType.RD06) {
5966
5978
  addressLine = `${address.BUILDING_NAME} `;
5967
5979
  }
@@ -5972,7 +5984,7 @@ class AddressParser {
5972
5984
  return this.removeNonAddressValues(addressLine);
5973
5985
  }
5974
5986
  parseAddressLine3(classification, address) {
5975
- let addressLine;
5987
+ let addressLine = '';
5976
5988
  if (classification === AddressType.RD06) {
5977
5989
  addressLine =
5978
5990
  `${address.BUILDING_NUMBER} ${address.THOROUGHFARE_NAME}`;
@@ -6000,7 +6012,7 @@ class AddressParser {
6000
6012
  return value.replace(new RegExp('^,', 'gi'), '');
6001
6013
  }
6002
6014
  prefixWithCommaIfPresent(value) {
6003
- return value ? `, ${value}` : value;
6015
+ return value ? ', ' + value : value;
6004
6016
  }
6005
6017
  }
6006
6018
 
@@ -6109,7 +6121,7 @@ class CaseFlagRefdataService {
6109
6121
  if (flagType) {
6110
6122
  url += `?flag-type=${flagType}`;
6111
6123
  }
6112
- if (typeof welshRequired === 'boolean') {
6124
+ if (welshRequired != null) {
6113
6125
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
6114
6126
  url.indexOf('?') > -1 ? url += '&' : url += '?';
6115
6127
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -6566,6 +6578,11 @@ RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBu
6566
6578
  type: Injectable
6567
6579
  }], null, null); })();
6568
6580
 
6581
+ class HasLoadingState {
6582
+ get isLoading() {
6583
+ return;
6584
+ }
6585
+ }
6569
6586
  class LoadingService {
6570
6587
  constructor() {
6571
6588
  this.registered = new Map();
@@ -6586,7 +6603,7 @@ class LoadingService {
6586
6603
  }
6587
6604
  generateToken() {
6588
6605
  const timestamp = window.performance.now();
6589
- return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
6606
+ return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
6590
6607
  }
6591
6608
  }
6592
6609
  LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
@@ -6603,7 +6620,10 @@ class SearchService {
6603
6620
  this.loadingService = loadingService;
6604
6621
  }
6605
6622
  search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
6606
- const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases`;
6623
+ const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
6624
+ + `/jurisdictions/${jurisdictionId}`
6625
+ + `/case-types/${caseTypeId}`
6626
+ + `/cases`;
6607
6627
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6608
6628
  const loadingToken = this.loadingService.register();
6609
6629
  return this.httpService
@@ -6611,13 +6631,14 @@ class SearchService {
6611
6631
  .pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
6612
6632
  }
6613
6633
  searchCasesByIds(caseTypeId, filter, view, sort) {
6614
- const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6634
+ const url = this.appConfig.getCaseDataUrl() +
6635
+ `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6615
6636
  const body = Object.assign(Object.assign({ sort }, filter), { size: this.appConfig.getPaginationPageSize() });
6616
6637
  const loadingToken = this.loadingService.register();
6617
6638
  return this.httpService.post(url, body).pipe(map((response) => response), finalize(() => this.loadingService.unregister(loadingToken)));
6618
6639
  }
6619
6640
  searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
6620
- const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6641
+ const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6621
6642
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6622
6643
  const body = {
6623
6644
  sort,
@@ -6660,8 +6681,9 @@ class SearchService {
6660
6681
  }
6661
6682
  }
6662
6683
  SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
6663
- // public static readonly VIEW_SEARCH = 'SEARCH';
6684
+ SearchService.VIEW_SEARCH = 'SEARCH';
6664
6685
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
6686
+ SearchService.FIELD_PREFIX = 'case.';
6665
6687
  SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
6666
6688
  SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
6667
6689
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
@@ -6775,12 +6797,17 @@ class DefinitionsService {
6775
6797
  this.appConfig = appConfig;
6776
6798
  }
6777
6799
  getCaseTypes(jurisdictionId, access) {
6778
- const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types?access=${access}`;
6800
+ const url = this.appConfig.getApiUrl()
6801
+ + `/caseworkers/:uid`
6802
+ + `/jurisdictions/${jurisdictionId}`
6803
+ + `/case-types?access=${access}`;
6779
6804
  return this.http
6780
6805
  .get(url).pipe(map(response => response));
6781
6806
  }
6782
6807
  getJurisdictions(access) {
6783
- const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions?access=${access}`;
6808
+ const url = this.appConfig.getApiUrl()
6809
+ + `/caseworkers/:uid`
6810
+ + `/jurisdictions?access=${access}`;
6784
6811
  return this.http
6785
6812
  .get(url)
6786
6813
  .pipe(map(response => response));
@@ -6852,8 +6879,8 @@ class SearchResultViewItemComparatorFactory {
6852
6879
  compare(a, b) {
6853
6880
  let fieldA = a.case_fields[fieldId];
6854
6881
  let fieldB = b.case_fields[fieldId];
6855
- fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
6856
- fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
6882
+ fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
6883
+ fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
6857
6884
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6858
6885
  }
6859
6886
  };
@@ -6863,8 +6890,8 @@ class SearchResultViewItemComparatorFactory {
6863
6890
  compare(a, b) {
6864
6891
  let fieldA = a.case_fields[fieldId];
6865
6892
  let fieldB = b.case_fields[fieldId];
6866
- fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
6867
- fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
6893
+ fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
6894
+ fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
6868
6895
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6869
6896
  }
6870
6897
  };
@@ -7093,31 +7120,31 @@ class WizardPageFieldToCaseFieldMapper {
7093
7120
  }
7094
7121
  processComplexFieldOverride(override, caseField, caseFields) {
7095
7122
  const caseFieldIds = override.complex_field_element_id.split('.');
7096
- let caseFieldLeaf;
7123
+ let case_field_leaf;
7097
7124
  const children = this.getCaseFieldChildren(caseField);
7098
7125
  if (children.length > 0) {
7099
7126
  const [_, ...tail] = caseFieldIds;
7100
- caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
7127
+ case_field_leaf = this.getCaseFieldLeaf(tail, children);
7101
7128
  }
7102
7129
  else {
7103
- caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7130
+ case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7104
7131
  }
7105
7132
  if (override.display_context !== 'HIDDEN') {
7106
- caseFieldLeaf.hidden = false;
7107
- caseFieldLeaf.display_context = override.display_context;
7133
+ case_field_leaf.hidden = false;
7134
+ case_field_leaf.display_context = override.display_context;
7108
7135
  if (override.label && override.label.length > 0) {
7109
- caseFieldLeaf.label = override.label;
7136
+ case_field_leaf.label = override.label;
7110
7137
  }
7111
7138
  if (override.hint_text && override.hint_text.length > 0) {
7112
- caseFieldLeaf.hint_text = override.hint_text;
7139
+ case_field_leaf.hint_text = override.hint_text;
7113
7140
  }
7114
7141
  if (override.show_condition && override.show_condition.length > 0) {
7115
- caseFieldLeaf.show_condition = override.show_condition;
7142
+ case_field_leaf.show_condition = override.show_condition;
7116
7143
  }
7117
7144
  }
7118
7145
  else {
7119
- caseFieldLeaf.hidden = true;
7120
- caseFieldLeaf.display_context = override.display_context;
7146
+ case_field_leaf.hidden = true;
7147
+ case_field_leaf.display_context = override.display_context;
7121
7148
  }
7122
7149
  }
7123
7150
  fixShowConditionPath(caseField, pathPrefix) {
@@ -7130,7 +7157,7 @@ class WizardPageFieldToCaseFieldMapper {
7130
7157
  });
7131
7158
  }
7132
7159
  preparePathPrefix(pathPrefix, caseField) {
7133
- return pathPrefix.length === 0 ? caseField : `${pathPrefix}.${caseField}`;
7160
+ return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
7134
7161
  }
7135
7162
  getCaseFieldLeaf(caseFieldId, caseFields) {
7136
7163
  const [head, ...tail] = caseFieldId;
@@ -7183,13 +7210,215 @@ WizardPageFieldToCaseFieldMapper.ɵprov = i0.ɵɵdefineInjectable({ token: Wizar
7183
7210
  }]
7184
7211
  }], null, null); })();
7185
7212
 
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
+
7186
7414
  class CasesService {
7187
- constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
7415
+ constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
7188
7416
  this.http = http;
7189
7417
  this.appConfig = appConfig;
7190
7418
  this.orderService = orderService;
7191
7419
  this.errorService = errorService;
7192
7420
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
7421
+ this.workAllocationService = workAllocationService;
7193
7422
  this.loadingService = loadingService;
7194
7423
  this.sessionStorageService = sessionStorageService;
7195
7424
  this.get = this.getCaseView;
@@ -7207,7 +7436,11 @@ class CasesService {
7207
7436
  });
7208
7437
  }
7209
7438
  getCaseView(jurisdictionId, caseTypeId, caseId) {
7210
- const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
7439
+ const url = this.appConfig.getApiUrl()
7440
+ + `/caseworkers/:uid`
7441
+ + `/jurisdictions/${jurisdictionId}`
7442
+ + `/case-types/${caseTypeId}`
7443
+ + `/cases/${caseId}`;
7211
7444
  const loadingToken = this.loadingService.register();
7212
7445
  return this.http
7213
7446
  .get(url)
@@ -7256,7 +7489,7 @@ class CasesService {
7256
7489
  }
7257
7490
  createEvent(caseDetails, eventData) {
7258
7491
  const caseId = caseDetails.case_id;
7259
- const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
7492
+ const url = this.appConfig.getCaseDataUrl() + `/cases/${caseId}/events`;
7260
7493
  const headers = new HttpHeaders()
7261
7494
  .set('experimental', 'true')
7262
7495
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -7269,8 +7502,9 @@ class CasesService {
7269
7502
  }));
7270
7503
  }
7271
7504
  validateCase(ctid, eventData, pageId) {
7272
- const pageIdString = pageId ? `?pageId=${pageId}` : '';
7273
- const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
7505
+ const pageIdString = pageId ? '?pageId=' + pageId : '';
7506
+ const url = this.appConfig.getCaseDataUrl()
7507
+ + `/case-types/${ctid}/validate${pageIdString}`;
7274
7508
  const headers = new HttpHeaders()
7275
7509
  .set('experimental', 'true')
7276
7510
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -7287,7 +7521,8 @@ class CasesService {
7287
7521
  if (eventData.ignore_warning) {
7288
7522
  ignoreWarning = 'true';
7289
7523
  }
7290
- const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7524
+ const url = this.appConfig.getCaseDataUrl()
7525
+ + `/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7291
7526
  const headers = new HttpHeaders()
7292
7527
  .set('experimental', 'true')
7293
7528
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -7300,7 +7535,9 @@ class CasesService {
7300
7535
  }));
7301
7536
  }
7302
7537
  getPrintDocuments(caseId) {
7303
- const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
7538
+ const url = this.appConfig.getCaseDataUrl()
7539
+ + `/cases/${caseId}`
7540
+ + `/documents`;
7304
7541
  const headers = new HttpHeaders()
7305
7542
  .set('experimental', 'true')
7306
7543
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -7313,7 +7550,7 @@ class CasesService {
7313
7550
  }));
7314
7551
  }
7315
7552
  buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
7316
- let url = `${this.appConfig.getCaseDataUrl()}/internal`;
7553
+ let url = this.appConfig.getCaseDataUrl() + `/internal`;
7317
7554
  if (Draft.isDraft(caseId)) {
7318
7555
  url += `/drafts/${caseId}`
7319
7556
  + `/event-trigger`
@@ -7407,11 +7644,11 @@ CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd
7407
7644
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
7408
7645
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
7409
7646
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
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)); };
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)); };
7411
7648
  CasesService.ɵprov = i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
7412
7649
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
7413
7650
  type: Injectable
7414
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7651
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7415
7652
 
7416
7653
  class EventTriggerService {
7417
7654
  constructor() {
@@ -7985,7 +8222,7 @@ class PageValidationService {
7985
8222
  isHidden(caseField, editForm, path) {
7986
8223
  const formFields = editForm.getRawValue();
7987
8224
  const condition = ShowCondition.getInstance(caseField.show_condition);
7988
- if (path && path.indexOf(`_${caseField.id}_`) === -1) {
8225
+ if (path && path.indexOf('_' + caseField.id + '_') === -1) {
7989
8226
  path = `${path}${caseField.id}`;
7990
8227
  }
7991
8228
  return !condition.match(formFields.data, path);
@@ -8014,220 +8251,19 @@ PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationSe
8014
8251
  type: Injectable
8015
8252
  }], function () { return [{ type: CaseFieldService }]; }, null); })();
8016
8253
 
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;
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;
8024
8263
  this.sessionStorageService = sessionStorageService;
8025
- // Check to see if work allocation is enabled
8026
- }
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();
8264
+ this.windowsService = windowsService;
8265
+ this.cancelled = new EventEmitter();
8266
+ this.submitted = new EventEmitter();
8231
8267
  }
8232
8268
  ngOnInit() {
8233
8269
  this.wizard = this.wizardFactory.create(this.eventTrigger);
@@ -9040,7 +9076,7 @@ class CaseEditPageComponent {
9040
9076
  const label = casefield.label || 'Field';
9041
9077
  let id = casefield.id;
9042
9078
  if (fieldElement['component'] && fieldElement['component'].parent) {
9043
- if (fieldElement['component'].idPrefix.indexOf(`_${id}_`) === -1) {
9079
+ if (fieldElement['component'].idPrefix.indexOf('_' + id + '_') === -1) {
9044
9080
  id = `${fieldElement['component'].idPrefix}${id}`;
9045
9081
  }
9046
9082
  else {
@@ -9169,8 +9205,8 @@ class CaseEditPageComponent {
9169
9205
  }
9170
9206
  }
9171
9207
  callbackErrorsNotify(errorContext) {
9172
- this.ignoreWarning = errorContext.ignoreWarning;
9173
- this.triggerText = errorContext.triggerText;
9208
+ this.ignoreWarning = errorContext.ignore_warning;
9209
+ this.triggerText = errorContext.trigger_text;
9174
9210
  }
9175
9211
  next() {
9176
9212
  this.resetErrors();
@@ -9482,12 +9518,12 @@ class CallbackErrorsComponent {
9482
9518
  buildCallbackErrorsContext() {
9483
9519
  const errorContext = new CallbackErrorsContext();
9484
9520
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
9485
- errorContext.ignoreWarning = true;
9486
- errorContext.triggerText = this.triggerTextIgnore;
9521
+ errorContext.ignore_warning = true;
9522
+ errorContext.trigger_text = this.triggerTextIgnore;
9487
9523
  }
9488
9524
  else {
9489
- errorContext.ignoreWarning = false;
9490
- errorContext.triggerText = this.triggerTextContinue;
9525
+ errorContext.ignore_warning = false;
9526
+ errorContext.trigger_text = this.triggerTextContinue;
9491
9527
  }
9492
9528
  return errorContext;
9493
9529
  }
@@ -9526,7 +9562,7 @@ CallbackErrorsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CallbackErrorsCom
9526
9562
 
9527
9563
  class AddressOption {
9528
9564
  constructor(addressModel, description) {
9529
- if (description === null) {
9565
+ if (description == null) {
9530
9566
  this.value = addressModel;
9531
9567
  this.description = this.getDescription();
9532
9568
  }
@@ -9535,10 +9571,13 @@ class AddressOption {
9535
9571
  }
9536
9572
  }
9537
9573
  getDescription() {
9538
- return this.removeInitialCommaIfPresent(`${this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1}${this.prefixWithCommaIfPresent(this.value.AddressLine2)}${this.prefixWithCommaIfPresent(this.value.AddressLine3)}, ${this.value.PostTown}`);
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
9578
  }
9540
9579
  prefixWithCommaIfPresent(value) {
9541
- return value ? `, ${value}` : value;
9580
+ return value ? ', ' + value : value;
9542
9581
  }
9543
9582
  removeInitialCommaIfPresent(value) {
9544
9583
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -9926,7 +9965,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
9926
9965
  this.missingPostcode = false;
9927
9966
  const postcode = this.postcode.value;
9928
9967
  this.caseField.value = null;
9929
- this.addressOptions = [];
9968
+ this.addressOptions = new Array();
9930
9969
  this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe(result => {
9931
9970
  result.forEach(address => {
9932
9971
  this.addressOptions.push(new AddressOption(address, null));
@@ -9969,7 +10008,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
9969
10008
  let hasAddress = false;
9970
10009
  if (address) {
9971
10010
  Object.keys(address).forEach((key) => {
9972
- if (address[key] !== null) {
10011
+ if (address[key] != null) {
9973
10012
  hasAddress = true;
9974
10013
  }
9975
10014
  });
@@ -9992,7 +10031,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
9992
10031
  }
9993
10032
  defaultLabel(numberOfAddresses) {
9994
10033
  return numberOfAddresses === 0 ? 'No address found'
9995
- : `${numberOfAddresses}${numberOfAddresses === 1 ? ' address ' : ' addresses '}found`;
10034
+ : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
9996
10035
  }
9997
10036
  setFormValue() {
9998
10037
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -11521,7 +11560,6 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11521
11560
  this.formArray.removeAt(index);
11522
11561
  }
11523
11562
  resetIds(index) {
11524
- var _a, _b;
11525
11563
  for (let i = index; i < this.collItems.length; i++) {
11526
11564
  const counter = i + 1;
11527
11565
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -11531,15 +11569,16 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11531
11569
  && this.collItems[i].caseField.id === counter.toString()) {
11532
11570
  this.collItems[i].caseField.id = i.toString();
11533
11571
  }
11534
- const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11535
- const idPrefix1Current = idPrefix1.replace(`_${i.toString()}`, `_${counter.toString()}`);
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());
11536
11574
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
11537
11575
  this.collItems[i].prefix = idPrefix1;
11538
11576
  }
11539
- const idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
11577
+ const idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
11578
+ && this.collItems[i].container['component'].idPrefix ? true : false;
11540
11579
  const idPrefix2 = idPrefixAvailable ?
11541
- this.collItems[i].container['component'].idPrefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11542
- const idPrefix2current = idPrefix2.replace(`_${i.toString()}`, `_${counter.toString()}`);
11580
+ this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
11581
+ const idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
11543
11582
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
11544
11583
  this.collItems[i].container['component'].idPrefix = idPrefix2;
11545
11584
  }
@@ -12411,254 +12450,45 @@ class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
12411
12450
  }
12412
12451
  WriteDynamicListFieldComponent.ɵfac = function WriteDynamicListFieldComponent_Factory(t) { return ɵWriteDynamicListFieldComponent_BaseFactory(t || WriteDynamicListFieldComponent); };
12413
12452
  WriteDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynamicListFieldComponent, selectors: [["ccd-write-dynamic-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-control", "ccd-dropdown", "bottom-30", 3, "id", "formControl"], [3, "ngValue"], ["role", "option", 3, "ngValue", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], ["role", "option", 3, "ngValue"]], template: function WriteDynamicListFieldComponent_Template(rf, ctx) { if (rf & 1) {
12414
- i0.ɵɵelementStart(0, "div", 0);
12415
- i0.ɵɵelementStart(1, "label", 1);
12416
- i0.ɵɵtemplate(2, WriteDynamicListFieldComponent_span_2_Template, 3, 3, "span", 2);
12417
- i0.ɵɵelementEnd();
12418
- i0.ɵɵtemplate(3, WriteDynamicListFieldComponent_span_3_Template, 2, 1, "span", 3);
12419
- i0.ɵɵtemplate(4, WriteDynamicListFieldComponent_span_4_Template, 2, 0, "span", 2);
12420
- i0.ɵɵtemplate(5, WriteDynamicListFieldComponent_span_5_Template, 3, 4, "span", 4);
12421
- i0.ɵɵelementStart(6, "select", 5);
12422
- i0.ɵɵelementStart(7, "option", 6);
12423
- i0.ɵɵtext(8, "--Select a value--");
12424
- i0.ɵɵelementEnd();
12425
- i0.ɵɵtemplate(9, WriteDynamicListFieldComponent_option_9_Template, 2, 2, "option", 7);
12426
- i0.ɵɵelementEnd();
12427
- i0.ɵɵelementEnd();
12428
- } if (rf & 2) {
12429
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12430
- i0.ɵɵadvance(1);
12431
- i0.ɵɵproperty("for", ctx.id());
12432
- i0.ɵɵadvance(1);
12433
- i0.ɵɵproperty("ngIf", ctx.caseField.label);
12434
- i0.ɵɵadvance(1);
12435
- i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
12436
- i0.ɵɵadvance(1);
12437
- i0.ɵɵproperty("ngIf", !ctx.caseField.label && !ctx.caseField.hint_text);
12438
- i0.ɵɵadvance(1);
12439
- i0.ɵɵproperty("ngIf", ctx.dynamicListFormControl.errors && ctx.dynamicListFormControl.dirty);
12440
- i0.ɵɵadvance(1);
12441
- i0.ɵɵproperty("id", ctx.id())("formControl", ctx.dynamicListFormControl);
12442
- i0.ɵɵadvance(1);
12443
- i0.ɵɵproperty("ngValue", null);
12444
- i0.ɵɵadvance(2);
12445
- i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
12446
- } }, directives: [i1.NgClass, i1.NgIf, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i2.NgSelectOption, i2.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12447
- const ɵWriteDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicListFieldComponent);
12448
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicListFieldComponent, [{
12449
- type: Component,
12450
- args: [{
12451
- selector: 'ccd-write-dynamic-list-field',
12452
- templateUrl: './write-dynamic-list-field.html'
12453
- }]
12454
- }], null, null); })();
12455
-
12456
- class FixedListPipe {
12457
- transform(value, items) {
12458
- if (!!items) {
12459
- const item = items.find(i => i.code === value);
12460
- return item ? item.label : FixedListPipe.EMPTY;
12461
- }
12462
- else {
12463
- return FixedListPipe.EMPTY;
12464
- }
12465
- }
12466
- }
12467
- FixedListPipe.EMPTY = '';
12468
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
12469
- FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
12470
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedListPipe, [{
12471
- type: Pipe,
12472
- args: [{
12473
- name: 'ccdFixedList'
12474
- }]
12475
- }], null, null); })();
12476
-
12477
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
12478
- i0.ɵɵelementStart(0, "div");
12479
- i0.ɵɵtext(1);
12480
- i0.ɵɵpipe(2, "ccdFixedList");
12481
- i0.ɵɵelementEnd();
12482
- } if (rf & 2) {
12483
- const value_r1 = ctx.$implicit;
12484
- const ctx_r0 = i0.ɵɵnextContext();
12485
- i0.ɵɵadvance(1);
12486
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
12487
- } }
12488
- class ReadDynamicMultiSelectListFieldComponent extends AbstractFieldReadComponent {
12489
- ngOnInit() {
12490
- /**
12491
- *
12492
- * Reassigning list_items from formatted_list when list_items is empty
12493
- */
12494
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12495
- this.caseField.list_items = this.caseField.formatted_value.list_items;
12496
- }
12497
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12498
- this.caseField.value = this.caseField.formatted_value.value;
12499
- }
12500
- super.ngOnInit();
12501
- }
12502
- }
12503
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
12504
- 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) {
12505
- i0.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
12506
- } if (rf & 2) {
12507
- i0.ɵɵproperty("ngForOf", ctx.caseField.value);
12508
- } }, 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}"] });
12509
- const ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
12510
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
12511
- type: Component,
12512
- args: [{
12513
- selector: 'ccd-read-dynamic-multi-select-list-field',
12514
- templateUrl: './read-dynamic-multi-select-list-field.html',
12515
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
12516
- }]
12517
- }], null, null); })();
12518
-
12519
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12520
- i0.ɵɵelementStart(0, "span", 5);
12521
- i0.ɵɵtext(1);
12522
- i0.ɵɵpipe(2, "ccdFieldLabel");
12523
- i0.ɵɵelementEnd();
12524
- } if (rf & 2) {
12525
- const ctx_r0 = i0.ɵɵnextContext();
12526
- i0.ɵɵadvance(1);
12527
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
12528
- } }
12529
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12530
- i0.ɵɵelementStart(0, "span", 6);
12531
- i0.ɵɵtext(1);
12532
- i0.ɵɵelementEnd();
12533
- } if (rf & 2) {
12534
- const ctx_r1 = i0.ɵɵnextContext();
12535
- i0.ɵɵadvance(1);
12536
- i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
12537
- } }
12538
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
12539
- i0.ɵɵelementStart(0, "span", 7);
12540
- i0.ɵɵtext(1);
12541
- i0.ɵɵpipe(2, "ccdFirstError");
12542
- i0.ɵɵelementEnd();
12543
- } if (rf & 2) {
12544
- const ctx_r2 = i0.ɵɵnextContext();
12545
- i0.ɵɵadvance(1);
12546
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
12547
- } }
12548
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
12549
- const _r6 = i0.ɵɵgetCurrentView();
12550
- i0.ɵɵelementContainerStart(0);
12551
- i0.ɵɵelementStart(1, "div", 8);
12552
- i0.ɵɵelementStart(2, "input", 9);
12553
- 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); });
12554
- i0.ɵɵelementEnd();
12555
- i0.ɵɵelementStart(3, "label", 10);
12556
- i0.ɵɵtext(4);
12557
- i0.ɵɵelementEnd();
12558
- i0.ɵɵelementEnd();
12559
- i0.ɵɵelementContainerEnd();
12560
- } if (rf & 2) {
12561
- const checkbox_r4 = ctx.$implicit;
12562
- const ctx_r3 = i0.ɵɵnextContext();
12563
- i0.ɵɵadvance(2);
12564
- i0.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
12565
- i0.ɵɵpropertyInterpolate("name", ctx_r3.id());
12566
- i0.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
12567
- i0.ɵɵadvance(1);
12568
- i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
12569
- i0.ɵɵadvance(1);
12570
- i0.ɵɵtextInterpolate(checkbox_r4.label);
12571
- } }
12572
- const _c0$L = function (a0) { return { "error": a0 }; };
12573
- class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
12574
- ngOnInit() {
12575
- this.checkboxes = new FormArray([]);
12576
- this.setInitialCaseList();
12577
- this.setInitialCaseFieldValue();
12578
- // Initialise array with existing values
12579
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
12580
- const values = this.caseField.value;
12581
- values.forEach(value => {
12582
- this.checkboxes.push(new FormControl(value));
12583
- });
12584
- }
12585
- this.dynamicListFormControl = this.registerControl(new FormControl(this.checkboxes.value));
12586
- this.dynamicListFormControl.setValue(this.checkboxes.value);
12587
- }
12588
- onCheckChange(event) {
12589
- const target = event.target;
12590
- if (!target || !target.value) {
12591
- return;
12592
- }
12593
- const selectedListItem = this.getValueListItem(target.value);
12594
- if (!this.isSelected(target.value)) {
12595
- // Add a new control in the FormArray
12596
- this.checkboxes.push(new FormControl(selectedListItem));
12597
- }
12598
- else {
12599
- // Remove the control from the FormArray
12600
- this.checkboxes.controls.forEach((ctrl, i) => {
12601
- if (ctrl.value.code === target.value) {
12602
- this.checkboxes.removeAt(i);
12603
- }
12604
- });
12605
- }
12606
- this.dynamicListFormControl.setValue(this.checkboxes.value);
12607
- }
12608
- isSelected(code) {
12609
- if (this.checkboxes && this.checkboxes.controls) {
12610
- return this.checkboxes.controls.find(control => control.value.code === code);
12611
- }
12612
- }
12613
- getValueListItem(value) {
12614
- return this.caseField.list_items.find(i => i.code === value);
12615
- }
12616
- setInitialCaseList() {
12617
- const hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
12618
- const hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
12619
- if (!hasListItems && hasFormattedListItems) {
12620
- this.caseField.list_items = this.caseField.formatted_value.list_items;
12621
- }
12622
- }
12623
- setInitialCaseFieldValue() {
12624
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12625
- this.caseField.value = this.caseField.formatted_value.value;
12626
- }
12627
- const isNull = this.caseField.value === undefined || this.caseField.value === '';
12628
- if (isNull || !Array.isArray(this.caseField.value)) {
12629
- this.caseField.value = [];
12630
- }
12631
- }
12632
- }
12633
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
12634
- 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) {
12635
- i0.ɵɵelementStart(0, "div", 0);
12636
- i0.ɵɵelementStart(1, "fieldset");
12637
- i0.ɵɵelementStart(2, "legend");
12638
- i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
12639
- i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
12640
- i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
12453
+ i0.ɵɵelementStart(0, "div", 0);
12454
+ i0.ɵɵelementStart(1, "label", 1);
12455
+ i0.ɵɵtemplate(2, WriteDynamicListFieldComponent_span_2_Template, 3, 3, "span", 2);
12641
12456
  i0.ɵɵelementEnd();
12642
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
12457
+ i0.ɵɵtemplate(3, WriteDynamicListFieldComponent_span_3_Template, 2, 1, "span", 3);
12458
+ i0.ɵɵtemplate(4, WriteDynamicListFieldComponent_span_4_Template, 2, 0, "span", 2);
12459
+ i0.ɵɵtemplate(5, WriteDynamicListFieldComponent_span_5_Template, 3, 4, "span", 4);
12460
+ i0.ɵɵelementStart(6, "select", 5);
12461
+ i0.ɵɵelementStart(7, "option", 6);
12462
+ i0.ɵɵtext(8, "--Select a value--");
12463
+ i0.ɵɵelementEnd();
12464
+ i0.ɵɵtemplate(9, WriteDynamicListFieldComponent_option_9_Template, 2, 2, "option", 7);
12643
12465
  i0.ɵɵelementEnd();
12644
12466
  i0.ɵɵelementEnd();
12645
12467
  } if (rf & 2) {
12646
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
12647
- i0.ɵɵadvance(3);
12468
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12469
+ i0.ɵɵadvance(1);
12470
+ i0.ɵɵproperty("for", ctx.id());
12471
+ i0.ɵɵadvance(1);
12648
12472
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
12649
12473
  i0.ɵɵadvance(1);
12650
12474
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
12651
12475
  i0.ɵɵadvance(1);
12652
- i0.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
12476
+ i0.ɵɵproperty("ngIf", !ctx.caseField.label && !ctx.caseField.hint_text);
12477
+ i0.ɵɵadvance(1);
12478
+ i0.ɵɵproperty("ngIf", ctx.dynamicListFormControl.errors && ctx.dynamicListFormControl.dirty);
12479
+ i0.ɵɵadvance(1);
12480
+ i0.ɵɵproperty("id", ctx.id())("formControl", ctx.dynamicListFormControl);
12653
12481
  i0.ɵɵadvance(1);
12482
+ i0.ɵɵproperty("ngValue", null);
12483
+ i0.ɵɵadvance(2);
12654
12484
  i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
12655
- } }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12656
- const ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
12657
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
12485
+ } }, directives: [i1.NgClass, i1.NgIf, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i2.NgSelectOption, i2.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12486
+ const ɵWriteDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicListFieldComponent);
12487
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicListFieldComponent, [{
12658
12488
  type: Component,
12659
12489
  args: [{
12660
- selector: 'ccd-write-dynamic-multi-select-list-field',
12661
- templateUrl: './write-dynamic-multi-select-list-field.html'
12490
+ selector: 'ccd-write-dynamic-list-field',
12491
+ templateUrl: './write-dynamic-list-field.html'
12662
12492
  }]
12663
12493
  }], null, null); })();
12664
12494
 
@@ -12756,7 +12586,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
12756
12586
  i0.ɵɵadvance(1);
12757
12587
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
12758
12588
  } }
12759
- const _c0$K = function (a0) { return { selected: a0 }; };
12589
+ const _c0$L = function (a0) { return { selected: a0 }; };
12760
12590
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
12761
12591
  i0.ɵɵelementStart(0, "div", 10);
12762
12592
  i0.ɵɵelement(1, "input", 11);
@@ -12767,7 +12597,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
12767
12597
  } if (rf & 2) {
12768
12598
  const radioButton_r5 = ctx.$implicit;
12769
12599
  const ctx_r4 = i0.ɵɵnextContext();
12770
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12600
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12771
12601
  i0.ɵɵadvance(1);
12772
12602
  i0.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
12773
12603
  i0.ɵɵadvance(1);
@@ -12900,7 +12730,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12900
12730
  i0.ɵɵadvance(1);
12901
12731
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
12902
12732
  } }
12903
- const _c0$J = function (a0) { return { "form-group-error": a0 }; };
12733
+ const _c0$K = function (a0) { return { "form-group-error": a0 }; };
12904
12734
  const _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
12905
12735
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
12906
12736
  ngOnInit() {
@@ -12918,7 +12748,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
12918
12748
  i0.ɵɵelement(5, "input", 5);
12919
12749
  i0.ɵɵelementEnd();
12920
12750
  } if (rf & 2) {
12921
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
12751
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
12922
12752
  i0.ɵɵadvance(1);
12923
12753
  i0.ɵɵproperty("for", ctx.id());
12924
12754
  i0.ɵɵadvance(1);
@@ -12939,6 +12769,27 @@ const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInherited
12939
12769
  }]
12940
12770
  }], null, null); })();
12941
12771
 
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
+
12942
12793
  class ReadFixedListFieldComponent extends AbstractFieldReadComponent {
12943
12794
  }
12944
12795
  ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
@@ -12999,7 +12850,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
12999
12850
  i0.ɵɵadvance(1);
13000
12851
  i0.ɵɵtextInterpolate(type_r4.label);
13001
12852
  } }
13002
- const _c0$I = function (a0) { return { "form-group-error": a0 }; };
12853
+ const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13003
12854
  class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
13004
12855
  get listItems() {
13005
12856
  if (this.caseField) {
@@ -13037,7 +12888,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
13037
12888
  i0.ɵɵelementEnd();
13038
12889
  i0.ɵɵelementEnd();
13039
12890
  } if (rf & 2) {
13040
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
12891
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13041
12892
  i0.ɵɵadvance(1);
13042
12893
  i0.ɵɵproperty("for", ctx.id());
13043
12894
  i0.ɵɵadvance(1);
@@ -13128,7 +12979,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
13128
12979
  i0.ɵɵadvance(1);
13129
12980
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
13130
12981
  } }
13131
- const _c0$H = function (a0) { return { selected: a0 }; };
12982
+ const _c0$I = function (a0) { return { selected: a0 }; };
13132
12983
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
13133
12984
  i0.ɵɵelementStart(0, "div", 9);
13134
12985
  i0.ɵɵelement(1, "input", 10);
@@ -13139,7 +12990,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13139
12990
  } if (rf & 2) {
13140
12991
  const radioButton_r4 = ctx.$implicit;
13141
12992
  const ctx_r3 = i0.ɵɵnextContext();
13142
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
12993
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13143
12994
  i0.ɵɵadvance(1);
13144
12995
  i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
13145
12996
  i0.ɵɵadvance(1);
@@ -13270,7 +13121,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
13270
13121
  i0.ɵɵadvance(1);
13271
13122
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
13272
13123
  } }
13273
- const _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
13124
+ const _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
13274
13125
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
13275
13126
  const _r7 = i0.ɵɵgetCurrentView();
13276
13127
  i0.ɵɵelementStart(0, "mat-option", 11);
@@ -13280,7 +13131,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
13280
13131
  } if (rf & 2) {
13281
13132
  const judicialUser_r5 = ctx.$implicit;
13282
13133
  const ctx_r3 = i0.ɵɵnextContext();
13283
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13134
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13284
13135
  i0.ɵɵadvance(1);
13285
13136
  i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
13286
13137
  } }
@@ -13499,7 +13350,7 @@ class LinkedCasesService {
13499
13350
  casesResponse.push(this.mapResponse(result));
13500
13351
  });
13501
13352
  });
13502
- this.linkedCases = casesResponse.map(item => {
13353
+ const caseLinks = casesResponse.map(item => {
13503
13354
  return {
13504
13355
  caseReference: item.caseReference,
13505
13356
  caseName: item.caseName,
@@ -13513,6 +13364,7 @@ class LinkedCasesService {
13513
13364
  }),
13514
13365
  };
13515
13366
  });
13367
+ this.linkedCases = caseLinks;
13516
13368
  this.serverLinkedApiError = null;
13517
13369
  }, err => {
13518
13370
  this.serverLinkedApiError = {
@@ -13975,7 +13827,7 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
13975
13827
  i0.ɵɵadvance(3);
13976
13828
  i0.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
13977
13829
  } }
13978
- const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
13830
+ const _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
13979
13831
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
13980
13832
  i0.ɵɵelementStart(0, "div", 35);
13981
13833
  i0.ɵɵelementStart(1, "h3", 22);
@@ -13991,7 +13843,7 @@ function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
13991
13843
  i0.ɵɵelementEnd();
13992
13844
  } if (rf & 2) {
13993
13845
  const ctx_r7 = i0.ɵɵnextContext(2);
13994
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
13846
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
13995
13847
  i0.ɵɵadvance(3);
13996
13848
  i0.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
13997
13849
  } }
@@ -14042,11 +13894,11 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
14042
13894
  const ctx_r0 = i0.ɵɵnextContext();
14043
13895
  i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
14044
13896
  i0.ɵɵadvance(1);
14045
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
13897
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
14046
13898
  i0.ɵɵadvance(3);
14047
13899
  i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
14048
13900
  i0.ɵɵadvance(2);
14049
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
13901
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
14050
13902
  i0.ɵɵadvance(5);
14051
13903
  i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
14052
13904
  i0.ɵɵadvance(2);
@@ -14457,7 +14309,7 @@ LinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkCasesComponent, se
14457
14309
  i0.ɵɵadvance(4);
14458
14310
  i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
14459
14311
  i0.ɵɵadvance(4);
14460
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
14312
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
14461
14313
  i0.ɵɵadvance(1);
14462
14314
  i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
14463
14315
  i0.ɵɵadvance(18);
@@ -15066,7 +14918,7 @@ function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1)
15066
14918
  i0.ɵɵadvance(1);
15067
14919
  i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
15068
14920
  } }
15069
- const _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
14921
+ const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15070
14922
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
15071
14923
  i0.ɵɵelementStart(0, "div", 7);
15072
14924
  i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
@@ -15076,7 +14928,7 @@ function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
15076
14928
  i0.ɵɵelementEnd();
15077
14929
  } if (rf & 2) {
15078
14930
  const ctx_r1 = i0.ɵɵnextContext(2);
15079
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
14931
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
15080
14932
  i0.ɵɵadvance(1);
15081
14933
  i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
15082
14934
  i0.ɵɵadvance(2);
@@ -15235,7 +15087,6 @@ UnLinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UnLinkCasesComponent
15235
15087
  type: Output
15236
15088
  }] }); })();
15237
15089
 
15238
- // tslint:disable:variable-name
15239
15090
  class LinkCaseReason {
15240
15091
  }
15241
15092
  class CCDCaseLinkType {
@@ -15346,7 +15197,7 @@ class ReadLinkedCasesFieldComponent {
15346
15197
  this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(field => field.id === 'caseLinks');
15347
15198
  }
15348
15199
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
15349
- const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15200
+ const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15350
15201
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15351
15202
  next: reasons => {
15352
15203
  this.reasonListLoaded = true;
@@ -15581,7 +15432,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15581
15432
  }
15582
15433
  }
15583
15434
  getLinkedCaseReasons() {
15584
- const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15435
+ const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15585
15436
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15586
15437
  next: reasons => {
15587
15438
  // Sort in ascending order
@@ -15639,7 +15490,8 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15639
15490
  getLinkedCases() {
15640
15491
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
15641
15492
  const caseViewFiltered = caseView.tabs.filter(tab => {
15642
- return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
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
15495
  });
15644
15496
  if (caseViewFiltered) {
15645
15497
  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; });
@@ -15895,7 +15747,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15895
15747
  i0.ɵɵadvance(1);
15896
15748
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
15897
15749
  } }
15898
- const _c0$D = function (a0) { return { "form-group-error": a0 }; };
15750
+ const _c0$E = function (a0) { return { "form-group-error": a0 }; };
15899
15751
  class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
15900
15752
  ngOnInit() {
15901
15753
  this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15918,7 +15770,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
15918
15770
  i0.ɵɵelementEnd();
15919
15771
  i0.ɵɵelementEnd();
15920
15772
  } if (rf & 2) {
15921
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15773
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15922
15774
  i0.ɵɵadvance(1);
15923
15775
  i0.ɵɵproperty("for", ctx.id());
15924
15776
  i0.ɵɵadvance(1);
@@ -16035,7 +15887,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
16035
15887
  i0.ɵɵadvance(1);
16036
15888
  i0.ɵɵtextInterpolate(checkbox_r4.label);
16037
15889
  } }
16038
- const _c0$C = function (a0) { return { "error": a0 }; };
15890
+ const _c0$D = function (a0) { return { "error": a0 }; };
16039
15891
  class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
16040
15892
  ngOnInit() {
16041
15893
  this.checkboxes = new FormArray([]);
@@ -16090,7 +15942,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
16090
15942
  i0.ɵɵelementEnd();
16091
15943
  i0.ɵɵelementEnd();
16092
15944
  } if (rf & 2) {
16093
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
15945
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16094
15946
  i0.ɵɵadvance(3);
16095
15947
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
16096
15948
  i0.ɵɵadvance(1);
@@ -16159,7 +16011,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
16159
16011
  i0.ɵɵadvance(1);
16160
16012
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16161
16013
  } }
16162
- const _c0$B = function (a0) { return { "form-group-error": a0 }; };
16014
+ const _c0$C = function (a0) { return { "form-group-error": a0 }; };
16163
16015
  const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16164
16016
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
16165
16017
  ngOnInit() {
@@ -16177,7 +16029,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
16177
16029
  i0.ɵɵelement(5, "input", 5);
16178
16030
  i0.ɵɵelementEnd();
16179
16031
  } if (rf & 2) {
16180
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16032
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
16181
16033
  i0.ɵɵadvance(1);
16182
16034
  i0.ɵɵproperty("for", ctx.id());
16183
16035
  i0.ɵɵadvance(1);
@@ -16427,7 +16279,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_div_4_Template(rf, ct
16427
16279
  i0.ɵɵelementEnd();
16428
16280
  i0.ɵɵelementEnd();
16429
16281
  } }
16430
- const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16282
+ const _c0$B = function (a0) { return { "scroll-container ": a0 }; };
16431
16283
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { if (rf & 1) {
16432
16284
  i0.ɵɵelementStart(0, "div", 26);
16433
16285
  i0.ɵɵpipe(1, "async");
@@ -16441,7 +16293,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { i
16441
16293
  const ctx_r2 = i0.ɵɵnextContext(2);
16442
16294
  let tmp_0_0 = null;
16443
16295
  let tmp_2_0 = null;
16444
- 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));
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
16297
  i0.ɵɵadvance(2);
16446
16298
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16447
16299
  i0.ɵɵadvance(2);
@@ -16794,6 +16646,194 @@ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Ca
16794
16646
  }]
16795
16647
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null); })();
16796
16648
 
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
+
16797
16837
  class ReadPhoneUKFieldComponent extends AbstractFieldReadComponent {
16798
16838
  }
16799
16839
  ReadPhoneUKFieldComponent.ɵfac = function ReadPhoneUKFieldComponent_Factory(t) { return ɵReadPhoneUKFieldComponent_BaseFactory(t || ReadPhoneUKFieldComponent); };
@@ -16944,7 +16984,7 @@ class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
16944
16984
  autoGrow(event) {
16945
16985
  if (this.browserService.isIEOrEdge()) {
16946
16986
  event.target.style.height = 'auto';
16947
- event.target.style.height = `${event.target.scrollHeight}px`;
16987
+ event.target.style.height = event.target.scrollHeight + 'px';
16948
16988
  event.target.scrollTop = event.target.scrollHeight;
16949
16989
  }
16950
16990
  }
@@ -17130,7 +17170,6 @@ class YesNoService {
17130
17170
  return YesNoService.EMPTY;
17131
17171
  }
17132
17172
  isYes(value) {
17133
- // tslint:disable-next-line:switch-default
17134
17173
  switch (typeof (value)) {
17135
17174
  case 'boolean':
17136
17175
  return value;
@@ -17140,7 +17179,6 @@ class YesNoService {
17140
17179
  return false;
17141
17180
  }
17142
17181
  isNo(value) {
17143
- // tslint:disable-next-line:switch-default
17144
17182
  switch (typeof (value)) {
17145
17183
  case 'boolean':
17146
17184
  return !value;
@@ -17522,7 +17560,7 @@ FieldWriteComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldWriteComponent,
17522
17560
  } if (rf & 2) {
17523
17561
  i0.ɵɵclassProp("grey-bar", ctx.canHaveGreyBar && !ctx.caseField.hiddenCannotChange);
17524
17562
  i0.ɵɵproperty("hidden", ctx.caseField.hidden);
17525
- } }, styles: [".form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
17563
+ } }, styles: [".form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
17526
17564
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldWriteComponent, [{
17527
17565
  type: Component,
17528
17566
  args: [{
@@ -17607,7 +17645,7 @@ FieldReadLabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadLabelCom
17607
17645
  i0.ɵɵproperty("hidden", ctx.caseField.hidden);
17608
17646
  i0.ɵɵadvance(1);
17609
17647
  i0.ɵɵproperty("ngIf", ctx.withLabel && !ctx.isLabel() && (!ctx.isComplex() || ctx.isCaseLink()))("ngIfElse", _r1);
17610
- } }, directives: [i1.NgIf, i1.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
17648
+ } }, directives: [i1.NgIf, i1.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
17611
17649
  const ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(FieldReadLabelComponent);
17612
17650
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldReadLabelComponent, [{
17613
17651
  type: Component,
@@ -17765,7 +17803,7 @@ CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseF
17765
17803
  i0.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
17766
17804
  i0.ɵɵadvance(2);
17767
17805
  i0.ɵɵproperty("ngForOf", ctx.currentCategories);
17768
- } }, directives: [i1.NgForOf, i1.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
17806
+ } }, directives: [i1.NgForOf, i1.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
17769
17807
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
17770
17808
  type: Component,
17771
17809
  args: [{
@@ -17962,7 +18000,6 @@ CaseFileViewFolderSortComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileV
17962
18000
  class CaseFileViewCategory {
17963
18001
  }
17964
18002
 
17965
- // tslint:disable:variable-name
17966
18003
  class CaseFileViewDocument {
17967
18004
  }
17968
18005
 
@@ -19173,7 +19210,7 @@ class SelectFlagLocationComponent {
19173
19210
  // is expected not to have a party name)
19174
19211
  if (this.flagsData) {
19175
19212
  this.filteredFlagsData =
19176
- this.flagsData.filter(f => f.flags.partyName !== null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19213
+ this.flagsData.filter(f => f.flags.partyName != null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19177
19214
  }
19178
19215
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
19179
19216
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -20341,19 +20378,18 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
20341
20378
  field.value = { CaseReference: value };
20342
20379
  return field;
20343
20380
  }
20344
- toCaseField(id, label, fieldType, value) {
20381
+ toCaseField(id, label, field_type, value) {
20345
20382
  return plainToClassFromExist(new CaseField(), {
20346
20383
  id,
20347
20384
  label,
20348
20385
  display_context: 'READONLY',
20349
20386
  value,
20350
- field_type: fieldType
20387
+ field_type
20351
20388
  });
20352
20389
  }
20353
20390
  sortRowsByColumns(column) {
20354
20391
  const shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
20355
20392
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
20356
- // tslint:disable-next-line:switch-default
20357
20393
  switch (this.columnsHorizontalLabel[column].type.type) {
20358
20394
  case 'Number':
20359
20395
  case 'MoneyGBP': {
@@ -21330,7 +21366,6 @@ MarkdownComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MarkdownComponent, sele
21330
21366
  class FeeValue {
21331
21367
  }
21332
21368
 
21333
- // tslint:disable:variable-name
21334
21369
  class Fee {
21335
21370
  }
21336
21371
 
@@ -21935,7 +21970,7 @@ CcdTabFieldsPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdTabFields", type: CcdTab
21935
21970
 
21936
21971
  class CcdPageFieldsPipe {
21937
21972
  transform(page, dataFormGroup) {
21938
- const complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
21973
+ const complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
21939
21974
  const control = dataFormGroup.controls['data'].get(key);
21940
21975
  return control['caseField'];
21941
21976
  }).filter(field => {
@@ -21954,7 +21989,7 @@ class CcdPageFieldsPipe {
21954
21989
  field_type: {
21955
21990
  id: page.id,
21956
21991
  type: 'Complex',
21957
- complex_fields: complexFields
21992
+ complex_fields
21958
21993
  }
21959
21994
  });
21960
21995
  }
@@ -22113,11 +22148,11 @@ class CollectionCreateCheckerService {
22113
22148
  }
22114
22149
  return childrenCaseFields;
22115
22150
  }
22116
- isComplex(caseField) {
22117
- return caseField.field_type.type === 'Complex';
22151
+ isComplex(case_field) {
22152
+ return case_field.field_type.type === 'Complex';
22118
22153
  }
22119
- isCollection(caseField) {
22120
- return caseField.field_type.type === 'Collection';
22154
+ isCollection(case_field) {
22155
+ return case_field.field_type.type === 'Collection';
22121
22156
  }
22122
22157
  hasCreateAccess(caseField, role) {
22123
22158
  return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
@@ -22264,9 +22299,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22264
22299
  FileUploadStateService,
22265
22300
  FileUploadProgressGuard,
22266
22301
  WindowService,
22267
- LinkedCasesService,
22268
22302
  CommonDataService,
22269
22303
  JurisdictionService,
22304
+ LinkedCasesService,
22270
22305
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
22271
22306
  ], imports: [[
22272
22307
  CommonModule,
@@ -22607,9 +22642,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22607
22642
  FileUploadStateService,
22608
22643
  FileUploadProgressGuard,
22609
22644
  WindowService,
22610
- LinkedCasesService,
22611
22645
  CommonDataService,
22612
22646
  JurisdictionService,
22647
+ LinkedCasesService,
22613
22648
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
22614
22649
  ],
22615
22650
  entryComponents: [CaseFileViewFolderSelectorComponent]
@@ -23231,7 +23266,7 @@ class CaseEditSubmitComponent {
23231
23266
  if (caseField.field_type.type === 'Complex') {
23232
23267
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
23233
23268
  // handle both null and undefined values
23234
- if (caseField.value !== null) {
23269
+ if (caseField.value != null) {
23235
23270
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
23236
23271
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
23237
23272
  // parent)
@@ -23293,8 +23328,8 @@ class CaseEditSubmitComponent {
23293
23328
  this.caseEdit.navigateToPage(pageId);
23294
23329
  }
23295
23330
  callbackErrorsNotify(errorContext) {
23296
- this.ignoreWarning = errorContext.ignoreWarning;
23297
- this.triggerText = errorContext.triggerText;
23331
+ this.ignoreWarning = errorContext.ignore_warning;
23332
+ this.triggerText = errorContext.trigger_text;
23298
23333
  }
23299
23334
  summaryCaseField(field) {
23300
23335
  if (null === this.editForm.get('data').get(field.id)) {
@@ -23847,7 +23882,6 @@ class CaseEventCompletionComponent {
23847
23882
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
23848
23883
  ]
23849
23884
  });
23850
- // tslint:disable-next-line:switch-default
23851
23885
  switch (portalType) {
23852
23886
  case EventCompletionPortalTypes.TaskCancelled:
23853
23887
  this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -24318,27 +24352,27 @@ class PaginationComponent {
24318
24352
  this.screenReaderCurrentLabel = `You're on page`;
24319
24353
  this.pageChange = new EventEmitter();
24320
24354
  this.pageBoundsCorrection = new EventEmitter();
24321
- this.pDirectionLinks = true;
24322
- this.pAutoHide = false;
24323
- this.pResponsive = false;
24355
+ this._directionLinks = true;
24356
+ this._autoHide = false;
24357
+ this._responsive = false;
24324
24358
  }
24325
24359
  get directionLinks() {
24326
- return this.pDirectionLinks;
24360
+ return this._directionLinks;
24327
24361
  }
24328
24362
  set directionLinks(value) {
24329
- this.pDirectionLinks = coerceToBoolean(value);
24363
+ this._directionLinks = coerceToBoolean(value);
24330
24364
  }
24331
24365
  get autoHide() {
24332
- return this.pAutoHide;
24366
+ return this._autoHide;
24333
24367
  }
24334
24368
  set autoHide(value) {
24335
- this.pAutoHide = coerceToBoolean(value);
24369
+ this._autoHide = coerceToBoolean(value);
24336
24370
  }
24337
24371
  get responsive() {
24338
- return this.pResponsive;
24372
+ return this._responsive;
24339
24373
  }
24340
24374
  set responsive(value) {
24341
- this.pResponsive = coerceToBoolean(value);
24375
+ this._responsive = coerceToBoolean(value);
24342
24376
  }
24343
24377
  }
24344
24378
  PaginationComponent.ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
@@ -24999,7 +25033,7 @@ class WorkbasketFiltersComponent {
24999
25033
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
25000
25034
  workbasketInputs.forEach(item => {
25001
25035
  if (item.field.elementPath) {
25002
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
25036
+ item.field.id = item.field.id + '.' + item.field.elementPath;
25003
25037
  }
25004
25038
  item.field.label = item.label;
25005
25039
  if (formValue) {
@@ -25051,7 +25085,7 @@ class WorkbasketFiltersComponent {
25051
25085
  const value = formGroupLS[key];
25052
25086
  // Clear the filter form group control values if it has a value in local storage
25053
25087
  // The regionList form group control value should be ignored as it always contain the latest value
25054
- if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
25088
+ if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
25055
25089
  this.formGroup.get(key).setValue(null);
25056
25090
  }
25057
25091
  }
@@ -26070,7 +26104,7 @@ class CaseEventTriggerComponent {
26070
26104
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
26071
26105
  if (this.activityPollingService.isEnabled) {
26072
26106
  this.ngZone.runOutsideAngular(() => {
26073
- this.activitySubscription = this.postEditActivity().subscribe(() => {
26107
+ this.activitySubscription = this.postEditActivity().subscribe((_resolved) => {
26074
26108
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
26075
26109
  });
26076
26110
  });
@@ -26745,7 +26779,7 @@ function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) { if (rf
26745
26779
  const _r34 = i0.ɵɵgetCurrentView();
26746
26780
  i0.ɵɵelementContainerStart(0);
26747
26781
  i0.ɵɵelementStart(1, "mat-tab-group", 23, 24);
26748
- i0.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0.ɵɵrestoreView(_r34); const ctx_r33 = i0.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
26782
+ i0.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r34); const ctx_r33 = i0.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
26749
26783
  i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
26750
26784
  i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
26751
26785
  i0.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
@@ -26781,6 +26815,7 @@ class CaseFullAccessViewComponent {
26781
26815
  this.location = location;
26782
26816
  this.crf = crf;
26783
26817
  this.sessionStorageService = sessionStorageService;
26818
+ this.HEARINGS_TAB_LABEL = 'Hearings';
26784
26819
  this.hasPrint = true;
26785
26820
  this.hasEventSelector = true;
26786
26821
  this.prependedTabs = [];
@@ -26792,6 +26827,7 @@ class CaseFullAccessViewComponent {
26792
26827
  this.ignoreWarning = false;
26793
26828
  this.selectedTabIndex = 0;
26794
26829
  this.activeCaseFlags = false;
26830
+ this.subs = [];
26795
26831
  this.callbackErrorsSubject = new Subject();
26796
26832
  }
26797
26833
  ngOnInit() {
@@ -26843,6 +26879,7 @@ class CaseFullAccessViewComponent {
26843
26879
  this.unsubscribe(this.callbackErrorsSubject);
26844
26880
  this.unsubscribe(this.errorSubscription);
26845
26881
  this.unsubscribe(this.subscription);
26882
+ this.subs.forEach(s => s.unsubscribe());
26846
26883
  }
26847
26884
  unsubscribe(subscription) {
26848
26885
  if (subscription) {
@@ -26850,7 +26887,7 @@ class CaseFullAccessViewComponent {
26850
26887
  }
26851
26888
  }
26852
26889
  checkRouteAndSetCaseViewTab() {
26853
- this.router.events
26890
+ this.subs.push(this.router.events
26854
26891
  .pipe(filter((event) => event instanceof NavigationEnd))
26855
26892
  .subscribe((event) => {
26856
26893
  const url = event && event.url;
@@ -26862,8 +26899,9 @@ class CaseFullAccessViewComponent {
26862
26899
  this.tabGroup.selectedIndex = matTab.position;
26863
26900
  }
26864
26901
  }
26865
- });
26902
+ }));
26866
26903
  }
26904
+ ;
26867
26905
  postViewActivity() {
26868
26906
  return this.activityPollingService.postViewActivity(this.caseDetails.case_id);
26869
26907
  }
@@ -26916,8 +26954,8 @@ class CaseFullAccessViewComponent {
26916
26954
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
26917
26955
  }
26918
26956
  callbackErrorsNotify(callbackErrorsContext) {
26919
- this.ignoreWarning = callbackErrorsContext.ignoreWarning;
26920
- this.triggerText = callbackErrorsContext.triggerText;
26957
+ this.ignoreWarning = callbackErrorsContext.ignore_warning;
26958
+ this.triggerText = callbackErrorsContext.trigger_text;
26921
26959
  }
26922
26960
  isDraft() {
26923
26961
  return Draft.isDraft(this.caseDetails.case_id);
@@ -26984,22 +27022,25 @@ class CaseFullAccessViewComponent {
26984
27022
  }
26985
27023
  }
26986
27024
  }
26987
- tabChanged(tabChangeEvent) {
26988
- // Update selected tab index
26989
- this.selectedTabIndex = tabChangeEvent.index;
26990
- const tab = tabChangeEvent.tab['_viewContainerRef'];
26991
- const id = tab.element.nativeElement.id;
26992
- // due to some edge case like hidden tab we can't calculate the last index of existing tabs,
26993
- // so have to hard code the hearings id here
26994
- if ((tabChangeEvent.index <= 1 && this.prependedTabs && this.prependedTabs.length) ||
26995
- (this.appendedTabs && this.appendedTabs.length && id === 'hearings')) {
27025
+ // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
27026
+ tabChanged(tabIndexChanged) {
27027
+ const matTab = this.tabGroup._tabs.find(tab => tab.isActive);
27028
+ const tabLabel = matTab.textLabel;
27029
+ // sortedTabs are fragments
27030
+ // appended/prepepended tabs use router navigation
27031
+ if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
27032
+ (this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
27033
+ // Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
27034
+ const tab = matTab['_viewContainerRef'];
27035
+ const id = tab.element.nativeElement.id;
27036
+ // cases/case-details/:caseId/hearings
27037
+ // cases/case-details/:caseId/roles-and-access
26996
27038
  this.router.navigate([id], { relativeTo: this.route });
26997
27039
  }
26998
27040
  else {
26999
- const label = tabChangeEvent.tab.textLabel;
27000
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(() => {
27001
- window.location.hash = label;
27002
- });
27041
+ // Routing here is based on tab label, not ideal
27042
+ // cases/case-details/:caseId#tabLabel
27043
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: tabLabel });
27003
27044
  }
27004
27045
  }
27005
27046
  onLinkClicked(triggerOutputEventText) {
@@ -27095,6 +27136,12 @@ class CaseFullAccessViewComponent {
27095
27136
  this.callbackErrorsSubject.next(null);
27096
27137
  this.alertService.clear();
27097
27138
  }
27139
+ getUrlFragment(url) {
27140
+ return url.split('#')[url.split('#').length - 1];
27141
+ }
27142
+ getTabIndexByTabLabel(tabGroup, tabLabel) {
27143
+ return tabGroup._tabs.toArray().findIndex((t) => t.textLabel.toLowerCase() === tabLabel.toLowerCase());
27144
+ }
27098
27145
  }
27099
27146
  CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM = 'origin';
27100
27147
  CaseFullAccessViewComponent.TRIGGER_TEXT_START = 'Go';
@@ -27107,7 +27154,7 @@ CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAcces
27107
27154
  } if (rf & 2) {
27108
27155
  let _t;
27109
27156
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
27110
- } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "selectedTabChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], ["id", "case-viewer-field-label"], [1, "case-viewer-label", "text-16"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
27157
+ } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "selectedIndexChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], ["id", "case-viewer-field-label"], [1, "case-viewer-label", "text-16"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
27111
27158
  i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 10, 0, "div", 0);
27112
27159
  i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_Template, 6, 2, "div", 0);
27113
27160
  i0.ɵɵelementStart(2, "ccd-callback-errors", 1);
@@ -27184,7 +27231,7 @@ class PrintUrlPipe {
27184
27231
  * or the empty string
27185
27232
  */
27186
27233
  transform(remoteUrl) {
27187
- if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
27234
+ if (remoteUrl && remoteUrl.length > 0) {
27188
27235
  let printServiceUrlPathname;
27189
27236
  /**
27190
27237
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -27200,7 +27247,7 @@ class PrintUrlPipe {
27200
27247
  printServiceUrlPathname = urlParser.pathname;
27201
27248
  if (printServiceUrlPathname[0] !== '/') {
27202
27249
  // Fix for IE11; it returns the pathname without leading slash
27203
- printServiceUrlPathname = `/${printServiceUrlPathname}`;
27250
+ printServiceUrlPathname = '/' + printServiceUrlPathname;
27204
27251
  }
27205
27252
  }
27206
27253
  else {
@@ -27377,10 +27424,10 @@ class CaseViewerComponent {
27377
27424
  }
27378
27425
  setUserAccessType(caseDetails) {
27379
27426
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
27380
- const accessProcess = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
27381
- const accessGranted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27382
- this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27383
- this.userAccessType = accessProcess ? accessProcess.value : null;
27427
+ const access_process = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
27428
+ const access_granted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27429
+ this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27430
+ this.userAccessType = access_process ? access_process.value : null;
27384
27431
  }
27385
27432
  }
27386
27433
  isDataLoaded() {
@@ -28545,11 +28592,11 @@ class CaseChallengedAccessRequestComponent {
28545
28592
  };
28546
28593
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId, challengedAccessRequest)
28547
28594
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
28548
- .subscribe(() => {
28595
+ .subscribe(_response => {
28549
28596
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
28550
28597
  // Angular 7.2!
28551
28598
  this.router.navigate(['success'], { relativeTo: this.route });
28552
- }, () => {
28599
+ }, _error => {
28553
28600
  // Navigate to error page
28554
28601
  });
28555
28602
  }
@@ -28563,7 +28610,7 @@ class CaseChallengedAccessRequestComponent {
28563
28610
  }
28564
28611
  }
28565
28612
  inputEmpty(input) {
28566
- return input.value === null || input.value.trim().length === 0;
28613
+ return input.value == null || input.value.trim().length === 0;
28567
28614
  }
28568
28615
  }
28569
28616
  CaseChallengedAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -29149,11 +29196,11 @@ class CaseSpecificAccessRequestComponent {
29149
29196
  };
29150
29197
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId, specificAccessRequest)
29151
29198
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
29152
- .subscribe(() => {
29199
+ .subscribe(_response => {
29153
29200
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
29154
29201
  // Angular 7.2
29155
29202
  this.router.navigate(['success'], { relativeTo: this.route });
29156
- }, () => {
29203
+ }, _error => {
29157
29204
  // Navigate to error page
29158
29205
  });
29159
29206
  }
@@ -29168,7 +29215,7 @@ class CaseSpecificAccessRequestComponent {
29168
29215
  }
29169
29216
  }
29170
29217
  inputEmpty(input) {
29171
- return input.value === null || input.value.trim().length === 0;
29218
+ return input.value == null || input.value.trim().length === 0;
29172
29219
  }
29173
29220
  }
29174
29221
  CaseSpecificAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -30010,7 +30057,7 @@ class SearchFiltersComponent {
30010
30057
  }
30011
30058
  searchInputs.forEach(item => {
30012
30059
  if (item.field.elementPath) {
30013
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
30060
+ item.field.id = item.field.id + '.' + item.field.elementPath;
30014
30061
  }
30015
30062
  item.field.label = item.label;
30016
30063
  if (formValueObject) {
@@ -30264,7 +30311,7 @@ function SearchResultComponent_table_0_div_4_Template(rf, ctx) { if (rf & 1) {
30264
30311
  } if (rf & 2) {
30265
30312
  const ctx_r3 = i0.ɵɵnextContext(2);
30266
30313
  i0.ɵɵadvance(6);
30267
- 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. ");
30314
+ 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
30315
  } }
30269
30316
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) { if (rf & 1) {
30270
30317
  i0.ɵɵelementStart(0, "div", 15);
@@ -30722,7 +30769,7 @@ class SearchResultComponent {
30722
30769
  }
30723
30770
  }
30724
30771
  get resultTotal() {
30725
- const total = this.paginationMetadata.totalResultsCount;
30772
+ const total = this.paginationMetadata.total_results_count;
30726
30773
  const maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
30727
30774
  this.paginationLimitEnforced = maximumResultReached;
30728
30775
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -30867,7 +30914,7 @@ class SearchResultComponent {
30867
30914
  return col;
30868
30915
  }
30869
30916
  hasResults() {
30870
- return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
30917
+ return this.resultView.results.length && this.paginationMetadata.total_pages_count;
30871
30918
  }
30872
30919
  hasDrafts() {
30873
30920
  return this.resultView.hasDrafts();
@@ -30966,7 +31013,7 @@ class SearchResultComponent {
30966
31013
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
30967
31014
  }
30968
31015
  getTotalResults() {
30969
- const total = this.paginationMetadata.totalResultsCount + this.draftsCount;
31016
+ const total = this.paginationMetadata.total_results_count + this.draftsCount;
30970
31017
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
30971
31018
  }
30972
31019
  prepareCaseLinkUrl(caseId) {
@@ -31111,7 +31158,6 @@ SearchResultModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
31111
31158
  }], null, null); })();
31112
31159
  i0.ɵɵsetComponentScope(SearchResultComponent, [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1.DecimalPipe, i1$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
31113
31160
 
31114
- // tslint:disable:variable-name
31115
31161
  class ComplexFieldOverride {
31116
31162
  }
31117
31163
 
@@ -31130,24 +31176,24 @@ class CaseFieldBuilder {
31130
31176
  this.caseField.id = id;
31131
31177
  return this;
31132
31178
  }
31133
- withFieldType(fieldType) {
31134
- this.caseField.field_type = fieldType;
31179
+ withFieldType(field_type) {
31180
+ this.caseField.field_type = field_type;
31135
31181
  return this;
31136
31182
  }
31137
- withDisplayContext(displayContext) {
31138
- this.caseField.display_context = displayContext;
31183
+ withDisplayContext(display_context) {
31184
+ this.caseField.display_context = display_context;
31139
31185
  return this;
31140
31186
  }
31141
- withDisplayContextParameter(displayContextParameter) {
31142
- this.caseField.display_context_parameter = displayContextParameter;
31187
+ withDisplayContextParameter(display_context_parameter) {
31188
+ this.caseField.display_context_parameter = display_context_parameter;
31143
31189
  return this;
31144
31190
  }
31145
31191
  withHidden(hidden) {
31146
31192
  this.caseField.hidden = hidden;
31147
31193
  return this;
31148
31194
  }
31149
- withHintText(hintText) {
31150
- this.caseField.hint_text = hintText;
31195
+ withHintText(hint_text) {
31196
+ this.caseField.hint_text = hint_text;
31151
31197
  return this;
31152
31198
  }
31153
31199
  withLabel(label) {
@@ -31158,12 +31204,12 @@ class CaseFieldBuilder {
31158
31204
  this.caseField.order = order;
31159
31205
  return this;
31160
31206
  }
31161
- withSecurityLabel(securityLabel) {
31162
- this.caseField.security_label = securityLabel;
31207
+ withSecurityLabel(security_label) {
31208
+ this.caseField.security_label = security_label;
31163
31209
  return this;
31164
31210
  }
31165
- withShowCondition(showCondition) {
31166
- this.caseField.show_condition = showCondition;
31211
+ withShowCondition(show_condition) {
31212
+ this.caseField.show_condition = show_condition;
31167
31213
  return this;
31168
31214
  }
31169
31215
  withShowSummaryContentOption(option) {
@@ -31190,19 +31236,19 @@ const textFieldType = () => {
31190
31236
  complex_fields: []
31191
31237
  };
31192
31238
  };
31193
- const createCaseEventTrigger = (id, name, caseId, showSummary, caseFields, wizardPages = [], canSaveDraft = false) => {
31239
+ const createCaseEventTrigger = (id, name, case_id, show_summary, case_fields, wizard_pages = [], can_save_draft = false) => {
31194
31240
  const eventTrigger = new CaseEventTrigger();
31195
31241
  eventTrigger.id = id;
31196
31242
  eventTrigger.name = name;
31197
- eventTrigger.case_id = caseId;
31198
- eventTrigger.show_summary = showSummary;
31199
- eventTrigger.wizard_pages = wizardPages;
31243
+ eventTrigger.case_id = case_id;
31244
+ eventTrigger.show_summary = show_summary;
31245
+ eventTrigger.wizard_pages = wizard_pages;
31200
31246
  eventTrigger.event_token = 'test-token';
31201
- eventTrigger.case_fields = caseFields;
31202
- eventTrigger.can_save_draft = canSaveDraft;
31247
+ eventTrigger.case_fields = case_fields;
31248
+ eventTrigger.can_save_draft = can_save_draft;
31203
31249
  return eventTrigger;
31204
31250
  };
31205
- const aCaseField = (id, label, type, displayContext, showSummaryContentOption, typeComplexFields = [], retainHiddenValue, hidden) => {
31251
+ const aCaseField = (id, label, type, display_context, show_summary_content_option, typeComplexFields = [], retain_hidden_value, hidden) => {
31206
31252
  return ({
31207
31253
  id: id || 'personFirstName',
31208
31254
  field_type: {
@@ -31210,10 +31256,10 @@ const aCaseField = (id, label, type, displayContext, showSummaryContentOption, t
31210
31256
  type: type || 'Text',
31211
31257
  complex_fields: typeComplexFields || []
31212
31258
  },
31213
- display_context: displayContext || 'OPTIONAL',
31259
+ display_context: display_context || 'OPTIONAL',
31214
31260
  label: label || 'First name',
31215
- show_summary_content_option: showSummaryContentOption,
31216
- retain_hidden_value: retainHiddenValue || false,
31261
+ show_summary_content_option,
31262
+ retain_hidden_value: retain_hidden_value || false,
31217
31263
  hidden: hidden || false
31218
31264
  });
31219
31265
  };
@@ -31251,59 +31297,59 @@ const createHiddenComplexFieldOverride = (id) => {
31251
31297
  complexFieldOverride.display_context = 'HIDDEN';
31252
31298
  return complexFieldOverride;
31253
31299
  };
31254
- const createCaseField = (id, label, hint, fieldType, displayContext, order = undefined, showCondition = undefined, acls = undefined, hidden) => {
31300
+ const createCaseField = (id, label, hint, fieldType, display_context, order = undefined, show_condition = undefined, ACLs = undefined, hidden) => {
31255
31301
  return CaseFieldBuilder.create()
31256
31302
  .withId(id || 'personFirstName')
31257
31303
  .withFieldType(fieldType || textFieldType())
31258
- .withDisplayContext(displayContext || 'OPTIONAL')
31304
+ .withDisplayContext(display_context || 'OPTIONAL')
31259
31305
  .withLabel(label || 'First name')
31260
31306
  .withHintText(hint || 'First name hint text')
31261
31307
  .withShowSummaryContentOption(0)
31262
31308
  .withOrder(order)
31263
- .withShowCondition(showCondition || undefined)
31264
- .withACLs(acls)
31309
+ .withShowCondition(show_condition || undefined)
31310
+ .withACLs(ACLs)
31265
31311
  .withHidden(hidden || false)
31266
31312
  .build();
31267
31313
  };
31268
- const newCaseField = (id, label, hint, fieldType, displayContext, order = undefined) => {
31314
+ const newCaseField = (id, label, hint, fieldType, display_context, order = undefined) => {
31269
31315
  return CaseFieldBuilder.create()
31270
31316
  .withId(id || 'personFirstName')
31271
31317
  .withFieldType(fieldType || textFieldType())
31272
- .withDisplayContext(displayContext || 'OPTIONAL')
31318
+ .withDisplayContext(display_context || 'OPTIONAL')
31273
31319
  .withHintText(hint || 'First name hint text')
31274
31320
  .withLabel(label || 'First name')
31275
31321
  .withOrder(order)
31276
31322
  .withShowSummaryContentOption(0);
31277
31323
  };
31278
- const createFieldType = (typeId, type, complexFields = [], collectionFieldType = undefined) => {
31324
+ const createFieldType = (typeId, type, complex_fields = [], collection_field_type = undefined) => {
31279
31325
  return {
31280
31326
  id: typeId || 'Text',
31281
31327
  type: type || 'Text',
31282
- complex_fields: complexFields || [],
31283
- collection_field_type: collectionFieldType || undefined
31328
+ complex_fields: complex_fields || [],
31329
+ collection_field_type: collection_field_type || undefined
31284
31330
  };
31285
31331
  };
31286
31332
  const createFixedListFieldType = (typeId, fixedListItems = []) => {
31287
31333
  return {
31288
- id: `FixedList-${typeId}`,
31334
+ id: 'FixedList-' + typeId,
31289
31335
  type: 'FixedList',
31290
31336
  fixed_list_items: fixedListItems || []
31291
31337
  };
31292
31338
  };
31293
31339
  const createMultiSelectListFieldType = (typeId, fixedListItems = []) => {
31294
31340
  return {
31295
- id: `MultiSelectList-${typeId}`,
31341
+ id: 'MultiSelectList-' + typeId,
31296
31342
  type: 'MultiSelectList',
31297
31343
  fixed_list_items: fixedListItems || []
31298
31344
  };
31299
31345
  };
31300
- const createACL = (role, aclCreate, aclRead, aclUpdate, aclDelete) => {
31346
+ const createACL = (role, create, read, update, _delete) => {
31301
31347
  return ({
31302
31348
  role: role || 'roleX',
31303
- create: aclCreate,
31304
- read: aclRead,
31305
- update: aclUpdate,
31306
- delete: aclDelete
31349
+ create,
31350
+ read,
31351
+ update,
31352
+ delete: _delete
31307
31353
  });
31308
31354
  };
31309
31355
 
@@ -31350,5 +31396,5 @@ class TestRouteSnapshotBuilder {
31350
31396
  * Generated bundle index. Do not edit.
31351
31397
  */
31352
31398
 
31353
- 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 };
31399
+ 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
31400
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map