@hmcts/ccd-case-ui-toolkit 6.15.0-g → 6.16.0-EXUI-343

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 (243) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +954 -994
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
  7. package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
  8. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
  9. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +5 -8
  10. package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
  11. package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
  12. package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +16 -8
  13. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +111 -96
  14. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
  15. package/esm2015/lib/shared/components/case-editor/case-editor.module.js +14 -15
  16. package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
  17. 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
  18. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
  19. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
  20. package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
  21. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
  22. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
  23. package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
  24. package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
  25. package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
  26. package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
  27. package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +3 -5
  28. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +25 -25
  29. package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
  30. package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +36 -18
  31. package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
  32. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
  33. package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
  34. package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
  35. package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
  36. package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
  37. package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
  38. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  39. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
  40. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  41. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
  42. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  43. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  44. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  45. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
  46. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  47. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  48. package/esm2015/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.js +2 -4
  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 +2 -2
  51. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +26 -2
  52. package/esm2015/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.js +2 -4
  53. package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.js +1 -1
  54. package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +2 -1
  55. package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +3 -5
  56. package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
  57. package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +38 -89
  58. package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
  59. package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
  60. package/esm2015/lib/shared/components/palette/palette.module.js +5 -5
  61. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  62. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  63. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  64. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
  65. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  66. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  67. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  68. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  69. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
  70. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
  71. package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
  72. package/esm2015/lib/shared/domain/case-details.model.js +2 -1
  73. package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
  74. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  75. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
  76. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  77. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
  78. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
  79. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
  80. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
  81. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
  82. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
  83. package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
  84. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  85. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  86. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  87. package/esm2015/lib/shared/domain/definition/case-field.model.js +2 -1
  88. package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
  89. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
  90. package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
  91. package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
  92. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  93. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  94. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  95. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  96. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
  97. package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
  98. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  99. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
  100. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  101. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  102. package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
  103. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  104. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  105. package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
  106. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  107. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  108. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  109. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  110. package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
  111. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  112. package/esm2015/lib/shared/services/fields/fields.utils.js +12 -4
  113. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
  114. package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
  115. package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
  116. package/esm2015/lib/shared/services/search/search.service.js +5 -10
  117. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  118. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  119. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +1004 -1031
  120. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  121. package/lib/app.config.d.ts.map +1 -1
  122. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  123. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  124. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +3 -5
  125. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  126. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  127. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +4 -3
  128. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  129. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +5 -2
  130. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  131. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  132. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  133. 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
  134. 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
  135. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  136. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  137. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  138. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  139. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  140. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  141. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  142. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  143. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  144. package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts.map +1 -1
  145. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  146. package/lib/shared/components/case-viewer/case-viewer.component.d.ts +6 -3
  147. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  148. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  149. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  150. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  151. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  152. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  153. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  154. package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
  155. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  156. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  157. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  158. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  159. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  160. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  161. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  162. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  163. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  164. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  165. package/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.d.ts.map +1 -1
  166. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  167. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  168. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts +2 -0
  169. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +1 -1
  170. package/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.d.ts.map +1 -1
  171. package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts +0 -4
  172. package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts.map +1 -1
  173. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  174. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  175. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  176. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +0 -4
  177. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  178. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  179. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  180. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  181. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  182. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  183. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  184. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  185. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  186. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  187. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  188. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  189. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  190. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  191. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  192. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  193. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  194. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  195. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  196. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  197. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  198. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  199. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  200. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  201. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  202. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  203. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  204. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  205. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  206. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  207. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  208. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  209. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  210. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  211. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  212. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  213. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  214. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  215. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  216. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  217. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  218. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  219. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  220. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  221. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  222. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  223. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  224. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  225. package/lib/shared/pipes/complex/index.d.ts +1 -1
  226. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  227. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  228. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  229. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  230. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  231. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  232. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  233. package/lib/shared/services/fields/fields.utils.d.ts +2 -1
  234. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  235. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  236. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  237. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  238. package/lib/shared/services/search/search.service.d.ts +0 -2
  239. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  240. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  241. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  242. package/package.json +2 -2
  243. package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
@@ -579,22 +579,22 @@ class DateInputComponent {
579
579
  }
580
580
  }
581
581
  dayId() {
582
- return this.id + '-day';
582
+ return `${this.id}-day`;
583
583
  }
584
584
  monthId() {
585
- return this.id + '-month';
585
+ return `${this.id}-month`;
586
586
  }
587
587
  yearId() {
588
- return this.id + '-year';
588
+ return `${this.id}-year`;
589
589
  }
590
590
  hourId() {
591
- return this.id + '-hour';
591
+ return `${this.id}-hour`;
592
592
  }
593
593
  minuteId() {
594
- return this.id + '-minute';
594
+ return `${this.id}-minute`;
595
595
  }
596
596
  secondId() {
597
- return this.id + '-second';
597
+ return `${this.id}-second`;
598
598
  }
599
599
  viewValue() {
600
600
  if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
@@ -609,7 +609,7 @@ class DateInputComponent {
609
609
  this.minute ? this.pad(this.minute) : '',
610
610
  this.second ? this.pad(this.second) : ''
611
611
  ].join(':');
612
- return date + 'T' + time + '.000';
612
+ return `${date}T${time}.000`;
613
613
  }
614
614
  else {
615
615
  return date;
@@ -1521,7 +1521,7 @@ class ActivityService {
1521
1521
  }
1522
1522
  static handleHttpError(response) {
1523
1523
  const error = HttpErrorService.convertToHttpError(response);
1524
- if (response.status && response.status !== error.status) {
1524
+ if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
1525
1525
  error.status = response.status;
1526
1526
  }
1527
1527
  return error;
@@ -1529,50 +1529,41 @@ class ActivityService {
1529
1529
  getOptions() {
1530
1530
  const userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
1531
1531
  const headers = new HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
1532
- const options = {
1532
+ return {
1533
1533
  headers,
1534
1534
  withCredentials: true,
1535
1535
  observe: 'body',
1536
1536
  };
1537
- return options;
1538
1537
  }
1539
1538
  getActivities(...caseId) {
1540
1539
  try {
1541
1540
  const options = this.getOptions();
1542
- const url = this.activityUrl() + `/cases/${caseId.join(',')}/activity`;
1541
+ const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
1543
1542
  return this.http
1544
1543
  .get(url, options, false, ActivityService.handleHttpError)
1545
1544
  .pipe(map(response => response));
1546
1545
  }
1547
1546
  catch (error) {
1548
- console.log('user may not be authenticated.' + error);
1547
+ console.log(`user may not be authenticated.${error}`);
1549
1548
  }
1550
1549
  }
1551
1550
  postActivity(caseId, activity) {
1552
1551
  try {
1553
1552
  const options = this.getOptions();
1554
- const url = this.activityUrl() + `/cases/${caseId}/activity`;
1553
+ const url = `${this.activityUrl()}/cases/${caseId}/activity`;
1555
1554
  const body = { activity };
1556
1555
  return this.http
1557
1556
  .post(url, body, options, false)
1558
1557
  .pipe(map(response => response));
1559
1558
  }
1560
1559
  catch (error) {
1561
- console.log('user may not be authenticated.' + error);
1560
+ console.log(`user may not be authenticated.${error}`);
1562
1561
  }
1563
1562
  }
1564
1563
  verifyUserIsAuthorized() {
1565
- if (this.sessionStorageService.getItem('userDetails') === undefined) {
1566
- return;
1567
- }
1568
- if (this.activityUrl() && this.userAuthorised === undefined) {
1564
+ if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
1569
1565
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
1570
- if ([401, 403].indexOf(error.status) > -1) {
1571
- this.userAuthorised = false;
1572
- }
1573
- else {
1574
- this.userAuthorised = true;
1575
- }
1566
+ this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
1576
1567
  });
1577
1568
  }
1578
1569
  }
@@ -1671,7 +1662,7 @@ class ActivityPollingService {
1671
1662
  requests.get(activity.caseId).next(activity);
1672
1663
  });
1673
1664
  }, (err) => {
1674
- console.log('error: ' + err);
1665
+ console.log(`error: ${err}`);
1675
1666
  Array.from(requests.values()).forEach((subject) => subject.error(err));
1676
1667
  }));
1677
1668
  });
@@ -1792,9 +1783,9 @@ class ActivityComponent {
1792
1783
  }
1793
1784
  generateDescription(prefix, suffix, namesArray, unknownCount) {
1794
1785
  let resultText = prefix;
1795
- resultText += namesArray.map(activityInfo => activityInfo.forename + ' ' + activityInfo.surname).join(', ');
1786
+ resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
1796
1787
  if (unknownCount > 0) {
1797
- resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
1788
+ resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
1798
1789
  resultText += (unknownCount > 1 ? 's' : '');
1799
1790
  }
1800
1791
  else {
@@ -1802,10 +1793,10 @@ class ActivityComponent {
1802
1793
  }
1803
1794
  if (suffix.length > 0) {
1804
1795
  if (namesArray.length + unknownCount > 1) {
1805
- resultText += ' are ' + suffix;
1796
+ resultText += ` are ${suffix}`;
1806
1797
  }
1807
1798
  else {
1808
- resultText += ' is ' + suffix;
1799
+ resultText += ` is ${suffix}`;
1809
1800
  }
1810
1801
  }
1811
1802
  return resultText;
@@ -2318,7 +2309,7 @@ class FormatTranslatorService {
2318
2309
  break;
2319
2310
  case 'n':
2320
2311
  case 'N':
2321
- maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2312
+ maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2322
2313
  break;
2323
2314
  case 'V':
2324
2315
  case 'O':
@@ -2441,9 +2432,9 @@ class DatePipe {
2441
2432
  resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
2442
2433
  if (match[4] && match[5] && match[6] && format !== 'short') {
2443
2434
  resultDate += ', ';
2444
- resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
2445
- resultDate += this.pad(offsetDate.getMinutes()) + ':';
2446
- resultDate += this.pad(offsetDate.getSeconds()) + ' ';
2435
+ resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
2436
+ resultDate += `${this.pad(offsetDate.getMinutes())}:`;
2437
+ resultDate += `${this.pad(offsetDate.getSeconds())} `;
2447
2438
  resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
2448
2439
  }
2449
2440
  }
@@ -2778,6 +2769,7 @@ PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
2778
2769
  }]
2779
2770
  }], null, null); })();
2780
2771
 
2772
+ // tslint:disable:variable-name
2781
2773
  class AddressModel {
2782
2774
  constructor() {
2783
2775
  this.AddressLine1 = '';
@@ -3049,6 +3041,7 @@ __decorate([
3049
3041
  __metadata("design:type", Array)
3050
3042
  ], CaseEventTrigger.prototype, "wizard_pages", void 0);
3051
3043
 
3044
+ // tslint:disable:variable-name
3052
3045
  class CaseViewEvent {
3053
3046
  }
3054
3047
 
@@ -3075,6 +3068,7 @@ __decorate([
3075
3068
  __metadata("design:type", Array)
3076
3069
  ], CaseType.prototype, "case_fields", void 0);
3077
3070
 
3071
+ // tslint:disable:variable-name
3078
3072
  class EventCaseField {
3079
3073
  }
3080
3074
 
@@ -3107,6 +3101,7 @@ __decorate([
3107
3101
  class CasePrintDocument {
3108
3102
  }
3109
3103
 
3104
+ // tslint:disable:variable-name
3110
3105
  class HRef {
3111
3106
  }
3112
3107
  class DocumentLinks {
@@ -3124,25 +3119,25 @@ class OrganisationConverter {
3124
3119
  static toSimpleAddress(organisationModel) {
3125
3120
  let simpleAddress = '';
3126
3121
  if (organisationModel.addressLine1) {
3127
- simpleAddress += organisationModel.addressLine1 + '<br>';
3122
+ simpleAddress += `${organisationModel.addressLine1}<br>`;
3128
3123
  }
3129
3124
  if (organisationModel.addressLine2) {
3130
- simpleAddress += organisationModel.addressLine2 + '<br>';
3125
+ simpleAddress += `${organisationModel.addressLine2}<br>`;
3131
3126
  }
3132
3127
  if (organisationModel.addressLine3) {
3133
- simpleAddress += organisationModel.addressLine3 + '<br>';
3128
+ simpleAddress += `${organisationModel.addressLine3}<br>`;
3134
3129
  }
3135
3130
  if (organisationModel.townCity) {
3136
- simpleAddress += organisationModel.townCity + '<br>';
3131
+ simpleAddress += `${organisationModel.townCity}<br>`;
3137
3132
  }
3138
3133
  if (organisationModel.county) {
3139
- simpleAddress += organisationModel.county + '<br>';
3134
+ simpleAddress += `${organisationModel.county}<br>`;
3140
3135
  }
3141
3136
  if (organisationModel.country) {
3142
- simpleAddress += organisationModel.country + '<br>';
3137
+ simpleAddress += `${organisationModel.country}<br>`;
3143
3138
  }
3144
3139
  if (organisationModel.postCode) {
3145
- simpleAddress += organisationModel.postCode + '<br>';
3140
+ simpleAddress += `${organisationModel.postCode}<br>`;
3146
3141
  }
3147
3142
  return simpleAddress;
3148
3143
  }
@@ -3225,20 +3220,15 @@ __decorate([
3225
3220
  __metadata("design:type", Array)
3226
3221
  ], SearchResultView.prototype, "results", void 0);
3227
3222
 
3223
+ // tslint:disable:variable-name
3228
3224
  class CaseDetails {
3229
3225
  }
3230
3226
 
3227
+ // tslint:disable:variable-name
3231
3228
  class CaseEventData {
3232
3229
  }
3233
3230
 
3234
3231
  class WorkbasketInputModel {
3235
- constructor(label, order, field, metadata, display_context_parameter) {
3236
- this.label = label;
3237
- this.order = order;
3238
- this.field = field;
3239
- this.metadata = metadata;
3240
- this.display_context_parameter = display_context_parameter;
3241
- }
3242
3232
  }
3243
3233
  class WorkbasketInput {
3244
3234
  }
@@ -3275,9 +3265,9 @@ class FieldsUtils {
3275
3265
  });
3276
3266
  return valueMap;
3277
3267
  }
3278
- static getType(elem) {
3279
- return Object.prototype.toString.call(elem).slice(8, -1);
3280
- }
3268
+ // public static getType(elem: any): string {
3269
+ // return Object.prototype.toString.call(elem).slice(8, -1);
3270
+ // }
3281
3271
  static isObject(elem) {
3282
3272
  return typeof elem === 'object' && elem !== null;
3283
3273
  }
@@ -3474,6 +3464,13 @@ class FieldsUtils {
3474
3464
  }
3475
3465
  return caseField.field_type.type === 'ComponentLauncher';
3476
3466
  }
3467
+ static isLinkedCasesCaseField(caseField) {
3468
+ return FieldsUtils.isComponentLauncherCaseField(caseField) &&
3469
+ caseField.id === 'LinkedCasesComponentLauncher';
3470
+ }
3471
+ static containsLinkedCasesCaseField(caseFields) {
3472
+ return caseFields === null || caseFields === void 0 ? void 0 : caseFields.some(caseField => FieldsUtils.isLinkedCasesCaseField(caseField));
3473
+ }
3477
3474
  static isFlagsFieldType(fieldType) {
3478
3475
  if (!fieldType) {
3479
3476
  return false;
@@ -3777,6 +3774,7 @@ FieldsUtils.LABEL_MERGE_FUNCTION = function mergeFunction(field, result) {
3777
3774
  const elements = (result[field.id] || field.value);
3778
3775
  if (elements) {
3779
3776
  elements.forEach((elem) => {
3777
+ // tslint:disable-next-line:switch-default
3780
3778
  switch (field.field_type.collection_field_type.type) {
3781
3779
  case 'MoneyGBP': {
3782
3780
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -3921,7 +3919,6 @@ class ConditionParser {
3921
3919
  if (!condition) {
3922
3920
  return null;
3923
3921
  }
3924
- ;
3925
3922
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
3926
3923
  return peg.parse(condition.trim(), {});
3927
3924
  }
@@ -3934,14 +3931,12 @@ class ConditionParser {
3934
3931
  if (!conditions || conditions.length === 0) {
3935
3932
  return true;
3936
3933
  }
3937
- ;
3938
3934
  const validJoinComparators = ['AND', 'OR'];
3939
- const result = conditions.reduce((accumulator, condition, index) => {
3935
+ return conditions.reduce((accumulator, condition, index) => {
3940
3936
  const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1);
3941
3937
  if (isJoinComparator(condition)) {
3942
3938
  return accumulator;
3943
3939
  }
3944
- ;
3945
3940
  let currentConditionResult = true;
3946
3941
  if (Array.isArray(condition)) {
3947
3942
  currentConditionResult = this.evaluate(fields, condition);
@@ -3958,9 +3953,9 @@ class ConditionParser {
3958
3953
  }
3959
3954
  return currentConditionResult;
3960
3955
  }, true);
3961
- return result;
3962
3956
  }
3963
3957
  static evaluateJoin(leftResult, comparator, rightResult) {
3958
+ // tslint:disable-next-line:switch-default
3964
3959
  switch (comparator) {
3965
3960
  case 'OR': return leftResult || rightResult;
3966
3961
  case 'AND': return leftResult && rightResult;
@@ -4050,8 +4045,7 @@ class ConditionParser {
4050
4045
  }
4051
4046
  }
4052
4047
  static unquoted(str) {
4053
- const res = str.replace(/^"|"$/g, '');
4054
- return res;
4048
+ return str.replace(/^"|"$/g, '');
4055
4049
  }
4056
4050
  static findValueForComplexCondition(fields, head, tail, path) {
4057
4051
  if (!fields) {
@@ -4163,8 +4157,8 @@ class ShowCondition {
4163
4157
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4164
4158
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4165
4159
  this.processedList.push(condition.fieldReference);
4166
- const regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4167
- return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4160
+ const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
4161
+ return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
4168
4162
  }
4169
4163
  else {
4170
4164
  return originalCondition;
@@ -4241,6 +4235,7 @@ class ShowCondition {
4241
4235
  }
4242
4236
  // Consider what type of field this is.
4243
4237
  const ft = caseField.field_type;
4238
+ // tslint:disable-next-line:switch-default
4244
4239
  switch (ft.type) {
4245
4240
  case 'Collection':
4246
4241
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -4686,14 +4681,14 @@ class FieldsPurger {
4686
4681
  const formFields = form.getRawValue();
4687
4682
  const currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
4688
4683
  currentPage.wizard_page_fields.forEach(wpf => {
4689
- const case_field = this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
4690
- if (this.hasShowConditionField(case_field, formFields)) {
4691
- const condition = new ShowCondition(case_field.show_condition);
4692
- if (this.isHidden(condition, formFields.data) && !(this.isReadonly(case_field))) {
4693
- this.resetField(form, case_field);
4684
+ const caseField = this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
4685
+ if (this.hasShowConditionField(caseField, formFields)) {
4686
+ const condition = new ShowCondition(caseField.show_condition);
4687
+ if (this.isHidden(condition, formFields.data) && !(this.isReadonly(caseField))) {
4688
+ this.resetField(form, caseField);
4694
4689
  }
4695
4690
  }
4696
- this.retainHiddenValueByFieldType(case_field, form);
4691
+ this.retainHiddenValueByFieldType(caseField, form);
4697
4692
  });
4698
4693
  }
4699
4694
  retainHiddenValueByFieldType(field, form) {
@@ -4724,13 +4719,13 @@ class FieldsPurger {
4724
4719
  hasShowConditionPage(wizardPage, formFields) {
4725
4720
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
4726
4721
  }
4727
- hasShowConditionField(case_field, formFields) {
4728
- return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
4722
+ hasShowConditionField(caseField, formFields) {
4723
+ return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
4729
4724
  }
4730
- getShowConditionKey(show_condition) {
4725
+ getShowConditionKey(showCondition) {
4731
4726
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
4732
4727
  // Also need to allow for conditions specified using the "CONTAINS" keyword
4733
- return show_condition.split(/!=|=|CONTAINS/)[0];
4728
+ return showCondition.split(/!=|=|CONTAINS/)[0];
4734
4729
  }
4735
4730
  resetField(form, field) {
4736
4731
  /**
@@ -4802,8 +4797,8 @@ class FieldsPurger {
4802
4797
  }
4803
4798
  resetPage(form, wizardPage) {
4804
4799
  wizardPage.wizard_page_fields.forEach(wpf => {
4805
- const case_field = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4806
- this.resetField(form, case_field);
4800
+ const caseField = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
4801
+ this.resetField(form, caseField);
4807
4802
  });
4808
4803
  }
4809
4804
  getType(elem) {
@@ -4813,8 +4808,8 @@ class FieldsPurger {
4813
4808
  return this.getType(elem) === 'Object';
4814
4809
  }
4815
4810
  // TODO: call isReadOnly on CaseFields once we make it available
4816
- isReadonly(case_field) {
4817
- return case_field.display_context.toUpperCase() === 'READONLY';
4811
+ isReadonly(caseField) {
4812
+ return caseField.display_context.toUpperCase() === 'READONLY';
4818
4813
  }
4819
4814
  /**
4820
4815
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -4970,6 +4965,7 @@ class FieldTypeSanitiser {
4970
4965
  return;
4971
4966
  }
4972
4967
  caseFields.forEach(caseField => {
4968
+ // tslint:disable-next-line:switch-default
4973
4969
  switch (caseField.field_type.type) {
4974
4970
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
4975
4971
  this.convertArrayToDynamicListOutput(caseField, data);
@@ -5546,7 +5542,6 @@ class FormValueService {
5546
5542
  });
5547
5543
  }
5548
5544
  }
5549
- ;
5550
5545
  });
5551
5546
  }
5552
5547
  }
@@ -5960,7 +5955,7 @@ class AddressParser {
5960
5955
  return addressModel;
5961
5956
  }
5962
5957
  parseAddressLine1(classification, address) {
5963
- let addressLine = '';
5958
+ let addressLine;
5964
5959
  if (classification === AddressType.RD06) {
5965
5960
  addressLine =
5966
5961
  `${address.SUB_BUILDING_NAME} ${address.ORGANISATION_NAME} ${address.DEPARTMENT_NAME} ${address.PO_BOX_NUMBER}`;
@@ -5973,7 +5968,7 @@ class AddressParser {
5973
5968
  return this.removeNonAddressValues(addressLine);
5974
5969
  }
5975
5970
  parseAddressLine2(classification, address) {
5976
- let addressLine = '';
5971
+ let addressLine;
5977
5972
  if (classification === AddressType.RD06) {
5978
5973
  addressLine = `${address.BUILDING_NAME} `;
5979
5974
  }
@@ -5984,7 +5979,7 @@ class AddressParser {
5984
5979
  return this.removeNonAddressValues(addressLine);
5985
5980
  }
5986
5981
  parseAddressLine3(classification, address) {
5987
- let addressLine = '';
5982
+ let addressLine;
5988
5983
  if (classification === AddressType.RD06) {
5989
5984
  addressLine =
5990
5985
  `${address.BUILDING_NUMBER} ${address.THOROUGHFARE_NAME}`;
@@ -6012,7 +6007,7 @@ class AddressParser {
6012
6007
  return value.replace(new RegExp('^,', 'gi'), '');
6013
6008
  }
6014
6009
  prefixWithCommaIfPresent(value) {
6015
- return value ? ', ' + value : value;
6010
+ return value ? `, ${value}` : value;
6016
6011
  }
6017
6012
  }
6018
6013
 
@@ -6121,7 +6116,7 @@ class CaseFlagRefdataService {
6121
6116
  if (flagType) {
6122
6117
  url += `?flag-type=${flagType}`;
6123
6118
  }
6124
- if (welshRequired != null) {
6119
+ if (typeof welshRequired === 'boolean') {
6125
6120
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
6126
6121
  url.indexOf('?') > -1 ? url += '&' : url += '?';
6127
6122
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -6578,11 +6573,6 @@ RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBu
6578
6573
  type: Injectable
6579
6574
  }], null, null); })();
6580
6575
 
6581
- class HasLoadingState {
6582
- get isLoading() {
6583
- return;
6584
- }
6585
- }
6586
6576
  class LoadingService {
6587
6577
  constructor() {
6588
6578
  this.registered = new Map();
@@ -6603,7 +6593,7 @@ class LoadingService {
6603
6593
  }
6604
6594
  generateToken() {
6605
6595
  const timestamp = window.performance.now();
6606
- return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
6596
+ return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
6607
6597
  }
6608
6598
  }
6609
6599
  LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
@@ -6620,10 +6610,7 @@ class SearchService {
6620
6610
  this.loadingService = loadingService;
6621
6611
  }
6622
6612
  search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
6623
- const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
6624
- + `/jurisdictions/${jurisdictionId}`
6625
- + `/case-types/${caseTypeId}`
6626
- + `/cases`;
6613
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases`;
6627
6614
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6628
6615
  const loadingToken = this.loadingService.register();
6629
6616
  return this.httpService
@@ -6631,14 +6618,13 @@ class SearchService {
6631
6618
  .pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
6632
6619
  }
6633
6620
  searchCasesByIds(caseTypeId, filter, view, sort) {
6634
- const url = this.appConfig.getCaseDataUrl() +
6635
- `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6621
+ const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6636
6622
  const body = Object.assign(Object.assign({ sort }, filter), { size: this.appConfig.getPaginationPageSize() });
6637
6623
  const loadingToken = this.loadingService.register();
6638
6624
  return this.httpService.post(url, body).pipe(map((response) => response), finalize(() => this.loadingService.unregister(loadingToken)));
6639
6625
  }
6640
6626
  searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
6641
- const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6627
+ const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
6642
6628
  const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
6643
6629
  const body = {
6644
6630
  sort,
@@ -6681,9 +6667,8 @@ class SearchService {
6681
6667
  }
6682
6668
  }
6683
6669
  SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
6684
- SearchService.VIEW_SEARCH = 'SEARCH';
6670
+ // public static readonly VIEW_SEARCH = 'SEARCH';
6685
6671
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
6686
- SearchService.FIELD_PREFIX = 'case.';
6687
6672
  SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
6688
6673
  SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
6689
6674
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
@@ -6797,17 +6782,12 @@ class DefinitionsService {
6797
6782
  this.appConfig = appConfig;
6798
6783
  }
6799
6784
  getCaseTypes(jurisdictionId, access) {
6800
- const url = this.appConfig.getApiUrl()
6801
- + `/caseworkers/:uid`
6802
- + `/jurisdictions/${jurisdictionId}`
6803
- + `/case-types?access=${access}`;
6785
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types?access=${access}`;
6804
6786
  return this.http
6805
6787
  .get(url).pipe(map(response => response));
6806
6788
  }
6807
6789
  getJurisdictions(access) {
6808
- const url = this.appConfig.getApiUrl()
6809
- + `/caseworkers/:uid`
6810
- + `/jurisdictions?access=${access}`;
6790
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions?access=${access}`;
6811
6791
  return this.http
6812
6792
  .get(url)
6813
6793
  .pipe(map(response => response));
@@ -6879,8 +6859,8 @@ class SearchResultViewItemComparatorFactory {
6879
6859
  compare(a, b) {
6880
6860
  let fieldA = a.case_fields[fieldId];
6881
6861
  let fieldB = b.case_fields[fieldId];
6882
- fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
6883
- fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
6862
+ fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
6863
+ fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
6884
6864
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6885
6865
  }
6886
6866
  };
@@ -6890,8 +6870,8 @@ class SearchResultViewItemComparatorFactory {
6890
6870
  compare(a, b) {
6891
6871
  let fieldA = a.case_fields[fieldId];
6892
6872
  let fieldB = b.case_fields[fieldId];
6893
- fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
6894
- fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
6873
+ fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
6874
+ fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
6895
6875
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
6896
6876
  }
6897
6877
  };
@@ -7120,31 +7100,31 @@ class WizardPageFieldToCaseFieldMapper {
7120
7100
  }
7121
7101
  processComplexFieldOverride(override, caseField, caseFields) {
7122
7102
  const caseFieldIds = override.complex_field_element_id.split('.');
7123
- let case_field_leaf;
7103
+ let caseFieldLeaf;
7124
7104
  const children = this.getCaseFieldChildren(caseField);
7125
7105
  if (children.length > 0) {
7126
7106
  const [_, ...tail] = caseFieldIds;
7127
- case_field_leaf = this.getCaseFieldLeaf(tail, children);
7107
+ caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
7128
7108
  }
7129
7109
  else {
7130
- case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7110
+ caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
7131
7111
  }
7132
7112
  if (override.display_context !== 'HIDDEN') {
7133
- case_field_leaf.hidden = false;
7134
- case_field_leaf.display_context = override.display_context;
7113
+ caseFieldLeaf.hidden = false;
7114
+ caseFieldLeaf.display_context = override.display_context;
7135
7115
  if (override.label && override.label.length > 0) {
7136
- case_field_leaf.label = override.label;
7116
+ caseFieldLeaf.label = override.label;
7137
7117
  }
7138
7118
  if (override.hint_text && override.hint_text.length > 0) {
7139
- case_field_leaf.hint_text = override.hint_text;
7119
+ caseFieldLeaf.hint_text = override.hint_text;
7140
7120
  }
7141
7121
  if (override.show_condition && override.show_condition.length > 0) {
7142
- case_field_leaf.show_condition = override.show_condition;
7122
+ caseFieldLeaf.show_condition = override.show_condition;
7143
7123
  }
7144
7124
  }
7145
7125
  else {
7146
- case_field_leaf.hidden = true;
7147
- case_field_leaf.display_context = override.display_context;
7126
+ caseFieldLeaf.hidden = true;
7127
+ caseFieldLeaf.display_context = override.display_context;
7148
7128
  }
7149
7129
  }
7150
7130
  fixShowConditionPath(caseField, pathPrefix) {
@@ -7157,7 +7137,7 @@ class WizardPageFieldToCaseFieldMapper {
7157
7137
  });
7158
7138
  }
7159
7139
  preparePathPrefix(pathPrefix, caseField) {
7160
- return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
7140
+ return pathPrefix.length === 0 ? caseField : `${pathPrefix}.${caseField}`;
7161
7141
  }
7162
7142
  getCaseFieldLeaf(caseFieldId, caseFields) {
7163
7143
  const [head, ...tail] = caseFieldId;
@@ -7210,215 +7190,13 @@ WizardPageFieldToCaseFieldMapper.ɵprov = i0.ɵɵdefineInjectable({ token: Wizar
7210
7190
  }]
7211
7191
  }], null, null); })();
7212
7192
 
7213
- const MULTIPLE_TASKS_FOUND = 'More than one task found!';
7214
- class WorkAllocationService {
7215
- constructor(http, appConfig, errorService, alertService, sessionStorageService) {
7216
- this.http = http;
7217
- this.appConfig = appConfig;
7218
- this.errorService = errorService;
7219
- this.alertService = alertService;
7220
- this.sessionStorageService = sessionStorageService;
7221
- // Check to see if work allocation is enabled
7222
- }
7223
- /**
7224
- * Call the API to get tasks matching the search criteria.
7225
- * @param searchRequest The search parameters that specify which tasks to match.
7226
- */
7227
- searchTasks(searchRequest) {
7228
- // Do not need to check if WA enabled as parent method will do that
7229
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/searchForCompletable`;
7230
- return this.http
7231
- .post(url, { searchRequest }, null, false)
7232
- .pipe(map(response => response), catchError(error => {
7233
- this.errorService.setError(error);
7234
- // explicitly eat away 401 error and 400 error
7235
- if (error && error.status && (error.status === 401 || error.status === 400)) {
7236
- // do nothing
7237
- console.log('error status 401 or 400', error);
7238
- }
7239
- else {
7240
- return throwError(error);
7241
- }
7242
- }));
7243
- }
7244
- isWAEnabled(jurisdiction, caseType) {
7245
- this.features = this.appConfig.getWAServiceConfig();
7246
- let enabled = false;
7247
- if (!jurisdiction || !caseType) {
7248
- const caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
7249
- jurisdiction = caseInfo.jurisdiction;
7250
- caseType = caseInfo.caseType;
7251
- }
7252
- if (!this.features || !this.features.configurations) {
7253
- return false;
7254
- }
7255
- this.features.configurations.forEach(serviceConfig => {
7256
- if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
7257
- enabled = true;
7258
- }
7259
- });
7260
- return enabled;
7261
- }
7262
- /**
7263
- * Call the API to assign a task.
7264
- * @param taskId specifies which task should be assigned.
7265
- * @param userId specifies the user the task should be assigned to.
7266
- */
7267
- assignTask(taskId, userId) {
7268
- if (!this.isWAEnabled()) {
7269
- return of(null);
7270
- }
7271
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/assign`;
7272
- return this.http
7273
- .post(url, { userId })
7274
- .pipe(catchError(error => {
7275
- this.errorService.setError(error);
7276
- return throwError(error);
7277
- }));
7278
- }
7279
- /**
7280
- * Call the API to complete a task.
7281
- * @param taskId specifies which task should be completed.
7282
- */
7283
- completeTask(taskId) {
7284
- if (!this.isWAEnabled()) {
7285
- return of(null);
7286
- }
7287
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
7288
- return this.http
7289
- .post(url, {})
7290
- .pipe(catchError(error => {
7291
- this.errorService.setError(error);
7292
- // this will subscribe to get the user details and decide whether to display an error message
7293
- this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
7294
- this.handleTaskCompletionError(response);
7295
- });
7296
- return throwError(error);
7297
- }));
7298
- }
7299
- /**
7300
- * Call the API to assign and complete a task.
7301
- * @param taskId specifies which task should be completed.
7302
- */
7303
- assignAndCompleteTask(taskId) {
7304
- if (!this.isWAEnabled()) {
7305
- return of(null);
7306
- }
7307
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
7308
- return this.http
7309
- .post(url, {
7310
- completion_options: {
7311
- assign_and_complete: true
7312
- }
7313
- })
7314
- .pipe(catchError(error => {
7315
- this.errorService.setError(error);
7316
- // this will subscribe to get the user details and decide whether to display an error message
7317
- this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
7318
- this.handleTaskCompletionError(response);
7319
- });
7320
- return throwError(error);
7321
- }));
7322
- }
7323
- /**
7324
- * Handles the response from the observable to get the user details when task is completed.
7325
- * @param response is the response given from the observable which contains the user detaild.
7326
- */
7327
- handleTaskCompletionError(response) {
7328
- const userDetails = response;
7329
- if (this.userIsCaseworker(userDetails.userInfo.roles)) {
7330
- // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
7331
- this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
7332
- this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
7333
- }
7334
- }
7335
- /**
7336
- * Returns true if the user's role is equivalent to a caseworker.
7337
- * @param roles is the list of roles found from the current user.
7338
- */
7339
- userIsCaseworker(roles) {
7340
- const lowerCaseRoles = roles.map(role => role.toLowerCase());
7341
- // When/if lib & target permanently change to es2016, replace indexOf with includes
7342
- return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
7343
- || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
7344
- }
7345
- /**
7346
- * Look for open tasks for a case and event combination. There are 5 possible scenarios:
7347
- * 1. No tasks found => Success.
7348
- * 2. One task found => Mark as done => Success.
7349
- * 3. One task found => Mark as done throws error => Failure.
7350
- * 4. More than one task found => Failure.
7351
- * 5. Search call throws an error => Failure.
7352
- * @param ccdId The ID of the case to find tasks for.
7353
- * @param eventId The ID of the event to find tasks for.
7354
- */
7355
- completeAppropriateTask(ccdId, eventId, jurisdiction, caseTypeId) {
7356
- if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
7357
- return of(null);
7358
- }
7359
- const taskSearchParameter = {
7360
- ccdId,
7361
- eventId,
7362
- jurisdiction,
7363
- caseTypeId
7364
- };
7365
- return this.searchTasks(taskSearchParameter)
7366
- .pipe(map((response) => {
7367
- const tasks = response.tasks;
7368
- if (tasks && tasks.length > 0) {
7369
- if (tasks.length === 1) {
7370
- this.completeTask(tasks[0].id).subscribe();
7371
- }
7372
- else {
7373
- // This is a problem. Throw an appropriate error.
7374
- throw new Error(MULTIPLE_TASKS_FOUND);
7375
- }
7376
- }
7377
- return true; // All good. Nothing to see here.
7378
- }), catchError(error => {
7379
- // Simply rethrow it.
7380
- return throwError(error);
7381
- }));
7382
- }
7383
- /**
7384
- * Return tasks for case and event.
7385
- */
7386
- getTasksByCaseIdAndEventId(eventId, caseId, caseType, jurisdiction) {
7387
- const defaultPayload = {
7388
- task_required_for_event: false,
7389
- tasks: []
7390
- };
7391
- if (!this.isWAEnabled()) {
7392
- return of(defaultPayload);
7393
- }
7394
- return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/case/tasks/${caseId}/event/${eventId}/caseType/${caseType}/jurisdiction/${jurisdiction}`);
7395
- }
7396
- /**
7397
- * Call the API to get a task
7398
- */
7399
- getTask(taskId) {
7400
- if (!this.isWAEnabled()) {
7401
- return of({ task: null });
7402
- }
7403
- return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}`);
7404
- }
7405
- }
7406
- WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
7407
- WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
7408
- WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(AlertService), i0.ɵɵinject(SessionStorageService)); };
7409
- WorkAllocationService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
7410
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkAllocationService, [{
7411
- type: Injectable
7412
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null); })();
7413
-
7414
7193
  class CasesService {
7415
- constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
7194
+ constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
7416
7195
  this.http = http;
7417
7196
  this.appConfig = appConfig;
7418
7197
  this.orderService = orderService;
7419
7198
  this.errorService = errorService;
7420
7199
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
7421
- this.workAllocationService = workAllocationService;
7422
7200
  this.loadingService = loadingService;
7423
7201
  this.sessionStorageService = sessionStorageService;
7424
7202
  this.get = this.getCaseView;
@@ -7436,11 +7214,7 @@ class CasesService {
7436
7214
  });
7437
7215
  }
7438
7216
  getCaseView(jurisdictionId, caseTypeId, caseId) {
7439
- const url = this.appConfig.getApiUrl()
7440
- + `/caseworkers/:uid`
7441
- + `/jurisdictions/${jurisdictionId}`
7442
- + `/case-types/${caseTypeId}`
7443
- + `/cases/${caseId}`;
7217
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
7444
7218
  const loadingToken = this.loadingService.register();
7445
7219
  return this.http
7446
7220
  .get(url)
@@ -7489,7 +7263,7 @@ class CasesService {
7489
7263
  }
7490
7264
  createEvent(caseDetails, eventData) {
7491
7265
  const caseId = caseDetails.case_id;
7492
- const url = this.appConfig.getCaseDataUrl() + `/cases/${caseId}/events`;
7266
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
7493
7267
  const headers = new HttpHeaders()
7494
7268
  .set('experimental', 'true')
7495
7269
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -7502,9 +7276,8 @@ class CasesService {
7502
7276
  }));
7503
7277
  }
7504
7278
  validateCase(ctid, eventData, pageId) {
7505
- const pageIdString = pageId ? '?pageId=' + pageId : '';
7506
- const url = this.appConfig.getCaseDataUrl()
7507
- + `/case-types/${ctid}/validate${pageIdString}`;
7279
+ const pageIdString = pageId ? `?pageId=${pageId}` : '';
7280
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
7508
7281
  const headers = new HttpHeaders()
7509
7282
  .set('experimental', 'true')
7510
7283
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -7521,8 +7294,7 @@ class CasesService {
7521
7294
  if (eventData.ignore_warning) {
7522
7295
  ignoreWarning = 'true';
7523
7296
  }
7524
- const url = this.appConfig.getCaseDataUrl()
7525
- + `/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7297
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
7526
7298
  const headers = new HttpHeaders()
7527
7299
  .set('experimental', 'true')
7528
7300
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -7535,9 +7307,7 @@ class CasesService {
7535
7307
  }));
7536
7308
  }
7537
7309
  getPrintDocuments(caseId) {
7538
- const url = this.appConfig.getCaseDataUrl()
7539
- + `/cases/${caseId}`
7540
- + `/documents`;
7310
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
7541
7311
  const headers = new HttpHeaders()
7542
7312
  .set('experimental', 'true')
7543
7313
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -7550,7 +7320,7 @@ class CasesService {
7550
7320
  }));
7551
7321
  }
7552
7322
  buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
7553
- let url = this.appConfig.getCaseDataUrl() + `/internal`;
7323
+ let url = `${this.appConfig.getCaseDataUrl()}/internal`;
7554
7324
  if (Draft.isDraft(caseId)) {
7555
7325
  url += `/drafts/${caseId}`
7556
7326
  + `/event-trigger`
@@ -7644,11 +7414,11 @@ CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd
7644
7414
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
7645
7415
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
7646
7416
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
7647
- CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService)); };
7417
+ CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService)); };
7648
7418
  CasesService.ɵprov = i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
7649
7419
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
7650
7420
  type: Injectable
7651
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7421
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
7652
7422
 
7653
7423
  class EventTriggerService {
7654
7424
  constructor() {
@@ -8250,7 +8020,7 @@ class PageValidationService {
8250
8020
  isHidden(caseField, editForm, path) {
8251
8021
  const formFields = editForm.getRawValue();
8252
8022
  const condition = ShowCondition.getInstance(caseField.show_condition);
8253
- if (path && path.indexOf('_' + caseField.id + '_') === -1) {
8023
+ if (path && path.indexOf(`_${caseField.id}_`) === -1) {
8254
8024
  path = `${path}${caseField.id}`;
8255
8025
  }
8256
8026
  return !condition.match(formFields.data, path);
@@ -8279,32 +8049,234 @@ PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationSe
8279
8049
  type: Injectable
8280
8050
  }], function () { return [{ type: CaseFieldService }]; }, null); })();
8281
8051
 
8282
- class CaseEditComponent {
8283
- constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService) {
8284
- this.fb = fb;
8285
- this.caseNotifier = caseNotifier;
8286
- this.router = router;
8287
- this.route = route;
8288
- this.fieldsUtils = fieldsUtils;
8289
- this.fieldsPurger = fieldsPurger;
8290
- this.registrarService = registrarService;
8291
- this.wizardFactory = wizardFactory;
8052
+ const MULTIPLE_TASKS_FOUND = 'More than one task found!';
8053
+ class WorkAllocationService {
8054
+ constructor(http, appConfig, errorService, alertService, sessionStorageService) {
8055
+ this.http = http;
8056
+ this.appConfig = appConfig;
8057
+ this.errorService = errorService;
8058
+ this.alertService = alertService;
8292
8059
  this.sessionStorageService = sessionStorageService;
8293
- this.windowsService = windowsService;
8294
- this.formValueService = formValueService;
8295
- this.formErrorService = formErrorService;
8296
- this.cancelled = new EventEmitter();
8297
- this.submitted = new EventEmitter();
8298
- this.isEventCompletionChecksRequired = false;
8299
- this.isCaseFlagSubmission = false;
8300
- this.ignoreWarning = false;
8301
- this.isLinkedCasesSubmission = false;
8302
- this.callbackErrorsSubject = new Subject();
8060
+ // Check to see if work allocation is enabled
8303
8061
  }
8304
- ngOnInit() {
8305
- this.wizard = this.wizardFactory.create(this.eventTrigger);
8306
- this.initialUrl = this.sessionStorageService.getItem('eventUrl');
8307
- this.isPageRefreshed = JSON.parse(this.sessionStorageService.getItem('isPageRefreshed'));
8062
+ /**
8063
+ * Call the API to get tasks matching the search criteria.
8064
+ * @param searchRequest The search parameters that specify which tasks to match.
8065
+ */
8066
+ searchTasks(searchRequest) {
8067
+ // Do not need to check if WA enabled as parent method will do that
8068
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/searchForCompletable`;
8069
+ return this.http
8070
+ .post(url, { searchRequest }, null, false)
8071
+ .pipe(map(response => response), catchError(error => {
8072
+ this.errorService.setError(error);
8073
+ // explicitly eat away 401 error and 400 error
8074
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
8075
+ // do nothing
8076
+ console.log('error status 401 or 400', error);
8077
+ }
8078
+ else {
8079
+ return throwError(error);
8080
+ }
8081
+ }));
8082
+ }
8083
+ isWAEnabled(jurisdiction, caseType) {
8084
+ this.features = this.appConfig.getWAServiceConfig();
8085
+ let enabled = false;
8086
+ if (!jurisdiction || !caseType) {
8087
+ const caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
8088
+ jurisdiction = caseInfo.jurisdiction;
8089
+ caseType = caseInfo.caseType;
8090
+ }
8091
+ if (!this.features || !this.features.configurations) {
8092
+ return false;
8093
+ }
8094
+ this.features.configurations.forEach(serviceConfig => {
8095
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
8096
+ enabled = true;
8097
+ }
8098
+ });
8099
+ return enabled;
8100
+ }
8101
+ /**
8102
+ * Call the API to assign a task.
8103
+ * @param taskId specifies which task should be assigned.
8104
+ * @param userId specifies the user the task should be assigned to.
8105
+ */
8106
+ assignTask(taskId, userId) {
8107
+ if (!this.isWAEnabled()) {
8108
+ return of(null);
8109
+ }
8110
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/assign`;
8111
+ return this.http
8112
+ .post(url, { userId })
8113
+ .pipe(catchError(error => {
8114
+ this.errorService.setError(error);
8115
+ return throwError(error);
8116
+ }));
8117
+ }
8118
+ /**
8119
+ * Call the API to complete a task.
8120
+ * @param taskId specifies which task should be completed.
8121
+ */
8122
+ completeTask(taskId) {
8123
+ if (!this.isWAEnabled()) {
8124
+ return of(null);
8125
+ }
8126
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
8127
+ return this.http
8128
+ .post(url, {})
8129
+ .pipe(catchError(error => {
8130
+ this.errorService.setError(error);
8131
+ // this will subscribe to get the user details and decide whether to display an error message
8132
+ this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
8133
+ this.handleTaskCompletionError(response);
8134
+ });
8135
+ return throwError(error);
8136
+ }));
8137
+ }
8138
+ /**
8139
+ * Call the API to assign and complete a task.
8140
+ * @param taskId specifies which task should be completed.
8141
+ */
8142
+ assignAndCompleteTask(taskId) {
8143
+ if (!this.isWAEnabled()) {
8144
+ return of(null);
8145
+ }
8146
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
8147
+ return this.http
8148
+ .post(url, {
8149
+ completion_options: {
8150
+ assign_and_complete: true
8151
+ }
8152
+ })
8153
+ .pipe(catchError(error => {
8154
+ this.errorService.setError(error);
8155
+ // this will subscribe to get the user details and decide whether to display an error message
8156
+ this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
8157
+ this.handleTaskCompletionError(response);
8158
+ });
8159
+ return throwError(error);
8160
+ }));
8161
+ }
8162
+ /**
8163
+ * Handles the response from the observable to get the user details when task is completed.
8164
+ * @param response is the response given from the observable which contains the user detaild.
8165
+ */
8166
+ handleTaskCompletionError(response) {
8167
+ const userDetails = response;
8168
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
8169
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
8170
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
8171
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
8172
+ }
8173
+ }
8174
+ /**
8175
+ * Returns true if the user's role is equivalent to a caseworker.
8176
+ * @param roles is the list of roles found from the current user.
8177
+ */
8178
+ userIsCaseworker(roles) {
8179
+ const lowerCaseRoles = roles.map(role => role.toLowerCase());
8180
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
8181
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
8182
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
8183
+ }
8184
+ /**
8185
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
8186
+ * 1. No tasks found => Success.
8187
+ * 2. One task found => Mark as done => Success.
8188
+ * 3. One task found => Mark as done throws error => Failure.
8189
+ * 4. More than one task found => Failure.
8190
+ * 5. Search call throws an error => Failure.
8191
+ * @param ccdId The ID of the case to find tasks for.
8192
+ * @param eventId The ID of the event to find tasks for.
8193
+ */
8194
+ completeAppropriateTask(ccdId, eventId, jurisdiction, caseTypeId) {
8195
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
8196
+ return of(null);
8197
+ }
8198
+ const taskSearchParameter = {
8199
+ ccdId,
8200
+ eventId,
8201
+ jurisdiction,
8202
+ caseTypeId
8203
+ };
8204
+ return this.searchTasks(taskSearchParameter)
8205
+ .pipe(map((response) => {
8206
+ const tasks = response.tasks;
8207
+ if (tasks && tasks.length > 0) {
8208
+ if (tasks.length === 1) {
8209
+ this.completeTask(tasks[0].id).subscribe();
8210
+ }
8211
+ else {
8212
+ // This is a problem. Throw an appropriate error.
8213
+ throw new Error(MULTIPLE_TASKS_FOUND);
8214
+ }
8215
+ }
8216
+ return true; // All good. Nothing to see here.
8217
+ }), catchError(error => {
8218
+ // Simply rethrow it.
8219
+ return throwError(error);
8220
+ }));
8221
+ }
8222
+ /**
8223
+ * Return tasks for case and event.
8224
+ */
8225
+ getTasksByCaseIdAndEventId(eventId, caseId, caseType, jurisdiction) {
8226
+ const defaultPayload = {
8227
+ task_required_for_event: false,
8228
+ tasks: []
8229
+ };
8230
+ if (!this.isWAEnabled()) {
8231
+ return of(defaultPayload);
8232
+ }
8233
+ return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/case/tasks/${caseId}/event/${eventId}/caseType/${caseType}/jurisdiction/${jurisdiction}`);
8234
+ }
8235
+ /**
8236
+ * Call the API to get a task
8237
+ */
8238
+ getTask(taskId) {
8239
+ if (!this.isWAEnabled()) {
8240
+ return of({ task: null });
8241
+ }
8242
+ return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}`);
8243
+ }
8244
+ }
8245
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
8246
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
8247
+ 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)); };
8248
+ WorkAllocationService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
8249
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkAllocationService, [{
8250
+ type: Injectable
8251
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null); })();
8252
+
8253
+ class CaseEditComponent {
8254
+ constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService) {
8255
+ this.fb = fb;
8256
+ this.caseNotifier = caseNotifier;
8257
+ this.router = router;
8258
+ this.route = route;
8259
+ this.fieldsUtils = fieldsUtils;
8260
+ this.fieldsPurger = fieldsPurger;
8261
+ this.registrarService = registrarService;
8262
+ this.wizardFactory = wizardFactory;
8263
+ this.sessionStorageService = sessionStorageService;
8264
+ this.windowsService = windowsService;
8265
+ this.formValueService = formValueService;
8266
+ this.formErrorService = formErrorService;
8267
+ this.loadingService = loadingService;
8268
+ this.cancelled = new EventEmitter();
8269
+ this.submitted = new EventEmitter();
8270
+ this.isEventCompletionChecksRequired = false;
8271
+ this.isCaseFlagSubmission = false;
8272
+ this.ignoreWarning = false;
8273
+ this.isLinkedCasesSubmission = false;
8274
+ this.callbackErrorsSubject = new Subject();
8275
+ }
8276
+ ngOnInit() {
8277
+ this.wizard = this.wizardFactory.create(this.eventTrigger);
8278
+ this.initialUrl = this.sessionStorageService.getItem('eventUrl');
8279
+ this.isPageRefreshed = JSON.parse(this.sessionStorageService.getItem('isPageRefreshed'));
8308
8280
  this.checkPageRefresh();
8309
8281
  /* istanbul ignore else */
8310
8282
  if (this.router.url && !this.isPageRefreshed) {
@@ -8362,7 +8334,7 @@ class CaseEditComponent {
8362
8334
  form: this.form,
8363
8335
  });
8364
8336
  /* istanbul ignore else */
8365
- if (!nextPage && !this.eventTrigger.show_summary) {
8337
+ if (!nextPage && !this.eventTrigger.show_summary && !this.eventTrigger.show_event_notes) {
8366
8338
  this.submitForm({
8367
8339
  eventTrigger: this.eventTrigger,
8368
8340
  form: this.form,
@@ -8430,7 +8402,8 @@ class CaseEditComponent {
8430
8402
  });
8431
8403
  this.caseSubmit({ form,
8432
8404
  caseEventData,
8433
- submit });
8405
+ submit
8406
+ });
8434
8407
  }
8435
8408
  }
8436
8409
  getCaseId(caseDetails) {
@@ -8568,13 +8541,18 @@ class CaseEditComponent {
8568
8541
  return rawFormValueData;
8569
8542
  }
8570
8543
  caseSubmit({ form, caseEventData, submit }) {
8544
+ const loadingSpinnerToken = this.loadingService.register();
8571
8545
  submit(caseEventData)
8546
+ .pipe(finalize(() => {
8547
+ this.loadingService.unregister(loadingSpinnerToken);
8548
+ }))
8572
8549
  .subscribe(response => {
8573
8550
  this.caseNotifier.cachedCaseView = null;
8574
8551
  this.sessionStorageService.removeItem('eventUrl');
8575
8552
  const confirmation = this.buildConfirmation(response);
8576
8553
  if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
8577
- this.confirm(confirmation);
8554
+ // Add finally to fix sonar bug
8555
+ this.confirm(confirmation).finally();
8578
8556
  }
8579
8557
  else {
8580
8558
  this.emitSubmitted(response);
@@ -8618,7 +8596,7 @@ class CaseEditComponent {
8618
8596
  }
8619
8597
  CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
8620
8598
  CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
8621
- CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService)); };
8599
+ CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService)); };
8622
8600
  CaseEditComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
8623
8601
  i0.ɵɵelement(0, "router-outlet");
8624
8602
  } }, directives: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:1px solid #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:0}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
@@ -8630,7 +8608,7 @@ CaseEditComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditComponent, sele
8630
8608
  styleUrls: ['../case-edit.scss'],
8631
8609
  providers: [GreyBarService]
8632
8610
  }]
8633
- }], function () { return [{ type: i2.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }]; }, { eventTrigger: [{
8611
+ }], function () { return [{ type: i2.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }]; }, { eventTrigger: [{
8634
8612
  type: Input
8635
8613
  }], submit: [{
8636
8614
  type: Input
@@ -8901,14 +8879,14 @@ class CaseEditDataService {
8901
8879
  this.title$ = new BehaviorSubject(null);
8902
8880
  this.formValidationErrors$ = new BehaviorSubject([]);
8903
8881
  this.editForm$ = new BehaviorSubject(null);
8904
- this.linkError$ = new BehaviorSubject(null);
8882
+ this.isLinkedCasesJourneyAtFinalStep$ = new BehaviorSubject(null);
8905
8883
  this.eventTriggerName$ = new BehaviorSubject(null);
8906
8884
  this.triggerSubmitEvent$ = new BehaviorSubject(null);
8907
8885
  this.caseDetails$ = this.details$.asObservable();
8908
8886
  this.caseTitle$ = this.title$.asObservable();
8909
8887
  this.caseEditForm$ = this.editForm$.asObservable();
8910
8888
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
8911
- this.caseLinkError$ = this.linkError$.asObservable();
8889
+ this.caseIsLinkedCasesJourneyAtFinalStep$ = this.isLinkedCasesJourneyAtFinalStep$.asObservable();
8912
8890
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
8913
8891
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
8914
8892
  }
@@ -8921,9 +8899,6 @@ class CaseEditDataService {
8921
8899
  setCaseEventTriggerName(triggerName) {
8922
8900
  this.eventTriggerName$.next(triggerName);
8923
8901
  }
8924
- setCaseLinkError(error) {
8925
- this.linkError$.next(error);
8926
- }
8927
8902
  setFormValidationErrors(validationErrors) {
8928
8903
  this.formValidationErrors$.next(validationErrors);
8929
8904
  }
@@ -8933,8 +8908,8 @@ class CaseEditDataService {
8933
8908
  clearFormValidationErrors() {
8934
8909
  this.formValidationErrors$.next([]);
8935
8910
  }
8936
- clearCaseLinkError() {
8937
- this.linkError$.next(null);
8911
+ setLinkedCasesJourneyAtFinalStep(isAtFinalStep) {
8912
+ this.isLinkedCasesJourneyAtFinalStep$.next(isAtFinalStep);
8938
8913
  }
8939
8914
  addFormValidationError(validationError) {
8940
8915
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
@@ -9032,19 +9007,16 @@ function initDialog() {
9032
9007
  return dialogConfig;
9033
9008
  }
9034
9009
 
9035
- function CaseEditPageComponent_ccd_loading_spinner_0_Template(rf, ctx) { if (rf & 1) {
9036
- i0.ɵɵelement(0, "ccd-loading-spinner");
9037
- } }
9038
- function CaseEditPageComponent_ng_container_1_h1_1_Template(rf, ctx) { if (rf & 1) {
9010
+ function CaseEditPageComponent_ng_container_0_h1_1_Template(rf, ctx) { if (rf & 1) {
9039
9011
  i0.ɵɵelementStart(0, "h1", 11);
9040
9012
  i0.ɵɵtext(1);
9041
9013
  i0.ɵɵelementEnd();
9042
9014
  } if (rf & 2) {
9043
- const ctx_r10 = i0.ɵɵnextContext(2);
9015
+ const ctx_r9 = i0.ɵɵnextContext(2);
9044
9016
  i0.ɵɵadvance(1);
9045
- i0.ɵɵtextInterpolate(ctx_r10.eventTrigger.name);
9017
+ i0.ɵɵtextInterpolate(ctx_r9.eventTrigger.name);
9046
9018
  } }
9047
- function CaseEditPageComponent_ng_container_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
9019
+ function CaseEditPageComponent_ng_container_0_ng_container_2_Template(rf, ctx) { if (rf & 1) {
9048
9020
  i0.ɵɵelementContainerStart(0);
9049
9021
  i0.ɵɵelementStart(1, "span", 12);
9050
9022
  i0.ɵɵtext(2);
@@ -9054,89 +9026,89 @@ function CaseEditPageComponent_ng_container_1_ng_container_2_Template(rf, ctx) {
9054
9026
  i0.ɵɵelementEnd();
9055
9027
  i0.ɵɵelementContainerEnd();
9056
9028
  } if (rf & 2) {
9057
- const ctx_r11 = i0.ɵɵnextContext(2);
9029
+ const ctx_r10 = i0.ɵɵnextContext(2);
9058
9030
  i0.ɵɵadvance(2);
9059
- i0.ɵɵtextInterpolate(ctx_r11.eventTrigger.name);
9031
+ i0.ɵɵtextInterpolate(ctx_r10.eventTrigger.name);
9060
9032
  i0.ɵɵadvance(2);
9061
- i0.ɵɵtextInterpolate(ctx_r11.currentPage.label);
9033
+ i0.ɵɵtextInterpolate(ctx_r10.currentPage.label);
9062
9034
  } }
9063
- function CaseEditPageComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
9035
+ function CaseEditPageComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
9064
9036
  i0.ɵɵelementContainerStart(0);
9065
- i0.ɵɵtemplate(1, CaseEditPageComponent_ng_container_1_h1_1_Template, 2, 1, "h1", 10);
9066
- i0.ɵɵtemplate(2, CaseEditPageComponent_ng_container_1_ng_container_2_Template, 5, 2, "ng-container", 0);
9037
+ i0.ɵɵtemplate(1, CaseEditPageComponent_ng_container_0_h1_1_Template, 2, 1, "h1", 10);
9038
+ i0.ɵɵtemplate(2, CaseEditPageComponent_ng_container_0_ng_container_2_Template, 5, 2, "ng-container", 0);
9067
9039
  i0.ɵɵelementContainerEnd();
9068
9040
  } if (rf & 2) {
9069
- const ctx_r1 = i0.ɵɵnextContext();
9041
+ const ctx_r0 = i0.ɵɵnextContext();
9070
9042
  i0.ɵɵadvance(1);
9071
- i0.ɵɵproperty("ngIf", !ctx_r1.currentPage.label);
9043
+ i0.ɵɵproperty("ngIf", !ctx_r0.currentPage.label);
9072
9044
  i0.ɵɵadvance(1);
9073
- i0.ɵɵproperty("ngIf", ctx_r1.currentPage.label);
9045
+ i0.ɵɵproperty("ngIf", ctx_r0.currentPage.label);
9074
9046
  } }
9075
- function CaseEditPageComponent_div_2_Template(rf, ctx) { if (rf & 1) {
9047
+ function CaseEditPageComponent_div_1_Template(rf, ctx) { if (rf & 1) {
9076
9048
  i0.ɵɵelement(0, "div");
9077
9049
  } }
9078
- function CaseEditPageComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
9050
+ function CaseEditPageComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
9079
9051
  i0.ɵɵelement(0, "ccd-markdown", 13);
9080
9052
  i0.ɵɵpipe(1, "ccdCaseTitle");
9081
9053
  } if (rf & 2) {
9082
- const ctx_r4 = i0.ɵɵnextContext();
9083
- i0.ɵɵproperty("content", i0.ɵɵpipeBind3(1, 1, ctx_r4.getCaseTitle(), ctx_r4.caseFields, ctx_r4.editForm.controls["data"]));
9054
+ const ctx_r3 = i0.ɵɵnextContext();
9055
+ i0.ɵɵproperty("content", i0.ɵɵpipeBind3(1, 1, ctx_r3.getCaseTitle(), ctx_r3.caseFields, ctx_r3.editForm.controls["data"]));
9084
9056
  } }
9085
- function CaseEditPageComponent_ng_template_5_h2_0_Template(rf, ctx) { if (rf & 1) {
9057
+ function CaseEditPageComponent_ng_template_4_h2_0_Template(rf, ctx) { if (rf & 1) {
9086
9058
  i0.ɵɵelementStart(0, "h2", 15);
9087
9059
  i0.ɵɵtext(1);
9088
9060
  i0.ɵɵpipe(2, "ccdCaseReference");
9089
9061
  i0.ɵɵelementEnd();
9090
9062
  } if (rf & 2) {
9091
- const ctx_r12 = i0.ɵɵnextContext(2);
9063
+ const ctx_r11 = i0.ɵɵnextContext(2);
9092
9064
  i0.ɵɵadvance(1);
9093
- i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r12.getCaseId()), "");
9065
+ i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r11.getCaseId()), "");
9094
9066
  } }
9095
- function CaseEditPageComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
9096
- i0.ɵɵtemplate(0, CaseEditPageComponent_ng_template_5_h2_0_Template, 3, 3, "h2", 14);
9067
+ function CaseEditPageComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
9068
+ i0.ɵɵtemplate(0, CaseEditPageComponent_ng_template_4_h2_0_Template, 3, 3, "h2", 14);
9097
9069
  } if (rf & 2) {
9098
- const ctx_r6 = i0.ɵɵnextContext();
9099
- i0.ɵɵproperty("ngIf", ctx_r6.getCaseId());
9070
+ const ctx_r5 = i0.ɵɵnextContext();
9071
+ i0.ɵɵproperty("ngIf", ctx_r5.getCaseId());
9100
9072
  } }
9101
- function CaseEditPageComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
9102
- const _r16 = i0.ɵɵgetCurrentView();
9073
+ function CaseEditPageComponent_div_6_div_3_Template(rf, ctx) { if (rf & 1) {
9074
+ const _r15 = i0.ɵɵgetCurrentView();
9103
9075
  i0.ɵɵelementStart(0, "div", 19);
9104
9076
  i0.ɵɵelementStart(1, "ul", 20);
9105
9077
  i0.ɵɵelementStart(2, "li");
9106
9078
  i0.ɵɵelementStart(3, "a", 21);
9107
- i0.ɵɵlistener("click", function CaseEditPageComponent_div_7_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r16); const validationError_r14 = ctx.$implicit; const ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.navigateToErrorElement(validationError_r14.id); });
9079
+ i0.ɵɵlistener("click", function CaseEditPageComponent_div_6_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r15); const validationError_r13 = ctx.$implicit; const ctx_r14 = i0.ɵɵnextContext(2); return ctx_r14.navigateToErrorElement(validationError_r13.id); });
9108
9080
  i0.ɵɵtext(4);
9109
9081
  i0.ɵɵelementEnd();
9110
9082
  i0.ɵɵelementEnd();
9111
9083
  i0.ɵɵelementEnd();
9112
9084
  i0.ɵɵelementEnd();
9113
9085
  } if (rf & 2) {
9114
- const validationError_r14 = ctx.$implicit;
9086
+ const validationError_r13 = ctx.$implicit;
9115
9087
  i0.ɵɵadvance(4);
9116
- i0.ɵɵtextInterpolate(validationError_r14.message);
9088
+ i0.ɵɵtextInterpolate(validationError_r13.message);
9117
9089
  } }
9118
- function CaseEditPageComponent_div_7_Template(rf, ctx) { if (rf & 1) {
9090
+ function CaseEditPageComponent_div_6_Template(rf, ctx) { if (rf & 1) {
9119
9091
  i0.ɵɵelementStart(0, "div", 16);
9120
9092
  i0.ɵɵelementStart(1, "h2", 17);
9121
9093
  i0.ɵɵtext(2, " There is a problem ");
9122
9094
  i0.ɵɵelementEnd();
9123
- i0.ɵɵtemplate(3, CaseEditPageComponent_div_7_div_3_Template, 5, 1, "div", 18);
9095
+ i0.ɵɵtemplate(3, CaseEditPageComponent_div_6_div_3_Template, 5, 1, "div", 18);
9124
9096
  i0.ɵɵelementEnd();
9125
9097
  } if (rf & 2) {
9126
- const ctx_r7 = i0.ɵɵnextContext();
9098
+ const ctx_r6 = i0.ɵɵnextContext();
9127
9099
  i0.ɵɵadvance(3);
9128
- i0.ɵɵproperty("ngForOf", ctx_r7.validationErrors);
9100
+ i0.ɵɵproperty("ngForOf", ctx_r6.validationErrors);
9129
9101
  } }
9130
- function CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template(rf, ctx) { if (rf & 1) {
9131
- const _r20 = i0.ɵɵgetCurrentView();
9102
+ function CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template(rf, ctx) { if (rf & 1) {
9103
+ const _r19 = i0.ɵɵgetCurrentView();
9132
9104
  i0.ɵɵelementStart(0, "ccd-case-edit-form", 32);
9133
- i0.ɵɵlistener("valuesChanged", function CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template_ccd_case_edit_form_valuesChanged_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.applyValuesChanged($event); });
9105
+ i0.ɵɵlistener("valuesChanged", function CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template_ccd_case_edit_form_valuesChanged_0_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(2); return ctx_r18.applyValuesChanged($event); });
9134
9106
  i0.ɵɵelementEnd();
9135
9107
  } if (rf & 2) {
9136
- const ctx_r17 = i0.ɵɵnextContext(2);
9137
- i0.ɵɵproperty("fields", ctx_r17.currentPage.getCol1Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields)("pageChangeSubject", ctx_r17.pageChangeSubject);
9108
+ const ctx_r16 = i0.ɵɵnextContext(2);
9109
+ i0.ɵɵproperty("fields", ctx_r16.currentPage.getCol1Fields())("formGroup", ctx_r16.editForm.controls["data"])("caseFields", ctx_r16.caseFields)("pageChangeSubject", ctx_r16.pageChangeSubject);
9138
9110
  } }
9139
- function CaseEditPageComponent_form_11_div_4_Template(rf, ctx) { if (rf & 1) {
9111
+ function CaseEditPageComponent_form_10_div_4_Template(rf, ctx) { if (rf & 1) {
9140
9112
  i0.ɵɵelementStart(0, "div", 33);
9141
9113
  i0.ɵɵelementStart(1, "div", 34);
9142
9114
  i0.ɵɵelement(2, "ccd-case-edit-form", 35);
@@ -9146,24 +9118,24 @@ function CaseEditPageComponent_form_11_div_4_Template(rf, ctx) { if (rf & 1) {
9146
9118
  i0.ɵɵelementEnd();
9147
9119
  i0.ɵɵelementEnd();
9148
9120
  } if (rf & 2) {
9149
- const ctx_r18 = i0.ɵɵnextContext(2);
9121
+ const ctx_r17 = i0.ɵɵnextContext(2);
9150
9122
  i0.ɵɵadvance(2);
9151
- i0.ɵɵproperty("fields", ctx_r18.currentPage.getCol1Fields())("formGroup", ctx_r18.editForm.controls["data"])("caseFields", ctx_r18.caseFields);
9123
+ i0.ɵɵproperty("fields", ctx_r17.currentPage.getCol1Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields);
9152
9124
  i0.ɵɵadvance(2);
9153
- i0.ɵɵproperty("fields", ctx_r18.currentPage.getCol2Fields())("formGroup", ctx_r18.editForm.controls["data"])("caseFields", ctx_r18.caseFields);
9125
+ i0.ɵɵproperty("fields", ctx_r17.currentPage.getCol2Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields);
9154
9126
  } }
9155
- function CaseEditPageComponent_form_11_Template(rf, ctx) { if (rf & 1) {
9156
- const _r22 = i0.ɵɵgetCurrentView();
9127
+ function CaseEditPageComponent_form_10_Template(rf, ctx) { if (rf & 1) {
9128
+ const _r21 = i0.ɵɵgetCurrentView();
9157
9129
  i0.ɵɵelementStart(0, "form", 22);
9158
- i0.ɵɵlistener("submit", function CaseEditPageComponent_form_11_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.submit(); });
9130
+ i0.ɵɵlistener("submit", function CaseEditPageComponent_form_10_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.submit(); });
9159
9131
  i0.ɵɵelementStart(1, "fieldset", 23);
9160
9132
  i0.ɵɵelement(2, "legend", 24);
9161
- i0.ɵɵtemplate(3, CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template, 1, 4, "ccd-case-edit-form", 25);
9162
- i0.ɵɵtemplate(4, CaseEditPageComponent_form_11_div_4_Template, 5, 6, "div", 26);
9133
+ i0.ɵɵtemplate(3, CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template, 1, 4, "ccd-case-edit-form", 25);
9134
+ i0.ɵɵtemplate(4, CaseEditPageComponent_form_10_div_4_Template, 5, 6, "div", 26);
9163
9135
  i0.ɵɵelementEnd();
9164
9136
  i0.ɵɵelementStart(5, "div", 27);
9165
9137
  i0.ɵɵelementStart(6, "button", 28);
9166
- i0.ɵɵlistener("click", function CaseEditPageComponent_form_11_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r22); const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.toPreviousPage(); });
9138
+ i0.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r21); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.toPreviousPage(); });
9167
9139
  i0.ɵɵpipe(7, "async");
9168
9140
  i0.ɵɵtext(8, " Previous ");
9169
9141
  i0.ɵɵelementEnd();
@@ -9173,38 +9145,38 @@ function CaseEditPageComponent_form_11_Template(rf, ctx) { if (rf & 1) {
9173
9145
  i0.ɵɵelementEnd();
9174
9146
  i0.ɵɵelementStart(11, "p", 30);
9175
9147
  i0.ɵɵelementStart(12, "a", 31);
9176
- i0.ɵɵlistener("click", function CaseEditPageComponent_form_11_Template_a_click_12_listener() { i0.ɵɵrestoreView(_r22); const ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.cancel(); });
9148
+ i0.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_a_click_12_listener() { i0.ɵɵrestoreView(_r21); const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.cancel(); });
9177
9149
  i0.ɵɵtext(13);
9178
9150
  i0.ɵɵelementEnd();
9179
9151
  i0.ɵɵelementEnd();
9180
9152
  i0.ɵɵelementEnd();
9181
9153
  } if (rf & 2) {
9182
- const ctx_r8 = i0.ɵɵnextContext();
9183
- i0.ɵɵproperty("formGroup", ctx_r8.editForm);
9154
+ const ctx_r7 = i0.ɵɵnextContext();
9155
+ i0.ɵɵproperty("formGroup", ctx_r7.editForm);
9184
9156
  i0.ɵɵadvance(3);
9185
- i0.ɵɵproperty("ngIf", !ctx_r8.currentPage.isMultiColumn());
9157
+ i0.ɵɵproperty("ngIf", !ctx_r7.currentPage.isMultiColumn());
9186
9158
  i0.ɵɵadvance(1);
9187
- i0.ɵɵproperty("ngIf", ctx_r8.currentPage.isMultiColumn());
9159
+ i0.ɵɵproperty("ngIf", ctx_r7.currentPage.isMultiColumn());
9188
9160
  i0.ɵɵadvance(2);
9189
- i0.ɵɵproperty("disabled", !i0.ɵɵpipeBind1(7, 7, ctx_r8.hasPreviousPage$));
9161
+ i0.ɵɵproperty("disabled", !i0.ɵɵpipeBind1(7, 7, ctx_r7.hasPreviousPage$));
9190
9162
  i0.ɵɵadvance(3);
9191
- i0.ɵɵproperty("disabled", ctx_r8.submitting());
9163
+ i0.ɵɵproperty("disabled", ctx_r7.submitting());
9192
9164
  i0.ɵɵadvance(1);
9193
- i0.ɵɵtextInterpolate(ctx_r8.triggerText);
9165
+ i0.ɵɵtextInterpolate(ctx_r7.triggerText);
9194
9166
  i0.ɵɵadvance(3);
9195
- i0.ɵɵtextInterpolate(ctx_r8.getCancelText());
9167
+ i0.ɵɵtextInterpolate(ctx_r7.getCancelText());
9196
9168
  } }
9197
- function CaseEditPageComponent_ccd_case_event_completion_12_Template(rf, ctx) { if (rf & 1) {
9198
- const _r26 = i0.ɵɵgetCurrentView();
9169
+ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) { if (rf & 1) {
9170
+ const _r25 = i0.ɵɵgetCurrentView();
9199
9171
  i0.ɵɵelementStart(0, "ccd-case-event-completion", 38);
9200
- i0.ɵɵlistener("eventCanBeCompleted", function CaseEditPageComponent_ccd_case_event_completion_12_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.onEventCanBeCompleted($event); });
9172
+ i0.ɵɵlistener("eventCanBeCompleted", function CaseEditPageComponent_ccd_case_event_completion_11_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r25); const ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.onEventCanBeCompleted($event); });
9201
9173
  i0.ɵɵelementEnd();
9202
9174
  } if (rf & 2) {
9203
- const ctx_r9 = i0.ɵɵnextContext();
9204
- i0.ɵɵproperty("eventCompletionParams", ctx_r9.caseEdit.eventCompletionParams);
9175
+ const ctx_r8 = i0.ɵɵnextContext();
9176
+ i0.ɵɵproperty("eventCompletionParams", ctx_r8.caseEdit.eventCompletionParams);
9205
9177
  } }
9206
9178
  class CaseEditPageComponent {
9207
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService) {
9179
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService) {
9208
9180
  this.caseEdit = caseEdit;
9209
9181
  this.route = route;
9210
9182
  this.formValueService = formValueService;
@@ -9214,6 +9186,7 @@ class CaseEditPageComponent {
9214
9186
  this.dialog = dialog;
9215
9187
  this.caseFieldService = caseFieldService;
9216
9188
  this.caseEditDataService = caseEditDataService;
9189
+ this.loadingService = loadingService;
9217
9190
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
9218
9191
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
9219
9192
  this.formValuesChanged = false;
@@ -9258,11 +9231,15 @@ class CaseEditPageComponent {
9258
9231
  }
9259
9232
  this.hasPreviousPage$.next(this.caseEdit.hasPrevious((_b = this.currentPage) === null || _b === void 0 ? void 0 : _b.id));
9260
9233
  }
9234
+ this.triggerText = this.getTriggerText();
9261
9235
  });
9262
9236
  CaseEditPageComponent.setFocusToTop();
9263
9237
  this.caseEditDataService.caseEditForm$.subscribe({
9264
9238
  next: editForm => this.editForm = editForm
9265
9239
  });
9240
+ this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
9241
+ next: isLinkedCasesJourneyAtFinalStep => this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep
9242
+ });
9266
9243
  this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
9267
9244
  next: state => {
9268
9245
  if (state) {
@@ -9271,7 +9248,6 @@ class CaseEditPageComponent {
9271
9248
  }
9272
9249
  }
9273
9250
  });
9274
- this.triggerText = this.getTriggerText();
9275
9251
  }
9276
9252
  ngAfterViewChecked() {
9277
9253
  this.cdRef.detectChanges();
@@ -9283,7 +9259,11 @@ class CaseEditPageComponent {
9283
9259
  return this.caseEdit.first();
9284
9260
  }
9285
9261
  currentPageIsNotValid() {
9286
- return !this.pageValidationService.isPageValid(this.currentPage, this.editForm);
9262
+ return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
9263
+ (this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
9264
+ }
9265
+ isLinkedCasesJourney() {
9266
+ return FieldsUtils.containsLinkedCasesCaseField(this.currentPage.case_fields);
9287
9267
  }
9288
9268
  /**
9289
9269
  * caseEventData.event_data contains all the values from the previous pages so we set caseEventData.data = caseEventData.event_data
@@ -9309,7 +9289,7 @@ class CaseEditPageComponent {
9309
9289
  const label = casefield.label || 'Field';
9310
9290
  let id = casefield.id;
9311
9291
  if (fieldElement['component'] && fieldElement['component'].parent) {
9312
- if (fieldElement['component'].idPrefix.indexOf('_' + id + '_') === -1) {
9292
+ if (fieldElement['component'].idPrefix.indexOf(`_${id}_`) === -1) {
9313
9293
  id = `${fieldElement['component'].idPrefix}${id}`;
9314
9294
  }
9315
9295
  else {
@@ -9383,14 +9363,26 @@ class CaseEditPageComponent {
9383
9363
  submit() {
9384
9364
  this.caseEditDataService.clearFormValidationErrors();
9385
9365
  if (this.currentPageIsNotValid()) {
9386
- this.generateErrorMessage(this.currentPage.case_fields);
9366
+ // The generateErrorMessage method filters out the hidden fields.
9367
+ // The error message for LinkedCases journey will never get displayed because the
9368
+ // LinkedCases is configured with ComponentLauncher field as visible and caseLinks field as hidden.
9369
+ if (this.isLinkedCasesJourney()) {
9370
+ this.validationErrors.push({ id: 'next-button', message: 'Please select Next to go to the next page' });
9371
+ CaseEditPageComponent.scrollToTop();
9372
+ }
9373
+ else {
9374
+ this.generateErrorMessage(this.currentPage.case_fields);
9375
+ }
9387
9376
  }
9388
9377
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
9389
9378
  this.caseEdit.isSubmitting = true;
9390
9379
  this.caseEdit.error = null;
9391
9380
  const caseEventData = this.buildCaseEventData();
9392
- this.showSpinner = true;
9381
+ const loadingSpinnerToken = this.loadingService.register();
9393
9382
  this.caseEdit.validate(caseEventData, this.currentPage.id)
9383
+ .pipe(finalize(() => {
9384
+ this.loadingService.unregister(loadingSpinnerToken);
9385
+ }))
9394
9386
  .subscribe((jsonData) => {
9395
9387
  /* istanbul ignore else */
9396
9388
  if (jsonData) {
@@ -9399,7 +9391,6 @@ class CaseEditPageComponent {
9399
9391
  this.saveDraft();
9400
9392
  this.next();
9401
9393
  }, error => {
9402
- this.showSpinner = false;
9403
9394
  this.handleError(error);
9404
9395
  });
9405
9396
  CaseEditPageComponent.scrollToTop();
@@ -9462,12 +9453,11 @@ class CaseEditPageComponent {
9462
9453
  }
9463
9454
  }
9464
9455
  callbackErrorsNotify(errorContext) {
9465
- this.caseEdit.ignoreWarning = errorContext.ignore_warning;
9466
- this.triggerText = errorContext.trigger_text;
9456
+ this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
9457
+ this.triggerText = errorContext.triggerText;
9467
9458
  }
9468
9459
  next() {
9469
9460
  if (this.canNavigateToSummaryPage()) {
9470
- this.showSpinner = false;
9471
9461
  this.caseEdit.isSubmitting = false;
9472
9462
  }
9473
9463
  this.resetErrors();
@@ -9658,30 +9648,27 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
9658
9648
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
9659
9649
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
9660
9650
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
9661
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
9662
- CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 13, vars: 12, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
9663
- i0.ɵɵtemplate(0, CaseEditPageComponent_ccd_loading_spinner_0_Template, 1, 0, "ccd-loading-spinner", 0);
9664
- i0.ɵɵtemplate(1, CaseEditPageComponent_ng_container_1_Template, 3, 2, "ng-container", 0);
9665
- i0.ɵɵtemplate(2, CaseEditPageComponent_div_2_Template, 1, 0, "div", 1);
9666
- i0.ɵɵtemplate(3, CaseEditPageComponent_ng_template_3_Template, 2, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
9667
- i0.ɵɵtemplate(5, CaseEditPageComponent_ng_template_5_Template, 1, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
9668
- i0.ɵɵtemplate(7, CaseEditPageComponent_div_7_Template, 4, 1, "div", 4);
9669
- i0.ɵɵelement(8, "ccd-case-edit-generic-errors", 5);
9670
- i0.ɵɵelementStart(9, "ccd-callback-errors", 6);
9671
- i0.ɵɵlistener("callbackErrorsContext", function CaseEditPageComponent_Template_ccd_callback_errors_callbackErrorsContext_9_listener($event) { return ctx.callbackErrorsNotify($event); });
9672
- i0.ɵɵelementEnd();
9673
- i0.ɵɵelementStart(10, "div", 7);
9674
- i0.ɵɵtemplate(11, CaseEditPageComponent_form_11_Template, 14, 9, "form", 8);
9675
- i0.ɵɵelementEnd();
9676
- i0.ɵɵtemplate(12, CaseEditPageComponent_ccd_case_event_completion_12_Template, 1, 1, "ccd-case-event-completion", 9);
9651
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService)); };
9652
+ CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 12, vars: 11, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
9653
+ i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
9654
+ i0.ɵɵtemplate(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 1);
9655
+ i0.ɵɵtemplate(2, CaseEditPageComponent_ng_template_2_Template, 2, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
9656
+ i0.ɵɵtemplate(4, CaseEditPageComponent_ng_template_4_Template, 1, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
9657
+ i0.ɵɵtemplate(6, CaseEditPageComponent_div_6_Template, 4, 1, "div", 4);
9658
+ i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
9659
+ i0.ɵɵelementStart(8, "ccd-callback-errors", 6);
9660
+ i0.ɵɵlistener("callbackErrorsContext", function CaseEditPageComponent_Template_ccd_callback_errors_callbackErrorsContext_8_listener($event) { return ctx.callbackErrorsNotify($event); });
9661
+ i0.ɵɵelementEnd();
9662
+ i0.ɵɵelementStart(9, "div", 7);
9663
+ i0.ɵɵtemplate(10, CaseEditPageComponent_form_10_Template, 14, 9, "form", 8);
9664
+ i0.ɵɵelementEnd();
9665
+ i0.ɵɵtemplate(11, CaseEditPageComponent_ccd_case_event_completion_11_Template, 1, 1, "ccd-case-event-completion", 9);
9677
9666
  } if (rf & 2) {
9678
- const _r3 = i0.ɵɵreference(4);
9679
- const _r5 = i0.ɵɵreference(6);
9680
- i0.ɵɵproperty("ngIf", ctx.showSpinner);
9681
- i0.ɵɵadvance(1);
9667
+ const _r2 = i0.ɵɵreference(3);
9668
+ const _r4 = i0.ɵɵreference(5);
9682
9669
  i0.ɵɵproperty("ngIf", ctx.currentPage);
9683
9670
  i0.ɵɵadvance(1);
9684
- i0.ɵɵproperty("ngIf", ctx.getCaseTitle())("ngIfThen", _r3)("ngIfElse", _r5);
9671
+ i0.ɵɵproperty("ngIf", ctx.getCaseTitle())("ngIfThen", _r2)("ngIfElse", _r4);
9685
9672
  i0.ɵɵadvance(5);
9686
9673
  i0.ɵɵproperty("ngIf", ctx.validationErrors.length > 0);
9687
9674
  i0.ɵɵadvance(1);
@@ -9700,7 +9687,7 @@ CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageCompone
9700
9687
  templateUrl: 'case-edit-page.html',
9701
9688
  styleUrls: ['./case-edit-page.scss']
9702
9689
  }]
9703
- }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }]; }, null); })();
9690
+ }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }]; }, null); })();
9704
9691
 
9705
9692
  class CallbackErrorsContext {
9706
9693
  }
@@ -9798,12 +9785,12 @@ class CallbackErrorsComponent {
9798
9785
  buildCallbackErrorsContext() {
9799
9786
  const errorContext = new CallbackErrorsContext();
9800
9787
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
9801
- errorContext.ignore_warning = true;
9802
- errorContext.trigger_text = this.triggerTextIgnore;
9788
+ errorContext.ignoreWarning = true;
9789
+ errorContext.triggerText = this.triggerTextIgnore;
9803
9790
  }
9804
9791
  else {
9805
- errorContext.ignore_warning = false;
9806
- errorContext.trigger_text = this.triggerTextContinue;
9792
+ errorContext.ignoreWarning = false;
9793
+ errorContext.triggerText = this.triggerTextContinue;
9807
9794
  }
9808
9795
  return errorContext;
9809
9796
  }
@@ -9842,7 +9829,7 @@ CallbackErrorsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CallbackErrorsCom
9842
9829
 
9843
9830
  class AddressOption {
9844
9831
  constructor(addressModel, description) {
9845
- if (description == null) {
9832
+ if (description === null) {
9846
9833
  this.value = addressModel;
9847
9834
  this.description = this.getDescription();
9848
9835
  }
@@ -9851,13 +9838,10 @@ class AddressOption {
9851
9838
  }
9852
9839
  }
9853
9840
  getDescription() {
9854
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
9855
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
9856
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
9857
- + ', ' + this.value.PostTown);
9841
+ return this.removeInitialCommaIfPresent(`${this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1}${this.prefixWithCommaIfPresent(this.value.AddressLine2)}${this.prefixWithCommaIfPresent(this.value.AddressLine3)}, ${this.value.PostTown}`);
9858
9842
  }
9859
9843
  prefixWithCommaIfPresent(value) {
9860
- return value ? ', ' + value : value;
9844
+ return value ? `, ${value}` : value;
9861
9845
  }
9862
9846
  removeInitialCommaIfPresent(value) {
9863
9847
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -10245,7 +10229,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10245
10229
  this.missingPostcode = false;
10246
10230
  const postcode = this.postcode.value;
10247
10231
  this.caseField.value = null;
10248
- this.addressOptions = new Array();
10232
+ this.addressOptions = [];
10249
10233
  this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe(result => {
10250
10234
  result.forEach(address => {
10251
10235
  this.addressOptions.push(new AddressOption(address, null));
@@ -10288,7 +10272,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10288
10272
  let hasAddress = false;
10289
10273
  if (address) {
10290
10274
  Object.keys(address).forEach((key) => {
10291
- if (address[key] != null) {
10275
+ if (address[key] !== null) {
10292
10276
  hasAddress = true;
10293
10277
  }
10294
10278
  });
@@ -10311,7 +10295,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10311
10295
  }
10312
10296
  defaultLabel(numberOfAddresses) {
10313
10297
  return numberOfAddresses === 0 ? 'No address found'
10314
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
10298
+ : `${numberOfAddresses}${numberOfAddresses === 1 ? ' address ' : ' addresses '}found`;
10315
10299
  }
10316
10300
  setFormValue() {
10317
10301
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -11890,6 +11874,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11890
11874
  this.formArray.removeAt(index);
11891
11875
  }
11892
11876
  resetIds(index) {
11877
+ var _a, _b;
11893
11878
  for (let i = index; i < this.collItems.length; i++) {
11894
11879
  const counter = i + 1;
11895
11880
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -11899,16 +11884,15 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
11899
11884
  && this.collItems[i].caseField.id === counter.toString()) {
11900
11885
  this.collItems[i].caseField.id = i.toString();
11901
11886
  }
11902
- const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
11903
- const idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
11887
+ const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11888
+ const idPrefix1Current = idPrefix1.replace(`_${i.toString()}`, `_${counter.toString()}`);
11904
11889
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
11905
11890
  this.collItems[i].prefix = idPrefix1;
11906
11891
  }
11907
- const idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
11908
- && this.collItems[i].container['component'].idPrefix ? true : false;
11892
+ const idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
11909
11893
  const idPrefix2 = idPrefixAvailable ?
11910
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
11911
- const idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
11894
+ this.collItems[i].container['component'].idPrefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
11895
+ const idPrefix2current = idPrefix2.replace(`_${i.toString()}`, `_${counter.toString()}`);
11912
11896
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
11913
11897
  this.collItems[i].container['component'].idPrefix = idPrefix2;
11914
11898
  }
@@ -12690,27 +12674,203 @@ class ReadDynamicListFieldComponent extends AbstractFieldReadComponent {
12690
12674
  super.ngOnInit();
12691
12675
  }
12692
12676
  }
12693
- ReadDynamicListFieldComponent.ɵfac = function ReadDynamicListFieldComponent_Factory(t) { return ɵReadDynamicListFieldComponent_BaseFactory(t || ReadDynamicListFieldComponent); };
12694
- ReadDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadDynamicListFieldComponent, selectors: [["ccd-read-dynamic-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadDynamicListFieldComponent_Template(rf, ctx) { if (rf & 1) {
12695
- i0.ɵɵelementStart(0, "span", 0);
12696
- i0.ɵɵtext(1);
12697
- i0.ɵɵpipe(2, "ccdDynamicList");
12698
- i0.ɵɵelementEnd();
12677
+ ReadDynamicListFieldComponent.ɵfac = function ReadDynamicListFieldComponent_Factory(t) { return ɵReadDynamicListFieldComponent_BaseFactory(t || ReadDynamicListFieldComponent); };
12678
+ ReadDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadDynamicListFieldComponent, selectors: [["ccd-read-dynamic-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadDynamicListFieldComponent_Template(rf, ctx) { if (rf & 1) {
12679
+ i0.ɵɵelementStart(0, "span", 0);
12680
+ i0.ɵɵtext(1);
12681
+ i0.ɵɵpipe(2, "ccdDynamicList");
12682
+ i0.ɵɵelementEnd();
12683
+ } if (rf & 2) {
12684
+ i0.ɵɵadvance(1);
12685
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.list_items));
12686
+ } }, pipes: [DynamicListPipe], encapsulation: 2 });
12687
+ const ɵReadDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicListFieldComponent);
12688
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicListFieldComponent, [{
12689
+ type: Component,
12690
+ args: [{
12691
+ selector: 'ccd-read-dynamic-list-field',
12692
+ template: '<span class="text-16">{{caseField.value | ccdDynamicList:caseField.list_items}}</span>',
12693
+ }]
12694
+ }], null, null); })();
12695
+
12696
+ function WriteDynamicListFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
12697
+ i0.ɵɵelementStart(0, "span", 8);
12698
+ i0.ɵɵtext(1);
12699
+ i0.ɵɵpipe(2, "ccdFieldLabel");
12700
+ i0.ɵɵelementEnd();
12701
+ } if (rf & 2) {
12702
+ const ctx_r0 = i0.ɵɵnextContext();
12703
+ i0.ɵɵadvance(1);
12704
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
12705
+ } }
12706
+ function WriteDynamicListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12707
+ i0.ɵɵelementStart(0, "span", 9);
12708
+ i0.ɵɵtext(1);
12709
+ i0.ɵɵelementEnd();
12710
+ } if (rf & 2) {
12711
+ const ctx_r1 = i0.ɵɵnextContext();
12712
+ i0.ɵɵadvance(1);
12713
+ i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
12714
+ } }
12715
+ function WriteDynamicListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12716
+ i0.ɵɵelementStart(0, "span", 8);
12717
+ i0.ɵɵtext(1, "Select an option from the dropdown");
12718
+ i0.ɵɵelementEnd();
12719
+ } }
12720
+ function WriteDynamicListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
12721
+ i0.ɵɵelementStart(0, "span", 10);
12722
+ i0.ɵɵtext(1);
12723
+ i0.ɵɵpipe(2, "ccdFirstError");
12724
+ i0.ɵɵelementEnd();
12725
+ } if (rf & 2) {
12726
+ const ctx_r3 = i0.ɵɵnextContext();
12727
+ i0.ɵɵadvance(1);
12728
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r3.dynamicListFormControl.errors, ctx_r3.caseField.label));
12729
+ } }
12730
+ function WriteDynamicListFieldComponent_option_9_Template(rf, ctx) { if (rf & 1) {
12731
+ i0.ɵɵelementStart(0, "option", 11);
12732
+ i0.ɵɵtext(1);
12733
+ i0.ɵɵelementEnd();
12734
+ } if (rf & 2) {
12735
+ const type_r5 = ctx.$implicit;
12736
+ i0.ɵɵproperty("ngValue", type_r5.code);
12737
+ i0.ɵɵadvance(1);
12738
+ i0.ɵɵtextInterpolate(type_r5.label);
12739
+ } }
12740
+ const _c0$M = function (a0) { return { "form-group-error": a0 }; };
12741
+ class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
12742
+ ngOnInit() {
12743
+ /**
12744
+ * Reassigning list_items from formatted_value when list_items is empty
12745
+ */
12746
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12747
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
12748
+ }
12749
+ /**
12750
+ * Reassigning value from formatted_value when value is empty
12751
+ */
12752
+ if (!this.caseField.value) {
12753
+ if (this.caseField.formatted_value && this.caseField.formatted_value.value && this.caseField.formatted_value.value.code) {
12754
+ this.caseField.value = this.caseField.formatted_value.value.code;
12755
+ }
12756
+ }
12757
+ const isNull = this.caseField.value === undefined || this.caseField.value === '';
12758
+ if (isNull || typeof this.caseField.value === 'object') {
12759
+ this.caseField.value = null;
12760
+ }
12761
+ this.dynamicListFormControl = this.registerControl(new FormControl(this.caseField.value));
12762
+ this.dynamicListFormControl.setValue(this.caseField.value);
12763
+ }
12764
+ }
12765
+ WriteDynamicListFieldComponent.ɵfac = function WriteDynamicListFieldComponent_Factory(t) { return ɵWriteDynamicListFieldComponent_BaseFactory(t || WriteDynamicListFieldComponent); };
12766
+ 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) {
12767
+ i0.ɵɵelementStart(0, "div", 0);
12768
+ i0.ɵɵelementStart(1, "label", 1);
12769
+ i0.ɵɵtemplate(2, WriteDynamicListFieldComponent_span_2_Template, 3, 3, "span", 2);
12770
+ i0.ɵɵelementEnd();
12771
+ i0.ɵɵtemplate(3, WriteDynamicListFieldComponent_span_3_Template, 2, 1, "span", 3);
12772
+ i0.ɵɵtemplate(4, WriteDynamicListFieldComponent_span_4_Template, 2, 0, "span", 2);
12773
+ i0.ɵɵtemplate(5, WriteDynamicListFieldComponent_span_5_Template, 3, 4, "span", 4);
12774
+ i0.ɵɵelementStart(6, "select", 5);
12775
+ i0.ɵɵelementStart(7, "option", 6);
12776
+ i0.ɵɵtext(8, "--Select a value--");
12777
+ i0.ɵɵelementEnd();
12778
+ i0.ɵɵtemplate(9, WriteDynamicListFieldComponent_option_9_Template, 2, 2, "option", 7);
12779
+ i0.ɵɵelementEnd();
12780
+ i0.ɵɵelementEnd();
12781
+ } if (rf & 2) {
12782
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12783
+ i0.ɵɵadvance(1);
12784
+ i0.ɵɵproperty("for", ctx.id());
12785
+ i0.ɵɵadvance(1);
12786
+ i0.ɵɵproperty("ngIf", ctx.caseField.label);
12787
+ i0.ɵɵadvance(1);
12788
+ i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
12789
+ i0.ɵɵadvance(1);
12790
+ i0.ɵɵproperty("ngIf", !ctx.caseField.label && !ctx.caseField.hint_text);
12791
+ i0.ɵɵadvance(1);
12792
+ i0.ɵɵproperty("ngIf", ctx.dynamicListFormControl.errors && ctx.dynamicListFormControl.dirty);
12793
+ i0.ɵɵadvance(1);
12794
+ i0.ɵɵproperty("id", ctx.id())("formControl", ctx.dynamicListFormControl);
12795
+ i0.ɵɵadvance(1);
12796
+ i0.ɵɵproperty("ngValue", null);
12797
+ i0.ɵɵadvance(2);
12798
+ i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
12799
+ } }, 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 });
12800
+ const ɵWriteDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicListFieldComponent);
12801
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicListFieldComponent, [{
12802
+ type: Component,
12803
+ args: [{
12804
+ selector: 'ccd-write-dynamic-list-field',
12805
+ templateUrl: './write-dynamic-list-field.html'
12806
+ }]
12807
+ }], null, null); })();
12808
+
12809
+ class FixedListPipe {
12810
+ transform(value, items) {
12811
+ if (!!items) {
12812
+ const item = items.find(i => i.code === value);
12813
+ return item ? item.label : FixedListPipe.EMPTY;
12814
+ }
12815
+ else {
12816
+ return FixedListPipe.EMPTY;
12817
+ }
12818
+ }
12819
+ }
12820
+ FixedListPipe.EMPTY = '';
12821
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
12822
+ FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
12823
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedListPipe, [{
12824
+ type: Pipe,
12825
+ args: [{
12826
+ name: 'ccdFixedList'
12827
+ }]
12828
+ }], null, null); })();
12829
+
12830
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
12831
+ i0.ɵɵelementStart(0, "div");
12832
+ i0.ɵɵtext(1);
12833
+ i0.ɵɵpipe(2, "ccdFixedList");
12834
+ i0.ɵɵelementEnd();
12835
+ } if (rf & 2) {
12836
+ const value_r1 = ctx.$implicit;
12837
+ const ctx_r0 = i0.ɵɵnextContext();
12838
+ i0.ɵɵadvance(1);
12839
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
12840
+ } }
12841
+ class ReadDynamicMultiSelectListFieldComponent extends AbstractFieldReadComponent {
12842
+ ngOnInit() {
12843
+ /**
12844
+ *
12845
+ * Reassigning list_items from formatted_list when list_items is empty
12846
+ */
12847
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12848
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
12849
+ }
12850
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12851
+ this.caseField.value = this.caseField.formatted_value.value;
12852
+ }
12853
+ super.ngOnInit();
12854
+ }
12855
+ }
12856
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
12857
+ 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) {
12858
+ i0.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
12699
12859
  } if (rf & 2) {
12700
- i0.ɵɵadvance(1);
12701
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.list_items));
12702
- } }, pipes: [DynamicListPipe], encapsulation: 2 });
12703
- const ɵReadDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicListFieldComponent);
12704
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicListFieldComponent, [{
12860
+ i0.ɵɵproperty("ngForOf", ctx.caseField.value);
12861
+ } }, 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}"] });
12862
+ const ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
12863
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
12705
12864
  type: Component,
12706
12865
  args: [{
12707
- selector: 'ccd-read-dynamic-list-field',
12708
- template: '<span class="text-16">{{caseField.value | ccdDynamicList:caseField.list_items}}</span>',
12866
+ selector: 'ccd-read-dynamic-multi-select-list-field',
12867
+ templateUrl: './read-dynamic-multi-select-list-field.html',
12868
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
12709
12869
  }]
12710
12870
  }], null, null); })();
12711
12871
 
12712
- function WriteDynamicListFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
12713
- i0.ɵɵelementStart(0, "span", 8);
12872
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12873
+ i0.ɵɵelementStart(0, "span", 5);
12714
12874
  i0.ɵɵtext(1);
12715
12875
  i0.ɵɵpipe(2, "ccdFieldLabel");
12716
12876
  i0.ɵɵelementEnd();
@@ -12719,8 +12879,8 @@ function WriteDynamicListFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
12719
12879
  i0.ɵɵadvance(1);
12720
12880
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
12721
12881
  } }
12722
- function WriteDynamicListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12723
- i0.ɵɵelementStart(0, "span", 9);
12882
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12883
+ i0.ɵɵelementStart(0, "span", 6);
12724
12884
  i0.ɵɵtext(1);
12725
12885
  i0.ɵɵelementEnd();
12726
12886
  } if (rf & 2) {
@@ -12728,97 +12888,130 @@ function WriteDynamicListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
12728
12888
  i0.ɵɵadvance(1);
12729
12889
  i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
12730
12890
  } }
12731
- function WriteDynamicListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
12732
- i0.ɵɵelementStart(0, "span", 8);
12733
- i0.ɵɵtext(1, "Select an option from the dropdown");
12734
- i0.ɵɵelementEnd();
12735
- } }
12736
- function WriteDynamicListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
12737
- i0.ɵɵelementStart(0, "span", 10);
12891
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
12892
+ i0.ɵɵelementStart(0, "span", 7);
12738
12893
  i0.ɵɵtext(1);
12739
12894
  i0.ɵɵpipe(2, "ccdFirstError");
12740
12895
  i0.ɵɵelementEnd();
12741
12896
  } if (rf & 2) {
12742
- const ctx_r3 = i0.ɵɵnextContext();
12897
+ const ctx_r2 = i0.ɵɵnextContext();
12743
12898
  i0.ɵɵadvance(1);
12744
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r3.dynamicListFormControl.errors, ctx_r3.caseField.label));
12899
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
12745
12900
  } }
12746
- function WriteDynamicListFieldComponent_option_9_Template(rf, ctx) { if (rf & 1) {
12747
- i0.ɵɵelementStart(0, "option", 11);
12748
- i0.ɵɵtext(1);
12901
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
12902
+ const _r6 = i0.ɵɵgetCurrentView();
12903
+ i0.ɵɵelementContainerStart(0);
12904
+ i0.ɵɵelementStart(1, "div", 8);
12905
+ i0.ɵɵelementStart(2, "input", 9);
12906
+ 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); });
12907
+ i0.ɵɵelementEnd();
12908
+ i0.ɵɵelementStart(3, "label", 10);
12909
+ i0.ɵɵtext(4);
12910
+ i0.ɵɵelementEnd();
12749
12911
  i0.ɵɵelementEnd();
12912
+ i0.ɵɵelementContainerEnd();
12750
12913
  } if (rf & 2) {
12751
- const type_r5 = ctx.$implicit;
12752
- i0.ɵɵproperty("ngValue", type_r5.code);
12914
+ const checkbox_r4 = ctx.$implicit;
12915
+ const ctx_r3 = i0.ɵɵnextContext();
12916
+ i0.ɵɵadvance(2);
12917
+ i0.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
12918
+ i0.ɵɵpropertyInterpolate("name", ctx_r3.id());
12919
+ i0.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
12753
12920
  i0.ɵɵadvance(1);
12754
- i0.ɵɵtextInterpolate(type_r5.label);
12921
+ i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
12922
+ i0.ɵɵadvance(1);
12923
+ i0.ɵɵtextInterpolate(checkbox_r4.label);
12755
12924
  } }
12756
- const _c0$M = function (a0) { return { "form-group-error": a0 }; };
12757
- class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
12925
+ const _c0$L = function (a0) { return { "error": a0 }; };
12926
+ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
12758
12927
  ngOnInit() {
12759
- /**
12760
- * Reassigning list_items from formatted_value when list_items is empty
12761
- */
12762
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
12928
+ this.checkboxes = new FormArray([]);
12929
+ this.setInitialCaseList();
12930
+ this.setInitialCaseFieldValue();
12931
+ // Initialise array with existing values
12932
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
12933
+ const values = this.caseField.value;
12934
+ values.forEach(value => {
12935
+ this.checkboxes.push(new FormControl(value));
12936
+ });
12937
+ }
12938
+ this.dynamicListFormControl = this.registerControl(new FormControl(this.checkboxes.value));
12939
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
12940
+ }
12941
+ onCheckChange(event) {
12942
+ const target = event.target;
12943
+ if (!target || !target.value) {
12944
+ return;
12945
+ }
12946
+ const selectedListItem = this.getValueListItem(target.value);
12947
+ if (!this.isSelected(target.value)) {
12948
+ // Add a new control in the FormArray
12949
+ this.checkboxes.push(new FormControl(selectedListItem));
12950
+ }
12951
+ else {
12952
+ // Remove the control from the FormArray
12953
+ this.checkboxes.controls.forEach((ctrl, i) => {
12954
+ if (ctrl.value.code === target.value) {
12955
+ this.checkboxes.removeAt(i);
12956
+ }
12957
+ });
12958
+ }
12959
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
12960
+ }
12961
+ isSelected(code) {
12962
+ if (this.checkboxes && this.checkboxes.controls) {
12963
+ return this.checkboxes.controls.find(control => control.value.code === code);
12964
+ }
12965
+ }
12966
+ getValueListItem(value) {
12967
+ return this.caseField.list_items.find(i => i.code === value);
12968
+ }
12969
+ setInitialCaseList() {
12970
+ const hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
12971
+ const hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
12972
+ if (!hasListItems && hasFormattedListItems) {
12763
12973
  this.caseField.list_items = this.caseField.formatted_value.list_items;
12764
12974
  }
12765
- /**
12766
- * Reassigning value from formatted_value when value is empty
12767
- */
12768
- if (!this.caseField.value) {
12769
- if (this.caseField.formatted_value && this.caseField.formatted_value.value && this.caseField.formatted_value.value.code) {
12770
- this.caseField.value = this.caseField.formatted_value.value.code;
12771
- }
12975
+ }
12976
+ setInitialCaseFieldValue() {
12977
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
12978
+ this.caseField.value = this.caseField.formatted_value.value;
12772
12979
  }
12773
12980
  const isNull = this.caseField.value === undefined || this.caseField.value === '';
12774
- if (isNull || typeof this.caseField.value === 'object') {
12775
- this.caseField.value = null;
12981
+ if (isNull || !Array.isArray(this.caseField.value)) {
12982
+ this.caseField.value = [];
12776
12983
  }
12777
- this.dynamicListFormControl = this.registerControl(new FormControl(this.caseField.value));
12778
- this.dynamicListFormControl.setValue(this.caseField.value);
12779
12984
  }
12780
12985
  }
12781
- WriteDynamicListFieldComponent.ɵfac = function WriteDynamicListFieldComponent_Factory(t) { return ɵWriteDynamicListFieldComponent_BaseFactory(t || WriteDynamicListFieldComponent); };
12782
- 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) {
12986
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
12987
+ 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) {
12783
12988
  i0.ɵɵelementStart(0, "div", 0);
12784
- i0.ɵɵelementStart(1, "label", 1);
12785
- i0.ɵɵtemplate(2, WriteDynamicListFieldComponent_span_2_Template, 3, 3, "span", 2);
12786
- i0.ɵɵelementEnd();
12787
- i0.ɵɵtemplate(3, WriteDynamicListFieldComponent_span_3_Template, 2, 1, "span", 3);
12788
- i0.ɵɵtemplate(4, WriteDynamicListFieldComponent_span_4_Template, 2, 0, "span", 2);
12789
- i0.ɵɵtemplate(5, WriteDynamicListFieldComponent_span_5_Template, 3, 4, "span", 4);
12790
- i0.ɵɵelementStart(6, "select", 5);
12791
- i0.ɵɵelementStart(7, "option", 6);
12792
- i0.ɵɵtext(8, "--Select a value--");
12989
+ i0.ɵɵelementStart(1, "fieldset");
12990
+ i0.ɵɵelementStart(2, "legend");
12991
+ i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
12992
+ i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
12993
+ i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
12793
12994
  i0.ɵɵelementEnd();
12794
- i0.ɵɵtemplate(9, WriteDynamicListFieldComponent_option_9_Template, 2, 2, "option", 7);
12995
+ i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
12795
12996
  i0.ɵɵelementEnd();
12796
12997
  i0.ɵɵelementEnd();
12797
12998
  } if (rf & 2) {
12798
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12799
- i0.ɵɵadvance(1);
12800
- i0.ɵɵproperty("for", ctx.id());
12801
- i0.ɵɵadvance(1);
12999
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
13000
+ i0.ɵɵadvance(3);
12802
13001
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
12803
13002
  i0.ɵɵadvance(1);
12804
13003
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
12805
13004
  i0.ɵɵadvance(1);
12806
- i0.ɵɵproperty("ngIf", !ctx.caseField.label && !ctx.caseField.hint_text);
12807
- i0.ɵɵadvance(1);
12808
- i0.ɵɵproperty("ngIf", ctx.dynamicListFormControl.errors && ctx.dynamicListFormControl.dirty);
12809
- i0.ɵɵadvance(1);
12810
- i0.ɵɵproperty("id", ctx.id())("formControl", ctx.dynamicListFormControl);
13005
+ i0.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
12811
13006
  i0.ɵɵadvance(1);
12812
- i0.ɵɵproperty("ngValue", null);
12813
- i0.ɵɵadvance(2);
12814
13007
  i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
12815
- } }, 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 });
12816
- const ɵWriteDynamicListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicListFieldComponent);
12817
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicListFieldComponent, [{
13008
+ } }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
13009
+ const ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
13010
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
12818
13011
  type: Component,
12819
13012
  args: [{
12820
- selector: 'ccd-write-dynamic-list-field',
12821
- templateUrl: './write-dynamic-list-field.html'
13013
+ selector: 'ccd-write-dynamic-multi-select-list-field',
13014
+ templateUrl: './write-dynamic-multi-select-list-field.html'
12822
13015
  }]
12823
13016
  }], null, null); })();
12824
13017
 
@@ -12916,7 +13109,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
12916
13109
  i0.ɵɵadvance(1);
12917
13110
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
12918
13111
  } }
12919
- const _c0$L = function (a0) { return { selected: a0 }; };
13112
+ const _c0$K = function (a0) { return { selected: a0 }; };
12920
13113
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
12921
13114
  i0.ɵɵelementStart(0, "div", 10);
12922
13115
  i0.ɵɵelement(1, "input", 11);
@@ -12927,7 +13120,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
12927
13120
  } if (rf & 2) {
12928
13121
  const radioButton_r5 = ctx.$implicit;
12929
13122
  const ctx_r4 = i0.ɵɵnextContext();
12930
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
13123
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12931
13124
  i0.ɵɵadvance(1);
12932
13125
  i0.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
12933
13126
  i0.ɵɵadvance(1);
@@ -13060,7 +13253,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
13060
13253
  i0.ɵɵadvance(1);
13061
13254
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
13062
13255
  } }
13063
- const _c0$K = function (a0) { return { "form-group-error": a0 }; };
13256
+ const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13064
13257
  const _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
13065
13258
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
13066
13259
  ngOnInit() {
@@ -13078,7 +13271,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
13078
13271
  i0.ɵɵelement(5, "input", 5);
13079
13272
  i0.ɵɵelementEnd();
13080
13273
  } if (rf & 2) {
13081
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
13274
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
13082
13275
  i0.ɵɵadvance(1);
13083
13276
  i0.ɵɵproperty("for", ctx.id());
13084
13277
  i0.ɵɵadvance(1);
@@ -13099,27 +13292,6 @@ const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInherited
13099
13292
  }]
13100
13293
  }], null, null); })();
13101
13294
 
13102
- class FixedListPipe {
13103
- transform(value, items) {
13104
- if (!!items) {
13105
- const item = items.find(i => i.code === value);
13106
- return item ? item.label : FixedListPipe.EMPTY;
13107
- }
13108
- else {
13109
- return FixedListPipe.EMPTY;
13110
- }
13111
- }
13112
- }
13113
- FixedListPipe.EMPTY = '';
13114
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
13115
- FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
13116
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedListPipe, [{
13117
- type: Pipe,
13118
- args: [{
13119
- name: 'ccdFixedList'
13120
- }]
13121
- }], null, null); })();
13122
-
13123
13295
  class ReadFixedListFieldComponent extends AbstractFieldReadComponent {
13124
13296
  }
13125
13297
  ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
@@ -13180,7 +13352,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
13180
13352
  i0.ɵɵadvance(1);
13181
13353
  i0.ɵɵtextInterpolate(type_r4.label);
13182
13354
  } }
13183
- const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13355
+ const _c0$I = function (a0) { return { "form-group-error": a0 }; };
13184
13356
  class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
13185
13357
  get listItems() {
13186
13358
  if (this.caseField) {
@@ -13218,7 +13390,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
13218
13390
  i0.ɵɵelementEnd();
13219
13391
  i0.ɵɵelementEnd();
13220
13392
  } if (rf & 2) {
13221
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13393
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13222
13394
  i0.ɵɵadvance(1);
13223
13395
  i0.ɵɵproperty("for", ctx.id());
13224
13396
  i0.ɵɵadvance(1);
@@ -13309,7 +13481,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
13309
13481
  i0.ɵɵadvance(1);
13310
13482
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
13311
13483
  } }
13312
- const _c0$I = function (a0) { return { selected: a0 }; };
13484
+ const _c0$H = function (a0) { return { selected: a0 }; };
13313
13485
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
13314
13486
  i0.ɵɵelementStart(0, "div", 9);
13315
13487
  i0.ɵɵelement(1, "input", 10);
@@ -13320,7 +13492,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13320
13492
  } if (rf & 2) {
13321
13493
  const radioButton_r4 = ctx.$implicit;
13322
13494
  const ctx_r3 = i0.ɵɵnextContext();
13323
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13495
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13324
13496
  i0.ɵɵadvance(1);
13325
13497
  i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
13326
13498
  i0.ɵɵadvance(1);
@@ -13451,7 +13623,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
13451
13623
  i0.ɵɵadvance(1);
13452
13624
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
13453
13625
  } }
13454
- const _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
13626
+ const _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
13455
13627
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
13456
13628
  const _r7 = i0.ɵɵgetCurrentView();
13457
13629
  i0.ɵɵelementStart(0, "mat-option", 11);
@@ -13461,7 +13633,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
13461
13633
  } if (rf & 2) {
13462
13634
  const judicialUser_r5 = ctx.$implicit;
13463
13635
  const ctx_r3 = i0.ɵɵnextContext();
13464
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13636
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13465
13637
  i0.ɵɵadvance(1);
13466
13638
  i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
13467
13639
  } }
@@ -13705,7 +13877,7 @@ class LinkedCasesService {
13705
13877
  casesResponse.push(this.mapResponse(result));
13706
13878
  });
13707
13879
  });
13708
- const caseLinks = casesResponse.map(item => {
13880
+ this.linkedCases = casesResponse.map(item => {
13709
13881
  return {
13710
13882
  caseReference: item.caseReference,
13711
13883
  caseName: item.caseName,
@@ -13719,7 +13891,6 @@ class LinkedCasesService {
13719
13891
  }),
13720
13892
  };
13721
13893
  });
13722
- this.linkedCases = caseLinks;
13723
13894
  this.serverLinkedApiError = null;
13724
13895
  }, err => {
13725
13896
  this.serverLinkedApiError = {
@@ -13857,9 +14028,7 @@ class BeforeYouStartComponent {
13857
14028
  });
13858
14029
  }
13859
14030
  onBack() {
13860
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
13861
- window.location.hash = 'Linked cases';
13862
- });
14031
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
13863
14032
  }
13864
14033
  }
13865
14034
  BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
@@ -14182,7 +14351,7 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
14182
14351
  i0.ɵɵadvance(3);
14183
14352
  i0.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
14184
14353
  } }
14185
- const _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
14354
+ const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
14186
14355
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
14187
14356
  i0.ɵɵelementStart(0, "div", 35);
14188
14357
  i0.ɵɵelementStart(1, "h3", 22);
@@ -14198,7 +14367,7 @@ function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
14198
14367
  i0.ɵɵelementEnd();
14199
14368
  } if (rf & 2) {
14200
14369
  const ctx_r7 = i0.ɵɵnextContext(2);
14201
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
14370
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
14202
14371
  i0.ɵɵadvance(3);
14203
14372
  i0.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
14204
14373
  } }
@@ -14249,11 +14418,11 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
14249
14418
  const ctx_r0 = i0.ɵɵnextContext();
14250
14419
  i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
14251
14420
  i0.ɵɵadvance(1);
14252
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
14421
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
14253
14422
  i0.ɵɵadvance(3);
14254
14423
  i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
14255
14424
  i0.ɵɵadvance(2);
14256
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
14425
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
14257
14426
  i0.ɵɵadvance(5);
14258
14427
  i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
14259
14428
  i0.ɵɵadvance(2);
@@ -14664,7 +14833,7 @@ LinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkCasesComponent, se
14664
14833
  i0.ɵɵadvance(4);
14665
14834
  i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
14666
14835
  i0.ɵɵadvance(4);
14667
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
14836
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
14668
14837
  i0.ɵɵadvance(1);
14669
14838
  i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
14670
14839
  i0.ɵɵadvance(18);
@@ -15091,10 +15260,11 @@ class LinkedCasesToTableComponent {
15091
15260
  });
15092
15261
  if (searchCasesResponse.length) {
15093
15262
  this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
15094
- const casesResponse = [];
15263
+ let casesResponse = [];
15095
15264
  searchCases.forEach(response => {
15096
15265
  casesResponse.push(this.mapResponse(response));
15097
15266
  });
15267
+ casesResponse = this.sortReasonCodes(casesResponse);
15098
15268
  this.linkedCasesFromResponse = this.sortLinkedCasesByReasonCode(casesResponse);
15099
15269
  this.isLoaded = true;
15100
15270
  const caseLinks = this.linkedCasesFromResponse.map(item => {
@@ -15120,6 +15290,29 @@ class LinkedCasesToTableComponent {
15120
15290
  });
15121
15291
  }
15122
15292
  }
15293
+ sortReasonCodes(searchCasesResponse) {
15294
+ searchCasesResponse.forEach((item) => {
15295
+ var _a;
15296
+ if ((_a = item === null || item === void 0 ? void 0 : item.reasons) === null || _a === void 0 ? void 0 : _a.length) {
15297
+ item.reasons.forEach((reason) => {
15298
+ reason.sortOrder = this.getReasonSortOrder(reason.value.Reason);
15299
+ });
15300
+ item.reasons = item.reasons.sort((a, b) => a.sortOrder - b.sortOrder);
15301
+ item.sortOrder = item.reasons[0].sortOrder;
15302
+ }
15303
+ });
15304
+ searchCasesResponse = searchCasesResponse === null || searchCasesResponse === void 0 ? void 0 : searchCasesResponse.sort((a, b) => a.sortOrder - b.sortOrder);
15305
+ return searchCasesResponse;
15306
+ }
15307
+ getReasonSortOrder(reasonCode) {
15308
+ if (reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE) {
15309
+ return 1;
15310
+ }
15311
+ else if (reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE) {
15312
+ return 2;
15313
+ }
15314
+ return 3;
15315
+ }
15123
15316
  searchCasesByCaseIds(searchCasesResponse) {
15124
15317
  return forkJoin(searchCasesResponse);
15125
15318
  }
@@ -15199,9 +15392,7 @@ class NoLinkedCasesComponent {
15199
15392
  this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
15200
15393
  }
15201
15394
  onBack() {
15202
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
15203
- window.location.hash = 'Linked cases';
15204
- });
15395
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
15205
15396
  }
15206
15397
  }
15207
15398
  NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
@@ -15273,7 +15464,7 @@ function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1)
15273
15464
  i0.ɵɵadvance(1);
15274
15465
  i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
15275
15466
  } }
15276
- const _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15467
+ const _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
15277
15468
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
15278
15469
  i0.ɵɵelementStart(0, "div", 7);
15279
15470
  i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
@@ -15283,7 +15474,7 @@ function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
15283
15474
  i0.ɵɵelementEnd();
15284
15475
  } if (rf & 2) {
15285
15476
  const ctx_r1 = i0.ɵɵnextContext(2);
15286
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
15477
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
15287
15478
  i0.ɵɵadvance(1);
15288
15479
  i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
15289
15480
  i0.ɵɵadvance(2);
@@ -15442,6 +15633,7 @@ UnLinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UnLinkCasesComponent
15442
15633
  type: Output
15443
15634
  }] }); })();
15444
15635
 
15636
+ // tslint:disable:variable-name
15445
15637
  class LinkCaseReason {
15446
15638
  }
15447
15639
  class CCDCaseLinkType {
@@ -15552,7 +15744,7 @@ class ReadLinkedCasesFieldComponent {
15552
15744
  this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(field => field.id === 'caseLinks');
15553
15745
  }
15554
15746
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
15555
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15747
+ const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15556
15748
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15557
15749
  next: reasons => {
15558
15750
  this.reasonListLoaded = true;
@@ -15587,9 +15779,7 @@ class ReadLinkedCasesFieldComponent {
15587
15779
  }
15588
15780
  }
15589
15781
  reloadCurrentRoute() {
15590
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(() => {
15591
- window.location.hash = 'Linked cases';
15592
- });
15782
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id], { fragment: 'Linked cases' });
15593
15783
  }
15594
15784
  getFailureLinkedToNotification(evt) {
15595
15785
  this.isServerLinkedToError = true;
@@ -15646,79 +15836,50 @@ ReadLinkedCasesFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadLinkedC
15646
15836
  } }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
15647
15837
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesFieldComponent, [{
15648
15838
  type: Component,
15649
- args: [{
15650
- selector: 'ccd-read-linked-cases-field',
15651
- templateUrl: './read-linked-cases-field.component.html',
15652
- styleUrls: ['./read-linked-cases-field.component.scss']
15653
- }]
15654
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null); })();
15655
-
15656
- function WriteLinkedCasesFieldComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
15657
- const _r9 = i0.ɵɵgetCurrentView();
15658
- i0.ɵɵelementStart(0, "div", 7);
15659
- i0.ɵɵelementStart(1, "ul", 8);
15660
- i0.ɵɵelementStart(2, "li");
15661
- i0.ɵɵelementStart(3, "a", 9);
15662
- i0.ɵɵlistener("click", function WriteLinkedCasesFieldComponent_div_0_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r9); const errorMessage_r7 = ctx.$implicit; const ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
15663
- i0.ɵɵtext(4);
15664
- i0.ɵɵelementEnd();
15665
- i0.ɵɵelementEnd();
15666
- i0.ɵɵelementEnd();
15667
- i0.ɵɵelementEnd();
15668
- } if (rf & 2) {
15669
- const errorMessage_r7 = ctx.$implicit;
15670
- i0.ɵɵadvance(4);
15671
- i0.ɵɵtextInterpolate(errorMessage_r7.description);
15672
- } }
15673
- function WriteLinkedCasesFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
15674
- i0.ɵɵelementStart(0, "div", 4);
15675
- i0.ɵɵelementStart(1, "h2", 5);
15676
- i0.ɵɵtext(2, " There is a problem ");
15677
- i0.ɵɵelementEnd();
15678
- i0.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_div_0_div_3_Template, 5, 1, "div", 6);
15839
+ args: [{
15840
+ selector: 'ccd-read-linked-cases-field',
15841
+ templateUrl: './read-linked-cases-field.component.html',
15842
+ styleUrls: ['./read-linked-cases-field.component.scss']
15843
+ }]
15844
+ }], function () { return [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null); })();
15845
+
15846
+ function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
15847
+ const _r6 = i0.ɵɵgetCurrentView();
15848
+ i0.ɵɵelementContainerStart(0);
15849
+ i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
15850
+ i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.onLinkedCasesStateEmitted($event); });
15679
15851
  i0.ɵɵelementEnd();
15680
- } if (rf & 2) {
15681
- const ctx_r0 = i0.ɵɵnextContext();
15682
- i0.ɵɵadvance(3);
15683
- i0.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
15852
+ i0.ɵɵelementContainerEnd();
15684
15853
  } }
15685
15854
  function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
15686
- const _r11 = i0.ɵɵgetCurrentView();
15855
+ const _r8 = i0.ɵɵgetCurrentView();
15687
15856
  i0.ɵɵelementContainerStart(0);
15688
- i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
15689
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
15857
+ i0.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
15858
+ i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onLinkedCasesStateEmitted($event); });
15690
15859
  i0.ɵɵelementEnd();
15691
15860
  i0.ɵɵelementContainerEnd();
15692
15861
  } }
15693
15862
  function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
15694
- const _r13 = i0.ɵɵgetCurrentView();
15863
+ const _r10 = i0.ɵɵgetCurrentView();
15695
15864
  i0.ɵɵelementContainerStart(0);
15696
- i0.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
15697
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
15865
+ i0.ɵɵelementStart(1, "ccd-link-cases", 3);
15866
+ i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.onLinkedCasesStateEmitted($event); });
15698
15867
  i0.ɵɵelementEnd();
15699
15868
  i0.ɵɵelementContainerEnd();
15700
15869
  } }
15701
15870
  function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
15702
- const _r15 = i0.ɵɵgetCurrentView();
15871
+ const _r12 = i0.ɵɵgetCurrentView();
15703
15872
  i0.ɵɵelementContainerStart(0);
15704
- i0.ɵɵelementStart(1, "ccd-link-cases", 10);
15705
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
15873
+ i0.ɵɵelementStart(1, "ccd-unlink-cases", 3);
15874
+ i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.onLinkedCasesStateEmitted($event); });
15706
15875
  i0.ɵɵelementEnd();
15707
15876
  i0.ɵɵelementContainerEnd();
15708
15877
  } }
15709
15878
  function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
15710
- const _r17 = i0.ɵɵgetCurrentView();
15711
- i0.ɵɵelementContainerStart(0);
15712
- i0.ɵɵelementStart(1, "ccd-unlink-cases", 10);
15713
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
15714
- i0.ɵɵelementEnd();
15715
- i0.ɵɵelementContainerEnd();
15716
- } }
15717
- function WriteLinkedCasesFieldComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
15718
- const _r19 = i0.ɵɵgetCurrentView();
15879
+ const _r14 = i0.ɵɵgetCurrentView();
15719
15880
  i0.ɵɵelementContainerStart(0);
15720
- i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
15721
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
15881
+ i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
15882
+ i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onLinkedCasesStateEmitted($event); });
15722
15883
  i0.ɵɵelementEnd();
15723
15884
  i0.ɵɵelementContainerEnd();
15724
15885
  } }
@@ -15733,9 +15894,11 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15733
15894
  this.linkedCasesPages = LinkedCasesPages;
15734
15895
  this.linkedCasesEventTriggers = LinkedCasesEventTriggers;
15735
15896
  this.linkedCases = [];
15736
- this.errorMessages = [];
15737
15897
  }
15738
15898
  ngOnInit() {
15899
+ // This is required to enable Continue button validation
15900
+ // Continue button should be enabled only at check your answers page
15901
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
15739
15902
  // Clear validation errors
15740
15903
  this.caseEditDataService.clearFormValidationErrors();
15741
15904
  // Get linked case reasons from ref data
@@ -15771,11 +15934,10 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15771
15934
  }
15772
15935
  }
15773
15936
  onLinkedCasesStateEmitted(linkedCasesState) {
15774
- this.errorMessages = [];
15937
+ // Clear validation errors
15775
15938
  this.caseEditDataService.clearFormValidationErrors();
15776
15939
  if (linkedCasesState.navigateToNextPage) {
15777
15940
  this.linkedCasesPage = this.getNextPage(linkedCasesState);
15778
- this.setContinueButtonValidationErrorMessage();
15779
15941
  this.proceedToNextPage();
15780
15942
  }
15781
15943
  else {
@@ -15787,7 +15949,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15787
15949
  }
15788
15950
  }
15789
15951
  getLinkedCaseReasons() {
15790
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
15952
+ const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
15791
15953
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
15792
15954
  next: reasons => {
15793
15955
  // Sort in ascending order
@@ -15798,27 +15960,19 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15798
15960
  }
15799
15961
  });
15800
15962
  }
15801
- setContinueButtonValidationErrorMessage() {
15802
- const errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
15803
- ? LinkedCasesErrorMessages.LinkCasesNavigationError
15804
- : LinkedCasesErrorMessages.UnlinkCasesNavigationError;
15805
- const buttonId = this.linkedCasesService.linkedCases.length === 0
15806
- ? 'back-button'
15807
- : 'next-button';
15808
- this.caseEditDataService.setCaseLinkError({
15809
- componentId: buttonId,
15810
- errorMessage
15811
- });
15812
- }
15813
15963
  proceedToNextPage() {
15814
15964
  if (this.isAtFinalPage()) {
15815
15965
  // Continue button event must be allowed in final page
15816
- this.caseEditDataService.clearCaseLinkError();
15966
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
15817
15967
  // Trigger validation to clear the "notAtFinalPage" error if now at the final state
15818
15968
  this.formGroup.updateValueAndValidity();
15819
15969
  // update form value
15820
15970
  this.submitLinkedCases();
15821
15971
  }
15972
+ else {
15973
+ // Continue button event must not be allowed if not in final page
15974
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
15975
+ }
15822
15976
  }
15823
15977
  submitLinkedCases() {
15824
15978
  if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
@@ -15845,8 +15999,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15845
15999
  getLinkedCases() {
15846
16000
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
15847
16001
  const caseViewFiltered = caseView.tabs.filter(tab => {
15848
- const linkField = tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
15849
- return linkField;
16002
+ return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
15850
16003
  });
15851
16004
  if (caseViewFiltered) {
15852
16005
  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; });
@@ -15859,35 +16012,21 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
15859
16012
  && !this.linkedCasesService.serverLinkedApiError)
15860
16013
  ? LinkedCasesPages.BEFORE_YOU_START
15861
16014
  : LinkedCasesPages.NO_LINKED_CASES;
15862
- // Initialise the error to be displayed when clicked on Continue button
15863
- this.setContinueButtonValidationErrorMessage();
15864
16015
  });
15865
16016
  }
15866
- navigateToErrorElement(elementId) {
15867
- if (elementId) {
15868
- const htmlElement = document.getElementById(elementId);
15869
- if (htmlElement) {
15870
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
15871
- htmlElement.focus();
15872
- }
15873
- }
15874
- }
15875
16017
  }
15876
16018
  WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
15877
- WriteLinkedCasesFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
15878
- i0.ɵɵtemplate(0, WriteLinkedCasesFieldComponent_div_0_Template, 4, 1, "div", 0);
16019
+ WriteLinkedCasesFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
16020
+ i0.ɵɵelementStart(0, "div", 0);
15879
16021
  i0.ɵɵelementStart(1, "div", 1);
15880
- i0.ɵɵelementStart(2, "div", 2);
15881
- i0.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
15882
- i0.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
15883
- i0.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
15884
- i0.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
15885
- i0.ɵɵtemplate(7, WriteLinkedCasesFieldComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
16022
+ i0.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2);
16023
+ i0.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2);
16024
+ i0.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2);
16025
+ i0.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2);
16026
+ i0.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
15886
16027
  i0.ɵɵelementEnd();
15887
16028
  i0.ɵɵelementEnd();
15888
16029
  } if (rf & 2) {
15889
- i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
15890
- i0.ɵɵadvance(1);
15891
16030
  i0.ɵɵproperty("formGroup", ctx.formGroup);
15892
16031
  i0.ɵɵadvance(1);
15893
16032
  i0.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
@@ -16102,7 +16241,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
16102
16241
  i0.ɵɵadvance(1);
16103
16242
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
16104
16243
  } }
16105
- const _c0$E = function (a0) { return { "form-group-error": a0 }; };
16244
+ const _c0$D = function (a0) { return { "form-group-error": a0 }; };
16106
16245
  class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
16107
16246
  ngOnInit() {
16108
16247
  this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
@@ -16125,7 +16264,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
16125
16264
  i0.ɵɵelementEnd();
16126
16265
  i0.ɵɵelementEnd();
16127
16266
  } if (rf & 2) {
16128
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16267
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16129
16268
  i0.ɵɵadvance(1);
16130
16269
  i0.ɵɵproperty("for", ctx.id());
16131
16270
  i0.ɵɵadvance(1);
@@ -16242,7 +16381,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
16242
16381
  i0.ɵɵadvance(1);
16243
16382
  i0.ɵɵtextInterpolate(checkbox_r4.label);
16244
16383
  } }
16245
- const _c0$D = function (a0) { return { "error": a0 }; };
16384
+ const _c0$C = function (a0) { return { "error": a0 }; };
16246
16385
  class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
16247
16386
  ngOnInit() {
16248
16387
  this.checkboxes = new FormArray([]);
@@ -16297,7 +16436,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
16297
16436
  i0.ɵɵelementEnd();
16298
16437
  i0.ɵɵelementEnd();
16299
16438
  } if (rf & 2) {
16300
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16439
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16301
16440
  i0.ɵɵadvance(3);
16302
16441
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
16303
16442
  i0.ɵɵadvance(1);
@@ -16366,7 +16505,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
16366
16505
  i0.ɵɵadvance(1);
16367
16506
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16368
16507
  } }
16369
- const _c0$C = function (a0) { return { "form-group-error": a0 }; };
16508
+ const _c0$B = function (a0) { return { "form-group-error": a0 }; };
16370
16509
  const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16371
16510
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
16372
16511
  ngOnInit() {
@@ -16384,7 +16523,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
16384
16523
  i0.ɵɵelement(5, "input", 5);
16385
16524
  i0.ɵɵelementEnd();
16386
16525
  } if (rf & 2) {
16387
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
16526
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16388
16527
  i0.ɵɵadvance(1);
16389
16528
  i0.ɵɵproperty("for", ctx.id());
16390
16529
  i0.ɵɵadvance(1);
@@ -16634,7 +16773,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_div_4_Template(rf, ct
16634
16773
  i0.ɵɵelementEnd();
16635
16774
  i0.ɵɵelementEnd();
16636
16775
  } }
16637
- const _c0$B = function (a0) { return { "scroll-container ": a0 }; };
16776
+ const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16638
16777
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { if (rf & 1) {
16639
16778
  i0.ɵɵelementStart(0, "div", 26);
16640
16779
  i0.ɵɵpipe(1, "async");
@@ -16648,7 +16787,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { i
16648
16787
  const ctx_r2 = i0.ɵɵnextContext(2);
16649
16788
  let tmp_0_0 = null;
16650
16789
  let tmp_2_0 = null;
16651
- 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));
16790
+ 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));
16652
16791
  i0.ɵɵadvance(2);
16653
16792
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16654
16793
  i0.ɵɵadvance(2);
@@ -17001,194 +17140,6 @@ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Ca
17001
17140
  }]
17002
17141
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null); })();
17003
17142
 
17004
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
17005
- i0.ɵɵelementStart(0, "div");
17006
- i0.ɵɵtext(1);
17007
- i0.ɵɵpipe(2, "ccdFixedList");
17008
- i0.ɵɵelementEnd();
17009
- } if (rf & 2) {
17010
- const value_r1 = ctx.$implicit;
17011
- const ctx_r0 = i0.ɵɵnextContext();
17012
- i0.ɵɵadvance(1);
17013
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
17014
- } }
17015
- class ReadDynamicMultiSelectListFieldComponent extends AbstractFieldReadComponent {
17016
- ngOnInit() {
17017
- /**
17018
- *
17019
- * Reassigning list_items from formatted_list when list_items is empty
17020
- */
17021
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
17022
- this.caseField.list_items = this.caseField.formatted_value.list_items;
17023
- }
17024
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
17025
- this.caseField.value = this.caseField.formatted_value.value;
17026
- }
17027
- super.ngOnInit();
17028
- }
17029
- }
17030
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
17031
- 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) {
17032
- i0.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
17033
- } if (rf & 2) {
17034
- i0.ɵɵproperty("ngForOf", ctx.caseField.value);
17035
- } }, 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}"] });
17036
- const ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
17037
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
17038
- type: Component,
17039
- args: [{
17040
- selector: 'ccd-read-dynamic-multi-select-list-field',
17041
- templateUrl: './read-dynamic-multi-select-list-field.html',
17042
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
17043
- }]
17044
- }], null, null); })();
17045
-
17046
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
17047
- i0.ɵɵelementStart(0, "span", 5);
17048
- i0.ɵɵtext(1);
17049
- i0.ɵɵpipe(2, "ccdFieldLabel");
17050
- i0.ɵɵelementEnd();
17051
- } if (rf & 2) {
17052
- const ctx_r0 = i0.ɵɵnextContext();
17053
- i0.ɵɵadvance(1);
17054
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
17055
- } }
17056
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
17057
- i0.ɵɵelementStart(0, "span", 6);
17058
- i0.ɵɵtext(1);
17059
- i0.ɵɵelementEnd();
17060
- } if (rf & 2) {
17061
- const ctx_r1 = i0.ɵɵnextContext();
17062
- i0.ɵɵadvance(1);
17063
- i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
17064
- } }
17065
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
17066
- i0.ɵɵelementStart(0, "span", 7);
17067
- i0.ɵɵtext(1);
17068
- i0.ɵɵpipe(2, "ccdFirstError");
17069
- i0.ɵɵelementEnd();
17070
- } if (rf & 2) {
17071
- const ctx_r2 = i0.ɵɵnextContext();
17072
- i0.ɵɵadvance(1);
17073
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
17074
- } }
17075
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
17076
- const _r6 = i0.ɵɵgetCurrentView();
17077
- i0.ɵɵelementContainerStart(0);
17078
- i0.ɵɵelementStart(1, "div", 8);
17079
- i0.ɵɵelementStart(2, "input", 9);
17080
- 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); });
17081
- i0.ɵɵelementEnd();
17082
- i0.ɵɵelementStart(3, "label", 10);
17083
- i0.ɵɵtext(4);
17084
- i0.ɵɵelementEnd();
17085
- i0.ɵɵelementEnd();
17086
- i0.ɵɵelementContainerEnd();
17087
- } if (rf & 2) {
17088
- const checkbox_r4 = ctx.$implicit;
17089
- const ctx_r3 = i0.ɵɵnextContext();
17090
- i0.ɵɵadvance(2);
17091
- i0.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
17092
- i0.ɵɵpropertyInterpolate("name", ctx_r3.id());
17093
- i0.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
17094
- i0.ɵɵadvance(1);
17095
- i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
17096
- i0.ɵɵadvance(1);
17097
- i0.ɵɵtextInterpolate(checkbox_r4.label);
17098
- } }
17099
- const _c0$A = function (a0) { return { "error": a0 }; };
17100
- class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
17101
- ngOnInit() {
17102
- this.checkboxes = new FormArray([]);
17103
- this.setInitialCaseList();
17104
- this.setInitialCaseFieldValue();
17105
- // Initialise array with existing values
17106
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
17107
- const values = this.caseField.value;
17108
- values.forEach(value => {
17109
- this.checkboxes.push(new FormControl(value));
17110
- });
17111
- }
17112
- this.dynamicListFormControl = this.registerControl(new FormControl(this.checkboxes.value));
17113
- this.dynamicListFormControl.setValue(this.checkboxes.value);
17114
- }
17115
- onCheckChange(event) {
17116
- const target = event.target;
17117
- if (!target || !target.value) {
17118
- return;
17119
- }
17120
- const selectedListItem = this.getValueListItem(target.value);
17121
- if (!this.isSelected(target.value)) {
17122
- // Add a new control in the FormArray
17123
- this.checkboxes.push(new FormControl(selectedListItem));
17124
- }
17125
- else {
17126
- // Remove the control from the FormArray
17127
- this.checkboxes.controls.forEach((ctrl, i) => {
17128
- if (ctrl.value.code === target.value) {
17129
- this.checkboxes.removeAt(i);
17130
- }
17131
- });
17132
- }
17133
- this.dynamicListFormControl.setValue(this.checkboxes.value);
17134
- }
17135
- isSelected(code) {
17136
- if (this.checkboxes && this.checkboxes.controls) {
17137
- return this.checkboxes.controls.find(control => control.value.code === code);
17138
- }
17139
- }
17140
- getValueListItem(value) {
17141
- return this.caseField.list_items.find(i => i.code === value);
17142
- }
17143
- setInitialCaseList() {
17144
- const hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
17145
- const hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
17146
- if (!hasListItems && hasFormattedListItems) {
17147
- this.caseField.list_items = this.caseField.formatted_value.list_items;
17148
- }
17149
- }
17150
- setInitialCaseFieldValue() {
17151
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
17152
- this.caseField.value = this.caseField.formatted_value.value;
17153
- }
17154
- const isNull = this.caseField.value === undefined || this.caseField.value === '';
17155
- if (isNull || !Array.isArray(this.caseField.value)) {
17156
- this.caseField.value = [];
17157
- }
17158
- }
17159
- }
17160
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
17161
- 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) {
17162
- i0.ɵɵelementStart(0, "div", 0);
17163
- i0.ɵɵelementStart(1, "fieldset");
17164
- i0.ɵɵelementStart(2, "legend");
17165
- i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
17166
- i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
17167
- i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
17168
- i0.ɵɵelementEnd();
17169
- i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
17170
- i0.ɵɵelementEnd();
17171
- i0.ɵɵelementEnd();
17172
- } if (rf & 2) {
17173
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
17174
- i0.ɵɵadvance(3);
17175
- i0.ɵɵproperty("ngIf", ctx.caseField.label);
17176
- i0.ɵɵadvance(1);
17177
- i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
17178
- i0.ɵɵadvance(1);
17179
- i0.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
17180
- i0.ɵɵadvance(1);
17181
- i0.ɵɵproperty("ngForOf", ctx.caseField.list_items);
17182
- } }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17183
- const ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
17184
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
17185
- type: Component,
17186
- args: [{
17187
- selector: 'ccd-write-dynamic-multi-select-list-field',
17188
- templateUrl: './write-dynamic-multi-select-list-field.html'
17189
- }]
17190
- }], null, null); })();
17191
-
17192
17143
  class ReadPhoneUKFieldComponent extends AbstractFieldReadComponent {
17193
17144
  }
17194
17145
  ReadPhoneUKFieldComponent.ɵfac = function ReadPhoneUKFieldComponent_Factory(t) { return ɵReadPhoneUKFieldComponent_BaseFactory(t || ReadPhoneUKFieldComponent); };
@@ -17339,7 +17290,7 @@ class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
17339
17290
  autoGrow(event) {
17340
17291
  if (this.browserService.isIEOrEdge()) {
17341
17292
  event.target.style.height = 'auto';
17342
- event.target.style.height = event.target.scrollHeight + 'px';
17293
+ event.target.style.height = `${event.target.scrollHeight}px`;
17343
17294
  event.target.scrollTop = event.target.scrollHeight;
17344
17295
  }
17345
17296
  }
@@ -17525,6 +17476,7 @@ class YesNoService {
17525
17476
  return YesNoService.EMPTY;
17526
17477
  }
17527
17478
  isYes(value) {
17479
+ // tslint:disable-next-line:switch-default
17528
17480
  switch (typeof (value)) {
17529
17481
  case 'boolean':
17530
17482
  return value;
@@ -17534,6 +17486,7 @@ class YesNoService {
17534
17486
  return false;
17535
17487
  }
17536
17488
  isNo(value) {
17489
+ // tslint:disable-next-line:switch-default
17537
17490
  switch (typeof (value)) {
17538
17491
  case 'boolean':
17539
17492
  return !value;
@@ -18158,7 +18111,7 @@ CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseF
18158
18111
  i0.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
18159
18112
  i0.ɵɵadvance(2);
18160
18113
  i0.ɵɵproperty("ngForOf", ctx.currentCategories);
18161
- } }, 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 });
18114
+ } }, 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 });
18162
18115
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
18163
18116
  type: Component,
18164
18117
  args: [{
@@ -18355,6 +18308,7 @@ CaseFileViewFolderSortComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileV
18355
18308
  class CaseFileViewCategory {
18356
18309
  }
18357
18310
 
18311
+ // tslint:disable:variable-name
18358
18312
  class CaseFileViewDocument {
18359
18313
  }
18360
18314
 
@@ -19570,7 +19524,7 @@ class SelectFlagLocationComponent {
19570
19524
  // is expected not to have a party name)
19571
19525
  if (this.flagsData) {
19572
19526
  this.filteredFlagsData =
19573
- this.flagsData.filter(f => f.flags.partyName != null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19527
+ this.flagsData.filter(f => f.flags.partyName !== null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
19574
19528
  }
19575
19529
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
19576
19530
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -20738,18 +20692,19 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
20738
20692
  field.value = { CaseReference: value };
20739
20693
  return field;
20740
20694
  }
20741
- toCaseField(id, label, field_type, value) {
20695
+ toCaseField(id, label, fieldType, value) {
20742
20696
  return plainToClassFromExist(new CaseField(), {
20743
20697
  id,
20744
20698
  label,
20745
20699
  display_context: 'READONLY',
20746
20700
  value,
20747
- field_type
20701
+ field_type: fieldType
20748
20702
  });
20749
20703
  }
20750
20704
  sortRowsByColumns(column) {
20751
20705
  const shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
20752
20706
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
20707
+ // tslint:disable-next-line:switch-default
20753
20708
  switch (this.columnsHorizontalLabel[column].type.type) {
20754
20709
  case 'Number':
20755
20710
  case 'MoneyGBP': {
@@ -21726,6 +21681,7 @@ MarkdownComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MarkdownComponent, sele
21726
21681
  class FeeValue {
21727
21682
  }
21728
21683
 
21684
+ // tslint:disable:variable-name
21729
21685
  class Fee {
21730
21686
  }
21731
21687
 
@@ -22330,7 +22286,7 @@ CcdTabFieldsPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdTabFields", type: CcdTab
22330
22286
 
22331
22287
  class CcdPageFieldsPipe {
22332
22288
  transform(page, dataFormGroup) {
22333
- const complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
22289
+ const complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
22334
22290
  const control = dataFormGroup.controls['data'].get(key);
22335
22291
  return control['caseField'];
22336
22292
  }).filter(field => {
@@ -22349,7 +22305,7 @@ class CcdPageFieldsPipe {
22349
22305
  field_type: {
22350
22306
  id: page.id,
22351
22307
  type: 'Complex',
22352
- complex_fields
22308
+ complex_fields: complexFields
22353
22309
  }
22354
22310
  });
22355
22311
  }
@@ -22508,11 +22464,11 @@ class CollectionCreateCheckerService {
22508
22464
  }
22509
22465
  return childrenCaseFields;
22510
22466
  }
22511
- isComplex(case_field) {
22512
- return case_field.field_type.type === 'Complex';
22467
+ isComplex(caseField) {
22468
+ return caseField.field_type.type === 'Complex';
22513
22469
  }
22514
- isCollection(case_field) {
22515
- return case_field.field_type.type === 'Collection';
22470
+ isCollection(caseField) {
22471
+ return caseField.field_type.type === 'Collection';
22516
22472
  }
22517
22473
  hasCreateAccess(caseField, role) {
22518
22474
  return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
@@ -22659,9 +22615,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22659
22615
  FileUploadStateService,
22660
22616
  FileUploadProgressGuard,
22661
22617
  WindowService,
22662
- LinkedCasesService,
22663
22618
  CommonDataService,
22664
22619
  JurisdictionService,
22620
+ LinkedCasesService,
22665
22621
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
22666
22622
  ], imports: [[
22667
22623
  CommonModule,
@@ -23002,9 +22958,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
23002
22958
  FileUploadStateService,
23003
22959
  FileUploadProgressGuard,
23004
22960
  WindowService,
23005
- LinkedCasesService,
23006
22961
  CommonDataService,
23007
22962
  JurisdictionService,
22963
+ LinkedCasesService,
23008
22964
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
23009
22965
  ],
23010
22966
  entryComponents: [CaseFileViewFolderSelectorComponent]
@@ -23038,7 +22994,7 @@ i0.ɵɵsetComponentScope(WriteCaseFlagFieldComponent, [i1.NgIf, i1.NgForOf, i2.N
23038
22994
  AddCommentsComponent,
23039
22995
  ManageCaseFlagsComponent,
23040
22996
  UpdateFlagComponent], []);
23041
- i0.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i1.NgIf, i1.NgForOf, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgSwitch, i1.NgSwitchCase, BeforeYouStartComponent,
22997
+ i0.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgSwitch, i1.NgSwitchCase, BeforeYouStartComponent,
23042
22998
  NoLinkedCasesComponent,
23043
22999
  LinkCasesComponent,
23044
23000
  UnLinkCasesComponent,
@@ -23422,8 +23378,8 @@ class CaseEditSubmitComponent {
23422
23378
  this.caseEdit.navigateToPage(pageId);
23423
23379
  }
23424
23380
  callbackErrorsNotify(errorContext) {
23425
- this.caseEdit.ignoreWarning = errorContext.ignore_warning;
23426
- this.triggerText = errorContext.trigger_text;
23381
+ this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
23382
+ this.triggerText = errorContext.triggerText;
23427
23383
  }
23428
23384
  summaryCaseField(field) {
23429
23385
  /* istanbul ignore else */
@@ -23478,7 +23434,7 @@ class CaseEditSubmitComponent {
23478
23434
  return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
23479
23435
  }
23480
23436
  showEventNotes() {
23481
- return this.eventTrigger.show_event_notes !== false;
23437
+ return this.eventTrigger.show_event_notes === true;
23482
23438
  }
23483
23439
  getLastPageShown() {
23484
23440
  let lastPage;
@@ -24046,6 +24002,7 @@ class CaseEventCompletionComponent {
24046
24002
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
24047
24003
  ]
24048
24004
  });
24005
+ // tslint:disable-next-line:switch-default
24049
24006
  switch (portalType) {
24050
24007
  case EventCompletionPortalTypes.TaskCancelled:
24051
24008
  this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -24221,7 +24178,7 @@ CaseEditorModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
24221
24178
  }]
24222
24179
  }], null, null); })();
24223
24180
  i0.ɵɵsetComponentScope(CaseEditConfirmComponent, [i1.NgIf, MarkdownComponent, i2.ɵangular_packages_forms_forms_ba, i2.NgControlStatusGroup, i2.FormGroupDirective], [CcdCaseTitlePipe, CaseReferencePipe]);
24224
- i0.ɵɵsetComponentScope(CaseEditPageComponent, [i1.NgIf, LoadingSpinnerComponent, MarkdownComponent, i1.NgForOf, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2.ɵangular_packages_forms_forms_ba, i2.NgControlStatusGroup, i2.FormGroupDirective, CaseEditFormComponent,
24181
+ i0.ɵɵsetComponentScope(CaseEditPageComponent, [i1.NgIf, MarkdownComponent, i1.NgForOf, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2.ɵangular_packages_forms_forms_ba, i2.NgControlStatusGroup, i2.FormGroupDirective, CaseEditFormComponent,
24225
24182
  CaseEventCompletionComponent], [CcdCaseTitlePipe, CaseReferencePipe, i1.AsyncPipe]);
24226
24183
  i0.ɵɵsetComponentScope(CaseEditFormComponent, [i1.NgForOf, ConditionalShowFormDirective, i2.NgControlStatusGroup, i2.FormGroupDirective, LabelSubstitutorDirective, i1.NgSwitch, i1.NgSwitchCase, FieldReadComponent, i1.NgIf, FieldWriteComponent], [IsReadOnlyAndNotCollectionPipe, IsCompoundPipe]);
24227
24184
  i0.ɵɵsetComponentScope(CaseEditSubmitComponent, [i1.NgIf, MarkdownComponent, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2.ɵangular_packages_forms_forms_ba, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgForOf, LabelSubstitutorDirective, FieldReadComponent, i1.NgSwitch, i1.NgSwitchCase, i2.FormGroupName, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i2.MaxLengthValidator, CaseEventCompletionComponent], [CcdCaseTitlePipe, CaseReferencePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, IsCompoundPipe]);
@@ -24519,27 +24476,27 @@ class PaginationComponent {
24519
24476
  this.screenReaderCurrentLabel = `You're on page`;
24520
24477
  this.pageChange = new EventEmitter();
24521
24478
  this.pageBoundsCorrection = new EventEmitter();
24522
- this._directionLinks = true;
24523
- this._autoHide = false;
24524
- this._responsive = false;
24479
+ this.pDirectionLinks = true;
24480
+ this.pAutoHide = false;
24481
+ this.pResponsive = false;
24525
24482
  }
24526
24483
  get directionLinks() {
24527
- return this._directionLinks;
24484
+ return this.pDirectionLinks;
24528
24485
  }
24529
24486
  set directionLinks(value) {
24530
- this._directionLinks = coerceToBoolean(value);
24487
+ this.pDirectionLinks = coerceToBoolean(value);
24531
24488
  }
24532
24489
  get autoHide() {
24533
- return this._autoHide;
24490
+ return this.pAutoHide;
24534
24491
  }
24535
24492
  set autoHide(value) {
24536
- this._autoHide = coerceToBoolean(value);
24493
+ this.pAutoHide = coerceToBoolean(value);
24537
24494
  }
24538
24495
  get responsive() {
24539
- return this._responsive;
24496
+ return this.pResponsive;
24540
24497
  }
24541
24498
  set responsive(value) {
24542
- this._responsive = coerceToBoolean(value);
24499
+ this.pResponsive = coerceToBoolean(value);
24543
24500
  }
24544
24501
  }
24545
24502
  PaginationComponent.ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
@@ -25200,7 +25157,7 @@ class WorkbasketFiltersComponent {
25200
25157
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
25201
25158
  workbasketInputs.forEach(item => {
25202
25159
  if (item.field.elementPath) {
25203
- item.field.id = item.field.id + '.' + item.field.elementPath;
25160
+ item.field.id = `${item.field.id}.${item.field.elementPath}`;
25204
25161
  }
25205
25162
  item.field.label = item.label;
25206
25163
  if (formValue) {
@@ -25252,7 +25209,7 @@ class WorkbasketFiltersComponent {
25252
25209
  const value = formGroupLS[key];
25253
25210
  // Clear the filter form group control values if it has a value in local storage
25254
25211
  // The regionList form group control value should be ignored as it always contain the latest value
25255
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
25212
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
25256
25213
  this.formGroup.get(key).setValue(null);
25257
25214
  }
25258
25215
  }
@@ -26271,7 +26228,7 @@ class CaseEventTriggerComponent {
26271
26228
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
26272
26229
  if (this.activityPollingService.isEnabled) {
26273
26230
  this.ngZone.runOutsideAngular(() => {
26274
- this.activitySubscription = this.postEditActivity().subscribe((_resolved) => {
26231
+ this.activitySubscription = this.postEditActivity().subscribe(() => {
26275
26232
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
26276
26233
  });
26277
26234
  });
@@ -26333,9 +26290,7 @@ class CaseEventTriggerComponent {
26333
26290
  }
26334
26291
  cancel() {
26335
26292
  if (this.router.url && this.router.url.includes('linkCases')) {
26336
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(() => {
26337
- window.location.hash = 'Linked cases';
26338
- });
26293
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: 'Linked cases' });
26339
26294
  }
26340
26295
  else {
26341
26296
  return this.router.navigate([this.parentUrl]);
@@ -26848,9 +26803,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_
26848
26803
  i0.ɵɵelementEnd();
26849
26804
  i0.ɵɵelementEnd();
26850
26805
  } if (rf & 2) {
26851
- const field_r24 = i0.ɵɵnextContext(2).$implicit;
26806
+ const field_r23 = i0.ɵɵnextContext(2).$implicit;
26852
26807
  i0.ɵɵadvance(2);
26853
- i0.ɵɵtextInterpolate(field_r24.label);
26808
+ i0.ɵɵtextInterpolate(field_r23.label);
26854
26809
  } }
26855
26810
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) { if (rf & 1) {
26856
26811
  i0.ɵɵelementStart(0, "tr");
@@ -26862,14 +26817,14 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_
26862
26817
  i0.ɵɵelementEnd();
26863
26818
  i0.ɵɵelementEnd();
26864
26819
  } if (rf & 2) {
26865
- const field_r24 = i0.ɵɵnextContext().$implicit;
26866
- const ctx_r25 = i0.ɵɵnextContext(4);
26820
+ const field_r23 = i0.ɵɵnextContext().$implicit;
26821
+ const ctx_r24 = i0.ɵɵnextContext(4);
26867
26822
  i0.ɵɵadvance(1);
26868
- i0.ɵɵproperty("ngIf", !ctx_r25.isFieldToHaveNoLabel(field_r24));
26823
+ i0.ɵɵproperty("ngIf", !ctx_r24.isFieldToHaveNoLabel(field_r23));
26869
26824
  i0.ɵɵadvance(1);
26870
- i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
26825
+ i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
26871
26826
  i0.ɵɵadvance(2);
26872
- i0.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
26827
+ i0.ɵɵproperty("topLevelFormGroup", ctx_r24.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r24.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r24.markdownUseHrefAsRouterLink);
26873
26828
  } }
26874
26829
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template(rf, ctx) { if (rf & 1) {
26875
26830
  i0.ɵɵelementStart(0, "tr", 39);
@@ -26880,12 +26835,12 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_
26880
26835
  i0.ɵɵelementEnd();
26881
26836
  i0.ɵɵelementEnd();
26882
26837
  } if (rf & 2) {
26883
- const field_r24 = i0.ɵɵnextContext().$implicit;
26884
- const ctx_r26 = i0.ɵɵnextContext(4);
26838
+ const field_r23 = i0.ɵɵnextContext().$implicit;
26839
+ const ctx_r25 = i0.ɵɵnextContext(4);
26885
26840
  i0.ɵɵadvance(1);
26886
- i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
26841
+ i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
26887
26842
  i0.ɵɵadvance(2);
26888
- i0.ɵɵproperty("topLevelFormGroup", ctx_r26.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r26.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r26.markdownUseHrefAsRouterLink);
26843
+ i0.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
26889
26844
  } }
26890
26845
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
26891
26846
  i0.ɵɵelementContainerStart(0);
@@ -26898,12 +26853,12 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_
26898
26853
  i0.ɵɵelementEnd();
26899
26854
  i0.ɵɵelementContainerEnd();
26900
26855
  } if (rf & 2) {
26901
- const field_r24 = ctx.$implicit;
26902
- const ctx_r23 = i0.ɵɵnextContext(4);
26856
+ const field_r23 = ctx.$implicit;
26857
+ const ctx_r22 = i0.ɵɵnextContext(4);
26903
26858
  i0.ɵɵadvance(1);
26904
- i0.ɵɵproperty("caseField", field_r24)("contextFields", ctx_r23.caseFields)("hidden", field_r24.hidden);
26859
+ i0.ɵɵproperty("caseField", field_r23)("contextFields", ctx_r22.caseFields)("hidden", field_r23.hidden);
26905
26860
  i0.ɵɵadvance(1);
26906
- i0.ɵɵproperty("ngSwitch", !i0.ɵɵpipeBind1(3, 6, field_r24));
26861
+ i0.ɵɵproperty("ngSwitch", !i0.ɵɵpipeBind1(3, 6, field_r23));
26907
26862
  i0.ɵɵadvance(2);
26908
26863
  i0.ɵɵproperty("ngSwitchCase", true);
26909
26864
  i0.ɵɵadvance(1);
@@ -26920,10 +26875,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_Tem
26920
26875
  i0.ɵɵelementEnd();
26921
26876
  } if (rf & 2) {
26922
26877
  const tab_r20 = i0.ɵɵnextContext().$implicit;
26923
- const ctx_r22 = i0.ɵɵnextContext(2);
26878
+ const ctx_r21 = i0.ɵɵnextContext(2);
26924
26879
  i0.ɵɵclassMap(tab_r20.id);
26925
26880
  i0.ɵɵadvance(2);
26926
- i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(3, 3, i0.ɵɵpureFunction2(11, _c1$3, i0.ɵɵpipeBind1(4, 9, tab_r20), ctx_r22.formGroup.controls["data"])));
26881
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(3, 3, i0.ɵɵpureFunction2(11, _c1$3, i0.ɵɵpipeBind1(4, 9, tab_r20), ctx_r21.formGroup.controls["data"])));
26927
26882
  } }
26928
26883
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) { if (rf & 1) {
26929
26884
  i0.ɵɵelementStart(0, "mat-tab", 26);
@@ -26936,17 +26891,17 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx)
26936
26891
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx) { if (rf & 1) {
26937
26892
  i0.ɵɵelement(0, "mat-tab", 26);
26938
26893
  } if (rf & 2) {
26939
- const tab_r32 = ctx.$implicit;
26940
- i0.ɵɵproperty("id", tab_r32.id)("label", tab_r32.label);
26894
+ const tab_r31 = ctx.$implicit;
26895
+ i0.ɵɵproperty("id", tab_r31.id)("label", tab_r31.label);
26941
26896
  } }
26942
26897
  function CaseFullAccessViewComponent_ng_container_12_router_outlet_6_Template(rf, ctx) { if (rf & 1) {
26943
26898
  i0.ɵɵelement(0, "router-outlet");
26944
26899
  } }
26945
26900
  function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) { if (rf & 1) {
26946
- const _r34 = i0.ɵɵgetCurrentView();
26901
+ const _r33 = i0.ɵɵgetCurrentView();
26947
26902
  i0.ɵɵelementContainerStart(0);
26948
26903
  i0.ɵɵelementStart(1, "mat-tab-group", 23, 24);
26949
- 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); });
26904
+ i0.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.tabChanged($event); });
26950
26905
  i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
26951
26906
  i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
26952
26907
  i0.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
@@ -27121,8 +27076,8 @@ class CaseFullAccessViewComponent {
27121
27076
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
27122
27077
  }
27123
27078
  callbackErrorsNotify(callbackErrorsContext) {
27124
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
27125
- this.triggerText = callbackErrorsContext.trigger_text;
27079
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
27080
+ this.triggerText = callbackErrorsContext.triggerText;
27126
27081
  }
27127
27082
  isDraft() {
27128
27083
  return Draft.isDraft(this.caseDetails.case_id);
@@ -27398,7 +27353,7 @@ class PrintUrlPipe {
27398
27353
  * or the empty string
27399
27354
  */
27400
27355
  transform(remoteUrl) {
27401
- if (remoteUrl && remoteUrl.length > 0) {
27356
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
27402
27357
  let printServiceUrlPathname;
27403
27358
  /**
27404
27359
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -27414,7 +27369,7 @@ class PrintUrlPipe {
27414
27369
  printServiceUrlPathname = urlParser.pathname;
27415
27370
  if (printServiceUrlPathname[0] !== '/') {
27416
27371
  // Fix for IE11; it returns the pathname without leading slash
27417
- printServiceUrlPathname = '/' + printServiceUrlPathname;
27372
+ printServiceUrlPathname = `/${printServiceUrlPathname}`;
27418
27373
  }
27419
27374
  }
27420
27375
  else {
@@ -27560,10 +27515,11 @@ function CaseViewerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
27560
27515
  i0.ɵɵproperty("ngIf", ctx_r0.hasStandardAccess());
27561
27516
  } }
27562
27517
  class CaseViewerComponent {
27563
- constructor(route, caseNotifier, appConfig) {
27518
+ constructor(route, caseNotifier, appConfig, orderService) {
27564
27519
  this.route = route;
27565
27520
  this.caseNotifier = caseNotifier;
27566
27521
  this.appConfig = appConfig;
27522
+ this.orderService = orderService;
27567
27523
  this.hasPrint = true;
27568
27524
  this.hasEventSelector = true;
27569
27525
  this.prependedTabs = [];
@@ -27578,23 +27534,25 @@ class CaseViewerComponent {
27578
27534
  }
27579
27535
  }
27580
27536
  loadCaseDetails() {
27581
- if (!this.route.snapshot.data.case) {
27537
+ if (this.route.snapshot.data.case) {
27538
+ this.caseDetails = this.route.snapshot.data.case;
27539
+ this.caseDetails.tabs = this.orderService.sort(this.caseDetails.tabs);
27540
+ this.caseDetails.tabs = this.suffixDuplicateTabs(this.caseDetails.tabs);
27541
+ this.setUserAccessType(this.caseDetails);
27542
+ }
27543
+ else {
27582
27544
  this.caseSubscription = this.caseNotifier.caseView.subscribe(caseDetails => {
27583
27545
  this.caseDetails = caseDetails;
27584
27546
  this.setUserAccessType(this.caseDetails);
27585
27547
  });
27586
27548
  }
27587
- else {
27588
- this.caseDetails = this.route.snapshot.data.case;
27589
- this.setUserAccessType(this.caseDetails);
27590
- }
27591
27549
  }
27592
27550
  setUserAccessType(caseDetails) {
27593
27551
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
27594
- const access_process = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
27595
- const access_granted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27596
- this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27597
- this.userAccessType = access_process ? access_process.value : null;
27552
+ const accessProcess = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID);
27553
+ const accessGranted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
27554
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
27555
+ this.userAccessType = accessProcess ? accessProcess.value : null;
27598
27556
  }
27599
27557
  }
27600
27558
  isDataLoaded() {
@@ -27606,13 +27564,29 @@ class CaseViewerComponent {
27606
27564
  !this.accessGranted ? CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.indexOf(this.userAccessType) === -1 : true
27607
27565
  : true;
27608
27566
  }
27567
+ suffixDuplicateTabs(tabs) {
27568
+ const count = {};
27569
+ const firstOccurences = {};
27570
+ let item;
27571
+ let itemCount;
27572
+ for (let i = 0, c = tabs.length; i < c; i++) {
27573
+ item = tabs[i].label;
27574
+ itemCount = count[item];
27575
+ itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1);
27576
+ if (count[item] > 1)
27577
+ tabs[i].label = tabs[i].label + Array(count[item] - 1).fill('_').join('');
27578
+ else
27579
+ firstOccurences[item] = i;
27580
+ }
27581
+ return tabs;
27582
+ }
27609
27583
  }
27610
- CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID = '[ACCESS_PROCESS]';
27584
+ CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID = '[ACCESS_PROCESS]';
27611
27585
  CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID = '[ACCESS_GRANTED]';
27612
27586
  CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES = ['CHALLENGED', 'SPECIFIC'];
27613
27587
  CaseViewerComponent.BASIC_USER_ACCESS_TYPES = 'BASIC';
27614
- CaseViewerComponent.ɵfac = function CaseViewerComponent_Factory(t) { return new (t || CaseViewerComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
27615
- CaseViewerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseViewerComponent, selectors: [["ccd-case-viewer"]], inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs", caseDetails: "caseDetails" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "accessType", "caseDetails", 4, "ngIf"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs", 4, "ngIf"], [3, "accessType", "caseDetails"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs"]], template: function CaseViewerComponent_Template(rf, ctx) { if (rf & 1) {
27588
+ CaseViewerComponent.ɵfac = function CaseViewerComponent_Factory(t) { return new (t || CaseViewerComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(OrderService)); };
27589
+ CaseViewerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseViewerComponent, selectors: [["ccd-case-viewer"]], inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "accessType", "caseDetails", 4, "ngIf"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs", 4, "ngIf"], [3, "accessType", "caseDetails"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs"]], template: function CaseViewerComponent_Template(rf, ctx) { if (rf & 1) {
27616
27590
  i0.ɵɵtemplate(0, CaseViewerComponent_div_0_Template, 3, 2, "div", 0);
27617
27591
  } if (rf & 2) {
27618
27592
  i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
@@ -27623,7 +27597,7 @@ CaseViewerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseViewerComponent,
27623
27597
  selector: 'ccd-case-viewer',
27624
27598
  templateUrl: './case-viewer.component.html'
27625
27599
  }]
27626
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CaseNotifier }, { type: AbstractAppConfig }]; }, { hasPrint: [{
27600
+ }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CaseNotifier }, { type: AbstractAppConfig }, { type: OrderService }]; }, { hasPrint: [{
27627
27601
  type: Input
27628
27602
  }], hasEventSelector: [{
27629
27603
  type: Input
@@ -27631,8 +27605,6 @@ CaseViewerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseViewerComponent,
27631
27605
  type: Input
27632
27606
  }], appendedTabs: [{
27633
27607
  type: Input
27634
- }], caseDetails: [{
27635
- type: Input
27636
27608
  }] }); })();
27637
27609
 
27638
27610
  /**
@@ -28759,11 +28731,11 @@ class CaseChallengedAccessRequestComponent {
28759
28731
  };
28760
28732
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId, challengedAccessRequest)
28761
28733
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
28762
- .subscribe(_response => {
28734
+ .subscribe(() => {
28763
28735
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
28764
28736
  // Angular 7.2!
28765
28737
  this.router.navigate(['success'], { relativeTo: this.route });
28766
- }, _error => {
28738
+ }, () => {
28767
28739
  // Navigate to error page
28768
28740
  });
28769
28741
  }
@@ -28777,7 +28749,7 @@ class CaseChallengedAccessRequestComponent {
28777
28749
  }
28778
28750
  }
28779
28751
  inputEmpty(input) {
28780
- return input.value == null || input.value.trim().length === 0;
28752
+ return input.value === null || input.value.trim().length === 0;
28781
28753
  }
28782
28754
  }
28783
28755
  CaseChallengedAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -29363,11 +29335,11 @@ class CaseSpecificAccessRequestComponent {
29363
29335
  };
29364
29336
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId, specificAccessRequest)
29365
29337
  .pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
29366
- .subscribe(_response => {
29338
+ .subscribe(() => {
29367
29339
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
29368
29340
  // Angular 7.2
29369
29341
  this.router.navigate(['success'], { relativeTo: this.route });
29370
- }, _error => {
29342
+ }, () => {
29371
29343
  // Navigate to error page
29372
29344
  });
29373
29345
  }
@@ -29382,7 +29354,7 @@ class CaseSpecificAccessRequestComponent {
29382
29354
  }
29383
29355
  }
29384
29356
  inputEmpty(input) {
29385
- return input.value == null || input.value.trim().length === 0;
29357
+ return input.value === null || input.value.trim().length === 0;
29386
29358
  }
29387
29359
  }
29388
29360
  CaseSpecificAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
@@ -30224,7 +30196,7 @@ class SearchFiltersComponent {
30224
30196
  }
30225
30197
  searchInputs.forEach(item => {
30226
30198
  if (item.field.elementPath) {
30227
- item.field.id = item.field.id + '.' + item.field.elementPath;
30199
+ item.field.id = `${item.field.id}.${item.field.elementPath}`;
30228
30200
  }
30229
30201
  item.field.label = item.label;
30230
30202
  if (formValueObject) {
@@ -30478,7 +30450,7 @@ function SearchResultComponent_table_0_div_4_Template(rf, ctx) { if (rf & 1) {
30478
30450
  } if (rf & 2) {
30479
30451
  const ctx_r3 = i0.ɵɵnextContext(2);
30480
30452
  i0.ɵɵadvance(6);
30481
- 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. ");
30453
+ 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. ");
30482
30454
  } }
30483
30455
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) { if (rf & 1) {
30484
30456
  i0.ɵɵelementStart(0, "div", 15);
@@ -30936,7 +30908,7 @@ class SearchResultComponent {
30936
30908
  }
30937
30909
  }
30938
30910
  get resultTotal() {
30939
- const total = this.paginationMetadata.total_results_count;
30911
+ const total = this.paginationMetadata.totalResultsCount;
30940
30912
  const maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
30941
30913
  this.paginationLimitEnforced = maximumResultReached;
30942
30914
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -31081,7 +31053,7 @@ class SearchResultComponent {
31081
31053
  return col;
31082
31054
  }
31083
31055
  hasResults() {
31084
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
31056
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
31085
31057
  }
31086
31058
  hasDrafts() {
31087
31059
  return this.resultView.hasDrafts();
@@ -31180,7 +31152,7 @@ class SearchResultComponent {
31180
31152
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
31181
31153
  }
31182
31154
  getTotalResults() {
31183
- const total = this.paginationMetadata.total_results_count + this.draftsCount;
31155
+ const total = this.paginationMetadata.totalResultsCount + this.draftsCount;
31184
31156
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
31185
31157
  }
31186
31158
  prepareCaseLinkUrl(caseId) {
@@ -31325,6 +31297,7 @@ SearchResultModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
31325
31297
  }], null, null); })();
31326
31298
  i0.ɵɵsetComponentScope(SearchResultComponent, [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1.DecimalPipe, i1$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
31327
31299
 
31300
+ // tslint:disable:variable-name
31328
31301
  class ComplexFieldOverride {
31329
31302
  }
31330
31303
 
@@ -31343,24 +31316,24 @@ class CaseFieldBuilder {
31343
31316
  this.caseField.id = id;
31344
31317
  return this;
31345
31318
  }
31346
- withFieldType(field_type) {
31347
- this.caseField.field_type = field_type;
31319
+ withFieldType(fieldType) {
31320
+ this.caseField.field_type = fieldType;
31348
31321
  return this;
31349
31322
  }
31350
- withDisplayContext(display_context) {
31351
- this.caseField.display_context = display_context;
31323
+ withDisplayContext(displayContext) {
31324
+ this.caseField.display_context = displayContext;
31352
31325
  return this;
31353
31326
  }
31354
- withDisplayContextParameter(display_context_parameter) {
31355
- this.caseField.display_context_parameter = display_context_parameter;
31327
+ withDisplayContextParameter(displayContextParameter) {
31328
+ this.caseField.display_context_parameter = displayContextParameter;
31356
31329
  return this;
31357
31330
  }
31358
31331
  withHidden(hidden) {
31359
31332
  this.caseField.hidden = hidden;
31360
31333
  return this;
31361
31334
  }
31362
- withHintText(hint_text) {
31363
- this.caseField.hint_text = hint_text;
31335
+ withHintText(hintText) {
31336
+ this.caseField.hint_text = hintText;
31364
31337
  return this;
31365
31338
  }
31366
31339
  withLabel(label) {
@@ -31371,12 +31344,12 @@ class CaseFieldBuilder {
31371
31344
  this.caseField.order = order;
31372
31345
  return this;
31373
31346
  }
31374
- withSecurityLabel(security_label) {
31375
- this.caseField.security_label = security_label;
31347
+ withSecurityLabel(securityLabel) {
31348
+ this.caseField.security_label = securityLabel;
31376
31349
  return this;
31377
31350
  }
31378
- withShowCondition(show_condition) {
31379
- this.caseField.show_condition = show_condition;
31351
+ withShowCondition(showCondition) {
31352
+ this.caseField.show_condition = showCondition;
31380
31353
  return this;
31381
31354
  }
31382
31355
  withShowSummaryContentOption(option) {
@@ -31403,19 +31376,19 @@ const textFieldType = () => {
31403
31376
  complex_fields: []
31404
31377
  };
31405
31378
  };
31406
- const createCaseEventTrigger = (id, name, case_id, show_summary, case_fields, wizard_pages = [], can_save_draft = false) => {
31379
+ const createCaseEventTrigger = (id, name, caseId, showSummary, caseFields, wizardPages = [], canSaveDraft = false) => {
31407
31380
  const eventTrigger = new CaseEventTrigger();
31408
31381
  eventTrigger.id = id;
31409
31382
  eventTrigger.name = name;
31410
- eventTrigger.case_id = case_id;
31411
- eventTrigger.show_summary = show_summary;
31412
- eventTrigger.wizard_pages = wizard_pages;
31383
+ eventTrigger.case_id = caseId;
31384
+ eventTrigger.show_summary = showSummary;
31385
+ eventTrigger.wizard_pages = wizardPages;
31413
31386
  eventTrigger.event_token = 'test-token';
31414
- eventTrigger.case_fields = case_fields;
31415
- eventTrigger.can_save_draft = can_save_draft;
31387
+ eventTrigger.case_fields = caseFields;
31388
+ eventTrigger.can_save_draft = canSaveDraft;
31416
31389
  return eventTrigger;
31417
31390
  };
31418
- const aCaseField = (id, label, type, display_context, show_summary_content_option, typeComplexFields = [], retain_hidden_value, hidden) => {
31391
+ const aCaseField = (id, label, type, displayContext, showSummaryContentOption, typeComplexFields = [], retainHiddenValue, hidden) => {
31419
31392
  return ({
31420
31393
  id: id || 'personFirstName',
31421
31394
  field_type: {
@@ -31423,10 +31396,10 @@ const aCaseField = (id, label, type, display_context, show_summary_content_optio
31423
31396
  type: type || 'Text',
31424
31397
  complex_fields: typeComplexFields || []
31425
31398
  },
31426
- display_context: display_context || 'OPTIONAL',
31399
+ display_context: displayContext || 'OPTIONAL',
31427
31400
  label: label || 'First name',
31428
- show_summary_content_option,
31429
- retain_hidden_value: retain_hidden_value || false,
31401
+ show_summary_content_option: showSummaryContentOption,
31402
+ retain_hidden_value: retainHiddenValue || false,
31430
31403
  hidden: hidden || false
31431
31404
  });
31432
31405
  };
@@ -31464,59 +31437,59 @@ const createHiddenComplexFieldOverride = (id) => {
31464
31437
  complexFieldOverride.display_context = 'HIDDEN';
31465
31438
  return complexFieldOverride;
31466
31439
  };
31467
- const createCaseField = (id, label, hint, fieldType, display_context, order = undefined, show_condition = undefined, ACLs = undefined, hidden) => {
31440
+ const createCaseField = (id, label, hint, fieldType, displayContext, order = undefined, showCondition = undefined, acls = undefined, hidden) => {
31468
31441
  return CaseFieldBuilder.create()
31469
31442
  .withId(id || 'personFirstName')
31470
31443
  .withFieldType(fieldType || textFieldType())
31471
- .withDisplayContext(display_context || 'OPTIONAL')
31444
+ .withDisplayContext(displayContext || 'OPTIONAL')
31472
31445
  .withLabel(label || 'First name')
31473
31446
  .withHintText(hint || 'First name hint text')
31474
31447
  .withShowSummaryContentOption(0)
31475
31448
  .withOrder(order)
31476
- .withShowCondition(show_condition || undefined)
31477
- .withACLs(ACLs)
31449
+ .withShowCondition(showCondition || undefined)
31450
+ .withACLs(acls)
31478
31451
  .withHidden(hidden || false)
31479
31452
  .build();
31480
31453
  };
31481
- const newCaseField = (id, label, hint, fieldType, display_context, order = undefined) => {
31454
+ const newCaseField = (id, label, hint, fieldType, displayContext, order = undefined) => {
31482
31455
  return CaseFieldBuilder.create()
31483
31456
  .withId(id || 'personFirstName')
31484
31457
  .withFieldType(fieldType || textFieldType())
31485
- .withDisplayContext(display_context || 'OPTIONAL')
31458
+ .withDisplayContext(displayContext || 'OPTIONAL')
31486
31459
  .withHintText(hint || 'First name hint text')
31487
31460
  .withLabel(label || 'First name')
31488
31461
  .withOrder(order)
31489
31462
  .withShowSummaryContentOption(0);
31490
31463
  };
31491
- const createFieldType = (typeId, type, complex_fields = [], collection_field_type = undefined) => {
31464
+ const createFieldType = (typeId, type, complexFields = [], collectionFieldType = undefined) => {
31492
31465
  return {
31493
31466
  id: typeId || 'Text',
31494
31467
  type: type || 'Text',
31495
- complex_fields: complex_fields || [],
31496
- collection_field_type: collection_field_type || undefined
31468
+ complex_fields: complexFields || [],
31469
+ collection_field_type: collectionFieldType || undefined
31497
31470
  };
31498
31471
  };
31499
31472
  const createFixedListFieldType = (typeId, fixedListItems = []) => {
31500
31473
  return {
31501
- id: 'FixedList-' + typeId,
31474
+ id: `FixedList-${typeId}`,
31502
31475
  type: 'FixedList',
31503
31476
  fixed_list_items: fixedListItems || []
31504
31477
  };
31505
31478
  };
31506
31479
  const createMultiSelectListFieldType = (typeId, fixedListItems = []) => {
31507
31480
  return {
31508
- id: 'MultiSelectList-' + typeId,
31481
+ id: `MultiSelectList-${typeId}`,
31509
31482
  type: 'MultiSelectList',
31510
31483
  fixed_list_items: fixedListItems || []
31511
31484
  };
31512
31485
  };
31513
- const createACL = (role, create, read, update, _delete) => {
31486
+ const createACL = (role, aclCreate, aclRead, aclUpdate, aclDelete) => {
31514
31487
  return ({
31515
31488
  role: role || 'roleX',
31516
- create,
31517
- read,
31518
- update,
31519
- delete: _delete
31489
+ create: aclCreate,
31490
+ read: aclRead,
31491
+ update: aclUpdate,
31492
+ delete: aclDelete
31520
31493
  });
31521
31494
  };
31522
31495
 
@@ -31563,5 +31536,5 @@ class TestRouteSnapshotBuilder {
31563
31536
  * Generated bundle index. Do not edit.
31564
31537
  */
31565
31538
 
31566
- 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 };
31539
+ 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 };
31567
31540
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map