@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
@@ -1036,22 +1036,22 @@
1036
1036
  }
1037
1037
  };
1038
1038
  DateInputComponent.prototype.dayId = function () {
1039
- return this.id + '-day';
1039
+ return this.id + "-day";
1040
1040
  };
1041
1041
  DateInputComponent.prototype.monthId = function () {
1042
- return this.id + '-month';
1042
+ return this.id + "-month";
1043
1043
  };
1044
1044
  DateInputComponent.prototype.yearId = function () {
1045
- return this.id + '-year';
1045
+ return this.id + "-year";
1046
1046
  };
1047
1047
  DateInputComponent.prototype.hourId = function () {
1048
- return this.id + '-hour';
1048
+ return this.id + "-hour";
1049
1049
  };
1050
1050
  DateInputComponent.prototype.minuteId = function () {
1051
- return this.id + '-minute';
1051
+ return this.id + "-minute";
1052
1052
  };
1053
1053
  DateInputComponent.prototype.secondId = function () {
1054
- return this.id + '-second';
1054
+ return this.id + "-second";
1055
1055
  };
1056
1056
  DateInputComponent.prototype.viewValue = function () {
1057
1057
  if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
@@ -1066,7 +1066,7 @@
1066
1066
  this.minute ? this.pad(this.minute) : '',
1067
1067
  this.second ? this.pad(this.second) : ''
1068
1068
  ].join(':');
1069
- return date + 'T' + time + '.000';
1069
+ return date + "T" + time + ".000";
1070
1070
  }
1071
1071
  else {
1072
1072
  return date;
@@ -2131,7 +2131,7 @@
2131
2131
  });
2132
2132
  ActivityService.handleHttpError = function (response) {
2133
2133
  var error = HttpErrorService.convertToHttpError(response);
2134
- if (response.status && response.status !== error.status) {
2134
+ if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
2135
2135
  error.status = response.status;
2136
2136
  }
2137
2137
  return error;
@@ -2139,12 +2139,11 @@
2139
2139
  ActivityService.prototype.getOptions = function () {
2140
2140
  var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
2141
2141
  var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
2142
- var options = {
2142
+ return {
2143
2143
  headers: headers,
2144
2144
  withCredentials: true,
2145
2145
  observe: 'body',
2146
2146
  };
2147
- return options;
2148
2147
  };
2149
2148
  ActivityService.prototype.getActivities = function () {
2150
2149
  var caseId = [];
@@ -2153,41 +2152,33 @@
2153
2152
  }
2154
2153
  try {
2155
2154
  var options = this.getOptions();
2156
- var url = this.activityUrl() + ("/cases/" + caseId.join(',') + "/activity");
2155
+ var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
2157
2156
  return this.http
2158
2157
  .get(url, options, false, ActivityService.handleHttpError)
2159
2158
  .pipe(operators.map(function (response) { return response; }));
2160
2159
  }
2161
2160
  catch (error) {
2162
- console.log('user may not be authenticated.' + error);
2161
+ console.log("user may not be authenticated." + error);
2163
2162
  }
2164
2163
  };
2165
2164
  ActivityService.prototype.postActivity = function (caseId, activity) {
2166
2165
  try {
2167
2166
  var options = this.getOptions();
2168
- var url = this.activityUrl() + ("/cases/" + caseId + "/activity");
2167
+ var url = this.activityUrl() + "/cases/" + caseId + "/activity";
2169
2168
  var body = { activity: activity };
2170
2169
  return this.http
2171
2170
  .post(url, body, options, false)
2172
2171
  .pipe(operators.map(function (response) { return response; }));
2173
2172
  }
2174
2173
  catch (error) {
2175
- console.log('user may not be authenticated.' + error);
2174
+ console.log("user may not be authenticated." + error);
2176
2175
  }
2177
2176
  };
2178
2177
  ActivityService.prototype.verifyUserIsAuthorized = function () {
2179
2178
  var _this = this;
2180
- if (this.sessionStorageService.getItem('userDetails') === undefined) {
2181
- return;
2182
- }
2183
- if (this.activityUrl() && this.userAuthorised === undefined) {
2179
+ if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
2184
2180
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
2185
- if ([401, 403].indexOf(error.status) > -1) {
2186
- _this.userAuthorised = false;
2187
- }
2188
- else {
2189
- _this.userAuthorised = true;
2190
- }
2181
+ _this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
2191
2182
  });
2192
2183
  }
2193
2184
  };
@@ -2300,7 +2291,7 @@
2300
2291
  requests.get(activity.caseId).next(activity);
2301
2292
  });
2302
2293
  }, function (err) {
2303
- console.log('error: ' + err);
2294
+ console.log("error: " + err);
2304
2295
  Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
2305
2296
  }); });
2306
2297
  });
@@ -2440,9 +2431,9 @@
2440
2431
  };
2441
2432
  ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
2442
2433
  var resultText = prefix;
2443
- resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + ' ' + activityInfo.surname; }).join(', ');
2434
+ resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
2444
2435
  if (unknownCount > 0) {
2445
- resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
2436
+ resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
2446
2437
  resultText += (unknownCount > 1 ? 's' : '');
2447
2438
  }
2448
2439
  else {
@@ -2450,10 +2441,10 @@
2450
2441
  }
2451
2442
  if (suffix.length > 0) {
2452
2443
  if (namesArray.length + unknownCount > 1) {
2453
- resultText += ' are ' + suffix;
2444
+ resultText += " are " + suffix;
2454
2445
  }
2455
2446
  else {
2456
- resultText += ' is ' + suffix;
2447
+ resultText += " is " + suffix;
2457
2448
  }
2458
2449
  }
2459
2450
  return resultText;
@@ -2792,7 +2783,7 @@
2792
2783
  break;
2793
2784
  case 'n':
2794
2785
  case 'N':
2795
- maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2786
+ maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2796
2787
  break;
2797
2788
  case 'V':
2798
2789
  case 'O':
@@ -2926,9 +2917,9 @@
2926
2917
  resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
2927
2918
  if (match[4] && match[5] && match[6] && format !== 'short') {
2928
2919
  resultDate += ', ';
2929
- resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
2930
- resultDate += this.pad(offsetDate.getMinutes()) + ':';
2931
- resultDate += this.pad(offsetDate.getSeconds()) + ' ';
2920
+ resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
2921
+ resultDate += this.pad(offsetDate.getMinutes()) + ":";
2922
+ resultDate += this.pad(offsetDate.getSeconds()) + " ";
2932
2923
  resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
2933
2924
  }
2934
2925
  }
@@ -3303,6 +3294,7 @@
3303
3294
  }], null, null);
3304
3295
  })();
3305
3296
 
3297
+ // tslint:disable:variable-name
3306
3298
  var AddressModel = /** @class */ (function () {
3307
3299
  function AddressModel() {
3308
3300
  this.AddressLine1 = '';
@@ -3613,6 +3605,7 @@
3613
3605
  __metadata("design:type", Array)
3614
3606
  ], CaseEventTrigger.prototype, "wizard_pages", void 0);
3615
3607
 
3608
+ // tslint:disable:variable-name
3616
3609
  var CaseViewEvent = /** @class */ (function () {
3617
3610
  function CaseViewEvent() {
3618
3611
  }
@@ -3657,6 +3650,7 @@
3657
3650
  __metadata("design:type", Array)
3658
3651
  ], CaseType.prototype, "case_fields", void 0);
3659
3652
 
3653
+ // tslint:disable:variable-name
3660
3654
  var EventCaseField = /** @class */ (function () {
3661
3655
  function EventCaseField() {
3662
3656
  }
@@ -3707,6 +3701,7 @@
3707
3701
  return CasePrintDocument;
3708
3702
  }());
3709
3703
 
3704
+ // tslint:disable:variable-name
3710
3705
  var HRef = /** @class */ (function () {
3711
3706
  function HRef() {
3712
3707
  }
@@ -3744,25 +3739,25 @@
3744
3739
  OrganisationConverter.toSimpleAddress = function (organisationModel) {
3745
3740
  var simpleAddress = '';
3746
3741
  if (organisationModel.addressLine1) {
3747
- simpleAddress += organisationModel.addressLine1 + '<br>';
3742
+ simpleAddress += organisationModel.addressLine1 + "<br>";
3748
3743
  }
3749
3744
  if (organisationModel.addressLine2) {
3750
- simpleAddress += organisationModel.addressLine2 + '<br>';
3745
+ simpleAddress += organisationModel.addressLine2 + "<br>";
3751
3746
  }
3752
3747
  if (organisationModel.addressLine3) {
3753
- simpleAddress += organisationModel.addressLine3 + '<br>';
3748
+ simpleAddress += organisationModel.addressLine3 + "<br>";
3754
3749
  }
3755
3750
  if (organisationModel.townCity) {
3756
- simpleAddress += organisationModel.townCity + '<br>';
3751
+ simpleAddress += organisationModel.townCity + "<br>";
3757
3752
  }
3758
3753
  if (organisationModel.county) {
3759
- simpleAddress += organisationModel.county + '<br>';
3754
+ simpleAddress += organisationModel.county + "<br>";
3760
3755
  }
3761
3756
  if (organisationModel.country) {
3762
- simpleAddress += organisationModel.country + '<br>';
3757
+ simpleAddress += organisationModel.country + "<br>";
3763
3758
  }
3764
3759
  if (organisationModel.postCode) {
3765
- simpleAddress += organisationModel.postCode + '<br>';
3760
+ simpleAddress += organisationModel.postCode + "<br>";
3766
3761
  }
3767
3762
  return simpleAddress;
3768
3763
  };
@@ -3875,12 +3870,14 @@
3875
3870
  __metadata("design:type", Array)
3876
3871
  ], SearchResultView.prototype, "results", void 0);
3877
3872
 
3873
+ // tslint:disable:variable-name
3878
3874
  var CaseDetails = /** @class */ (function () {
3879
3875
  function CaseDetails() {
3880
3876
  }
3881
3877
  return CaseDetails;
3882
3878
  }());
3883
3879
 
3880
+ // tslint:disable:variable-name
3884
3881
  var CaseEventData = /** @class */ (function () {
3885
3882
  function CaseEventData() {
3886
3883
  }
@@ -3888,12 +3885,7 @@
3888
3885
  }());
3889
3886
 
3890
3887
  var WorkbasketInputModel = /** @class */ (function () {
3891
- function WorkbasketInputModel(label, order, field, metadata, display_context_parameter) {
3892
- this.label = label;
3893
- this.order = order;
3894
- this.field = field;
3895
- this.metadata = metadata;
3896
- this.display_context_parameter = display_context_parameter;
3888
+ function WorkbasketInputModel() {
3897
3889
  }
3898
3890
  return WorkbasketInputModel;
3899
3891
  }());
@@ -3941,9 +3933,9 @@
3941
3933
  });
3942
3934
  return valueMap;
3943
3935
  };
3944
- FieldsUtils.getType = function (elem) {
3945
- return Object.prototype.toString.call(elem).slice(8, -1);
3946
- };
3936
+ // public static getType(elem: any): string {
3937
+ // return Object.prototype.toString.call(elem).slice(8, -1);
3938
+ // }
3947
3939
  FieldsUtils.isObject = function (elem) {
3948
3940
  return typeof elem === 'object' && elem !== null;
3949
3941
  };
@@ -4144,6 +4136,13 @@
4144
4136
  }
4145
4137
  return caseField.field_type.type === 'ComponentLauncher';
4146
4138
  };
4139
+ FieldsUtils.isLinkedCasesCaseField = function (caseField) {
4140
+ return FieldsUtils.isComponentLauncherCaseField(caseField) &&
4141
+ caseField.id === 'LinkedCasesComponentLauncher';
4142
+ };
4143
+ FieldsUtils.containsLinkedCasesCaseField = function (caseFields) {
4144
+ return caseFields === null || caseFields === void 0 ? void 0 : caseFields.some(function (caseField) { return FieldsUtils.isLinkedCasesCaseField(caseField); });
4145
+ };
4147
4146
  FieldsUtils.isFlagsFieldType = function (fieldType) {
4148
4147
  if (!fieldType) {
4149
4148
  return false;
@@ -4452,6 +4451,7 @@
4452
4451
  var elements = (result[field.id] || field.value);
4453
4452
  if (elements) {
4454
4453
  elements.forEach(function (elem) {
4454
+ // tslint:disable-next-line:switch-default
4455
4455
  switch (field.field_type.collection_field_type.type) {
4456
4456
  case 'MoneyGBP': {
4457
4457
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -4501,7 +4501,6 @@
4501
4501
  if (!condition) {
4502
4502
  return null;
4503
4503
  }
4504
- ;
4505
4504
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
4506
4505
  return peg.parse(condition.trim(), {});
4507
4506
  };
@@ -4515,14 +4514,12 @@
4515
4514
  if (!conditions || conditions.length === 0) {
4516
4515
  return true;
4517
4516
  }
4518
- ;
4519
4517
  var validJoinComparators = ['AND', 'OR'];
4520
- var result = conditions.reduce(function (accumulator, condition, index) {
4518
+ return conditions.reduce(function (accumulator, condition, index) {
4521
4519
  var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
4522
4520
  if (isJoinComparator(condition)) {
4523
4521
  return accumulator;
4524
4522
  }
4525
- ;
4526
4523
  var currentConditionResult = true;
4527
4524
  if (Array.isArray(condition)) {
4528
4525
  currentConditionResult = _this.evaluate(fields, condition);
@@ -4539,9 +4536,9 @@
4539
4536
  }
4540
4537
  return currentConditionResult;
4541
4538
  }, true);
4542
- return result;
4543
4539
  };
4544
4540
  ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
4541
+ // tslint:disable-next-line:switch-default
4545
4542
  switch (comparator) {
4546
4543
  case 'OR': return leftResult || rightResult;
4547
4544
  case 'AND': return leftResult && rightResult;
@@ -4631,8 +4628,7 @@
4631
4628
  }
4632
4629
  };
4633
4630
  ConditionParser.unquoted = function (str) {
4634
- var res = str.replace(/^"|"$/g, '');
4635
- return res;
4631
+ return str.replace(/^"|"$/g, '');
4636
4632
  };
4637
4633
  ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
4638
4634
  if (!fields) {
@@ -4746,8 +4742,8 @@
4746
4742
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4747
4743
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4748
4744
  this.processedList.push(condition.fieldReference);
4749
- var regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4750
- return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4745
+ var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
4746
+ return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
4751
4747
  }
4752
4748
  else {
4753
4749
  return originalCondition;
@@ -4826,6 +4822,7 @@
4826
4822
  }
4827
4823
  // Consider what type of field this is.
4828
4824
  var ft = caseField.field_type;
4825
+ // tslint:disable-next-line:switch-default
4829
4826
  switch (ft.type) {
4830
4827
  case 'Collection':
4831
4828
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -5316,14 +5313,14 @@
5316
5313
  var formFields = form.getRawValue();
5317
5314
  var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
5318
5315
  currentPage.wizard_page_fields.forEach(function (wpf) {
5319
- var case_field = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
5320
- if (_this.hasShowConditionField(case_field, formFields)) {
5321
- var condition = new ShowCondition(case_field.show_condition);
5322
- if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(case_field))) {
5323
- _this.resetField(form, case_field);
5316
+ var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
5317
+ if (_this.hasShowConditionField(caseField, formFields)) {
5318
+ var condition = new ShowCondition(caseField.show_condition);
5319
+ if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
5320
+ _this.resetField(form, caseField);
5324
5321
  }
5325
5322
  }
5326
- _this.retainHiddenValueByFieldType(case_field, form);
5323
+ _this.retainHiddenValueByFieldType(caseField, form);
5327
5324
  });
5328
5325
  };
5329
5326
  FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
@@ -5354,13 +5351,13 @@
5354
5351
  FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
5355
5352
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
5356
5353
  };
5357
- FieldsPurger.prototype.hasShowConditionField = function (case_field, formFields) {
5358
- return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
5354
+ FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
5355
+ return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
5359
5356
  };
5360
- FieldsPurger.prototype.getShowConditionKey = function (show_condition) {
5357
+ FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
5361
5358
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
5362
5359
  // Also need to allow for conditions specified using the "CONTAINS" keyword
5363
- return show_condition.split(/!=|=|CONTAINS/)[0];
5360
+ return showCondition.split(/!=|=|CONTAINS/)[0];
5364
5361
  };
5365
5362
  FieldsPurger.prototype.resetField = function (form, field) {
5366
5363
  var e_1, _a;
@@ -5456,8 +5453,8 @@
5456
5453
  FieldsPurger.prototype.resetPage = function (form, wizardPage) {
5457
5454
  var _this = this;
5458
5455
  wizardPage.wizard_page_fields.forEach(function (wpf) {
5459
- var case_field = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5460
- _this.resetField(form, case_field);
5456
+ var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5457
+ _this.resetField(form, caseField);
5461
5458
  });
5462
5459
  };
5463
5460
  FieldsPurger.prototype.getType = function (elem) {
@@ -5467,8 +5464,8 @@
5467
5464
  return this.getType(elem) === 'Object';
5468
5465
  };
5469
5466
  // TODO: call isReadOnly on CaseFields once we make it available
5470
- FieldsPurger.prototype.isReadonly = function (case_field) {
5471
- return case_field.display_context.toUpperCase() === 'READONLY';
5467
+ FieldsPurger.prototype.isReadonly = function (caseField) {
5468
+ return caseField.display_context.toUpperCase() === 'READONLY';
5472
5469
  };
5473
5470
  /**
5474
5471
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -5655,6 +5652,7 @@
5655
5652
  return;
5656
5653
  }
5657
5654
  caseFields.forEach(function (caseField) {
5655
+ // tslint:disable-next-line:switch-default
5658
5656
  switch (caseField.field_type.type) {
5659
5657
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
5660
5658
  _this.convertArrayToDynamicListOutput(caseField, data);
@@ -6363,7 +6361,6 @@
6363
6361
  });
6364
6362
  }
6365
6363
  }
6366
- ;
6367
6364
  });
6368
6365
  }
6369
6366
  };
@@ -6802,7 +6799,7 @@
6802
6799
  return addressModel;
6803
6800
  };
6804
6801
  AddressParser.prototype.parseAddressLine1 = function (classification, address) {
6805
- var addressLine = '';
6802
+ var addressLine;
6806
6803
  if (classification === AddressType.RD06) {
6807
6804
  addressLine =
6808
6805
  address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
@@ -6815,7 +6812,7 @@
6815
6812
  return this.removeNonAddressValues(addressLine);
6816
6813
  };
6817
6814
  AddressParser.prototype.parseAddressLine2 = function (classification, address) {
6818
- var addressLine = '';
6815
+ var addressLine;
6819
6816
  if (classification === AddressType.RD06) {
6820
6817
  addressLine = address.BUILDING_NAME + " ";
6821
6818
  }
@@ -6826,7 +6823,7 @@
6826
6823
  return this.removeNonAddressValues(addressLine);
6827
6824
  };
6828
6825
  AddressParser.prototype.parseAddressLine3 = function (classification, address) {
6829
- var addressLine = '';
6826
+ var addressLine;
6830
6827
  if (classification === AddressType.RD06) {
6831
6828
  addressLine =
6832
6829
  address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
@@ -6854,7 +6851,7 @@
6854
6851
  return value.replace(new RegExp('^,', 'gi'), '');
6855
6852
  };
6856
6853
  AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
6857
- return value ? ', ' + value : value;
6854
+ return value ? ", " + value : value;
6858
6855
  };
6859
6856
  return AddressParser;
6860
6857
  }());
@@ -7104,7 +7101,7 @@
7104
7101
  if (flagType) {
7105
7102
  url += "?flag-type=" + flagType;
7106
7103
  }
7107
- if (welshRequired != null) {
7104
+ if (typeof welshRequired === 'boolean') {
7108
7105
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
7109
7106
  url.indexOf('?') > -1 ? url += '&' : url += '?';
7110
7107
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -7710,18 +7707,6 @@
7710
7707
  }], null, null);
7711
7708
  })();
7712
7709
 
7713
- var HasLoadingState = /** @class */ (function () {
7714
- function HasLoadingState() {
7715
- }
7716
- Object.defineProperty(HasLoadingState.prototype, "isLoading", {
7717
- get: function () {
7718
- return;
7719
- },
7720
- enumerable: false,
7721
- configurable: true
7722
- });
7723
- return HasLoadingState;
7724
- }());
7725
7710
  var LoadingService = /** @class */ (function () {
7726
7711
  function LoadingService() {
7727
7712
  this.registered = new Map();
@@ -7746,7 +7731,7 @@
7746
7731
  };
7747
7732
  LoadingService.prototype.generateToken = function () {
7748
7733
  var timestamp = window.performance.now();
7749
- return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
7734
+ return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
7750
7735
  };
7751
7736
  return LoadingService;
7752
7737
  }());
@@ -7767,10 +7752,7 @@
7767
7752
  }
7768
7753
  SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
7769
7754
  var _this = this;
7770
- var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
7771
- + ("/jurisdictions/" + jurisdictionId)
7772
- + ("/case-types/" + caseTypeId)
7773
- + "/cases";
7755
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
7774
7756
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7775
7757
  var loadingToken = this.loadingService.register();
7776
7758
  return this.httpService
@@ -7779,15 +7761,14 @@
7779
7761
  };
7780
7762
  SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
7781
7763
  var _this = this;
7782
- var url = this.appConfig.getCaseDataUrl() +
7783
- ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7764
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7784
7765
  var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
7785
7766
  var loadingToken = this.loadingService.register();
7786
7767
  return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
7787
7768
  };
7788
7769
  SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
7789
7770
  var _this = this;
7790
- var url = this.appConfig.getCaseDataUrl() + ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7771
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7791
7772
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7792
7773
  var body = {
7793
7774
  sort: sort,
@@ -7832,9 +7813,8 @@
7832
7813
  return SearchService;
7833
7814
  }());
7834
7815
  SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
7835
- SearchService.VIEW_SEARCH = 'SEARCH';
7816
+ // public static readonly VIEW_SEARCH = 'SEARCH';
7836
7817
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
7837
- SearchService.FIELD_PREFIX = 'case.';
7838
7818
  SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
7839
7819
  SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
7840
7820
  (function () {
@@ -7964,17 +7944,12 @@
7964
7944
  this.appConfig = appConfig;
7965
7945
  }
7966
7946
  DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
7967
- var url = this.appConfig.getApiUrl()
7968
- + "/caseworkers/:uid"
7969
- + ("/jurisdictions/" + jurisdictionId)
7970
- + ("/case-types?access=" + access);
7947
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
7971
7948
  return this.http
7972
7949
  .get(url).pipe(operators.map(function (response) { return response; }));
7973
7950
  };
7974
7951
  DefinitionsService.prototype.getJurisdictions = function (access) {
7975
- var url = this.appConfig.getApiUrl()
7976
- + "/caseworkers/:uid"
7977
- + ("/jurisdictions?access=" + access);
7952
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
7978
7953
  return this.http
7979
7954
  .get(url)
7980
7955
  .pipe(operators.map(function (response) { return response; }));
@@ -8056,8 +8031,8 @@
8056
8031
  compare: function (a, b) {
8057
8032
  var fieldA = a.case_fields[fieldId];
8058
8033
  var fieldB = b.case_fields[fieldId];
8059
- fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
8060
- fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
8034
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
8035
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
8061
8036
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8062
8037
  }
8063
8038
  };
@@ -8067,8 +8042,8 @@
8067
8042
  compare: function (a, b) {
8068
8043
  var fieldA = a.case_fields[fieldId];
8069
8044
  var fieldB = b.case_fields[fieldId];
8070
- fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
8071
- fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
8045
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
8046
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
8072
8047
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8073
8048
  }
8074
8049
  };
@@ -8326,31 +8301,31 @@
8326
8301
  };
8327
8302
  WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
8328
8303
  var caseFieldIds = override.complex_field_element_id.split('.');
8329
- var case_field_leaf;
8304
+ var caseFieldLeaf;
8330
8305
  var children = this.getCaseFieldChildren(caseField);
8331
8306
  if (children.length > 0) {
8332
8307
  var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
8333
- case_field_leaf = this.getCaseFieldLeaf(tail, children);
8308
+ caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
8334
8309
  }
8335
8310
  else {
8336
- case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8311
+ caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8337
8312
  }
8338
8313
  if (override.display_context !== 'HIDDEN') {
8339
- case_field_leaf.hidden = false;
8340
- case_field_leaf.display_context = override.display_context;
8314
+ caseFieldLeaf.hidden = false;
8315
+ caseFieldLeaf.display_context = override.display_context;
8341
8316
  if (override.label && override.label.length > 0) {
8342
- case_field_leaf.label = override.label;
8317
+ caseFieldLeaf.label = override.label;
8343
8318
  }
8344
8319
  if (override.hint_text && override.hint_text.length > 0) {
8345
- case_field_leaf.hint_text = override.hint_text;
8320
+ caseFieldLeaf.hint_text = override.hint_text;
8346
8321
  }
8347
8322
  if (override.show_condition && override.show_condition.length > 0) {
8348
- case_field_leaf.show_condition = override.show_condition;
8323
+ caseFieldLeaf.show_condition = override.show_condition;
8349
8324
  }
8350
8325
  }
8351
8326
  else {
8352
- case_field_leaf.hidden = true;
8353
- case_field_leaf.display_context = override.display_context;
8327
+ caseFieldLeaf.hidden = true;
8328
+ caseFieldLeaf.display_context = override.display_context;
8354
8329
  }
8355
8330
  };
8356
8331
  WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
@@ -8364,7 +8339,7 @@
8364
8339
  });
8365
8340
  };
8366
8341
  WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
8367
- return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
8342
+ return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
8368
8343
  };
8369
8344
  WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
8370
8345
  var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
@@ -8421,223 +8396,13 @@
8421
8396
  }], null, null);
8422
8397
  })();
8423
8398
 
8424
- var MULTIPLE_TASKS_FOUND = 'More than one task found!';
8425
- var WorkAllocationService = /** @class */ (function () {
8426
- function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
8427
- this.http = http;
8428
- this.appConfig = appConfig;
8429
- this.errorService = errorService;
8430
- this.alertService = alertService;
8431
- this.sessionStorageService = sessionStorageService;
8432
- // Check to see if work allocation is enabled
8433
- }
8434
- /**
8435
- * Call the API to get tasks matching the search criteria.
8436
- * @param searchRequest The search parameters that specify which tasks to match.
8437
- */
8438
- WorkAllocationService.prototype.searchTasks = function (searchRequest) {
8439
- var _this = this;
8440
- // Do not need to check if WA enabled as parent method will do that
8441
- var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
8442
- return this.http
8443
- .post(url, { searchRequest: searchRequest }, null, false)
8444
- .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
8445
- _this.errorService.setError(error);
8446
- // explicitly eat away 401 error and 400 error
8447
- if (error && error.status && (error.status === 401 || error.status === 400)) {
8448
- // do nothing
8449
- console.log('error status 401 or 400', error);
8450
- }
8451
- else {
8452
- return rxjs.throwError(error);
8453
- }
8454
- }));
8455
- };
8456
- WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
8457
- this.features = this.appConfig.getWAServiceConfig();
8458
- var enabled = false;
8459
- if (!jurisdiction || !caseType) {
8460
- var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
8461
- jurisdiction = caseInfo.jurisdiction;
8462
- caseType = caseInfo.caseType;
8463
- }
8464
- if (!this.features || !this.features.configurations) {
8465
- return false;
8466
- }
8467
- this.features.configurations.forEach(function (serviceConfig) {
8468
- if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
8469
- enabled = true;
8470
- }
8471
- });
8472
- return enabled;
8473
- };
8474
- /**
8475
- * Call the API to assign a task.
8476
- * @param taskId specifies which task should be assigned.
8477
- * @param userId specifies the user the task should be assigned to.
8478
- */
8479
- WorkAllocationService.prototype.assignTask = function (taskId, userId) {
8480
- var _this = this;
8481
- if (!this.isWAEnabled()) {
8482
- return rxjs.of(null);
8483
- }
8484
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
8485
- return this.http
8486
- .post(url, { userId: userId })
8487
- .pipe(operators.catchError(function (error) {
8488
- _this.errorService.setError(error);
8489
- return rxjs.throwError(error);
8490
- }));
8491
- };
8492
- /**
8493
- * Call the API to complete a task.
8494
- * @param taskId specifies which task should be completed.
8495
- */
8496
- WorkAllocationService.prototype.completeTask = function (taskId) {
8497
- var _this = this;
8498
- if (!this.isWAEnabled()) {
8499
- return rxjs.of(null);
8500
- }
8501
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8502
- return this.http
8503
- .post(url, {})
8504
- .pipe(operators.catchError(function (error) {
8505
- _this.errorService.setError(error);
8506
- // this will subscribe to get the user details and decide whether to display an error message
8507
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8508
- _this.handleTaskCompletionError(response);
8509
- });
8510
- return rxjs.throwError(error);
8511
- }));
8512
- };
8513
- /**
8514
- * Call the API to assign and complete a task.
8515
- * @param taskId specifies which task should be completed.
8516
- */
8517
- WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
8518
- var _this = this;
8519
- if (!this.isWAEnabled()) {
8520
- return rxjs.of(null);
8521
- }
8522
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8523
- return this.http
8524
- .post(url, {
8525
- completion_options: {
8526
- assign_and_complete: true
8527
- }
8528
- })
8529
- .pipe(operators.catchError(function (error) {
8530
- _this.errorService.setError(error);
8531
- // this will subscribe to get the user details and decide whether to display an error message
8532
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8533
- _this.handleTaskCompletionError(response);
8534
- });
8535
- return rxjs.throwError(error);
8536
- }));
8537
- };
8538
- /**
8539
- * Handles the response from the observable to get the user details when task is completed.
8540
- * @param response is the response given from the observable which contains the user detaild.
8541
- */
8542
- WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
8543
- var userDetails = response;
8544
- if (this.userIsCaseworker(userDetails.userInfo.roles)) {
8545
- // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
8546
- this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
8547
- this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
8548
- }
8549
- };
8550
- /**
8551
- * Returns true if the user's role is equivalent to a caseworker.
8552
- * @param roles is the list of roles found from the current user.
8553
- */
8554
- WorkAllocationService.prototype.userIsCaseworker = function (roles) {
8555
- var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
8556
- // When/if lib & target permanently change to es2016, replace indexOf with includes
8557
- return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
8558
- || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
8559
- };
8560
- /**
8561
- * Look for open tasks for a case and event combination. There are 5 possible scenarios:
8562
- * 1. No tasks found => Success.
8563
- * 2. One task found => Mark as done => Success.
8564
- * 3. One task found => Mark as done throws error => Failure.
8565
- * 4. More than one task found => Failure.
8566
- * 5. Search call throws an error => Failure.
8567
- * @param ccdId The ID of the case to find tasks for.
8568
- * @param eventId The ID of the event to find tasks for.
8569
- */
8570
- WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
8571
- var _this = this;
8572
- if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
8573
- return rxjs.of(null);
8574
- }
8575
- var taskSearchParameter = {
8576
- ccdId: ccdId,
8577
- eventId: eventId,
8578
- jurisdiction: jurisdiction,
8579
- caseTypeId: caseTypeId
8580
- };
8581
- return this.searchTasks(taskSearchParameter)
8582
- .pipe(operators.map(function (response) {
8583
- var tasks = response.tasks;
8584
- if (tasks && tasks.length > 0) {
8585
- if (tasks.length === 1) {
8586
- _this.completeTask(tasks[0].id).subscribe();
8587
- }
8588
- else {
8589
- // This is a problem. Throw an appropriate error.
8590
- throw new Error(MULTIPLE_TASKS_FOUND);
8591
- }
8592
- }
8593
- return true; // All good. Nothing to see here.
8594
- }), operators.catchError(function (error) {
8595
- // Simply rethrow it.
8596
- return rxjs.throwError(error);
8597
- }));
8598
- };
8599
- /**
8600
- * Return tasks for case and event.
8601
- */
8602
- WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
8603
- var defaultPayload = {
8604
- task_required_for_event: false,
8605
- tasks: []
8606
- };
8607
- if (!this.isWAEnabled()) {
8608
- return rxjs.of(defaultPayload);
8609
- }
8610
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
8611
- };
8612
- /**
8613
- * Call the API to get a task
8614
- */
8615
- WorkAllocationService.prototype.getTask = function (taskId) {
8616
- if (!this.isWAEnabled()) {
8617
- return rxjs.of({ task: null });
8618
- }
8619
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
8620
- };
8621
- return WorkAllocationService;
8622
- }());
8623
- WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
8624
- WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
8625
- WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
8626
- WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
8627
- (function () {
8628
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
8629
- type: i0.Injectable
8630
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
8631
- })();
8632
-
8633
8399
  var CasesService = /** @class */ (function () {
8634
- function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
8400
+ function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
8635
8401
  this.http = http;
8636
8402
  this.appConfig = appConfig;
8637
8403
  this.orderService = orderService;
8638
8404
  this.errorService = errorService;
8639
8405
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
8640
- this.workAllocationService = workAllocationService;
8641
8406
  this.loadingService = loadingService;
8642
8407
  this.sessionStorageService = sessionStorageService;
8643
8408
  this.get = this.getCaseView;
@@ -8656,11 +8421,7 @@
8656
8421
  };
8657
8422
  CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
8658
8423
  var _this = this;
8659
- var url = this.appConfig.getApiUrl()
8660
- + "/caseworkers/:uid"
8661
- + ("/jurisdictions/" + jurisdictionId)
8662
- + ("/case-types/" + caseTypeId)
8663
- + ("/cases/" + caseId);
8424
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
8664
8425
  var loadingToken = this.loadingService.register();
8665
8426
  return this.http
8666
8427
  .get(url)
@@ -8712,7 +8473,7 @@
8712
8473
  CasesService.prototype.createEvent = function (caseDetails, eventData) {
8713
8474
  var _this = this;
8714
8475
  var caseId = caseDetails.case_id;
8715
- var url = this.appConfig.getCaseDataUrl() + ("/cases/" + caseId + "/events");
8476
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
8716
8477
  var headers = new i1$2.HttpHeaders()
8717
8478
  .set('experimental', 'true')
8718
8479
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -8726,9 +8487,8 @@
8726
8487
  };
8727
8488
  CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
8728
8489
  var _this = this;
8729
- var pageIdString = pageId ? '?pageId=' + pageId : '';
8730
- var url = this.appConfig.getCaseDataUrl()
8731
- + ("/case-types/" + ctid + "/validate" + pageIdString);
8490
+ var pageIdString = pageId ? "?pageId=" + pageId : '';
8491
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
8732
8492
  var headers = new i1$2.HttpHeaders()
8733
8493
  .set('experimental', 'true')
8734
8494
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -8746,8 +8506,7 @@
8746
8506
  if (eventData.ignore_warning) {
8747
8507
  ignoreWarning = 'true';
8748
8508
  }
8749
- var url = this.appConfig.getCaseDataUrl()
8750
- + ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
8509
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
8751
8510
  var headers = new i1$2.HttpHeaders()
8752
8511
  .set('experimental', 'true')
8753
8512
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -8761,9 +8520,7 @@
8761
8520
  };
8762
8521
  CasesService.prototype.getPrintDocuments = function (caseId) {
8763
8522
  var _this = this;
8764
- var url = this.appConfig.getCaseDataUrl()
8765
- + ("/cases/" + caseId)
8766
- + "/documents";
8523
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
8767
8524
  var headers = new i1$2.HttpHeaders()
8768
8525
  .set('experimental', 'true')
8769
8526
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -8872,12 +8629,12 @@
8872
8629
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
8873
8630
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
8874
8631
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
8875
- CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(WorkAllocationService), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8632
+ CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8876
8633
  CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8877
8634
  (function () {
8878
8635
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
8879
8636
  type: i0.Injectable
8880
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8637
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8881
8638
  })();
8882
8639
 
8883
8640
  var EventTriggerService = /** @class */ (function () {
@@ -9528,7 +9285,7 @@
9528
9285
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
9529
9286
  var formFields = editForm.getRawValue();
9530
9287
  var condition = ShowCondition.getInstance(caseField.show_condition);
9531
- if (path && path.indexOf('_' + caseField.id + '_') === -1) {
9288
+ if (path && path.indexOf("_" + caseField.id + "_") === -1) {
9532
9289
  path = "" + path + caseField.id;
9533
9290
  }
9534
9291
  return !condition.match(formFields.data, path);
@@ -9560,8 +9317,217 @@
9560
9317
  }], function () { return [{ type: CaseFieldService }]; }, null);
9561
9318
  })();
9562
9319
 
9320
+ var MULTIPLE_TASKS_FOUND = 'More than one task found!';
9321
+ var WorkAllocationService = /** @class */ (function () {
9322
+ function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
9323
+ this.http = http;
9324
+ this.appConfig = appConfig;
9325
+ this.errorService = errorService;
9326
+ this.alertService = alertService;
9327
+ this.sessionStorageService = sessionStorageService;
9328
+ // Check to see if work allocation is enabled
9329
+ }
9330
+ /**
9331
+ * Call the API to get tasks matching the search criteria.
9332
+ * @param searchRequest The search parameters that specify which tasks to match.
9333
+ */
9334
+ WorkAllocationService.prototype.searchTasks = function (searchRequest) {
9335
+ var _this = this;
9336
+ // Do not need to check if WA enabled as parent method will do that
9337
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
9338
+ return this.http
9339
+ .post(url, { searchRequest: searchRequest }, null, false)
9340
+ .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
9341
+ _this.errorService.setError(error);
9342
+ // explicitly eat away 401 error and 400 error
9343
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
9344
+ // do nothing
9345
+ console.log('error status 401 or 400', error);
9346
+ }
9347
+ else {
9348
+ return rxjs.throwError(error);
9349
+ }
9350
+ }));
9351
+ };
9352
+ WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
9353
+ this.features = this.appConfig.getWAServiceConfig();
9354
+ var enabled = false;
9355
+ if (!jurisdiction || !caseType) {
9356
+ var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
9357
+ jurisdiction = caseInfo.jurisdiction;
9358
+ caseType = caseInfo.caseType;
9359
+ }
9360
+ if (!this.features || !this.features.configurations) {
9361
+ return false;
9362
+ }
9363
+ this.features.configurations.forEach(function (serviceConfig) {
9364
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
9365
+ enabled = true;
9366
+ }
9367
+ });
9368
+ return enabled;
9369
+ };
9370
+ /**
9371
+ * Call the API to assign a task.
9372
+ * @param taskId specifies which task should be assigned.
9373
+ * @param userId specifies the user the task should be assigned to.
9374
+ */
9375
+ WorkAllocationService.prototype.assignTask = function (taskId, userId) {
9376
+ var _this = this;
9377
+ if (!this.isWAEnabled()) {
9378
+ return rxjs.of(null);
9379
+ }
9380
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
9381
+ return this.http
9382
+ .post(url, { userId: userId })
9383
+ .pipe(operators.catchError(function (error) {
9384
+ _this.errorService.setError(error);
9385
+ return rxjs.throwError(error);
9386
+ }));
9387
+ };
9388
+ /**
9389
+ * Call the API to complete a task.
9390
+ * @param taskId specifies which task should be completed.
9391
+ */
9392
+ WorkAllocationService.prototype.completeTask = function (taskId) {
9393
+ var _this = this;
9394
+ if (!this.isWAEnabled()) {
9395
+ return rxjs.of(null);
9396
+ }
9397
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9398
+ return this.http
9399
+ .post(url, {})
9400
+ .pipe(operators.catchError(function (error) {
9401
+ _this.errorService.setError(error);
9402
+ // this will subscribe to get the user details and decide whether to display an error message
9403
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9404
+ _this.handleTaskCompletionError(response);
9405
+ });
9406
+ return rxjs.throwError(error);
9407
+ }));
9408
+ };
9409
+ /**
9410
+ * Call the API to assign and complete a task.
9411
+ * @param taskId specifies which task should be completed.
9412
+ */
9413
+ WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
9414
+ var _this = this;
9415
+ if (!this.isWAEnabled()) {
9416
+ return rxjs.of(null);
9417
+ }
9418
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9419
+ return this.http
9420
+ .post(url, {
9421
+ completion_options: {
9422
+ assign_and_complete: true
9423
+ }
9424
+ })
9425
+ .pipe(operators.catchError(function (error) {
9426
+ _this.errorService.setError(error);
9427
+ // this will subscribe to get the user details and decide whether to display an error message
9428
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9429
+ _this.handleTaskCompletionError(response);
9430
+ });
9431
+ return rxjs.throwError(error);
9432
+ }));
9433
+ };
9434
+ /**
9435
+ * Handles the response from the observable to get the user details when task is completed.
9436
+ * @param response is the response given from the observable which contains the user detaild.
9437
+ */
9438
+ WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
9439
+ var userDetails = response;
9440
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
9441
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
9442
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
9443
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
9444
+ }
9445
+ };
9446
+ /**
9447
+ * Returns true if the user's role is equivalent to a caseworker.
9448
+ * @param roles is the list of roles found from the current user.
9449
+ */
9450
+ WorkAllocationService.prototype.userIsCaseworker = function (roles) {
9451
+ var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
9452
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
9453
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
9454
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
9455
+ };
9456
+ /**
9457
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
9458
+ * 1. No tasks found => Success.
9459
+ * 2. One task found => Mark as done => Success.
9460
+ * 3. One task found => Mark as done throws error => Failure.
9461
+ * 4. More than one task found => Failure.
9462
+ * 5. Search call throws an error => Failure.
9463
+ * @param ccdId The ID of the case to find tasks for.
9464
+ * @param eventId The ID of the event to find tasks for.
9465
+ */
9466
+ WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
9467
+ var _this = this;
9468
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
9469
+ return rxjs.of(null);
9470
+ }
9471
+ var taskSearchParameter = {
9472
+ ccdId: ccdId,
9473
+ eventId: eventId,
9474
+ jurisdiction: jurisdiction,
9475
+ caseTypeId: caseTypeId
9476
+ };
9477
+ return this.searchTasks(taskSearchParameter)
9478
+ .pipe(operators.map(function (response) {
9479
+ var tasks = response.tasks;
9480
+ if (tasks && tasks.length > 0) {
9481
+ if (tasks.length === 1) {
9482
+ _this.completeTask(tasks[0].id).subscribe();
9483
+ }
9484
+ else {
9485
+ // This is a problem. Throw an appropriate error.
9486
+ throw new Error(MULTIPLE_TASKS_FOUND);
9487
+ }
9488
+ }
9489
+ return true; // All good. Nothing to see here.
9490
+ }), operators.catchError(function (error) {
9491
+ // Simply rethrow it.
9492
+ return rxjs.throwError(error);
9493
+ }));
9494
+ };
9495
+ /**
9496
+ * Return tasks for case and event.
9497
+ */
9498
+ WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
9499
+ var defaultPayload = {
9500
+ task_required_for_event: false,
9501
+ tasks: []
9502
+ };
9503
+ if (!this.isWAEnabled()) {
9504
+ return rxjs.of(defaultPayload);
9505
+ }
9506
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
9507
+ };
9508
+ /**
9509
+ * Call the API to get a task
9510
+ */
9511
+ WorkAllocationService.prototype.getTask = function (taskId) {
9512
+ if (!this.isWAEnabled()) {
9513
+ return rxjs.of({ task: null });
9514
+ }
9515
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
9516
+ };
9517
+ return WorkAllocationService;
9518
+ }());
9519
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
9520
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
9521
+ WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
9522
+ WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
9523
+ (function () {
9524
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
9525
+ type: i0.Injectable
9526
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
9527
+ })();
9528
+
9563
9529
  var CaseEditComponent = /** @class */ (function () {
9564
- function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService) {
9530
+ function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService) {
9565
9531
  this.fb = fb;
9566
9532
  this.caseNotifier = caseNotifier;
9567
9533
  this.router = router;
@@ -9574,6 +9540,7 @@
9574
9540
  this.windowsService = windowsService;
9575
9541
  this.formValueService = formValueService;
9576
9542
  this.formErrorService = formErrorService;
9543
+ this.loadingService = loadingService;
9577
9544
  this.cancelled = new i0.EventEmitter();
9578
9545
  this.submitted = new i0.EventEmitter();
9579
9546
  this.isEventCompletionChecksRequired = false;
@@ -9644,7 +9611,7 @@
9644
9611
  form: this.form,
9645
9612
  });
9646
9613
  /* istanbul ignore else */
9647
- if (!nextPage && !this.eventTrigger.show_summary) {
9614
+ if (!nextPage && !this.eventTrigger.show_summary && !this.eventTrigger.show_event_notes) {
9648
9615
  this.submitForm({
9649
9616
  eventTrigger: this.eventTrigger,
9650
9617
  form: this.form,
@@ -9714,7 +9681,8 @@
9714
9681
  });
9715
9682
  this.caseSubmit({ form: form,
9716
9683
  caseEventData: caseEventData,
9717
- submit: submit });
9684
+ submit: submit
9685
+ });
9718
9686
  }
9719
9687
  };
9720
9688
  CaseEditComponent.prototype.getCaseId = function (caseDetails) {
@@ -9856,13 +9824,18 @@
9856
9824
  CaseEditComponent.prototype.caseSubmit = function (_a) {
9857
9825
  var _this = this;
9858
9826
  var form = _a.form, caseEventData = _a.caseEventData, submit = _a.submit;
9827
+ var loadingSpinnerToken = this.loadingService.register();
9859
9828
  submit(caseEventData)
9829
+ .pipe(operators.finalize(function () {
9830
+ _this.loadingService.unregister(loadingSpinnerToken);
9831
+ }))
9860
9832
  .subscribe(function (response) {
9861
9833
  _this.caseNotifier.cachedCaseView = null;
9862
9834
  _this.sessionStorageService.removeItem('eventUrl');
9863
9835
  var confirmation = _this.buildConfirmation(response);
9864
9836
  if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
9865
- _this.confirm(confirmation);
9837
+ // Add finally to fix sonar bug
9838
+ _this.confirm(confirmation).finally();
9866
9839
  }
9867
9840
  else {
9868
9841
  _this.emitSubmitted(response);
@@ -9908,7 +9881,7 @@
9908
9881
  }());
9909
9882
  CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
9910
9883
  CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
9911
- CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FieldsUtils), i0__namespace.ɵɵdirectiveInject(FieldsPurger), i0__namespace.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0__namespace.ɵɵdirectiveInject(WizardFactoryService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService)); };
9884
+ CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FieldsUtils), i0__namespace.ɵɵdirectiveInject(FieldsPurger), i0__namespace.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0__namespace.ɵɵdirectiveInject(WizardFactoryService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
9912
9885
  CaseEditComponent.ɵcmp = i0__namespace.ɵɵ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__namespace.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) {
9913
9886
  if (rf & 1) {
9914
9887
  i0__namespace.ɵɵelement(0, "router-outlet");
@@ -9923,7 +9896,7 @@
9923
9896
  styleUrls: ['../case-edit.scss'],
9924
9897
  providers: [GreyBarService]
9925
9898
  }]
9926
- }], function () { return [{ type: i2__namespace.FormBuilder }, { type: CaseNotifier }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }]; }, { eventTrigger: [{
9899
+ }], function () { return [{ type: i2__namespace.FormBuilder }, { type: CaseNotifier }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }]; }, { eventTrigger: [{
9927
9900
  type: i0.Input
9928
9901
  }], submit: [{
9929
9902
  type: i0.Input
@@ -10318,14 +10291,14 @@
10318
10291
  this.title$ = new rxjs.BehaviorSubject(null);
10319
10292
  this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
10320
10293
  this.editForm$ = new rxjs.BehaviorSubject(null);
10321
- this.linkError$ = new rxjs.BehaviorSubject(null);
10294
+ this.isLinkedCasesJourneyAtFinalStep$ = new rxjs.BehaviorSubject(null);
10322
10295
  this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
10323
10296
  this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
10324
10297
  this.caseDetails$ = this.details$.asObservable();
10325
10298
  this.caseTitle$ = this.title$.asObservable();
10326
10299
  this.caseEditForm$ = this.editForm$.asObservable();
10327
10300
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
10328
- this.caseLinkError$ = this.linkError$.asObservable();
10301
+ this.caseIsLinkedCasesJourneyAtFinalStep$ = this.isLinkedCasesJourneyAtFinalStep$.asObservable();
10329
10302
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
10330
10303
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
10331
10304
  }
@@ -10338,9 +10311,6 @@
10338
10311
  CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
10339
10312
  this.eventTriggerName$.next(triggerName);
10340
10313
  };
10341
- CaseEditDataService.prototype.setCaseLinkError = function (error) {
10342
- this.linkError$.next(error);
10343
- };
10344
10314
  CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
10345
10315
  this.formValidationErrors$.next(validationErrors);
10346
10316
  };
@@ -10350,8 +10320,8 @@
10350
10320
  CaseEditDataService.prototype.clearFormValidationErrors = function () {
10351
10321
  this.formValidationErrors$.next([]);
10352
10322
  };
10353
- CaseEditDataService.prototype.clearCaseLinkError = function () {
10354
- this.linkError$.next(null);
10323
+ CaseEditDataService.prototype.setLinkedCasesJourneyAtFinalStep = function (isAtFinalStep) {
10324
+ this.isLinkedCasesJourneyAtFinalStep$.next(isAtFinalStep);
10355
10325
  };
10356
10326
  CaseEditDataService.prototype.addFormValidationError = function (validationError) {
10357
10327
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
@@ -10383,24 +10353,19 @@
10383
10353
  }], null, null);
10384
10354
  })();
10385
10355
 
10386
- function CaseEditPageComponent_ccd_loading_spinner_0_Template(rf, ctx) {
10387
- if (rf & 1) {
10388
- i0__namespace.ɵɵelement(0, "ccd-loading-spinner");
10389
- }
10390
- }
10391
- function CaseEditPageComponent_ng_container_1_h1_1_Template(rf, ctx) {
10356
+ function CaseEditPageComponent_ng_container_0_h1_1_Template(rf, ctx) {
10392
10357
  if (rf & 1) {
10393
10358
  i0__namespace.ɵɵelementStart(0, "h1", 11);
10394
10359
  i0__namespace.ɵɵtext(1);
10395
10360
  i0__namespace.ɵɵelementEnd();
10396
10361
  }
10397
10362
  if (rf & 2) {
10398
- var ctx_r10 = i0__namespace.ɵɵnextContext(2);
10363
+ var ctx_r9 = i0__namespace.ɵɵnextContext(2);
10399
10364
  i0__namespace.ɵɵadvance(1);
10400
- i0__namespace.ɵɵtextInterpolate(ctx_r10.eventTrigger.name);
10365
+ i0__namespace.ɵɵtextInterpolate(ctx_r9.eventTrigger.name);
10401
10366
  }
10402
10367
  }
10403
- function CaseEditPageComponent_ng_container_1_ng_container_2_Template(rf, ctx) {
10368
+ function CaseEditPageComponent_ng_container_0_ng_container_2_Template(rf, ctx) {
10404
10369
  if (rf & 1) {
10405
10370
  i0__namespace.ɵɵelementContainerStart(0);
10406
10371
  i0__namespace.ɵɵelementStart(1, "span", 12);
@@ -10412,44 +10377,44 @@
10412
10377
  i0__namespace.ɵɵelementContainerEnd();
10413
10378
  }
10414
10379
  if (rf & 2) {
10415
- var ctx_r11 = i0__namespace.ɵɵnextContext(2);
10380
+ var ctx_r10 = i0__namespace.ɵɵnextContext(2);
10416
10381
  i0__namespace.ɵɵadvance(2);
10417
- i0__namespace.ɵɵtextInterpolate(ctx_r11.eventTrigger.name);
10382
+ i0__namespace.ɵɵtextInterpolate(ctx_r10.eventTrigger.name);
10418
10383
  i0__namespace.ɵɵadvance(2);
10419
- i0__namespace.ɵɵtextInterpolate(ctx_r11.currentPage.label);
10384
+ i0__namespace.ɵɵtextInterpolate(ctx_r10.currentPage.label);
10420
10385
  }
10421
10386
  }
10422
- function CaseEditPageComponent_ng_container_1_Template(rf, ctx) {
10387
+ function CaseEditPageComponent_ng_container_0_Template(rf, ctx) {
10423
10388
  if (rf & 1) {
10424
10389
  i0__namespace.ɵɵelementContainerStart(0);
10425
- i0__namespace.ɵɵtemplate(1, CaseEditPageComponent_ng_container_1_h1_1_Template, 2, 1, "h1", 10);
10426
- i0__namespace.ɵɵtemplate(2, CaseEditPageComponent_ng_container_1_ng_container_2_Template, 5, 2, "ng-container", 0);
10390
+ i0__namespace.ɵɵtemplate(1, CaseEditPageComponent_ng_container_0_h1_1_Template, 2, 1, "h1", 10);
10391
+ i0__namespace.ɵɵtemplate(2, CaseEditPageComponent_ng_container_0_ng_container_2_Template, 5, 2, "ng-container", 0);
10427
10392
  i0__namespace.ɵɵelementContainerEnd();
10428
10393
  }
10429
10394
  if (rf & 2) {
10430
- var ctx_r1 = i0__namespace.ɵɵnextContext();
10395
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
10431
10396
  i0__namespace.ɵɵadvance(1);
10432
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.currentPage.label);
10397
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r0.currentPage.label);
10433
10398
  i0__namespace.ɵɵadvance(1);
10434
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.currentPage.label);
10399
+ i0__namespace.ɵɵproperty("ngIf", ctx_r0.currentPage.label);
10435
10400
  }
10436
10401
  }
10437
- function CaseEditPageComponent_div_2_Template(rf, ctx) {
10402
+ function CaseEditPageComponent_div_1_Template(rf, ctx) {
10438
10403
  if (rf & 1) {
10439
10404
  i0__namespace.ɵɵelement(0, "div");
10440
10405
  }
10441
10406
  }
10442
- function CaseEditPageComponent_ng_template_3_Template(rf, ctx) {
10407
+ function CaseEditPageComponent_ng_template_2_Template(rf, ctx) {
10443
10408
  if (rf & 1) {
10444
10409
  i0__namespace.ɵɵelement(0, "ccd-markdown", 13);
10445
10410
  i0__namespace.ɵɵpipe(1, "ccdCaseTitle");
10446
10411
  }
10447
10412
  if (rf & 2) {
10448
- var ctx_r4 = i0__namespace.ɵɵnextContext();
10449
- i0__namespace.ɵɵproperty("content", i0__namespace.ɵɵpipeBind3(1, 1, ctx_r4.getCaseTitle(), ctx_r4.caseFields, ctx_r4.editForm.controls["data"]));
10413
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
10414
+ i0__namespace.ɵɵproperty("content", i0__namespace.ɵɵpipeBind3(1, 1, ctx_r3.getCaseTitle(), ctx_r3.caseFields, ctx_r3.editForm.controls["data"]));
10450
10415
  }
10451
10416
  }
10452
- function CaseEditPageComponent_ng_template_5_h2_0_Template(rf, ctx) {
10417
+ function CaseEditPageComponent_ng_template_4_h2_0_Template(rf, ctx) {
10453
10418
  if (rf & 1) {
10454
10419
  i0__namespace.ɵɵelementStart(0, "h2", 15);
10455
10420
  i0__namespace.ɵɵtext(1);
@@ -10457,28 +10422,28 @@
10457
10422
  i0__namespace.ɵɵelementEnd();
10458
10423
  }
10459
10424
  if (rf & 2) {
10460
- var ctx_r12 = i0__namespace.ɵɵnextContext(2);
10425
+ var ctx_r11 = i0__namespace.ɵɵnextContext(2);
10461
10426
  i0__namespace.ɵɵadvance(1);
10462
- i0__namespace.ɵɵtextInterpolate1("#", i0__namespace.ɵɵpipeBind1(2, 1, ctx_r12.getCaseId()), "");
10427
+ i0__namespace.ɵɵtextInterpolate1("#", i0__namespace.ɵɵpipeBind1(2, 1, ctx_r11.getCaseId()), "");
10463
10428
  }
10464
10429
  }
10465
- function CaseEditPageComponent_ng_template_5_Template(rf, ctx) {
10430
+ function CaseEditPageComponent_ng_template_4_Template(rf, ctx) {
10466
10431
  if (rf & 1) {
10467
- i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ng_template_5_h2_0_Template, 3, 3, "h2", 14);
10432
+ i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ng_template_4_h2_0_Template, 3, 3, "h2", 14);
10468
10433
  }
10469
10434
  if (rf & 2) {
10470
- var ctx_r6 = i0__namespace.ɵɵnextContext();
10471
- i0__namespace.ɵɵproperty("ngIf", ctx_r6.getCaseId());
10435
+ var ctx_r5 = i0__namespace.ɵɵnextContext();
10436
+ i0__namespace.ɵɵproperty("ngIf", ctx_r5.getCaseId());
10472
10437
  }
10473
10438
  }
10474
- function CaseEditPageComponent_div_7_div_3_Template(rf, ctx) {
10439
+ function CaseEditPageComponent_div_6_div_3_Template(rf, ctx) {
10475
10440
  if (rf & 1) {
10476
- var _r16_1 = i0__namespace.ɵɵgetCurrentView();
10441
+ var _r15_1 = i0__namespace.ɵɵgetCurrentView();
10477
10442
  i0__namespace.ɵɵelementStart(0, "div", 19);
10478
10443
  i0__namespace.ɵɵelementStart(1, "ul", 20);
10479
10444
  i0__namespace.ɵɵelementStart(2, "li");
10480
10445
  i0__namespace.ɵɵelementStart(3, "a", 21);
10481
- i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_div_7_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var validationError_r14 = ctx.$implicit; var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.navigateToErrorElement(validationError_r14.id); });
10446
+ i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_div_6_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r15_1); var validationError_r13 = ctx.$implicit; var ctx_r14 = i0__namespace.ɵɵnextContext(2); return ctx_r14.navigateToErrorElement(validationError_r13.id); });
10482
10447
  i0__namespace.ɵɵtext(4);
10483
10448
  i0__namespace.ɵɵelementEnd();
10484
10449
  i0__namespace.ɵɵelementEnd();
@@ -10486,39 +10451,39 @@
10486
10451
  i0__namespace.ɵɵelementEnd();
10487
10452
  }
10488
10453
  if (rf & 2) {
10489
- var validationError_r14 = ctx.$implicit;
10454
+ var validationError_r13 = ctx.$implicit;
10490
10455
  i0__namespace.ɵɵadvance(4);
10491
- i0__namespace.ɵɵtextInterpolate(validationError_r14.message);
10456
+ i0__namespace.ɵɵtextInterpolate(validationError_r13.message);
10492
10457
  }
10493
10458
  }
10494
- function CaseEditPageComponent_div_7_Template(rf, ctx) {
10459
+ function CaseEditPageComponent_div_6_Template(rf, ctx) {
10495
10460
  if (rf & 1) {
10496
10461
  i0__namespace.ɵɵelementStart(0, "div", 16);
10497
10462
  i0__namespace.ɵɵelementStart(1, "h2", 17);
10498
10463
  i0__namespace.ɵɵtext(2, " There is a problem ");
10499
10464
  i0__namespace.ɵɵelementEnd();
10500
- i0__namespace.ɵɵtemplate(3, CaseEditPageComponent_div_7_div_3_Template, 5, 1, "div", 18);
10465
+ i0__namespace.ɵɵtemplate(3, CaseEditPageComponent_div_6_div_3_Template, 5, 1, "div", 18);
10501
10466
  i0__namespace.ɵɵelementEnd();
10502
10467
  }
10503
10468
  if (rf & 2) {
10504
- var ctx_r7 = i0__namespace.ɵɵnextContext();
10469
+ var ctx_r6 = i0__namespace.ɵɵnextContext();
10505
10470
  i0__namespace.ɵɵadvance(3);
10506
- i0__namespace.ɵɵproperty("ngForOf", ctx_r7.validationErrors);
10471
+ i0__namespace.ɵɵproperty("ngForOf", ctx_r6.validationErrors);
10507
10472
  }
10508
10473
  }
10509
- function CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template(rf, ctx) {
10474
+ function CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template(rf, ctx) {
10510
10475
  if (rf & 1) {
10511
- var _r20_1 = i0__namespace.ɵɵgetCurrentView();
10476
+ var _r19_1 = i0__namespace.ɵɵgetCurrentView();
10512
10477
  i0__namespace.ɵɵelementStart(0, "ccd-case-edit-form", 32);
10513
- i0__namespace.ɵɵlistener("valuesChanged", function CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template_ccd_case_edit_form_valuesChanged_0_listener($event) { i0__namespace.ɵɵrestoreView(_r20_1); var ctx_r19 = i0__namespace.ɵɵnextContext(2); return ctx_r19.applyValuesChanged($event); });
10478
+ i0__namespace.ɵɵlistener("valuesChanged", function CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template_ccd_case_edit_form_valuesChanged_0_listener($event) { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(2); return ctx_r18.applyValuesChanged($event); });
10514
10479
  i0__namespace.ɵɵelementEnd();
10515
10480
  }
10516
10481
  if (rf & 2) {
10517
- var ctx_r17 = i0__namespace.ɵɵnextContext(2);
10518
- i0__namespace.ɵɵproperty("fields", ctx_r17.currentPage.getCol1Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields)("pageChangeSubject", ctx_r17.pageChangeSubject);
10482
+ var ctx_r16 = i0__namespace.ɵɵnextContext(2);
10483
+ i0__namespace.ɵɵproperty("fields", ctx_r16.currentPage.getCol1Fields())("formGroup", ctx_r16.editForm.controls["data"])("caseFields", ctx_r16.caseFields)("pageChangeSubject", ctx_r16.pageChangeSubject);
10519
10484
  }
10520
10485
  }
10521
- function CaseEditPageComponent_form_11_div_4_Template(rf, ctx) {
10486
+ function CaseEditPageComponent_form_10_div_4_Template(rf, ctx) {
10522
10487
  if (rf & 1) {
10523
10488
  i0__namespace.ɵɵelementStart(0, "div", 33);
10524
10489
  i0__namespace.ɵɵelementStart(1, "div", 34);
@@ -10530,26 +10495,26 @@
10530
10495
  i0__namespace.ɵɵelementEnd();
10531
10496
  }
10532
10497
  if (rf & 2) {
10533
- var ctx_r18 = i0__namespace.ɵɵnextContext(2);
10498
+ var ctx_r17 = i0__namespace.ɵɵnextContext(2);
10534
10499
  i0__namespace.ɵɵadvance(2);
10535
- i0__namespace.ɵɵproperty("fields", ctx_r18.currentPage.getCol1Fields())("formGroup", ctx_r18.editForm.controls["data"])("caseFields", ctx_r18.caseFields);
10500
+ i0__namespace.ɵɵproperty("fields", ctx_r17.currentPage.getCol1Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields);
10536
10501
  i0__namespace.ɵɵadvance(2);
10537
- i0__namespace.ɵɵproperty("fields", ctx_r18.currentPage.getCol2Fields())("formGroup", ctx_r18.editForm.controls["data"])("caseFields", ctx_r18.caseFields);
10502
+ i0__namespace.ɵɵproperty("fields", ctx_r17.currentPage.getCol2Fields())("formGroup", ctx_r17.editForm.controls["data"])("caseFields", ctx_r17.caseFields);
10538
10503
  }
10539
10504
  }
10540
- function CaseEditPageComponent_form_11_Template(rf, ctx) {
10505
+ function CaseEditPageComponent_form_10_Template(rf, ctx) {
10541
10506
  if (rf & 1) {
10542
- var _r22_1 = i0__namespace.ɵɵgetCurrentView();
10507
+ var _r21_1 = i0__namespace.ɵɵgetCurrentView();
10543
10508
  i0__namespace.ɵɵelementStart(0, "form", 22);
10544
- i0__namespace.ɵɵlistener("submit", function CaseEditPageComponent_form_11_Template_form_submit_0_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var ctx_r21 = i0__namespace.ɵɵnextContext(); return ctx_r21.submit(); });
10509
+ i0__namespace.ɵɵlistener("submit", function CaseEditPageComponent_form_10_Template_form_submit_0_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r20 = i0__namespace.ɵɵnextContext(); return ctx_r20.submit(); });
10545
10510
  i0__namespace.ɵɵelementStart(1, "fieldset", 23);
10546
10511
  i0__namespace.ɵɵelement(2, "legend", 24);
10547
- i0__namespace.ɵɵtemplate(3, CaseEditPageComponent_form_11_ccd_case_edit_form_3_Template, 1, 4, "ccd-case-edit-form", 25);
10548
- i0__namespace.ɵɵtemplate(4, CaseEditPageComponent_form_11_div_4_Template, 5, 6, "div", 26);
10512
+ i0__namespace.ɵɵtemplate(3, CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template, 1, 4, "ccd-case-edit-form", 25);
10513
+ i0__namespace.ɵɵtemplate(4, CaseEditPageComponent_form_10_div_4_Template, 5, 6, "div", 26);
10549
10514
  i0__namespace.ɵɵelementEnd();
10550
10515
  i0__namespace.ɵɵelementStart(5, "div", 27);
10551
10516
  i0__namespace.ɵɵelementStart(6, "button", 28);
10552
- i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_form_11_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var ctx_r23 = i0__namespace.ɵɵnextContext(); return ctx_r23.toPreviousPage(); });
10517
+ i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r22 = i0__namespace.ɵɵnextContext(); return ctx_r22.toPreviousPage(); });
10553
10518
  i0__namespace.ɵɵpipe(7, "async");
10554
10519
  i0__namespace.ɵɵtext(8, " Previous ");
10555
10520
  i0__namespace.ɵɵelementEnd();
@@ -10559,43 +10524,43 @@
10559
10524
  i0__namespace.ɵɵelementEnd();
10560
10525
  i0__namespace.ɵɵelementStart(11, "p", 30);
10561
10526
  i0__namespace.ɵɵelementStart(12, "a", 31);
10562
- i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_form_11_Template_a_click_12_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var ctx_r24 = i0__namespace.ɵɵnextContext(); return ctx_r24.cancel(); });
10527
+ i0__namespace.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_a_click_12_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r23 = i0__namespace.ɵɵnextContext(); return ctx_r23.cancel(); });
10563
10528
  i0__namespace.ɵɵtext(13);
10564
10529
  i0__namespace.ɵɵelementEnd();
10565
10530
  i0__namespace.ɵɵelementEnd();
10566
10531
  i0__namespace.ɵɵelementEnd();
10567
10532
  }
10568
10533
  if (rf & 2) {
10569
- var ctx_r8 = i0__namespace.ɵɵnextContext();
10570
- i0__namespace.ɵɵproperty("formGroup", ctx_r8.editForm);
10534
+ var ctx_r7 = i0__namespace.ɵɵnextContext();
10535
+ i0__namespace.ɵɵproperty("formGroup", ctx_r7.editForm);
10571
10536
  i0__namespace.ɵɵadvance(3);
10572
- i0__namespace.ɵɵproperty("ngIf", !ctx_r8.currentPage.isMultiColumn());
10537
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r7.currentPage.isMultiColumn());
10573
10538
  i0__namespace.ɵɵadvance(1);
10574
- i0__namespace.ɵɵproperty("ngIf", ctx_r8.currentPage.isMultiColumn());
10539
+ i0__namespace.ɵɵproperty("ngIf", ctx_r7.currentPage.isMultiColumn());
10575
10540
  i0__namespace.ɵɵadvance(2);
10576
- i0__namespace.ɵɵproperty("disabled", !i0__namespace.ɵɵpipeBind1(7, 7, ctx_r8.hasPreviousPage$));
10541
+ i0__namespace.ɵɵproperty("disabled", !i0__namespace.ɵɵpipeBind1(7, 7, ctx_r7.hasPreviousPage$));
10577
10542
  i0__namespace.ɵɵadvance(3);
10578
- i0__namespace.ɵɵproperty("disabled", ctx_r8.submitting());
10543
+ i0__namespace.ɵɵproperty("disabled", ctx_r7.submitting());
10579
10544
  i0__namespace.ɵɵadvance(1);
10580
- i0__namespace.ɵɵtextInterpolate(ctx_r8.triggerText);
10545
+ i0__namespace.ɵɵtextInterpolate(ctx_r7.triggerText);
10581
10546
  i0__namespace.ɵɵadvance(3);
10582
- i0__namespace.ɵɵtextInterpolate(ctx_r8.getCancelText());
10547
+ i0__namespace.ɵɵtextInterpolate(ctx_r7.getCancelText());
10583
10548
  }
10584
10549
  }
10585
- function CaseEditPageComponent_ccd_case_event_completion_12_Template(rf, ctx) {
10550
+ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
10586
10551
  if (rf & 1) {
10587
- var _r26_1 = i0__namespace.ɵɵgetCurrentView();
10552
+ var _r25_1 = i0__namespace.ɵɵgetCurrentView();
10588
10553
  i0__namespace.ɵɵelementStart(0, "ccd-case-event-completion", 38);
10589
- i0__namespace.ɵɵlistener("eventCanBeCompleted", function CaseEditPageComponent_ccd_case_event_completion_12_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0__namespace.ɵɵrestoreView(_r26_1); var ctx_r25 = i0__namespace.ɵɵnextContext(); return ctx_r25.onEventCanBeCompleted($event); });
10554
+ i0__namespace.ɵɵlistener("eventCanBeCompleted", function CaseEditPageComponent_ccd_case_event_completion_11_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0__namespace.ɵɵrestoreView(_r25_1); var ctx_r24 = i0__namespace.ɵɵnextContext(); return ctx_r24.onEventCanBeCompleted($event); });
10590
10555
  i0__namespace.ɵɵelementEnd();
10591
10556
  }
10592
10557
  if (rf & 2) {
10593
- var ctx_r9 = i0__namespace.ɵɵnextContext();
10594
- i0__namespace.ɵɵproperty("eventCompletionParams", ctx_r9.caseEdit.eventCompletionParams);
10558
+ var ctx_r8 = i0__namespace.ɵɵnextContext();
10559
+ i0__namespace.ɵɵproperty("eventCompletionParams", ctx_r8.caseEdit.eventCompletionParams);
10595
10560
  }
10596
10561
  }
10597
10562
  var CaseEditPageComponent = /** @class */ (function () {
10598
- function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService) {
10563
+ function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService) {
10599
10564
  this.caseEdit = caseEdit;
10600
10565
  this.route = route;
10601
10566
  this.formValueService = formValueService;
@@ -10605,6 +10570,7 @@
10605
10570
  this.dialog = dialog;
10606
10571
  this.caseFieldService = caseFieldService;
10607
10572
  this.caseEditDataService = caseEditDataService;
10573
+ this.loadingService = loadingService;
10608
10574
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
10609
10575
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
10610
10576
  this.formValuesChanged = false;
@@ -10650,11 +10616,15 @@
10650
10616
  }
10651
10617
  _this.hasPreviousPage$.next(_this.caseEdit.hasPrevious((_b = _this.currentPage) === null || _b === void 0 ? void 0 : _b.id));
10652
10618
  }
10619
+ _this.triggerText = _this.getTriggerText();
10653
10620
  });
10654
10621
  CaseEditPageComponent.setFocusToTop();
10655
10622
  this.caseEditDataService.caseEditForm$.subscribe({
10656
10623
  next: function (editForm) { return _this.editForm = editForm; }
10657
10624
  });
10625
+ this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
10626
+ next: function (isLinkedCasesJourneyAtFinalStep) { return _this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep; }
10627
+ });
10658
10628
  this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
10659
10629
  next: function (state) {
10660
10630
  if (state) {
@@ -10663,7 +10633,6 @@
10663
10633
  }
10664
10634
  }
10665
10635
  });
10666
- this.triggerText = this.getTriggerText();
10667
10636
  };
10668
10637
  CaseEditPageComponent.prototype.ngAfterViewChecked = function () {
10669
10638
  this.cdRef.detectChanges();
@@ -10675,7 +10644,11 @@
10675
10644
  return this.caseEdit.first();
10676
10645
  };
10677
10646
  CaseEditPageComponent.prototype.currentPageIsNotValid = function () {
10678
- return !this.pageValidationService.isPageValid(this.currentPage, this.editForm);
10647
+ return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
10648
+ (this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
10649
+ };
10650
+ CaseEditPageComponent.prototype.isLinkedCasesJourney = function () {
10651
+ return FieldsUtils.containsLinkedCasesCaseField(this.currentPage.case_fields);
10679
10652
  };
10680
10653
  /**
10681
10654
  * caseEventData.event_data contains all the values from the previous pages so we set caseEventData.data = caseEventData.event_data
@@ -10702,7 +10675,7 @@
10702
10675
  var label = casefield.label || 'Field';
10703
10676
  var id_1 = casefield.id;
10704
10677
  if (fieldElement['component'] && fieldElement['component'].parent) {
10705
- if (fieldElement['component'].idPrefix.indexOf('_' + id_1 + '_') === -1) {
10678
+ if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
10706
10679
  id_1 = "" + fieldElement['component'].idPrefix + id_1;
10707
10680
  }
10708
10681
  else {
@@ -10777,14 +10750,26 @@
10777
10750
  var _this = this;
10778
10751
  this.caseEditDataService.clearFormValidationErrors();
10779
10752
  if (this.currentPageIsNotValid()) {
10780
- this.generateErrorMessage(this.currentPage.case_fields);
10753
+ // The generateErrorMessage method filters out the hidden fields.
10754
+ // The error message for LinkedCases journey will never get displayed because the
10755
+ // LinkedCases is configured with ComponentLauncher field as visible and caseLinks field as hidden.
10756
+ if (this.isLinkedCasesJourney()) {
10757
+ this.validationErrors.push({ id: 'next-button', message: 'Please select Next to go to the next page' });
10758
+ CaseEditPageComponent.scrollToTop();
10759
+ }
10760
+ else {
10761
+ this.generateErrorMessage(this.currentPage.case_fields);
10762
+ }
10781
10763
  }
10782
10764
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
10783
10765
  this.caseEdit.isSubmitting = true;
10784
10766
  this.caseEdit.error = null;
10785
10767
  var caseEventData = this.buildCaseEventData();
10786
- this.showSpinner = true;
10768
+ var loadingSpinnerToken_1 = this.loadingService.register();
10787
10769
  this.caseEdit.validate(caseEventData, this.currentPage.id)
10770
+ .pipe(operators.finalize(function () {
10771
+ _this.loadingService.unregister(loadingSpinnerToken_1);
10772
+ }))
10788
10773
  .subscribe(function (jsonData) {
10789
10774
  /* istanbul ignore else */
10790
10775
  if (jsonData) {
@@ -10793,7 +10778,6 @@
10793
10778
  _this.saveDraft();
10794
10779
  _this.next();
10795
10780
  }, function (error) {
10796
- _this.showSpinner = false;
10797
10781
  _this.handleError(error);
10798
10782
  });
10799
10783
  CaseEditPageComponent.scrollToTop();
@@ -10870,12 +10854,11 @@
10870
10854
  }
10871
10855
  };
10872
10856
  CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
10873
- this.caseEdit.ignoreWarning = errorContext.ignore_warning;
10874
- this.triggerText = errorContext.trigger_text;
10857
+ this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
10858
+ this.triggerText = errorContext.triggerText;
10875
10859
  };
10876
10860
  CaseEditPageComponent.prototype.next = function () {
10877
10861
  if (this.canNavigateToSummaryPage()) {
10878
- this.showSpinner = false;
10879
10862
  this.caseEdit.isSubmitting = false;
10880
10863
  }
10881
10864
  this.resetErrors();
@@ -11074,32 +11057,29 @@
11074
11057
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
11075
11058
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
11076
11059
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
11077
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
11078
- CaseEditPageComponent.ɵcmp = i0__namespace.ɵɵ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) {
11060
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
11061
+ CaseEditPageComponent.ɵcmp = i0__namespace.ɵɵ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) {
11079
11062
  if (rf & 1) {
11080
- i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ccd_loading_spinner_0_Template, 1, 0, "ccd-loading-spinner", 0);
11081
- i0__namespace.ɵɵtemplate(1, CaseEditPageComponent_ng_container_1_Template, 3, 2, "ng-container", 0);
11082
- i0__namespace.ɵɵtemplate(2, CaseEditPageComponent_div_2_Template, 1, 0, "div", 1);
11083
- i0__namespace.ɵɵtemplate(3, CaseEditPageComponent_ng_template_3_Template, 2, 5, "ng-template", null, 2, i0__namespace.ɵɵtemplateRefExtractor);
11084
- i0__namespace.ɵɵtemplate(5, CaseEditPageComponent_ng_template_5_Template, 1, 1, "ng-template", null, 3, i0__namespace.ɵɵtemplateRefExtractor);
11085
- i0__namespace.ɵɵtemplate(7, CaseEditPageComponent_div_7_Template, 4, 1, "div", 4);
11086
- i0__namespace.ɵɵelement(8, "ccd-case-edit-generic-errors", 5);
11087
- i0__namespace.ɵɵelementStart(9, "ccd-callback-errors", 6);
11088
- i0__namespace.ɵɵlistener("callbackErrorsContext", function CaseEditPageComponent_Template_ccd_callback_errors_callbackErrorsContext_9_listener($event) { return ctx.callbackErrorsNotify($event); });
11063
+ i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
11064
+ i0__namespace.ɵɵtemplate(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 1);
11065
+ i0__namespace.ɵɵtemplate(2, CaseEditPageComponent_ng_template_2_Template, 2, 5, "ng-template", null, 2, i0__namespace.ɵɵtemplateRefExtractor);
11066
+ i0__namespace.ɵɵtemplate(4, CaseEditPageComponent_ng_template_4_Template, 1, 1, "ng-template", null, 3, i0__namespace.ɵɵtemplateRefExtractor);
11067
+ i0__namespace.ɵɵtemplate(6, CaseEditPageComponent_div_6_Template, 4, 1, "div", 4);
11068
+ i0__namespace.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
11069
+ i0__namespace.ɵɵelementStart(8, "ccd-callback-errors", 6);
11070
+ i0__namespace.ɵɵlistener("callbackErrorsContext", function CaseEditPageComponent_Template_ccd_callback_errors_callbackErrorsContext_8_listener($event) { return ctx.callbackErrorsNotify($event); });
11089
11071
  i0__namespace.ɵɵelementEnd();
11090
- i0__namespace.ɵɵelementStart(10, "div", 7);
11091
- i0__namespace.ɵɵtemplate(11, CaseEditPageComponent_form_11_Template, 14, 9, "form", 8);
11072
+ i0__namespace.ɵɵelementStart(9, "div", 7);
11073
+ i0__namespace.ɵɵtemplate(10, CaseEditPageComponent_form_10_Template, 14, 9, "form", 8);
11092
11074
  i0__namespace.ɵɵelementEnd();
11093
- i0__namespace.ɵɵtemplate(12, CaseEditPageComponent_ccd_case_event_completion_12_Template, 1, 1, "ccd-case-event-completion", 9);
11075
+ i0__namespace.ɵɵtemplate(11, CaseEditPageComponent_ccd_case_event_completion_11_Template, 1, 1, "ccd-case-event-completion", 9);
11094
11076
  }
11095
11077
  if (rf & 2) {
11096
- var _r3 = i0__namespace.ɵɵreference(4);
11097
- var _r5 = i0__namespace.ɵɵreference(6);
11098
- i0__namespace.ɵɵproperty("ngIf", ctx.showSpinner);
11099
- i0__namespace.ɵɵadvance(1);
11078
+ var _r2 = i0__namespace.ɵɵreference(3);
11079
+ var _r4 = i0__namespace.ɵɵreference(5);
11100
11080
  i0__namespace.ɵɵproperty("ngIf", ctx.currentPage);
11101
11081
  i0__namespace.ɵɵadvance(1);
11102
- i0__namespace.ɵɵproperty("ngIf", ctx.getCaseTitle())("ngIfThen", _r3)("ngIfElse", _r5);
11082
+ i0__namespace.ɵɵproperty("ngIf", ctx.getCaseTitle())("ngIfThen", _r2)("ngIfElse", _r4);
11103
11083
  i0__namespace.ɵɵadvance(5);
11104
11084
  i0__namespace.ɵɵproperty("ngIf", ctx.validationErrors.length > 0);
11105
11085
  i0__namespace.ɵɵadvance(1);
@@ -11120,7 +11100,7 @@
11120
11100
  templateUrl: 'case-edit-page.html',
11121
11101
  styleUrls: ['./case-edit-page.scss']
11122
11102
  }]
11123
- }], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }]; }, null);
11103
+ }], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }]; }, null);
11124
11104
  })();
11125
11105
 
11126
11106
  var CallbackErrorsContext = /** @class */ (function () {
@@ -11240,12 +11220,12 @@
11240
11220
  CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
11241
11221
  var errorContext = new CallbackErrorsContext();
11242
11222
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
11243
- errorContext.ignore_warning = true;
11244
- errorContext.trigger_text = this.triggerTextIgnore;
11223
+ errorContext.ignoreWarning = true;
11224
+ errorContext.triggerText = this.triggerTextIgnore;
11245
11225
  }
11246
11226
  else {
11247
- errorContext.ignore_warning = false;
11248
- errorContext.trigger_text = this.triggerTextContinue;
11227
+ errorContext.ignoreWarning = false;
11228
+ errorContext.triggerText = this.triggerTextContinue;
11249
11229
  }
11250
11230
  return errorContext;
11251
11231
  };
@@ -11290,7 +11270,7 @@
11290
11270
 
11291
11271
  var AddressOption = /** @class */ (function () {
11292
11272
  function AddressOption(addressModel, description) {
11293
- if (description == null) {
11273
+ if (description === null) {
11294
11274
  this.value = addressModel;
11295
11275
  this.description = this.getDescription();
11296
11276
  }
@@ -11299,13 +11279,10 @@
11299
11279
  }
11300
11280
  }
11301
11281
  AddressOption.prototype.getDescription = function () {
11302
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
11303
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
11304
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
11305
- + ', ' + this.value.PostTown);
11282
+ return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
11306
11283
  };
11307
11284
  AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
11308
- return value ? ', ' + value : value;
11285
+ return value ? ", " + value : value;
11309
11286
  };
11310
11287
  AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
11311
11288
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -11449,7 +11426,7 @@
11449
11426
  this.missingPostcode = false;
11450
11427
  var postcode_1 = this.postcode.value;
11451
11428
  this.caseField.value = null;
11452
- this.addressOptions = new Array();
11429
+ this.addressOptions = [];
11453
11430
  this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
11454
11431
  result.forEach(function (address) {
11455
11432
  _this.addressOptions.push(new AddressOption(address, null));
@@ -11492,7 +11469,7 @@
11492
11469
  var hasAddress = false;
11493
11470
  if (address) {
11494
11471
  Object.keys(address).forEach(function (key) {
11495
- if (address[key] != null) {
11472
+ if (address[key] !== null) {
11496
11473
  hasAddress = true;
11497
11474
  }
11498
11475
  });
@@ -11515,7 +11492,7 @@
11515
11492
  };
11516
11493
  WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
11517
11494
  return numberOfAddresses === 0 ? 'No address found'
11518
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
11495
+ : "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
11519
11496
  };
11520
11497
  WriteAddressFieldComponent.prototype.setFormValue = function () {
11521
11498
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -13129,7 +13106,7 @@
13129
13106
  }
13130
13107
  };
13131
13108
  WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
13132
- var e_1, _a;
13109
+ var e_1, _c;
13133
13110
  if (isNew === void 0) { isNew = false; }
13134
13111
  /**
13135
13112
  * What follow is code that makes me want to go jump in the shower!
@@ -13165,8 +13142,8 @@
13165
13142
  if (!value) {
13166
13143
  value = new i2.FormGroup({});
13167
13144
  try {
13168
- for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
13169
- var key = _c.value;
13145
+ for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
13146
+ var key = _e.value;
13170
13147
  value.addControl(key, group.get(key));
13171
13148
  // DON'T remove the control for this key from the outer group or it
13172
13149
  // goes awry. So DON'T uncomment the below line!
@@ -13176,7 +13153,7 @@
13176
13153
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
13177
13154
  finally {
13178
13155
  try {
13179
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
13156
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
13180
13157
  }
13181
13158
  finally { if (e_1) throw e_1.error; }
13182
13159
  }
@@ -13307,6 +13284,7 @@
13307
13284
  this.formArray.removeAt(index);
13308
13285
  };
13309
13286
  WriteCollectionFieldComponent.prototype.resetIds = function (index) {
13287
+ var _a, _b;
13310
13288
  for (var i = index; i < this.collItems.length; i++) {
13311
13289
  var counter = i + 1;
13312
13290
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -13316,16 +13294,15 @@
13316
13294
  && this.collItems[i].caseField.id === counter.toString()) {
13317
13295
  this.collItems[i].caseField.id = i.toString();
13318
13296
  }
13319
- var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
13320
- var idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
13297
+ var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
13298
+ var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
13321
13299
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
13322
13300
  this.collItems[i].prefix = idPrefix1;
13323
13301
  }
13324
- var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
13325
- && this.collItems[i].container['component'].idPrefix ? true : false;
13302
+ var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
13326
13303
  var idPrefix2 = idPrefixAvailable ?
13327
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
13328
- var idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
13304
+ this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
13305
+ var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
13329
13306
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
13330
13307
  this.collItems[i].container['component'].idPrefix = idPrefix2;
13331
13308
  }
@@ -14681,6 +14658,257 @@
14681
14658
  }], null, null);
14682
14659
  })();
14683
14660
 
14661
+ var FixedListPipe = /** @class */ (function () {
14662
+ function FixedListPipe() {
14663
+ }
14664
+ FixedListPipe.prototype.transform = function (value, items) {
14665
+ if (!!items) {
14666
+ var item = items.find(function (i) { return i.code === value; });
14667
+ return item ? item.label : FixedListPipe.EMPTY;
14668
+ }
14669
+ else {
14670
+ return FixedListPipe.EMPTY;
14671
+ }
14672
+ };
14673
+ return FixedListPipe;
14674
+ }());
14675
+ FixedListPipe.EMPTY = '';
14676
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14677
+ FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14678
+ (function () {
14679
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14680
+ type: i0.Pipe,
14681
+ args: [{
14682
+ name: 'ccdFixedList'
14683
+ }]
14684
+ }], null, null);
14685
+ })();
14686
+
14687
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
14688
+ if (rf & 1) {
14689
+ i0__namespace.ɵɵelementStart(0, "div");
14690
+ i0__namespace.ɵɵtext(1);
14691
+ i0__namespace.ɵɵpipe(2, "ccdFixedList");
14692
+ i0__namespace.ɵɵelementEnd();
14693
+ }
14694
+ if (rf & 2) {
14695
+ var value_r1 = ctx.$implicit;
14696
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14697
+ i0__namespace.ɵɵadvance(1);
14698
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
14699
+ }
14700
+ }
14701
+ var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14702
+ __extends(ReadDynamicMultiSelectListFieldComponent, _super);
14703
+ function ReadDynamicMultiSelectListFieldComponent() {
14704
+ return _super !== null && _super.apply(this, arguments) || this;
14705
+ }
14706
+ ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14707
+ /**
14708
+ *
14709
+ * Reassigning list_items from formatted_list when list_items is empty
14710
+ */
14711
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
14712
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14713
+ }
14714
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14715
+ this.caseField.value = this.caseField.formatted_value.value;
14716
+ }
14717
+ _super.prototype.ngOnInit.call(this);
14718
+ };
14719
+ return ReadDynamicMultiSelectListFieldComponent;
14720
+ }(AbstractFieldReadComponent));
14721
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
14722
+ ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
14723
+ if (rf & 1) {
14724
+ i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
14725
+ }
14726
+ if (rf & 2) {
14727
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
14728
+ }
14729
+ }, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
14730
+ var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
14731
+ (function () {
14732
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
14733
+ type: i0.Component,
14734
+ args: [{
14735
+ selector: 'ccd-read-dynamic-multi-select-list-field',
14736
+ templateUrl: './read-dynamic-multi-select-list-field.html',
14737
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
14738
+ }]
14739
+ }], null, null);
14740
+ })();
14741
+
14742
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
14743
+ if (rf & 1) {
14744
+ i0__namespace.ɵɵelementStart(0, "span", 5);
14745
+ i0__namespace.ɵɵtext(1);
14746
+ i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
14747
+ i0__namespace.ɵɵelementEnd();
14748
+ }
14749
+ if (rf & 2) {
14750
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14751
+ i0__namespace.ɵɵadvance(1);
14752
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
14753
+ }
14754
+ }
14755
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
14756
+ if (rf & 1) {
14757
+ i0__namespace.ɵɵelementStart(0, "span", 6);
14758
+ i0__namespace.ɵɵtext(1);
14759
+ i0__namespace.ɵɵelementEnd();
14760
+ }
14761
+ if (rf & 2) {
14762
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
14763
+ i0__namespace.ɵɵadvance(1);
14764
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
14765
+ }
14766
+ }
14767
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
14768
+ if (rf & 1) {
14769
+ i0__namespace.ɵɵelementStart(0, "span", 7);
14770
+ i0__namespace.ɵɵtext(1);
14771
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
14772
+ i0__namespace.ɵɵelementEnd();
14773
+ }
14774
+ if (rf & 2) {
14775
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
14776
+ i0__namespace.ɵɵadvance(1);
14777
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
14778
+ }
14779
+ }
14780
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
14781
+ if (rf & 1) {
14782
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
14783
+ i0__namespace.ɵɵelementContainerStart(0);
14784
+ i0__namespace.ɵɵelementStart(1, "div", 8);
14785
+ i0__namespace.ɵɵelementStart(2, "input", 9);
14786
+ i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
14787
+ i0__namespace.ɵɵelementEnd();
14788
+ i0__namespace.ɵɵelementStart(3, "label", 10);
14789
+ i0__namespace.ɵɵtext(4);
14790
+ i0__namespace.ɵɵelementEnd();
14791
+ i0__namespace.ɵɵelementEnd();
14792
+ i0__namespace.ɵɵelementContainerEnd();
14793
+ }
14794
+ if (rf & 2) {
14795
+ var checkbox_r4 = ctx.$implicit;
14796
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
14797
+ i0__namespace.ɵɵadvance(2);
14798
+ i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
14799
+ i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
14800
+ i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
14801
+ i0__namespace.ɵɵadvance(1);
14802
+ i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14803
+ i0__namespace.ɵɵadvance(1);
14804
+ i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
14805
+ }
14806
+ }
14807
+ var _c0$L = function (a0) { return { "error": a0 }; };
14808
+ var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14809
+ __extends(WriteDynamicMultiSelectListFieldComponent, _super);
14810
+ function WriteDynamicMultiSelectListFieldComponent() {
14811
+ return _super !== null && _super.apply(this, arguments) || this;
14812
+ }
14813
+ WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14814
+ var _this = this;
14815
+ this.checkboxes = new i2.FormArray([]);
14816
+ this.setInitialCaseList();
14817
+ this.setInitialCaseFieldValue();
14818
+ // Initialise array with existing values
14819
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
14820
+ var values = this.caseField.value;
14821
+ values.forEach(function (value) {
14822
+ _this.checkboxes.push(new i2.FormControl(value));
14823
+ });
14824
+ }
14825
+ this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
14826
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14827
+ };
14828
+ WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
14829
+ var _this = this;
14830
+ var target = event.target;
14831
+ if (!target || !target.value) {
14832
+ return;
14833
+ }
14834
+ var selectedListItem = this.getValueListItem(target.value);
14835
+ if (!this.isSelected(target.value)) {
14836
+ // Add a new control in the FormArray
14837
+ this.checkboxes.push(new i2.FormControl(selectedListItem));
14838
+ }
14839
+ else {
14840
+ // Remove the control from the FormArray
14841
+ this.checkboxes.controls.forEach(function (ctrl, i) {
14842
+ if (ctrl.value.code === target.value) {
14843
+ _this.checkboxes.removeAt(i);
14844
+ }
14845
+ });
14846
+ }
14847
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14848
+ };
14849
+ WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
14850
+ if (this.checkboxes && this.checkboxes.controls) {
14851
+ return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
14852
+ }
14853
+ };
14854
+ WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
14855
+ return this.caseField.list_items.find(function (i) { return i.code === value; });
14856
+ };
14857
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
14858
+ var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
14859
+ var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
14860
+ if (!hasListItems && hasFormattedListItems) {
14861
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14862
+ }
14863
+ };
14864
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
14865
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14866
+ this.caseField.value = this.caseField.formatted_value.value;
14867
+ }
14868
+ var isNull = this.caseField.value === undefined || this.caseField.value === '';
14869
+ if (isNull || !Array.isArray(this.caseField.value)) {
14870
+ this.caseField.value = [];
14871
+ }
14872
+ };
14873
+ return WriteDynamicMultiSelectListFieldComponent;
14874
+ }(AbstractFieldWriteComponent));
14875
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
14876
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
14877
+ if (rf & 1) {
14878
+ i0__namespace.ɵɵelementStart(0, "div", 0);
14879
+ i0__namespace.ɵɵelementStart(1, "fieldset");
14880
+ i0__namespace.ɵɵelementStart(2, "legend");
14881
+ i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14882
+ i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14883
+ i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14884
+ i0__namespace.ɵɵelementEnd();
14885
+ i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14886
+ i0__namespace.ɵɵelementEnd();
14887
+ i0__namespace.ɵɵelementEnd();
14888
+ }
14889
+ if (rf & 2) {
14890
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
14891
+ i0__namespace.ɵɵadvance(3);
14892
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
14893
+ i0__namespace.ɵɵadvance(1);
14894
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
14895
+ i0__namespace.ɵɵadvance(1);
14896
+ i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
14897
+ i0__namespace.ɵɵadvance(1);
14898
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
14899
+ }
14900
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14901
+ var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
14902
+ (function () {
14903
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14904
+ type: i0.Component,
14905
+ args: [{
14906
+ selector: 'ccd-write-dynamic-multi-select-list-field',
14907
+ templateUrl: './write-dynamic-multi-select-list-field.html'
14908
+ }]
14909
+ }], null, null);
14910
+ })();
14911
+
14684
14912
  var DynamicRadioListPipe = /** @class */ (function () {
14685
14913
  function DynamicRadioListPipe() {
14686
14914
  }
@@ -14801,7 +15029,7 @@
14801
15029
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14802
15030
  }
14803
15031
  }
14804
- var _c0$L = function (a0) { return { selected: a0 }; };
15032
+ var _c0$K = function (a0) { return { selected: a0 }; };
14805
15033
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14806
15034
  if (rf & 1) {
14807
15035
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14814,7 +15042,7 @@
14814
15042
  if (rf & 2) {
14815
15043
  var radioButton_r5 = ctx.$implicit;
14816
15044
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14817
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
15045
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14818
15046
  i0__namespace.ɵɵadvance(1);
14819
15047
  i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
14820
15048
  i0__namespace.ɵɵadvance(1);
@@ -14978,7 +15206,7 @@
14978
15206
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14979
15207
  }
14980
15208
  }
14981
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
15209
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14982
15210
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14983
15211
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14984
15212
  __extends(WriteEmailFieldComponent, _super);
@@ -15003,7 +15231,7 @@
15003
15231
  i0__namespace.ɵɵelementEnd();
15004
15232
  }
15005
15233
  if (rf & 2) {
15006
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15234
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15007
15235
  i0__namespace.ɵɵadvance(1);
15008
15236
  i0__namespace.ɵɵproperty("for", ctx.id());
15009
15237
  i0__namespace.ɵɵadvance(1);
@@ -15027,32 +15255,6 @@
15027
15255
  }], null, null);
15028
15256
  })();
15029
15257
 
15030
- var FixedListPipe = /** @class */ (function () {
15031
- function FixedListPipe() {
15032
- }
15033
- FixedListPipe.prototype.transform = function (value, items) {
15034
- if (!!items) {
15035
- var item = items.find(function (i) { return i.code === value; });
15036
- return item ? item.label : FixedListPipe.EMPTY;
15037
- }
15038
- else {
15039
- return FixedListPipe.EMPTY;
15040
- }
15041
- };
15042
- return FixedListPipe;
15043
- }());
15044
- FixedListPipe.EMPTY = '';
15045
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
15046
- FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
15047
- (function () {
15048
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
15049
- type: i0.Pipe,
15050
- args: [{
15051
- name: 'ccdFixedList'
15052
- }]
15053
- }], null, null);
15054
- })();
15055
-
15056
15258
  var ReadFixedListFieldComponent = /** @class */ (function (_super) {
15057
15259
  __extends(ReadFixedListFieldComponent, _super);
15058
15260
  function ReadFixedListFieldComponent() {
@@ -15135,7 +15337,7 @@
15135
15337
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
15136
15338
  }
15137
15339
  }
15138
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
15340
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
15139
15341
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
15140
15342
  __extends(WriteFixedListFieldComponent, _super);
15141
15343
  function WriteFixedListFieldComponent() {
@@ -15184,7 +15386,7 @@
15184
15386
  i0__namespace.ɵɵelementEnd();
15185
15387
  }
15186
15388
  if (rf & 2) {
15187
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15389
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15188
15390
  i0__namespace.ɵɵadvance(1);
15189
15391
  i0__namespace.ɵɵproperty("for", ctx.id());
15190
15392
  i0__namespace.ɵɵadvance(1);
@@ -15302,7 +15504,7 @@
15302
15504
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15303
15505
  }
15304
15506
  }
15305
- var _c0$I = function (a0) { return { selected: a0 }; };
15507
+ var _c0$H = function (a0) { return { selected: a0 }; };
15306
15508
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15307
15509
  if (rf & 1) {
15308
15510
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15315,7 +15517,7 @@
15315
15517
  if (rf & 2) {
15316
15518
  var radioButton_r4 = ctx.$implicit;
15317
15519
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15318
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15520
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15319
15521
  i0__namespace.ɵɵadvance(1);
15320
15522
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15321
15523
  i0__namespace.ɵɵadvance(1);
@@ -15485,7 +15687,7 @@
15485
15687
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15486
15688
  }
15487
15689
  }
15488
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15690
+ var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15489
15691
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15490
15692
  if (rf & 1) {
15491
15693
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15497,7 +15699,7 @@
15497
15699
  if (rf & 2) {
15498
15700
  var judicialUser_r5 = ctx.$implicit;
15499
15701
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15500
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15702
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15501
15703
  i0__namespace.ɵɵadvance(1);
15502
15704
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15503
15705
  }
@@ -15763,7 +15965,7 @@
15763
15965
  casesResponse.push(_this.mapResponse(result));
15764
15966
  });
15765
15967
  });
15766
- var caseLinks = casesResponse.map(function (item) {
15968
+ _this.linkedCases = casesResponse.map(function (item) {
15767
15969
  return {
15768
15970
  caseReference: item.caseReference,
15769
15971
  caseName: item.caseName,
@@ -15777,7 +15979,6 @@
15777
15979
  }),
15778
15980
  };
15779
15981
  });
15780
- _this.linkedCases = caseLinks;
15781
15982
  _this.serverLinkedApiError = null;
15782
15983
  }, function (err) {
15783
15984
  _this.serverLinkedApiError = {
@@ -15932,9 +16133,7 @@
15932
16133
  });
15933
16134
  };
15934
16135
  BeforeYouStartComponent.prototype.onBack = function () {
15935
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
15936
- window.location.hash = 'Linked cases';
15937
- });
16136
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
15938
16137
  };
15939
16138
  return BeforeYouStartComponent;
15940
16139
  }());
@@ -16314,7 +16513,7 @@
16314
16513
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
16315
16514
  }
16316
16515
  }
16317
- var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16516
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
16318
16517
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
16319
16518
  if (rf & 1) {
16320
16519
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -16332,7 +16531,7 @@
16332
16531
  }
16333
16532
  if (rf & 2) {
16334
16533
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
16335
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
16534
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
16336
16535
  i0__namespace.ɵɵadvance(3);
16337
16536
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
16338
16537
  }
@@ -16389,11 +16588,11 @@
16389
16588
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16390
16589
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16391
16590
  i0__namespace.ɵɵadvance(1);
16392
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
16591
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
16393
16592
  i0__namespace.ɵɵadvance(3);
16394
16593
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16395
16594
  i0__namespace.ɵɵadvance(2);
16396
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
16595
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
16397
16596
  i0__namespace.ɵɵadvance(5);
16398
16597
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16399
16598
  i0__namespace.ɵɵadvance(2);
@@ -16827,7 +17026,7 @@
16827
17026
  i0__namespace.ɵɵadvance(4);
16828
17027
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16829
17028
  i0__namespace.ɵɵadvance(4);
16830
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
17029
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
16831
17030
  i0__namespace.ɵɵadvance(1);
16832
17031
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16833
17032
  i0__namespace.ɵɵadvance(18);
@@ -17308,6 +17507,7 @@
17308
17507
  searchCases.forEach(function (response) {
17309
17508
  casesResponse.push(_this.mapResponse(response));
17310
17509
  });
17510
+ casesResponse = _this.sortReasonCodes(casesResponse);
17311
17511
  _this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
17312
17512
  _this.isLoaded = true;
17313
17513
  var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
@@ -17333,6 +17533,30 @@
17333
17533
  });
17334
17534
  }
17335
17535
  };
17536
+ LinkedCasesToTableComponent.prototype.sortReasonCodes = function (searchCasesResponse) {
17537
+ var _this = this;
17538
+ searchCasesResponse.forEach(function (item) {
17539
+ var _a;
17540
+ if ((_a = item === null || item === void 0 ? void 0 : item.reasons) === null || _a === void 0 ? void 0 : _a.length) {
17541
+ item.reasons.forEach(function (reason) {
17542
+ reason.sortOrder = _this.getReasonSortOrder(reason.value.Reason);
17543
+ });
17544
+ item.reasons = item.reasons.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
17545
+ item.sortOrder = item.reasons[0].sortOrder;
17546
+ }
17547
+ });
17548
+ searchCasesResponse = searchCasesResponse === null || searchCasesResponse === void 0 ? void 0 : searchCasesResponse.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
17549
+ return searchCasesResponse;
17550
+ };
17551
+ LinkedCasesToTableComponent.prototype.getReasonSortOrder = function (reasonCode) {
17552
+ if (reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE) {
17553
+ return 1;
17554
+ }
17555
+ else if (reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE) {
17556
+ return 2;
17557
+ }
17558
+ return 3;
17559
+ };
17336
17560
  LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
17337
17561
  return rxjs.forkJoin(searchCasesResponse);
17338
17562
  };
@@ -17425,9 +17649,7 @@
17425
17649
  this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
17426
17650
  };
17427
17651
  NoLinkedCasesComponent.prototype.onBack = function () {
17428
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
17429
- window.location.hash = 'Linked cases';
17430
- });
17652
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
17431
17653
  };
17432
17654
  return NoLinkedCasesComponent;
17433
17655
  }());
@@ -17511,7 +17733,7 @@
17511
17733
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17512
17734
  }
17513
17735
  }
17514
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17736
+ var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17515
17737
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17516
17738
  if (rf & 1) {
17517
17739
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17523,7 +17745,7 @@
17523
17745
  }
17524
17746
  if (rf & 2) {
17525
17747
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
17526
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17748
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17527
17749
  i0__namespace.ɵɵadvance(1);
17528
17750
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17529
17751
  i0__namespace.ɵɵadvance(2);
@@ -17699,6 +17921,7 @@
17699
17921
  }] });
17700
17922
  })();
17701
17923
 
17924
+ // tslint:disable:variable-name
17702
17925
  var LinkCaseReason = /** @class */ (function () {
17703
17926
  function LinkCaseReason() {
17704
17927
  }
@@ -17857,7 +18080,7 @@
17857
18080
  this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(function (field) { return field.id === 'caseLinks'; });
17858
18081
  }
17859
18082
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
17860
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
18083
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17861
18084
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17862
18085
  next: function (reasons) {
17863
18086
  _this.reasonListLoaded = true;
@@ -17892,9 +18115,7 @@
17892
18115
  }
17893
18116
  };
17894
18117
  ReadLinkedCasesFieldComponent.prototype.reloadCurrentRoute = function () {
17895
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
17896
- window.location.hash = 'Linked cases';
17897
- });
18118
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id], { fragment: 'Linked cases' });
17898
18119
  };
17899
18120
  ReadLinkedCasesFieldComponent.prototype.getFailureLinkedToNotification = function (evt) {
17900
18121
  this.isServerLinkedToError = true;
@@ -17964,87 +18185,52 @@
17964
18185
  }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null);
17965
18186
  })();
17966
18187
 
17967
- function WriteLinkedCasesFieldComponent_div_0_div_3_Template(rf, ctx) {
17968
- if (rf & 1) {
17969
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
17970
- i0__namespace.ɵɵelementStart(0, "div", 7);
17971
- i0__namespace.ɵɵelementStart(1, "ul", 8);
17972
- i0__namespace.ɵɵelementStart(2, "li");
17973
- i0__namespace.ɵɵelementStart(3, "a", 9);
17974
- i0__namespace.ɵɵlistener("click", function WriteLinkedCasesFieldComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
17975
- i0__namespace.ɵɵtext(4);
17976
- i0__namespace.ɵɵelementEnd();
17977
- i0__namespace.ɵɵelementEnd();
17978
- i0__namespace.ɵɵelementEnd();
17979
- i0__namespace.ɵɵelementEnd();
17980
- }
17981
- if (rf & 2) {
17982
- var errorMessage_r7 = ctx.$implicit;
17983
- i0__namespace.ɵɵadvance(4);
17984
- i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
17985
- }
17986
- }
17987
- function WriteLinkedCasesFieldComponent_div_0_Template(rf, ctx) {
18188
+ function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) {
17988
18189
  if (rf & 1) {
17989
- i0__namespace.ɵɵelementStart(0, "div", 4);
17990
- i0__namespace.ɵɵelementStart(1, "h2", 5);
17991
- i0__namespace.ɵɵtext(2, " There is a problem ");
17992
- i0__namespace.ɵɵelementEnd();
17993
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_div_0_div_3_Template, 5, 1, "div", 6);
18190
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
18191
+ i0__namespace.ɵɵelementContainerStart(0);
18192
+ i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
18193
+ i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onLinkedCasesStateEmitted($event); });
17994
18194
  i0__namespace.ɵɵelementEnd();
17995
- }
17996
- if (rf & 2) {
17997
- var ctx_r0 = i0__namespace.ɵɵnextContext();
17998
- i0__namespace.ɵɵadvance(3);
17999
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
18195
+ i0__namespace.ɵɵelementContainerEnd();
18000
18196
  }
18001
18197
  }
18002
18198
  function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) {
18003
18199
  if (rf & 1) {
18004
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
18200
+ var _r8_1 = i0__namespace.ɵɵgetCurrentView();
18005
18201
  i0__namespace.ɵɵelementContainerStart(0);
18006
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
18007
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
18202
+ i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
18203
+ i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onLinkedCasesStateEmitted($event); });
18008
18204
  i0__namespace.ɵɵelementEnd();
18009
18205
  i0__namespace.ɵɵelementContainerEnd();
18010
18206
  }
18011
18207
  }
18012
18208
  function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) {
18013
18209
  if (rf & 1) {
18014
- var _r13_1 = i0__namespace.ɵɵgetCurrentView();
18210
+ var _r10_1 = i0__namespace.ɵɵgetCurrentView();
18015
18211
  i0__namespace.ɵɵelementContainerStart(0);
18016
- i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
18017
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r13_1); var ctx_r12 = i0__namespace.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
18212
+ i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 3);
18213
+ i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.onLinkedCasesStateEmitted($event); });
18018
18214
  i0__namespace.ɵɵelementEnd();
18019
18215
  i0__namespace.ɵɵelementContainerEnd();
18020
18216
  }
18021
18217
  }
18022
18218
  function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) {
18023
18219
  if (rf & 1) {
18024
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
18220
+ var _r12_1 = i0__namespace.ɵɵgetCurrentView();
18025
18221
  i0__namespace.ɵɵelementContainerStart(0);
18026
- i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
18027
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
18222
+ i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 3);
18223
+ i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(); return ctx_r11.onLinkedCasesStateEmitted($event); });
18028
18224
  i0__namespace.ɵɵelementEnd();
18029
18225
  i0__namespace.ɵɵelementContainerEnd();
18030
18226
  }
18031
18227
  }
18032
18228
  function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) {
18033
18229
  if (rf & 1) {
18034
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
18035
- i0__namespace.ɵɵelementContainerStart(0);
18036
- i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
18037
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
18038
- i0__namespace.ɵɵelementEnd();
18039
- i0__namespace.ɵɵelementContainerEnd();
18040
- }
18041
- }
18042
- function WriteLinkedCasesFieldComponent_ng_container_7_Template(rf, ctx) {
18043
- if (rf & 1) {
18044
- var _r19_1 = i0__namespace.ɵɵgetCurrentView();
18230
+ var _r14_1 = i0__namespace.ɵɵgetCurrentView();
18045
18231
  i0__namespace.ɵɵelementContainerStart(0);
18046
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
18047
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
18232
+ i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
18233
+ i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r14_1); var ctx_r13 = i0__namespace.ɵɵnextContext(); return ctx_r13.onLinkedCasesStateEmitted($event); });
18048
18234
  i0__namespace.ɵɵelementEnd();
18049
18235
  i0__namespace.ɵɵelementContainerEnd();
18050
18236
  }
@@ -18061,11 +18247,13 @@
18061
18247
  _this.linkedCasesPages = exports.LinkedCasesPages;
18062
18248
  _this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
18063
18249
  _this.linkedCases = [];
18064
- _this.errorMessages = [];
18065
18250
  return _this;
18066
18251
  }
18067
18252
  WriteLinkedCasesFieldComponent.prototype.ngOnInit = function () {
18068
18253
  var _this = this;
18254
+ // This is required to enable Continue button validation
18255
+ // Continue button should be enabled only at check your answers page
18256
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
18069
18257
  // Clear validation errors
18070
18258
  this.caseEditDataService.clearFormValidationErrors();
18071
18259
  // Get linked case reasons from ref data
@@ -18102,11 +18290,10 @@
18102
18290
  };
18103
18291
  WriteLinkedCasesFieldComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
18104
18292
  var _this = this;
18105
- this.errorMessages = [];
18293
+ // Clear validation errors
18106
18294
  this.caseEditDataService.clearFormValidationErrors();
18107
18295
  if (linkedCasesState.navigateToNextPage) {
18108
18296
  this.linkedCasesPage = this.getNextPage(linkedCasesState);
18109
- this.setContinueButtonValidationErrorMessage();
18110
18297
  this.proceedToNextPage();
18111
18298
  }
18112
18299
  else {
@@ -18119,7 +18306,7 @@
18119
18306
  };
18120
18307
  WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
18121
18308
  var _this = this;
18122
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
18309
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
18123
18310
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
18124
18311
  next: function (reasons) {
18125
18312
  // Sort in ascending order
@@ -18130,27 +18317,19 @@
18130
18317
  }
18131
18318
  });
18132
18319
  };
18133
- WriteLinkedCasesFieldComponent.prototype.setContinueButtonValidationErrorMessage = function () {
18134
- var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
18135
- ? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
18136
- : exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
18137
- var buttonId = this.linkedCasesService.linkedCases.length === 0
18138
- ? 'back-button'
18139
- : 'next-button';
18140
- this.caseEditDataService.setCaseLinkError({
18141
- componentId: buttonId,
18142
- errorMessage: errorMessage
18143
- });
18144
- };
18145
18320
  WriteLinkedCasesFieldComponent.prototype.proceedToNextPage = function () {
18146
18321
  if (this.isAtFinalPage()) {
18147
18322
  // Continue button event must be allowed in final page
18148
- this.caseEditDataService.clearCaseLinkError();
18323
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
18149
18324
  // Trigger validation to clear the "notAtFinalPage" error if now at the final state
18150
18325
  this.formGroup.updateValueAndValidity();
18151
18326
  // update form value
18152
18327
  this.submitLinkedCases();
18153
18328
  }
18329
+ else {
18330
+ // Continue button event must not be allowed if not in final page
18331
+ this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
18332
+ }
18154
18333
  };
18155
18334
  WriteLinkedCasesFieldComponent.prototype.submitLinkedCases = function () {
18156
18335
  if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
@@ -18178,11 +18357,10 @@
18178
18357
  var _this = this;
18179
18358
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
18180
18359
  var caseViewFiltered = caseView.tabs.filter(function (tab) {
18181
- var linkField = tab.fields.some(function (_b) {
18360
+ return tab.fields.some(function (_b) {
18182
18361
  var field_type = _b.field_type;
18183
18362
  return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
18184
18363
  });
18185
- return linkField;
18186
18364
  });
18187
18365
  if (caseViewFiltered) {
18188
18366
  var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(function (field) { return field.id === 'caseLinks'; })[0].value; });
@@ -18195,38 +18373,24 @@
18195
18373
  && !_this.linkedCasesService.serverLinkedApiError)
18196
18374
  ? exports.LinkedCasesPages.BEFORE_YOU_START
18197
18375
  : exports.LinkedCasesPages.NO_LINKED_CASES;
18198
- // Initialise the error to be displayed when clicked on Continue button
18199
- _this.setContinueButtonValidationErrorMessage();
18200
18376
  });
18201
18377
  };
18202
- WriteLinkedCasesFieldComponent.prototype.navigateToErrorElement = function (elementId) {
18203
- if (elementId) {
18204
- var htmlElement = document.getElementById(elementId);
18205
- if (htmlElement) {
18206
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
18207
- htmlElement.focus();
18208
- }
18209
- }
18210
- };
18211
18378
  return WriteLinkedCasesFieldComponent;
18212
18379
  }(AbstractFieldWriteComponent));
18213
18380
  WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
18214
- WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) {
18381
+ WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵ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) {
18215
18382
  if (rf & 1) {
18216
- i0__namespace.ɵɵtemplate(0, WriteLinkedCasesFieldComponent_div_0_Template, 4, 1, "div", 0);
18383
+ i0__namespace.ɵɵelementStart(0, "div", 0);
18217
18384
  i0__namespace.ɵɵelementStart(1, "div", 1);
18218
- i0__namespace.ɵɵelementStart(2, "div", 2);
18219
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
18220
- i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
18221
- i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
18222
- i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
18223
- i0__namespace.ɵɵtemplate(7, WriteLinkedCasesFieldComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
18385
+ i0__namespace.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2);
18386
+ i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2);
18387
+ i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2);
18388
+ i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2);
18389
+ i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
18224
18390
  i0__namespace.ɵɵelementEnd();
18225
18391
  i0__namespace.ɵɵelementEnd();
18226
18392
  }
18227
18393
  if (rf & 2) {
18228
- i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
18229
- i0__namespace.ɵɵadvance(1);
18230
18394
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
18231
18395
  i0__namespace.ɵɵadvance(1);
18232
18396
  i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
@@ -18465,7 +18629,7 @@
18465
18629
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18466
18630
  }
18467
18631
  }
18468
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18632
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18469
18633
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18470
18634
  __extends(WriteMoneyGbpFieldComponent, _super);
18471
18635
  function WriteMoneyGbpFieldComponent() {
@@ -18495,7 +18659,7 @@
18495
18659
  i0__namespace.ɵɵelementEnd();
18496
18660
  }
18497
18661
  if (rf & 2) {
18498
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18662
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18499
18663
  i0__namespace.ɵɵadvance(1);
18500
18664
  i0__namespace.ɵɵproperty("for", ctx.id());
18501
18665
  i0__namespace.ɵɵadvance(1);
@@ -18643,7 +18807,7 @@
18643
18807
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18644
18808
  }
18645
18809
  }
18646
- var _c0$D = function (a0) { return { "error": a0 }; };
18810
+ var _c0$C = function (a0) { return { "error": a0 }; };
18647
18811
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18648
18812
  __extends(WriteMultiSelectListFieldComponent, _super);
18649
18813
  function WriteMultiSelectListFieldComponent() {
@@ -18707,7 +18871,7 @@
18707
18871
  i0__namespace.ɵɵelementEnd();
18708
18872
  }
18709
18873
  if (rf & 2) {
18710
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18874
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18711
18875
  i0__namespace.ɵɵadvance(3);
18712
18876
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18713
18877
  i0__namespace.ɵɵadvance(1);
@@ -18798,7 +18962,7 @@
18798
18962
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18799
18963
  }
18800
18964
  }
18801
- var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18965
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18802
18966
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18803
18967
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18804
18968
  __extends(WriteNumberFieldComponent, _super);
@@ -18823,7 +18987,7 @@
18823
18987
  i0__namespace.ɵɵelementEnd();
18824
18988
  }
18825
18989
  if (rf & 2) {
18826
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
18990
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
18827
18991
  i0__namespace.ɵɵadvance(1);
18828
18992
  i0__namespace.ɵɵproperty("for", ctx.id());
18829
18993
  i0__namespace.ɵɵadvance(1);
@@ -19124,7 +19288,7 @@
19124
19288
  i0__namespace.ɵɵelementEnd();
19125
19289
  }
19126
19290
  }
19127
- var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
19291
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
19128
19292
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
19129
19293
  if (rf & 1) {
19130
19294
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -19140,7 +19304,7 @@
19140
19304
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
19141
19305
  var tmp_0_0 = null;
19142
19306
  var tmp_2_0 = null;
19143
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$B, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
19307
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
19144
19308
  i0__namespace.ɵɵadvance(2);
19145
19309
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
19146
19310
  i0__namespace.ɵɵadvance(2);
@@ -19547,231 +19711,6 @@
19547
19711
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19548
19712
  })();
19549
19713
 
19550
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
19551
- if (rf & 1) {
19552
- i0__namespace.ɵɵelementStart(0, "div");
19553
- i0__namespace.ɵɵtext(1);
19554
- i0__namespace.ɵɵpipe(2, "ccdFixedList");
19555
- i0__namespace.ɵɵelementEnd();
19556
- }
19557
- if (rf & 2) {
19558
- var value_r1 = ctx.$implicit;
19559
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19560
- i0__namespace.ɵɵadvance(1);
19561
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
19562
- }
19563
- }
19564
- var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19565
- __extends(ReadDynamicMultiSelectListFieldComponent, _super);
19566
- function ReadDynamicMultiSelectListFieldComponent() {
19567
- return _super !== null && _super.apply(this, arguments) || this;
19568
- }
19569
- ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19570
- /**
19571
- *
19572
- * Reassigning list_items from formatted_list when list_items is empty
19573
- */
19574
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
19575
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19576
- }
19577
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19578
- this.caseField.value = this.caseField.formatted_value.value;
19579
- }
19580
- _super.prototype.ngOnInit.call(this);
19581
- };
19582
- return ReadDynamicMultiSelectListFieldComponent;
19583
- }(AbstractFieldReadComponent));
19584
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
19585
- ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
19586
- if (rf & 1) {
19587
- i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
19588
- }
19589
- if (rf & 2) {
19590
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
19591
- }
19592
- }, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
19593
- var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
19594
- (function () {
19595
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
19596
- type: i0.Component,
19597
- args: [{
19598
- selector: 'ccd-read-dynamic-multi-select-list-field',
19599
- templateUrl: './read-dynamic-multi-select-list-field.html',
19600
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
19601
- }]
19602
- }], null, null);
19603
- })();
19604
-
19605
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
19606
- if (rf & 1) {
19607
- i0__namespace.ɵɵelementStart(0, "span", 5);
19608
- i0__namespace.ɵɵtext(1);
19609
- i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
19610
- i0__namespace.ɵɵelementEnd();
19611
- }
19612
- if (rf & 2) {
19613
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19614
- i0__namespace.ɵɵadvance(1);
19615
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
19616
- }
19617
- }
19618
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
19619
- if (rf & 1) {
19620
- i0__namespace.ɵɵelementStart(0, "span", 6);
19621
- i0__namespace.ɵɵtext(1);
19622
- i0__namespace.ɵɵelementEnd();
19623
- }
19624
- if (rf & 2) {
19625
- var ctx_r1 = i0__namespace.ɵɵnextContext();
19626
- i0__namespace.ɵɵadvance(1);
19627
- i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
19628
- }
19629
- }
19630
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
19631
- if (rf & 1) {
19632
- i0__namespace.ɵɵelementStart(0, "span", 7);
19633
- i0__namespace.ɵɵtext(1);
19634
- i0__namespace.ɵɵpipe(2, "ccdFirstError");
19635
- i0__namespace.ɵɵelementEnd();
19636
- }
19637
- if (rf & 2) {
19638
- var ctx_r2 = i0__namespace.ɵɵnextContext();
19639
- i0__namespace.ɵɵadvance(1);
19640
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
19641
- }
19642
- }
19643
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
19644
- if (rf & 1) {
19645
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
19646
- i0__namespace.ɵɵelementContainerStart(0);
19647
- i0__namespace.ɵɵelementStart(1, "div", 8);
19648
- i0__namespace.ɵɵelementStart(2, "input", 9);
19649
- i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
19650
- i0__namespace.ɵɵelementEnd();
19651
- i0__namespace.ɵɵelementStart(3, "label", 10);
19652
- i0__namespace.ɵɵtext(4);
19653
- i0__namespace.ɵɵelementEnd();
19654
- i0__namespace.ɵɵelementEnd();
19655
- i0__namespace.ɵɵelementContainerEnd();
19656
- }
19657
- if (rf & 2) {
19658
- var checkbox_r4 = ctx.$implicit;
19659
- var ctx_r3 = i0__namespace.ɵɵnextContext();
19660
- i0__namespace.ɵɵadvance(2);
19661
- i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
19662
- i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
19663
- i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
19664
- i0__namespace.ɵɵadvance(1);
19665
- i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
19666
- i0__namespace.ɵɵadvance(1);
19667
- i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
19668
- }
19669
- }
19670
- var _c0$A = function (a0) { return { "error": a0 }; };
19671
- var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19672
- __extends(WriteDynamicMultiSelectListFieldComponent, _super);
19673
- function WriteDynamicMultiSelectListFieldComponent() {
19674
- return _super !== null && _super.apply(this, arguments) || this;
19675
- }
19676
- WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19677
- var _this = this;
19678
- this.checkboxes = new i2.FormArray([]);
19679
- this.setInitialCaseList();
19680
- this.setInitialCaseFieldValue();
19681
- // Initialise array with existing values
19682
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
19683
- var values = this.caseField.value;
19684
- values.forEach(function (value) {
19685
- _this.checkboxes.push(new i2.FormControl(value));
19686
- });
19687
- }
19688
- this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
19689
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19690
- };
19691
- WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
19692
- var _this = this;
19693
- var target = event.target;
19694
- if (!target || !target.value) {
19695
- return;
19696
- }
19697
- var selectedListItem = this.getValueListItem(target.value);
19698
- if (!this.isSelected(target.value)) {
19699
- // Add a new control in the FormArray
19700
- this.checkboxes.push(new i2.FormControl(selectedListItem));
19701
- }
19702
- else {
19703
- // Remove the control from the FormArray
19704
- this.checkboxes.controls.forEach(function (ctrl, i) {
19705
- if (ctrl.value.code === target.value) {
19706
- _this.checkboxes.removeAt(i);
19707
- }
19708
- });
19709
- }
19710
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19711
- };
19712
- WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
19713
- if (this.checkboxes && this.checkboxes.controls) {
19714
- return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
19715
- }
19716
- };
19717
- WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
19718
- return this.caseField.list_items.find(function (i) { return i.code === value; });
19719
- };
19720
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
19721
- var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
19722
- var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
19723
- if (!hasListItems && hasFormattedListItems) {
19724
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19725
- }
19726
- };
19727
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
19728
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19729
- this.caseField.value = this.caseField.formatted_value.value;
19730
- }
19731
- var isNull = this.caseField.value === undefined || this.caseField.value === '';
19732
- if (isNull || !Array.isArray(this.caseField.value)) {
19733
- this.caseField.value = [];
19734
- }
19735
- };
19736
- return WriteDynamicMultiSelectListFieldComponent;
19737
- }(AbstractFieldWriteComponent));
19738
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
19739
- WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
19740
- if (rf & 1) {
19741
- i0__namespace.ɵɵelementStart(0, "div", 0);
19742
- i0__namespace.ɵɵelementStart(1, "fieldset");
19743
- i0__namespace.ɵɵelementStart(2, "legend");
19744
- i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
19745
- i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
19746
- i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
19747
- i0__namespace.ɵɵelementEnd();
19748
- i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
19749
- i0__namespace.ɵɵelementEnd();
19750
- i0__namespace.ɵɵelementEnd();
19751
- }
19752
- if (rf & 2) {
19753
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
19754
- i0__namespace.ɵɵadvance(3);
19755
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
19756
- i0__namespace.ɵɵadvance(1);
19757
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
19758
- i0__namespace.ɵɵadvance(1);
19759
- i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
19760
- i0__namespace.ɵɵadvance(1);
19761
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
19762
- }
19763
- }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
19764
- var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
19765
- (function () {
19766
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
19767
- type: i0.Component,
19768
- args: [{
19769
- selector: 'ccd-write-dynamic-multi-select-list-field',
19770
- templateUrl: './write-dynamic-multi-select-list-field.html'
19771
- }]
19772
- }], null, null);
19773
- })();
19774
-
19775
19714
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19776
19715
  __extends(ReadPhoneUKFieldComponent, _super);
19777
19716
  function ReadPhoneUKFieldComponent() {
@@ -19972,7 +19911,7 @@
19972
19911
  WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
19973
19912
  if (this.browserService.isIEOrEdge()) {
19974
19913
  event.target.style.height = 'auto';
19975
- event.target.style.height = event.target.scrollHeight + 'px';
19914
+ event.target.style.height = event.target.scrollHeight + "px";
19976
19915
  event.target.scrollTop = event.target.scrollHeight;
19977
19916
  }
19978
19917
  };
@@ -20212,6 +20151,7 @@
20212
20151
  return YesNoService.EMPTY;
20213
20152
  };
20214
20153
  YesNoService.prototype.isYes = function (value) {
20154
+ // tslint:disable-next-line:switch-default
20215
20155
  switch (typeof (value)) {
20216
20156
  case 'boolean':
20217
20157
  return value;
@@ -20221,6 +20161,7 @@
20221
20161
  return false;
20222
20162
  };
20223
20163
  YesNoService.prototype.isNo = function (value) {
20164
+ // tslint:disable-next-line:switch-default
20224
20165
  switch (typeof (value)) {
20225
20166
  case 'boolean':
20226
20167
  return !value;
@@ -20957,7 +20898,7 @@
20957
20898
  i0__namespace.ɵɵadvance(2);
20958
20899
  i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
20959
20900
  }
20960
- }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.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 });
20901
+ }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
20961
20902
  (function () {
20962
20903
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
20963
20904
  type: i0.Component,
@@ -21194,6 +21135,7 @@
21194
21135
  return CaseFileViewCategory;
21195
21136
  }());
21196
21137
 
21138
+ // tslint:disable:variable-name
21197
21139
  var CaseFileViewDocument = /** @class */ (function () {
21198
21140
  function CaseFileViewDocument() {
21199
21141
  }
@@ -22552,7 +22494,7 @@
22552
22494
  // is expected not to have a party name)
22553
22495
  if (this.flagsData) {
22554
22496
  this.filteredFlagsData =
22555
- this.flagsData.filter(function (f) { return f.flags.partyName != null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22497
+ this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22556
22498
  }
22557
22499
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
22558
22500
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -23849,18 +23791,19 @@
23849
23791
  field.value = { CaseReference: value };
23850
23792
  return field;
23851
23793
  };
23852
- ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
23794
+ ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
23853
23795
  return classTransformer.plainToClassFromExist(new CaseField(), {
23854
23796
  id: id,
23855
23797
  label: label,
23856
23798
  display_context: 'READONLY',
23857
23799
  value: value,
23858
- field_type: field_type
23800
+ field_type: fieldType
23859
23801
  });
23860
23802
  };
23861
23803
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
23862
23804
  var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
23863
23805
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
23806
+ // tslint:disable-next-line:switch-default
23864
23807
  switch (this.columnsHorizontalLabel[column].type.type) {
23865
23808
  case 'Number':
23866
23809
  case 'MoneyGBP': {
@@ -24986,6 +24929,7 @@
24986
24929
  return FeeValue;
24987
24930
  }());
24988
24931
 
24932
+ // tslint:disable:variable-name
24989
24933
  var Fee = /** @class */ (function () {
24990
24934
  function Fee() {
24991
24935
  }
@@ -25691,7 +25635,7 @@
25691
25635
  function CcdPageFieldsPipe() {
25692
25636
  }
25693
25637
  CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
25694
- var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25638
+ var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25695
25639
  var control = dataFormGroup.controls['data'].get(key);
25696
25640
  return control['caseField'];
25697
25641
  }).filter(function (field) {
@@ -25711,7 +25655,7 @@
25711
25655
  field_type: {
25712
25656
  id: page.id,
25713
25657
  type: 'Complex',
25714
- complex_fields: complex_fields
25658
+ complex_fields: complexFields
25715
25659
  }
25716
25660
  });
25717
25661
  };
@@ -25890,11 +25834,11 @@
25890
25834
  }
25891
25835
  return childrenCaseFields;
25892
25836
  };
25893
- CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
25894
- return case_field.field_type.type === 'Complex';
25837
+ CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
25838
+ return caseField.field_type.type === 'Complex';
25895
25839
  };
25896
- CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
25897
- return case_field.field_type.type === 'Collection';
25840
+ CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
25841
+ return caseField.field_type.type === 'Collection';
25898
25842
  };
25899
25843
  CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
25900
25844
  return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
@@ -26050,9 +25994,9 @@
26050
25994
  FileUploadStateService,
26051
25995
  FileUploadProgressGuard,
26052
25996
  WindowService,
26053
- LinkedCasesService,
26054
25997
  CommonDataService,
26055
25998
  JurisdictionService,
25999
+ LinkedCasesService,
26056
26000
  { provide: i5.MAT_DATE_LOCALE, useValue: 'en-GB' }
26057
26001
  ], imports: [[
26058
26002
  i1.CommonModule,
@@ -26394,9 +26338,9 @@
26394
26338
  FileUploadStateService,
26395
26339
  FileUploadProgressGuard,
26396
26340
  WindowService,
26397
- LinkedCasesService,
26398
26341
  CommonDataService,
26399
26342
  JurisdictionService,
26343
+ LinkedCasesService,
26400
26344
  { provide: i5.MAT_DATE_LOCALE, useValue: 'en-GB' }
26401
26345
  ],
26402
26346
  entryComponents: [CaseFileViewFolderSelectorComponent]
@@ -26431,7 +26375,7 @@
26431
26375
  AddCommentsComponent,
26432
26376
  ManageCaseFlagsComponent,
26433
26377
  UpdateFlagComponent], []);
26434
- i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
26378
+ i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
26435
26379
  NoLinkedCasesComponent,
26436
26380
  LinkCasesComponent,
26437
26381
  UnLinkCasesComponent,
@@ -26881,8 +26825,8 @@
26881
26825
  this.caseEdit.navigateToPage(pageId);
26882
26826
  };
26883
26827
  CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
26884
- this.caseEdit.ignoreWarning = errorContext.ignore_warning;
26885
- this.triggerText = errorContext.trigger_text;
26828
+ this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
26829
+ this.triggerText = errorContext.triggerText;
26886
26830
  };
26887
26831
  CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
26888
26832
  /* istanbul ignore else */
@@ -26958,7 +26902,7 @@
26958
26902
  return this.eventTrigger.case_fields.some(function (field) { return field.show_summary_content_option >= 0; });
26959
26903
  };
26960
26904
  CaseEditSubmitComponent.prototype.showEventNotes = function () {
26961
- return this.eventTrigger.show_event_notes !== false;
26905
+ return this.eventTrigger.show_event_notes === true;
26962
26906
  };
26963
26907
  CaseEditSubmitComponent.prototype.getLastPageShown = function () {
26964
26908
  var _this = this;
@@ -27603,6 +27547,7 @@
27603
27547
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
27604
27548
  ]
27605
27549
  });
27550
+ // tslint:disable-next-line:switch-default
27606
27551
  switch (portalType) {
27607
27552
  case EventCompletionPortalTypes.TaskCancelled:
27608
27553
  this.selectedComponentPortal = new i6$1.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -27791,7 +27736,7 @@
27791
27736
  }], null, null);
27792
27737
  })();
27793
27738
  i0__namespace.ɵɵsetComponentScope(CaseEditConfirmComponent, [i1__namespace.NgIf, MarkdownComponent, i2__namespace.ɵangular_packages_forms_forms_ba, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [CcdCaseTitlePipe, CaseReferencePipe]);
27794
- i0__namespace.ɵɵsetComponentScope(CaseEditPageComponent, [i1__namespace.NgIf, LoadingSpinnerComponent, MarkdownComponent, i1__namespace.NgForOf, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2__namespace.ɵangular_packages_forms_forms_ba, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, CaseEditFormComponent,
27739
+ i0__namespace.ɵɵsetComponentScope(CaseEditPageComponent, [i1__namespace.NgIf, MarkdownComponent, i1__namespace.NgForOf, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2__namespace.ɵangular_packages_forms_forms_ba, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, CaseEditFormComponent,
27795
27740
  CaseEventCompletionComponent], [CcdCaseTitlePipe, CaseReferencePipe, i1__namespace.AsyncPipe]);
27796
27741
  i0__namespace.ɵɵsetComponentScope(CaseEditFormComponent, [i1__namespace.NgForOf, ConditionalShowFormDirective, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, LabelSubstitutorDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, FieldReadComponent, i1__namespace.NgIf, FieldWriteComponent], [IsReadOnlyAndNotCollectionPipe, IsCompoundPipe]);
27797
27742
  i0__namespace.ɵɵsetComponentScope(CaseEditSubmitComponent, [i1__namespace.NgIf, MarkdownComponent, CaseEditGenericErrorsComponent, CallbackErrorsComponent, i2__namespace.ɵangular_packages_forms_forms_ba, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, LabelSubstitutorDirective, FieldReadComponent, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, i2__namespace.FormGroupName, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.MaxLengthValidator, CaseEventCompletionComponent], [CcdCaseTitlePipe, CaseReferencePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, IsCompoundPipe]);
@@ -28140,36 +28085,36 @@
28140
28085
  this.screenReaderCurrentLabel = "You're on page";
28141
28086
  this.pageChange = new i0.EventEmitter();
28142
28087
  this.pageBoundsCorrection = new i0.EventEmitter();
28143
- this._directionLinks = true;
28144
- this._autoHide = false;
28145
- this._responsive = false;
28088
+ this.pDirectionLinks = true;
28089
+ this.pAutoHide = false;
28090
+ this.pResponsive = false;
28146
28091
  }
28147
28092
  Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
28148
28093
  get: function () {
28149
- return this._directionLinks;
28094
+ return this.pDirectionLinks;
28150
28095
  },
28151
28096
  set: function (value) {
28152
- this._directionLinks = coerceToBoolean(value);
28097
+ this.pDirectionLinks = coerceToBoolean(value);
28153
28098
  },
28154
28099
  enumerable: false,
28155
28100
  configurable: true
28156
28101
  });
28157
28102
  Object.defineProperty(PaginationComponent.prototype, "autoHide", {
28158
28103
  get: function () {
28159
- return this._autoHide;
28104
+ return this.pAutoHide;
28160
28105
  },
28161
28106
  set: function (value) {
28162
- this._autoHide = coerceToBoolean(value);
28107
+ this.pAutoHide = coerceToBoolean(value);
28163
28108
  },
28164
28109
  enumerable: false,
28165
28110
  configurable: true
28166
28111
  });
28167
28112
  Object.defineProperty(PaginationComponent.prototype, "responsive", {
28168
28113
  get: function () {
28169
- return this._responsive;
28114
+ return this.pResponsive;
28170
28115
  },
28171
28116
  set: function (value) {
28172
- this._responsive = coerceToBoolean(value);
28117
+ this.pResponsive = coerceToBoolean(value);
28173
28118
  },
28174
28119
  enumerable: false,
28175
28120
  configurable: true
@@ -28936,7 +28881,7 @@
28936
28881
  var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
28937
28882
  workbasketInputs.forEach(function (item) {
28938
28883
  if (item.field.elementPath) {
28939
- item.field.id = item.field.id + '.' + item.field.elementPath;
28884
+ item.field.id = item.field.id + "." + item.field.elementPath;
28940
28885
  }
28941
28886
  item.field.label = item.label;
28942
28887
  if (formValue) {
@@ -28988,7 +28933,7 @@
28988
28933
  var value = formGroupLS[key];
28989
28934
  // Clear the filter form group control values if it has a value in local storage
28990
28935
  // The regionList form group control value should be ignored as it always contain the latest value
28991
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
28936
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
28992
28937
  this.formGroup.get(key).setValue(null);
28993
28938
  }
28994
28939
  }
@@ -30117,7 +30062,7 @@
30117
30062
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
30118
30063
  if (this.activityPollingService.isEnabled) {
30119
30064
  this.ngZone.runOutsideAngular(function () {
30120
- _this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
30065
+ _this.activitySubscription = _this.postEditActivity().subscribe(function () {
30121
30066
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
30122
30067
  });
30123
30068
  });
@@ -30193,9 +30138,7 @@
30193
30138
  };
30194
30139
  CaseEventTriggerComponent.prototype.cancel = function () {
30195
30140
  if (this.router.url && this.router.url.includes('linkCases')) {
30196
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
30197
- window.location.hash = 'Linked cases';
30198
- });
30141
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: 'Linked cases' });
30199
30142
  }
30200
30143
  else {
30201
30144
  return this.router.navigate([this.parentUrl]);
@@ -30793,9 +30736,9 @@
30793
30736
  i0__namespace.ɵɵelementEnd();
30794
30737
  }
30795
30738
  if (rf & 2) {
30796
- var field_r24 = i0__namespace.ɵɵnextContext(2).$implicit;
30739
+ var field_r23 = i0__namespace.ɵɵnextContext(2).$implicit;
30797
30740
  i0__namespace.ɵɵadvance(2);
30798
- i0__namespace.ɵɵtextInterpolate(field_r24.label);
30741
+ i0__namespace.ɵɵtextInterpolate(field_r23.label);
30799
30742
  }
30800
30743
  }
30801
30744
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) {
@@ -30810,14 +30753,14 @@
30810
30753
  i0__namespace.ɵɵelementEnd();
30811
30754
  }
30812
30755
  if (rf & 2) {
30813
- var field_r24 = i0__namespace.ɵɵnextContext().$implicit;
30814
- var ctx_r25 = i0__namespace.ɵɵnextContext(4);
30756
+ var field_r23 = i0__namespace.ɵɵnextContext().$implicit;
30757
+ var ctx_r24 = i0__namespace.ɵɵnextContext(4);
30815
30758
  i0__namespace.ɵɵadvance(1);
30816
- i0__namespace.ɵɵproperty("ngIf", !ctx_r25.isFieldToHaveNoLabel(field_r24));
30759
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r24.isFieldToHaveNoLabel(field_r23));
30817
30760
  i0__namespace.ɵɵadvance(1);
30818
- i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
30761
+ i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
30819
30762
  i0__namespace.ɵɵadvance(2);
30820
- i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
30763
+ i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r24.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r24.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r24.markdownUseHrefAsRouterLink);
30821
30764
  }
30822
30765
  }
30823
30766
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template(rf, ctx) {
@@ -30831,12 +30774,12 @@
30831
30774
  i0__namespace.ɵɵelementEnd();
30832
30775
  }
30833
30776
  if (rf & 2) {
30834
- var field_r24 = i0__namespace.ɵɵnextContext().$implicit;
30835
- var ctx_r26 = i0__namespace.ɵɵnextContext(4);
30777
+ var field_r23 = i0__namespace.ɵɵnextContext().$implicit;
30778
+ var ctx_r25 = i0__namespace.ɵɵnextContext(4);
30836
30779
  i0__namespace.ɵɵadvance(1);
30837
- i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
30780
+ i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
30838
30781
  i0__namespace.ɵɵadvance(2);
30839
- i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r26.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r26.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r26.markdownUseHrefAsRouterLink);
30782
+ i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
30840
30783
  }
30841
30784
  }
30842
30785
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_Template(rf, ctx) {
@@ -30852,12 +30795,12 @@
30852
30795
  i0__namespace.ɵɵelementContainerEnd();
30853
30796
  }
30854
30797
  if (rf & 2) {
30855
- var field_r24 = ctx.$implicit;
30856
- var ctx_r23 = i0__namespace.ɵɵnextContext(4);
30798
+ var field_r23 = ctx.$implicit;
30799
+ var ctx_r22 = i0__namespace.ɵɵnextContext(4);
30857
30800
  i0__namespace.ɵɵadvance(1);
30858
- i0__namespace.ɵɵproperty("caseField", field_r24)("contextFields", ctx_r23.caseFields)("hidden", field_r24.hidden);
30801
+ i0__namespace.ɵɵproperty("caseField", field_r23)("contextFields", ctx_r22.caseFields)("hidden", field_r23.hidden);
30859
30802
  i0__namespace.ɵɵadvance(1);
30860
- i0__namespace.ɵɵproperty("ngSwitch", !i0__namespace.ɵɵpipeBind1(3, 6, field_r24));
30803
+ i0__namespace.ɵɵproperty("ngSwitch", !i0__namespace.ɵɵpipeBind1(3, 6, field_r23));
30861
30804
  i0__namespace.ɵɵadvance(2);
30862
30805
  i0__namespace.ɵɵproperty("ngSwitchCase", true);
30863
30806
  i0__namespace.ɵɵadvance(1);
@@ -30877,10 +30820,10 @@
30877
30820
  }
30878
30821
  if (rf & 2) {
30879
30822
  var tab_r20 = i0__namespace.ɵɵnextContext().$implicit;
30880
- var ctx_r22 = i0__namespace.ɵɵnextContext(2);
30823
+ var ctx_r21 = i0__namespace.ɵɵnextContext(2);
30881
30824
  i0__namespace.ɵɵclassMap(tab_r20.id);
30882
30825
  i0__namespace.ɵɵadvance(2);
30883
- i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBindV(3, 3, i0__namespace.ɵɵpureFunction2(11, _c1$3, i0__namespace.ɵɵpipeBind1(4, 9, tab_r20), ctx_r22.formGroup.controls["data"])));
30826
+ i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBindV(3, 3, i0__namespace.ɵɵpureFunction2(11, _c1$3, i0__namespace.ɵɵpipeBind1(4, 9, tab_r20), ctx_r21.formGroup.controls["data"])));
30884
30827
  }
30885
30828
  }
30886
30829
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) {
@@ -30899,8 +30842,8 @@
30899
30842
  i0__namespace.ɵɵelement(0, "mat-tab", 26);
30900
30843
  }
30901
30844
  if (rf & 2) {
30902
- var tab_r32 = ctx.$implicit;
30903
- i0__namespace.ɵɵproperty("id", tab_r32.id)("label", tab_r32.label);
30845
+ var tab_r31 = ctx.$implicit;
30846
+ i0__namespace.ɵɵproperty("id", tab_r31.id)("label", tab_r31.label);
30904
30847
  }
30905
30848
  }
30906
30849
  function CaseFullAccessViewComponent_ng_container_12_router_outlet_6_Template(rf, ctx) {
@@ -30910,10 +30853,10 @@
30910
30853
  }
30911
30854
  function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) {
30912
30855
  if (rf & 1) {
30913
- var _r34_1 = i0__namespace.ɵɵgetCurrentView();
30856
+ var _r33_1 = i0__namespace.ɵɵgetCurrentView();
30914
30857
  i0__namespace.ɵɵelementContainerStart(0);
30915
30858
  i0__namespace.ɵɵelementStart(1, "mat-tab-group", 23, 24);
30916
- i0__namespace.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r34_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
30859
+ i0__namespace.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r33_1); var ctx_r32 = i0__namespace.ɵɵnextContext(); return ctx_r32.tabChanged($event); });
30917
30860
  i0__namespace.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
30918
30861
  i0__namespace.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
30919
30862
  i0__namespace.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
@@ -31093,8 +31036,8 @@
31093
31036
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
31094
31037
  };
31095
31038
  CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
31096
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
31097
- this.triggerText = callbackErrorsContext.trigger_text;
31039
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
31040
+ this.triggerText = callbackErrorsContext.triggerText;
31098
31041
  };
31099
31042
  CaseFullAccessViewComponent.prototype.isDraft = function () {
31100
31043
  return Draft.isDraft(this.caseDetails.case_id);
@@ -31382,7 +31325,7 @@
31382
31325
  * or the empty string
31383
31326
  */
31384
31327
  PrintUrlPipe.prototype.transform = function (remoteUrl) {
31385
- if (remoteUrl && remoteUrl.length > 0) {
31328
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
31386
31329
  var printServiceUrlPathname = void 0;
31387
31330
  /**
31388
31331
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -31398,7 +31341,7 @@
31398
31341
  printServiceUrlPathname = urlParser.pathname;
31399
31342
  if (printServiceUrlPathname[0] !== '/') {
31400
31343
  // Fix for IE11; it returns the pathname without leading slash
31401
- printServiceUrlPathname = '/' + printServiceUrlPathname;
31344
+ printServiceUrlPathname = "/" + printServiceUrlPathname;
31402
31345
  }
31403
31346
  }
31404
31347
  else {
@@ -31569,10 +31512,11 @@
31569
31512
  }
31570
31513
  }
31571
31514
  var CaseViewerComponent = /** @class */ (function () {
31572
- function CaseViewerComponent(route, caseNotifier, appConfig) {
31515
+ function CaseViewerComponent(route, caseNotifier, appConfig, orderService) {
31573
31516
  this.route = route;
31574
31517
  this.caseNotifier = caseNotifier;
31575
31518
  this.appConfig = appConfig;
31519
+ this.orderService = orderService;
31576
31520
  this.hasPrint = true;
31577
31521
  this.hasEventSelector = true;
31578
31522
  this.prependedTabs = [];
@@ -31588,23 +31532,25 @@
31588
31532
  };
31589
31533
  CaseViewerComponent.prototype.loadCaseDetails = function () {
31590
31534
  var _this = this;
31591
- if (!this.route.snapshot.data.case) {
31535
+ if (this.route.snapshot.data.case) {
31536
+ this.caseDetails = this.route.snapshot.data.case;
31537
+ this.caseDetails.tabs = this.orderService.sort(this.caseDetails.tabs);
31538
+ this.caseDetails.tabs = this.suffixDuplicateTabs(this.caseDetails.tabs);
31539
+ this.setUserAccessType(this.caseDetails);
31540
+ }
31541
+ else {
31592
31542
  this.caseSubscription = this.caseNotifier.caseView.subscribe(function (caseDetails) {
31593
31543
  _this.caseDetails = caseDetails;
31594
31544
  _this.setUserAccessType(_this.caseDetails);
31595
31545
  });
31596
31546
  }
31597
- else {
31598
- this.caseDetails = this.route.snapshot.data.case;
31599
- this.setUserAccessType(this.caseDetails);
31600
- }
31601
31547
  };
31602
31548
  CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
31603
31549
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
31604
- var access_process = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31605
- var access_granted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31606
- this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31607
- this.userAccessType = access_process ? access_process.value : null;
31550
+ var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID; });
31551
+ var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31552
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31553
+ this.userAccessType = accessProcess ? accessProcess.value : null;
31608
31554
  }
31609
31555
  };
31610
31556
  CaseViewerComponent.prototype.isDataLoaded = function () {
@@ -31616,14 +31562,30 @@
31616
31562
  !this.accessGranted ? CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.indexOf(this.userAccessType) === -1 : true
31617
31563
  : true;
31618
31564
  };
31565
+ CaseViewerComponent.prototype.suffixDuplicateTabs = function (tabs) {
31566
+ var count = {};
31567
+ var firstOccurences = {};
31568
+ var item;
31569
+ var itemCount;
31570
+ for (var i = 0, c = tabs.length; i < c; i++) {
31571
+ item = tabs[i].label;
31572
+ itemCount = count[item];
31573
+ itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1);
31574
+ if (count[item] > 1)
31575
+ tabs[i].label = tabs[i].label + Array(count[item] - 1).fill('_').join('');
31576
+ else
31577
+ firstOccurences[item] = i;
31578
+ }
31579
+ return tabs;
31580
+ };
31619
31581
  return CaseViewerComponent;
31620
31582
  }());
31621
- CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID = '[ACCESS_PROCESS]';
31583
+ CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID = '[ACCESS_PROCESS]';
31622
31584
  CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID = '[ACCESS_GRANTED]';
31623
31585
  CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES = ['CHALLENGED', 'SPECIFIC'];
31624
31586
  CaseViewerComponent.BASIC_USER_ACCESS_TYPES = 'BASIC';
31625
- CaseViewerComponent.ɵfac = function CaseViewerComponent_Factory(t) { return new (t || CaseViewerComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig)); };
31626
- CaseViewerComponent.ɵcmp = i0__namespace.ɵɵ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) {
31587
+ CaseViewerComponent.ɵfac = function CaseViewerComponent_Factory(t) { return new (t || CaseViewerComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(OrderService)); };
31588
+ CaseViewerComponent.ɵcmp = i0__namespace.ɵɵ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) {
31627
31589
  if (rf & 1) {
31628
31590
  i0__namespace.ɵɵtemplate(0, CaseViewerComponent_div_0_Template, 3, 2, "div", 0);
31629
31591
  }
@@ -31638,7 +31600,7 @@
31638
31600
  selector: 'ccd-case-viewer',
31639
31601
  templateUrl: './case-viewer.component.html'
31640
31602
  }]
31641
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CaseNotifier }, { type: AbstractAppConfig }]; }, { hasPrint: [{
31603
+ }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CaseNotifier }, { type: AbstractAppConfig }, { type: OrderService }]; }, { hasPrint: [{
31642
31604
  type: i0.Input
31643
31605
  }], hasEventSelector: [{
31644
31606
  type: i0.Input
@@ -31646,8 +31608,6 @@
31646
31608
  type: i0.Input
31647
31609
  }], appendedTabs: [{
31648
31610
  type: i0.Input
31649
- }], caseDetails: [{
31650
- type: i0.Input
31651
31611
  }] });
31652
31612
  })();
31653
31613
 
@@ -32900,11 +32860,11 @@
32900
32860
  };
32901
32861
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
32902
32862
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
32903
- .subscribe(function (_response) {
32863
+ .subscribe(function () {
32904
32864
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
32905
32865
  // Angular 7.2!
32906
32866
  _this.router.navigate(['success'], { relativeTo: _this.route });
32907
- }, function (_error) {
32867
+ }, function () {
32908
32868
  // Navigate to error page
32909
32869
  });
32910
32870
  }
@@ -32918,7 +32878,7 @@
32918
32878
  }
32919
32879
  };
32920
32880
  CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
32921
- return input.value == null || input.value.trim().length === 0;
32881
+ return input.value === null || input.value.trim().length === 0;
32922
32882
  };
32923
32883
  return CaseChallengedAccessRequestComponent;
32924
32884
  }());
@@ -33542,11 +33502,11 @@
33542
33502
  };
33543
33503
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
33544
33504
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
33545
- .subscribe(function (_response) {
33505
+ .subscribe(function () {
33546
33506
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
33547
33507
  // Angular 7.2
33548
33508
  _this.router.navigate(['success'], { relativeTo: _this.route });
33549
- }, function (_error) {
33509
+ }, function () {
33550
33510
  // Navigate to error page
33551
33511
  });
33552
33512
  }
@@ -33561,7 +33521,7 @@
33561
33521
  }
33562
33522
  };
33563
33523
  CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
33564
- return input.value == null || input.value.trim().length === 0;
33524
+ return input.value === null || input.value.trim().length === 0;
33565
33525
  };
33566
33526
  return CaseSpecificAccessRequestComponent;
33567
33527
  }());
@@ -34462,7 +34422,7 @@
34462
34422
  }
34463
34423
  searchInputs.forEach(function (item) {
34464
34424
  if (item.field.elementPath) {
34465
- item.field.id = item.field.id + '.' + item.field.elementPath;
34425
+ item.field.id = item.field.id + "." + item.field.elementPath;
34466
34426
  }
34467
34427
  item.field.label = item.label;
34468
34428
  if (formValueObject) {
@@ -34741,7 +34701,7 @@
34741
34701
  if (rf & 2) {
34742
34702
  var ctx_r3 = i0__namespace.ɵɵnextContext(2);
34743
34703
  i0__namespace.ɵɵadvance(6);
34744
- i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.total_results_count), ". Only the first 10,000 records are available for display. ");
34704
+ i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.totalResultsCount), ". Only the first 10,000 records are available for display. ");
34745
34705
  }
34746
34706
  }
34747
34707
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
@@ -35300,7 +35260,7 @@
35300
35260
  };
35301
35261
  Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
35302
35262
  get: function () {
35303
- var total = this.paginationMetadata.total_results_count;
35263
+ var total = this.paginationMetadata.totalResultsCount;
35304
35264
  var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
35305
35265
  this.paginationLimitEnforced = maximumResultReached;
35306
35266
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -35451,7 +35411,7 @@
35451
35411
  return col;
35452
35412
  };
35453
35413
  SearchResultComponent.prototype.hasResults = function () {
35454
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
35414
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
35455
35415
  };
35456
35416
  SearchResultComponent.prototype.hasDrafts = function () {
35457
35417
  return this.resultView.hasDrafts();
@@ -35550,7 +35510,7 @@
35550
35510
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
35551
35511
  };
35552
35512
  SearchResultComponent.prototype.getTotalResults = function () {
35553
- var total = this.paginationMetadata.total_results_count + this.draftsCount;
35513
+ var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
35554
35514
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
35555
35515
  };
35556
35516
  SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
@@ -35708,6 +35668,7 @@
35708
35668
  })();
35709
35669
  i0__namespace.ɵɵsetComponentScope(SearchResultComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1__namespace.DecimalPipe, i1__namespace$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
35710
35670
 
35671
+ // tslint:disable:variable-name
35711
35672
  var ComplexFieldOverride = /** @class */ (function () {
35712
35673
  function ComplexFieldOverride() {
35713
35674
  }
@@ -35729,24 +35690,24 @@
35729
35690
  this.caseField.id = id;
35730
35691
  return this;
35731
35692
  };
35732
- CaseFieldBuilder.prototype.withFieldType = function (field_type) {
35733
- this.caseField.field_type = field_type;
35693
+ CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
35694
+ this.caseField.field_type = fieldType;
35734
35695
  return this;
35735
35696
  };
35736
- CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
35737
- this.caseField.display_context = display_context;
35697
+ CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
35698
+ this.caseField.display_context = displayContext;
35738
35699
  return this;
35739
35700
  };
35740
- CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
35741
- this.caseField.display_context_parameter = display_context_parameter;
35701
+ CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
35702
+ this.caseField.display_context_parameter = displayContextParameter;
35742
35703
  return this;
35743
35704
  };
35744
35705
  CaseFieldBuilder.prototype.withHidden = function (hidden) {
35745
35706
  this.caseField.hidden = hidden;
35746
35707
  return this;
35747
35708
  };
35748
- CaseFieldBuilder.prototype.withHintText = function (hint_text) {
35749
- this.caseField.hint_text = hint_text;
35709
+ CaseFieldBuilder.prototype.withHintText = function (hintText) {
35710
+ this.caseField.hint_text = hintText;
35750
35711
  return this;
35751
35712
  };
35752
35713
  CaseFieldBuilder.prototype.withLabel = function (label) {
@@ -35757,12 +35718,12 @@
35757
35718
  this.caseField.order = order;
35758
35719
  return this;
35759
35720
  };
35760
- CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
35761
- this.caseField.security_label = security_label;
35721
+ CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
35722
+ this.caseField.security_label = securityLabel;
35762
35723
  return this;
35763
35724
  };
35764
- CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
35765
- this.caseField.show_condition = show_condition;
35725
+ CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
35726
+ this.caseField.show_condition = showCondition;
35766
35727
  return this;
35767
35728
  };
35768
35729
  CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
@@ -35790,21 +35751,21 @@
35790
35751
  complex_fields: []
35791
35752
  };
35792
35753
  };
35793
- var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
35794
- if (wizard_pages === void 0) { wizard_pages = []; }
35795
- if (can_save_draft === void 0) { can_save_draft = false; }
35754
+ var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
35755
+ if (wizardPages === void 0) { wizardPages = []; }
35756
+ if (canSaveDraft === void 0) { canSaveDraft = false; }
35796
35757
  var eventTrigger = new CaseEventTrigger();
35797
35758
  eventTrigger.id = id;
35798
35759
  eventTrigger.name = name;
35799
- eventTrigger.case_id = case_id;
35800
- eventTrigger.show_summary = show_summary;
35801
- eventTrigger.wizard_pages = wizard_pages;
35760
+ eventTrigger.case_id = caseId;
35761
+ eventTrigger.show_summary = showSummary;
35762
+ eventTrigger.wizard_pages = wizardPages;
35802
35763
  eventTrigger.event_token = 'test-token';
35803
- eventTrigger.case_fields = case_fields;
35804
- eventTrigger.can_save_draft = can_save_draft;
35764
+ eventTrigger.case_fields = caseFields;
35765
+ eventTrigger.can_save_draft = canSaveDraft;
35805
35766
  return eventTrigger;
35806
35767
  };
35807
- var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields, retain_hidden_value, hidden) {
35768
+ var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
35808
35769
  if (typeComplexFields === void 0) { typeComplexFields = []; }
35809
35770
  return ({
35810
35771
  id: id || 'personFirstName',
@@ -35813,10 +35774,10 @@
35813
35774
  type: type || 'Text',
35814
35775
  complex_fields: typeComplexFields || []
35815
35776
  },
35816
- display_context: display_context || 'OPTIONAL',
35777
+ display_context: displayContext || 'OPTIONAL',
35817
35778
  label: label || 'First name',
35818
- show_summary_content_option: show_summary_content_option,
35819
- retain_hidden_value: retain_hidden_value || false,
35779
+ show_summary_content_option: showSummaryContentOption,
35780
+ retain_hidden_value: retainHiddenValue || false,
35820
35781
  hidden: hidden || false
35821
35782
  });
35822
35783
  };
@@ -35858,48 +35819,48 @@
35858
35819
  complexFieldOverride.display_context = 'HIDDEN';
35859
35820
  return complexFieldOverride;
35860
35821
  };
35861
- var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition, ACLs, hidden) {
35822
+ var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
35862
35823
  if (order === void 0) { order = undefined; }
35863
- if (show_condition === void 0) { show_condition = undefined; }
35864
- if (ACLs === void 0) { ACLs = undefined; }
35824
+ if (showCondition === void 0) { showCondition = undefined; }
35825
+ if (acls === void 0) { acls = undefined; }
35865
35826
  return CaseFieldBuilder.create()
35866
35827
  .withId(id || 'personFirstName')
35867
35828
  .withFieldType(fieldType || textFieldType())
35868
- .withDisplayContext(display_context || 'OPTIONAL')
35829
+ .withDisplayContext(displayContext || 'OPTIONAL')
35869
35830
  .withLabel(label || 'First name')
35870
35831
  .withHintText(hint || 'First name hint text')
35871
35832
  .withShowSummaryContentOption(0)
35872
35833
  .withOrder(order)
35873
- .withShowCondition(show_condition || undefined)
35874
- .withACLs(ACLs)
35834
+ .withShowCondition(showCondition || undefined)
35835
+ .withACLs(acls)
35875
35836
  .withHidden(hidden || false)
35876
35837
  .build();
35877
35838
  };
35878
- var newCaseField = function (id, label, hint, fieldType, display_context, order) {
35839
+ var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
35879
35840
  if (order === void 0) { order = undefined; }
35880
35841
  return CaseFieldBuilder.create()
35881
35842
  .withId(id || 'personFirstName')
35882
35843
  .withFieldType(fieldType || textFieldType())
35883
- .withDisplayContext(display_context || 'OPTIONAL')
35844
+ .withDisplayContext(displayContext || 'OPTIONAL')
35884
35845
  .withHintText(hint || 'First name hint text')
35885
35846
  .withLabel(label || 'First name')
35886
35847
  .withOrder(order)
35887
35848
  .withShowSummaryContentOption(0);
35888
35849
  };
35889
- var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
35890
- if (complex_fields === void 0) { complex_fields = []; }
35891
- if (collection_field_type === void 0) { collection_field_type = undefined; }
35850
+ var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
35851
+ if (complexFields === void 0) { complexFields = []; }
35852
+ if (collectionFieldType === void 0) { collectionFieldType = undefined; }
35892
35853
  return {
35893
35854
  id: typeId || 'Text',
35894
35855
  type: type || 'Text',
35895
- complex_fields: complex_fields || [],
35896
- collection_field_type: collection_field_type || undefined
35856
+ complex_fields: complexFields || [],
35857
+ collection_field_type: collectionFieldType || undefined
35897
35858
  };
35898
35859
  };
35899
35860
  var createFixedListFieldType = function (typeId, fixedListItems) {
35900
35861
  if (fixedListItems === void 0) { fixedListItems = []; }
35901
35862
  return {
35902
- id: 'FixedList-' + typeId,
35863
+ id: "FixedList-" + typeId,
35903
35864
  type: 'FixedList',
35904
35865
  fixed_list_items: fixedListItems || []
35905
35866
  };
@@ -35907,18 +35868,18 @@
35907
35868
  var createMultiSelectListFieldType = function (typeId, fixedListItems) {
35908
35869
  if (fixedListItems === void 0) { fixedListItems = []; }
35909
35870
  return {
35910
- id: 'MultiSelectList-' + typeId,
35871
+ id: "MultiSelectList-" + typeId,
35911
35872
  type: 'MultiSelectList',
35912
35873
  fixed_list_items: fixedListItems || []
35913
35874
  };
35914
35875
  };
35915
- var createACL = function (role, create, read, update, _delete) {
35876
+ var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
35916
35877
  return ({
35917
35878
  role: role || 'roleX',
35918
- create: create,
35919
- read: read,
35920
- update: update,
35921
- delete: _delete
35879
+ create: aclCreate,
35880
+ read: aclRead,
35881
+ update: aclUpdate,
35882
+ delete: aclDelete
35922
35883
  });
35923
35884
  };
35924
35885
 
@@ -36137,7 +36098,6 @@
36137
36098
  exports.FormatTranslatorService = FormatTranslatorService;
36138
36099
  exports.GreyBarService = GreyBarService;
36139
36100
  exports.HRef = HRef;
36140
- exports.HasLoadingState = HasLoadingState;
36141
36101
  exports.HeaderBarComponent = HeaderBarComponent;
36142
36102
  exports.HeadersModule = HeadersModule;
36143
36103
  exports.HttpError = HttpError;