@hmcts/ccd-case-ui-toolkit 6.14.5-duplicate-tabs → 6.14.6-date-grey-bar

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 (239) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +761 -786
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
  7. package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
  8. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
  9. package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
  10. package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
  11. package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
  12. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +4 -4
  13. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
  14. package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
  15. package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
  16. package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
  17. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
  18. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
  19. package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
  20. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
  21. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
  22. package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
  23. package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
  24. package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
  25. package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
  26. package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +5 -3
  27. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +27 -25
  28. package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
  29. package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +12 -10
  30. package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
  31. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
  32. package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
  33. package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
  34. package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
  35. package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
  36. package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
  37. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  38. package/esm2015/lib/shared/components/palette/base-field/field-read-label.component.js +1 -1
  39. package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +1 -1
  40. package/esm2015/lib/shared/components/palette/base-field/payment-field.component.js +4 -1
  41. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  42. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
  43. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  44. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  45. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  46. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
  47. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  48. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  49. package/esm2015/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.js +4 -2
  50. package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
  51. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
  52. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
  53. package/esm2015/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.js +4 -2
  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 +5 -3
  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 +3 -4
  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 +2 -2
  61. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  62. package/esm2015/lib/shared/components/palette/payment/case-payment-history-viewer-field.component.js +3 -3
  63. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  64. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  65. package/esm2015/lib/shared/components/palette/waystopay/waystopay-field.component.js +4 -4
  66. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
  67. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  68. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  69. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  70. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  71. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
  72. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
  73. package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
  74. package/esm2015/lib/shared/domain/case-details.model.js +2 -1
  75. package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
  76. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  77. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
  78. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  79. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
  80. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
  81. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
  82. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
  83. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
  84. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
  85. package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
  86. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  87. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  88. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  89. package/esm2015/lib/shared/domain/definition/case-field.model.js +2 -1
  90. package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
  91. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
  92. package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
  93. package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
  94. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  95. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  96. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  97. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  98. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
  99. package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
  100. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  101. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
  102. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  103. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  104. package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
  105. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  106. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  107. package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
  108. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  109. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  110. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  111. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  112. package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
  113. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  114. package/esm2015/lib/shared/services/fields/fields.utils.js +5 -4
  115. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
  116. package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
  117. package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
  118. package/esm2015/lib/shared/services/search/search.service.js +5 -10
  119. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  120. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  121. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +742 -761
  122. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  123. package/lib/app.config.d.ts +2 -0
  124. package/lib/app.config.d.ts.map +1 -1
  125. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  126. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  127. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  128. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
  129. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  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-event-completion/case-event-completion.component.d.ts.map +1 -1
  132. 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
  133. 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
  134. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  135. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  136. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  137. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  138. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  139. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  140. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  141. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  142. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  143. package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts.map +1 -1
  144. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  145. package/lib/shared/components/case-viewer/case-viewer.component.d.ts +2 -2
  146. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  147. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  148. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  149. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  150. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  151. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  152. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  153. package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
  154. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  155. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  156. package/lib/shared/components/palette/base-field/payment-field.component.d.ts +1 -0
  157. package/lib/shared/components/palette/base-field/payment-field.component.d.ts.map +1 -1
  158. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  159. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  160. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  161. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  162. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  163. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  164. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  165. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  166. package/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.d.ts.map +1 -1
  167. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  168. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  169. package/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.d.ts.map +1 -1
  170. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  171. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  172. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  173. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  174. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  175. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  176. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  177. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  178. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  179. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  180. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  181. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  182. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  183. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  184. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  185. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  186. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  187. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  188. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  189. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  190. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  191. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  192. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  193. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  194. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  195. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  196. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  197. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  198. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  199. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  200. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  201. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  202. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  203. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  204. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  205. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  206. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  207. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  208. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  209. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  210. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  211. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  212. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  213. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  214. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  215. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  216. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  217. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  218. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  219. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  220. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  221. package/lib/shared/pipes/complex/index.d.ts +1 -1
  222. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  223. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  224. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  225. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  226. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  227. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  228. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  229. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  230. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  231. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  232. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  233. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  234. package/lib/shared/services/search/search.service.d.ts +0 -2
  235. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  236. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  237. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  238. package/package.json +1 -1
  239. 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
  };
@@ -4452,6 +4444,7 @@
4452
4444
  var elements = (result[field.id] || field.value);
4453
4445
  if (elements) {
4454
4446
  elements.forEach(function (elem) {
4447
+ // tslint:disable-next-line:switch-default
4455
4448
  switch (field.field_type.collection_field_type.type) {
4456
4449
  case 'MoneyGBP': {
4457
4450
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -4501,7 +4494,6 @@
4501
4494
  if (!condition) {
4502
4495
  return null;
4503
4496
  }
4504
- ;
4505
4497
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
4506
4498
  return peg.parse(condition.trim(), {});
4507
4499
  };
@@ -4515,14 +4507,12 @@
4515
4507
  if (!conditions || conditions.length === 0) {
4516
4508
  return true;
4517
4509
  }
4518
- ;
4519
4510
  var validJoinComparators = ['AND', 'OR'];
4520
- var result = conditions.reduce(function (accumulator, condition, index) {
4511
+ return conditions.reduce(function (accumulator, condition, index) {
4521
4512
  var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
4522
4513
  if (isJoinComparator(condition)) {
4523
4514
  return accumulator;
4524
4515
  }
4525
- ;
4526
4516
  var currentConditionResult = true;
4527
4517
  if (Array.isArray(condition)) {
4528
4518
  currentConditionResult = _this.evaluate(fields, condition);
@@ -4539,9 +4529,9 @@
4539
4529
  }
4540
4530
  return currentConditionResult;
4541
4531
  }, true);
4542
- return result;
4543
4532
  };
4544
4533
  ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
4534
+ // tslint:disable-next-line:switch-default
4545
4535
  switch (comparator) {
4546
4536
  case 'OR': return leftResult || rightResult;
4547
4537
  case 'AND': return leftResult && rightResult;
@@ -4631,8 +4621,7 @@
4631
4621
  }
4632
4622
  };
4633
4623
  ConditionParser.unquoted = function (str) {
4634
- var res = str.replace(/^"|"$/g, '');
4635
- return res;
4624
+ return str.replace(/^"|"$/g, '');
4636
4625
  };
4637
4626
  ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
4638
4627
  if (!fields) {
@@ -4746,8 +4735,8 @@
4746
4735
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4747
4736
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4748
4737
  this.processedList.push(condition.fieldReference);
4749
- var regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4750
- return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4738
+ var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
4739
+ return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
4751
4740
  }
4752
4741
  else {
4753
4742
  return originalCondition;
@@ -4826,6 +4815,7 @@
4826
4815
  }
4827
4816
  // Consider what type of field this is.
4828
4817
  var ft = caseField.field_type;
4818
+ // tslint:disable-next-line:switch-default
4829
4819
  switch (ft.type) {
4830
4820
  case 'Collection':
4831
4821
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -5316,14 +5306,14 @@
5316
5306
  var formFields = form.getRawValue();
5317
5307
  var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
5318
5308
  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);
5309
+ var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
5310
+ if (_this.hasShowConditionField(caseField, formFields)) {
5311
+ var condition = new ShowCondition(caseField.show_condition);
5312
+ if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
5313
+ _this.resetField(form, caseField);
5324
5314
  }
5325
5315
  }
5326
- _this.retainHiddenValueByFieldType(case_field, form);
5316
+ _this.retainHiddenValueByFieldType(caseField, form);
5327
5317
  });
5328
5318
  };
5329
5319
  FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
@@ -5354,13 +5344,13 @@
5354
5344
  FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
5355
5345
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
5356
5346
  };
5357
- FieldsPurger.prototype.hasShowConditionField = function (case_field, formFields) {
5358
- return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
5347
+ FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
5348
+ return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
5359
5349
  };
5360
- FieldsPurger.prototype.getShowConditionKey = function (show_condition) {
5350
+ FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
5361
5351
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
5362
5352
  // Also need to allow for conditions specified using the "CONTAINS" keyword
5363
- return show_condition.split(/!=|=|CONTAINS/)[0];
5353
+ return showCondition.split(/!=|=|CONTAINS/)[0];
5364
5354
  };
5365
5355
  FieldsPurger.prototype.resetField = function (form, field) {
5366
5356
  var e_1, _a;
@@ -5456,8 +5446,8 @@
5456
5446
  FieldsPurger.prototype.resetPage = function (form, wizardPage) {
5457
5447
  var _this = this;
5458
5448
  wizardPage.wizard_page_fields.forEach(function (wpf) {
5459
- var case_field = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5460
- _this.resetField(form, case_field);
5449
+ var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5450
+ _this.resetField(form, caseField);
5461
5451
  });
5462
5452
  };
5463
5453
  FieldsPurger.prototype.getType = function (elem) {
@@ -5467,8 +5457,8 @@
5467
5457
  return this.getType(elem) === 'Object';
5468
5458
  };
5469
5459
  // 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';
5460
+ FieldsPurger.prototype.isReadonly = function (caseField) {
5461
+ return caseField.display_context.toUpperCase() === 'READONLY';
5472
5462
  };
5473
5463
  /**
5474
5464
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -5655,6 +5645,7 @@
5655
5645
  return;
5656
5646
  }
5657
5647
  caseFields.forEach(function (caseField) {
5648
+ // tslint:disable-next-line:switch-default
5658
5649
  switch (caseField.field_type.type) {
5659
5650
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
5660
5651
  _this.convertArrayToDynamicListOutput(caseField, data);
@@ -6363,7 +6354,6 @@
6363
6354
  });
6364
6355
  }
6365
6356
  }
6366
- ;
6367
6357
  });
6368
6358
  }
6369
6359
  };
@@ -6802,7 +6792,7 @@
6802
6792
  return addressModel;
6803
6793
  };
6804
6794
  AddressParser.prototype.parseAddressLine1 = function (classification, address) {
6805
- var addressLine = '';
6795
+ var addressLine;
6806
6796
  if (classification === AddressType.RD06) {
6807
6797
  addressLine =
6808
6798
  address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
@@ -6815,7 +6805,7 @@
6815
6805
  return this.removeNonAddressValues(addressLine);
6816
6806
  };
6817
6807
  AddressParser.prototype.parseAddressLine2 = function (classification, address) {
6818
- var addressLine = '';
6808
+ var addressLine;
6819
6809
  if (classification === AddressType.RD06) {
6820
6810
  addressLine = address.BUILDING_NAME + " ";
6821
6811
  }
@@ -6826,7 +6816,7 @@
6826
6816
  return this.removeNonAddressValues(addressLine);
6827
6817
  };
6828
6818
  AddressParser.prototype.parseAddressLine3 = function (classification, address) {
6829
- var addressLine = '';
6819
+ var addressLine;
6830
6820
  if (classification === AddressType.RD06) {
6831
6821
  addressLine =
6832
6822
  address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
@@ -6854,7 +6844,7 @@
6854
6844
  return value.replace(new RegExp('^,', 'gi'), '');
6855
6845
  };
6856
6846
  AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
6857
- return value ? ', ' + value : value;
6847
+ return value ? ", " + value : value;
6858
6848
  };
6859
6849
  return AddressParser;
6860
6850
  }());
@@ -7104,7 +7094,7 @@
7104
7094
  if (flagType) {
7105
7095
  url += "?flag-type=" + flagType;
7106
7096
  }
7107
- if (welshRequired != null) {
7097
+ if (typeof welshRequired === 'boolean') {
7108
7098
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
7109
7099
  url.indexOf('?') > -1 ? url += '&' : url += '?';
7110
7100
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -7710,18 +7700,6 @@
7710
7700
  }], null, null);
7711
7701
  })();
7712
7702
 
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
7703
  var LoadingService = /** @class */ (function () {
7726
7704
  function LoadingService() {
7727
7705
  this.registered = new Map();
@@ -7746,7 +7724,7 @@
7746
7724
  };
7747
7725
  LoadingService.prototype.generateToken = function () {
7748
7726
  var timestamp = window.performance.now();
7749
- return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
7727
+ return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
7750
7728
  };
7751
7729
  return LoadingService;
7752
7730
  }());
@@ -7767,10 +7745,7 @@
7767
7745
  }
7768
7746
  SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
7769
7747
  var _this = this;
7770
- var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
7771
- + ("/jurisdictions/" + jurisdictionId)
7772
- + ("/case-types/" + caseTypeId)
7773
- + "/cases";
7748
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
7774
7749
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7775
7750
  var loadingToken = this.loadingService.register();
7776
7751
  return this.httpService
@@ -7779,15 +7754,14 @@
7779
7754
  };
7780
7755
  SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
7781
7756
  var _this = this;
7782
- var url = this.appConfig.getCaseDataUrl() +
7783
- ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7757
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7784
7758
  var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
7785
7759
  var loadingToken = this.loadingService.register();
7786
7760
  return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
7787
7761
  };
7788
7762
  SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
7789
7763
  var _this = this;
7790
- var url = this.appConfig.getCaseDataUrl() + ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7764
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7791
7765
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7792
7766
  var body = {
7793
7767
  sort: sort,
@@ -7832,9 +7806,8 @@
7832
7806
  return SearchService;
7833
7807
  }());
7834
7808
  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';
7809
+ // public static readonly VIEW_SEARCH = 'SEARCH';
7836
7810
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
7837
- SearchService.FIELD_PREFIX = 'case.';
7838
7811
  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
7812
  SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
7840
7813
  (function () {
@@ -7964,17 +7937,12 @@
7964
7937
  this.appConfig = appConfig;
7965
7938
  }
7966
7939
  DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
7967
- var url = this.appConfig.getApiUrl()
7968
- + "/caseworkers/:uid"
7969
- + ("/jurisdictions/" + jurisdictionId)
7970
- + ("/case-types?access=" + access);
7940
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
7971
7941
  return this.http
7972
7942
  .get(url).pipe(operators.map(function (response) { return response; }));
7973
7943
  };
7974
7944
  DefinitionsService.prototype.getJurisdictions = function (access) {
7975
- var url = this.appConfig.getApiUrl()
7976
- + "/caseworkers/:uid"
7977
- + ("/jurisdictions?access=" + access);
7945
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
7978
7946
  return this.http
7979
7947
  .get(url)
7980
7948
  .pipe(operators.map(function (response) { return response; }));
@@ -8056,8 +8024,8 @@
8056
8024
  compare: function (a, b) {
8057
8025
  var fieldA = a.case_fields[fieldId];
8058
8026
  var fieldB = b.case_fields[fieldId];
8059
- fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
8060
- fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
8027
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
8028
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
8061
8029
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8062
8030
  }
8063
8031
  };
@@ -8067,8 +8035,8 @@
8067
8035
  compare: function (a, b) {
8068
8036
  var fieldA = a.case_fields[fieldId];
8069
8037
  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();
8038
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
8039
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
8072
8040
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8073
8041
  }
8074
8042
  };
@@ -8326,31 +8294,31 @@
8326
8294
  };
8327
8295
  WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
8328
8296
  var caseFieldIds = override.complex_field_element_id.split('.');
8329
- var case_field_leaf;
8297
+ var caseFieldLeaf;
8330
8298
  var children = this.getCaseFieldChildren(caseField);
8331
8299
  if (children.length > 0) {
8332
8300
  var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
8333
- case_field_leaf = this.getCaseFieldLeaf(tail, children);
8301
+ caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
8334
8302
  }
8335
8303
  else {
8336
- case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8304
+ caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8337
8305
  }
8338
8306
  if (override.display_context !== 'HIDDEN') {
8339
- case_field_leaf.hidden = false;
8340
- case_field_leaf.display_context = override.display_context;
8307
+ caseFieldLeaf.hidden = false;
8308
+ caseFieldLeaf.display_context = override.display_context;
8341
8309
  if (override.label && override.label.length > 0) {
8342
- case_field_leaf.label = override.label;
8310
+ caseFieldLeaf.label = override.label;
8343
8311
  }
8344
8312
  if (override.hint_text && override.hint_text.length > 0) {
8345
- case_field_leaf.hint_text = override.hint_text;
8313
+ caseFieldLeaf.hint_text = override.hint_text;
8346
8314
  }
8347
8315
  if (override.show_condition && override.show_condition.length > 0) {
8348
- case_field_leaf.show_condition = override.show_condition;
8316
+ caseFieldLeaf.show_condition = override.show_condition;
8349
8317
  }
8350
8318
  }
8351
8319
  else {
8352
- case_field_leaf.hidden = true;
8353
- case_field_leaf.display_context = override.display_context;
8320
+ caseFieldLeaf.hidden = true;
8321
+ caseFieldLeaf.display_context = override.display_context;
8354
8322
  }
8355
8323
  };
8356
8324
  WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
@@ -8364,7 +8332,7 @@
8364
8332
  });
8365
8333
  };
8366
8334
  WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
8367
- return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
8335
+ return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
8368
8336
  };
8369
8337
  WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
8370
8338
  var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
@@ -8421,223 +8389,13 @@
8421
8389
  }], null, null);
8422
8390
  })();
8423
8391
 
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
8392
  var CasesService = /** @class */ (function () {
8634
- function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
8393
+ function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
8635
8394
  this.http = http;
8636
8395
  this.appConfig = appConfig;
8637
8396
  this.orderService = orderService;
8638
8397
  this.errorService = errorService;
8639
8398
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
8640
- this.workAllocationService = workAllocationService;
8641
8399
  this.loadingService = loadingService;
8642
8400
  this.sessionStorageService = sessionStorageService;
8643
8401
  this.get = this.getCaseView;
@@ -8656,11 +8414,7 @@
8656
8414
  };
8657
8415
  CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
8658
8416
  var _this = this;
8659
- var url = this.appConfig.getApiUrl()
8660
- + "/caseworkers/:uid"
8661
- + ("/jurisdictions/" + jurisdictionId)
8662
- + ("/case-types/" + caseTypeId)
8663
- + ("/cases/" + caseId);
8417
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
8664
8418
  var loadingToken = this.loadingService.register();
8665
8419
  return this.http
8666
8420
  .get(url)
@@ -8712,7 +8466,7 @@
8712
8466
  CasesService.prototype.createEvent = function (caseDetails, eventData) {
8713
8467
  var _this = this;
8714
8468
  var caseId = caseDetails.case_id;
8715
- var url = this.appConfig.getCaseDataUrl() + ("/cases/" + caseId + "/events");
8469
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
8716
8470
  var headers = new i1$2.HttpHeaders()
8717
8471
  .set('experimental', 'true')
8718
8472
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -8726,9 +8480,8 @@
8726
8480
  };
8727
8481
  CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
8728
8482
  var _this = this;
8729
- var pageIdString = pageId ? '?pageId=' + pageId : '';
8730
- var url = this.appConfig.getCaseDataUrl()
8731
- + ("/case-types/" + ctid + "/validate" + pageIdString);
8483
+ var pageIdString = pageId ? "?pageId=" + pageId : '';
8484
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
8732
8485
  var headers = new i1$2.HttpHeaders()
8733
8486
  .set('experimental', 'true')
8734
8487
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -8746,8 +8499,7 @@
8746
8499
  if (eventData.ignore_warning) {
8747
8500
  ignoreWarning = 'true';
8748
8501
  }
8749
- var url = this.appConfig.getCaseDataUrl()
8750
- + ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
8502
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
8751
8503
  var headers = new i1$2.HttpHeaders()
8752
8504
  .set('experimental', 'true')
8753
8505
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -8761,9 +8513,7 @@
8761
8513
  };
8762
8514
  CasesService.prototype.getPrintDocuments = function (caseId) {
8763
8515
  var _this = this;
8764
- var url = this.appConfig.getCaseDataUrl()
8765
- + ("/cases/" + caseId)
8766
- + "/documents";
8516
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
8767
8517
  var headers = new i1$2.HttpHeaders()
8768
8518
  .set('experimental', 'true')
8769
8519
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -8872,12 +8622,12 @@
8872
8622
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
8873
8623
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
8874
8624
  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)); };
8625
+ 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
8626
  CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8877
8627
  (function () {
8878
8628
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
8879
8629
  type: i0.Injectable
8880
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8630
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8881
8631
  })();
8882
8632
 
8883
8633
  var EventTriggerService = /** @class */ (function () {
@@ -9499,7 +9249,7 @@
9499
9249
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
9500
9250
  var formFields = editForm.getRawValue();
9501
9251
  var condition = ShowCondition.getInstance(caseField.show_condition);
9502
- if (path && path.indexOf('_' + caseField.id + '_') === -1) {
9252
+ if (path && path.indexOf("_" + caseField.id + "_") === -1) {
9503
9253
  path = "" + path + caseField.id;
9504
9254
  }
9505
9255
  return !condition.match(formFields.data, path);
@@ -9531,6 +9281,215 @@
9531
9281
  }], function () { return [{ type: CaseFieldService }]; }, null);
9532
9282
  })();
9533
9283
 
9284
+ var MULTIPLE_TASKS_FOUND = 'More than one task found!';
9285
+ var WorkAllocationService = /** @class */ (function () {
9286
+ function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
9287
+ this.http = http;
9288
+ this.appConfig = appConfig;
9289
+ this.errorService = errorService;
9290
+ this.alertService = alertService;
9291
+ this.sessionStorageService = sessionStorageService;
9292
+ // Check to see if work allocation is enabled
9293
+ }
9294
+ /**
9295
+ * Call the API to get tasks matching the search criteria.
9296
+ * @param searchRequest The search parameters that specify which tasks to match.
9297
+ */
9298
+ WorkAllocationService.prototype.searchTasks = function (searchRequest) {
9299
+ var _this = this;
9300
+ // Do not need to check if WA enabled as parent method will do that
9301
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
9302
+ return this.http
9303
+ .post(url, { searchRequest: searchRequest }, null, false)
9304
+ .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
9305
+ _this.errorService.setError(error);
9306
+ // explicitly eat away 401 error and 400 error
9307
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
9308
+ // do nothing
9309
+ console.log('error status 401 or 400', error);
9310
+ }
9311
+ else {
9312
+ return rxjs.throwError(error);
9313
+ }
9314
+ }));
9315
+ };
9316
+ WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
9317
+ this.features = this.appConfig.getWAServiceConfig();
9318
+ var enabled = false;
9319
+ if (!jurisdiction || !caseType) {
9320
+ var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
9321
+ jurisdiction = caseInfo.jurisdiction;
9322
+ caseType = caseInfo.caseType;
9323
+ }
9324
+ if (!this.features || !this.features.configurations) {
9325
+ return false;
9326
+ }
9327
+ this.features.configurations.forEach(function (serviceConfig) {
9328
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
9329
+ enabled = true;
9330
+ }
9331
+ });
9332
+ return enabled;
9333
+ };
9334
+ /**
9335
+ * Call the API to assign a task.
9336
+ * @param taskId specifies which task should be assigned.
9337
+ * @param userId specifies the user the task should be assigned to.
9338
+ */
9339
+ WorkAllocationService.prototype.assignTask = function (taskId, userId) {
9340
+ var _this = this;
9341
+ if (!this.isWAEnabled()) {
9342
+ return rxjs.of(null);
9343
+ }
9344
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
9345
+ return this.http
9346
+ .post(url, { userId: userId })
9347
+ .pipe(operators.catchError(function (error) {
9348
+ _this.errorService.setError(error);
9349
+ return rxjs.throwError(error);
9350
+ }));
9351
+ };
9352
+ /**
9353
+ * Call the API to complete a task.
9354
+ * @param taskId specifies which task should be completed.
9355
+ */
9356
+ WorkAllocationService.prototype.completeTask = function (taskId) {
9357
+ var _this = this;
9358
+ if (!this.isWAEnabled()) {
9359
+ return rxjs.of(null);
9360
+ }
9361
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9362
+ return this.http
9363
+ .post(url, {})
9364
+ .pipe(operators.catchError(function (error) {
9365
+ _this.errorService.setError(error);
9366
+ // this will subscribe to get the user details and decide whether to display an error message
9367
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9368
+ _this.handleTaskCompletionError(response);
9369
+ });
9370
+ return rxjs.throwError(error);
9371
+ }));
9372
+ };
9373
+ /**
9374
+ * Call the API to assign and complete a task.
9375
+ * @param taskId specifies which task should be completed.
9376
+ */
9377
+ WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
9378
+ var _this = this;
9379
+ if (!this.isWAEnabled()) {
9380
+ return rxjs.of(null);
9381
+ }
9382
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9383
+ return this.http
9384
+ .post(url, {
9385
+ completion_options: {
9386
+ assign_and_complete: true
9387
+ }
9388
+ })
9389
+ .pipe(operators.catchError(function (error) {
9390
+ _this.errorService.setError(error);
9391
+ // this will subscribe to get the user details and decide whether to display an error message
9392
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9393
+ _this.handleTaskCompletionError(response);
9394
+ });
9395
+ return rxjs.throwError(error);
9396
+ }));
9397
+ };
9398
+ /**
9399
+ * Handles the response from the observable to get the user details when task is completed.
9400
+ * @param response is the response given from the observable which contains the user detaild.
9401
+ */
9402
+ WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
9403
+ var userDetails = response;
9404
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
9405
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
9406
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
9407
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
9408
+ }
9409
+ };
9410
+ /**
9411
+ * Returns true if the user's role is equivalent to a caseworker.
9412
+ * @param roles is the list of roles found from the current user.
9413
+ */
9414
+ WorkAllocationService.prototype.userIsCaseworker = function (roles) {
9415
+ var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
9416
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
9417
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
9418
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
9419
+ };
9420
+ /**
9421
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
9422
+ * 1. No tasks found => Success.
9423
+ * 2. One task found => Mark as done => Success.
9424
+ * 3. One task found => Mark as done throws error => Failure.
9425
+ * 4. More than one task found => Failure.
9426
+ * 5. Search call throws an error => Failure.
9427
+ * @param ccdId The ID of the case to find tasks for.
9428
+ * @param eventId The ID of the event to find tasks for.
9429
+ */
9430
+ WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
9431
+ var _this = this;
9432
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
9433
+ return rxjs.of(null);
9434
+ }
9435
+ var taskSearchParameter = {
9436
+ ccdId: ccdId,
9437
+ eventId: eventId,
9438
+ jurisdiction: jurisdiction,
9439
+ caseTypeId: caseTypeId
9440
+ };
9441
+ return this.searchTasks(taskSearchParameter)
9442
+ .pipe(operators.map(function (response) {
9443
+ var tasks = response.tasks;
9444
+ if (tasks && tasks.length > 0) {
9445
+ if (tasks.length === 1) {
9446
+ _this.completeTask(tasks[0].id).subscribe();
9447
+ }
9448
+ else {
9449
+ // This is a problem. Throw an appropriate error.
9450
+ throw new Error(MULTIPLE_TASKS_FOUND);
9451
+ }
9452
+ }
9453
+ return true; // All good. Nothing to see here.
9454
+ }), operators.catchError(function (error) {
9455
+ // Simply rethrow it.
9456
+ return rxjs.throwError(error);
9457
+ }));
9458
+ };
9459
+ /**
9460
+ * Return tasks for case and event.
9461
+ */
9462
+ WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
9463
+ var defaultPayload = {
9464
+ task_required_for_event: false,
9465
+ tasks: []
9466
+ };
9467
+ if (!this.isWAEnabled()) {
9468
+ return rxjs.of(defaultPayload);
9469
+ }
9470
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
9471
+ };
9472
+ /**
9473
+ * Call the API to get a task
9474
+ */
9475
+ WorkAllocationService.prototype.getTask = function (taskId) {
9476
+ if (!this.isWAEnabled()) {
9477
+ return rxjs.of({ task: null });
9478
+ }
9479
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
9480
+ };
9481
+ return WorkAllocationService;
9482
+ }());
9483
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
9484
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
9485
+ 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)); };
9486
+ WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
9487
+ (function () {
9488
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
9489
+ type: i0.Injectable
9490
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
9491
+ })();
9492
+
9534
9493
  var CaseEditComponent = /** @class */ (function () {
9535
9494
  function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
9536
9495
  this.fb = fb;
@@ -10469,7 +10428,7 @@
10469
10428
  var label = casefield.label || 'Field';
10470
10429
  var id_1 = casefield.id;
10471
10430
  if (fieldElement['component'] && fieldElement['component'].parent) {
10472
- if (fieldElement['component'].idPrefix.indexOf('_' + id_1 + '_') === -1) {
10431
+ if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
10473
10432
  id_1 = "" + fieldElement['component'].idPrefix + id_1;
10474
10433
  }
10475
10434
  else {
@@ -10610,8 +10569,8 @@
10610
10569
  }
10611
10570
  };
10612
10571
  CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
10613
- this.ignoreWarning = errorContext.ignore_warning;
10614
- this.triggerText = errorContext.trigger_text;
10572
+ this.ignoreWarning = errorContext.ignoreWarning;
10573
+ this.triggerText = errorContext.triggerText;
10615
10574
  };
10616
10575
  CaseEditPageComponent.prototype.next = function () {
10617
10576
  this.resetErrors();
@@ -10957,12 +10916,12 @@
10957
10916
  CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
10958
10917
  var errorContext = new CallbackErrorsContext();
10959
10918
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
10960
- errorContext.ignore_warning = true;
10961
- errorContext.trigger_text = this.triggerTextIgnore;
10919
+ errorContext.ignoreWarning = true;
10920
+ errorContext.triggerText = this.triggerTextIgnore;
10962
10921
  }
10963
10922
  else {
10964
- errorContext.ignore_warning = false;
10965
- errorContext.trigger_text = this.triggerTextContinue;
10923
+ errorContext.ignoreWarning = false;
10924
+ errorContext.triggerText = this.triggerTextContinue;
10966
10925
  }
10967
10926
  return errorContext;
10968
10927
  };
@@ -11007,7 +10966,7 @@
11007
10966
 
11008
10967
  var AddressOption = /** @class */ (function () {
11009
10968
  function AddressOption(addressModel, description) {
11010
- if (description == null) {
10969
+ if (description === null) {
11011
10970
  this.value = addressModel;
11012
10971
  this.description = this.getDescription();
11013
10972
  }
@@ -11016,13 +10975,10 @@
11016
10975
  }
11017
10976
  }
11018
10977
  AddressOption.prototype.getDescription = function () {
11019
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
11020
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
11021
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
11022
- + ', ' + this.value.PostTown);
10978
+ return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
11023
10979
  };
11024
10980
  AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
11025
- return value ? ', ' + value : value;
10981
+ return value ? ", " + value : value;
11026
10982
  };
11027
10983
  AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
11028
10984
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -11166,7 +11122,7 @@
11166
11122
  this.missingPostcode = false;
11167
11123
  var postcode_1 = this.postcode.value;
11168
11124
  this.caseField.value = null;
11169
- this.addressOptions = new Array();
11125
+ this.addressOptions = [];
11170
11126
  this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
11171
11127
  result.forEach(function (address) {
11172
11128
  _this.addressOptions.push(new AddressOption(address, null));
@@ -11209,7 +11165,7 @@
11209
11165
  var hasAddress = false;
11210
11166
  if (address) {
11211
11167
  Object.keys(address).forEach(function (key) {
11212
- if (address[key] != null) {
11168
+ if (address[key] !== null) {
11213
11169
  hasAddress = true;
11214
11170
  }
11215
11171
  });
@@ -11232,7 +11188,7 @@
11232
11188
  };
11233
11189
  WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
11234
11190
  return numberOfAddresses === 0 ? 'No address found'
11235
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
11191
+ : "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
11236
11192
  };
11237
11193
  WriteAddressFieldComponent.prototype.setFormValue = function () {
11238
11194
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -12790,7 +12746,7 @@
12790
12746
  }
12791
12747
  };
12792
12748
  WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
12793
- var e_1, _a;
12749
+ var e_1, _c;
12794
12750
  if (isNew === void 0) { isNew = false; }
12795
12751
  /**
12796
12752
  * What follow is code that makes me want to go jump in the shower!
@@ -12826,8 +12782,8 @@
12826
12782
  if (!value) {
12827
12783
  value = new i2.FormGroup({});
12828
12784
  try {
12829
- for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
12830
- var key = _c.value;
12785
+ for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
12786
+ var key = _e.value;
12831
12787
  value.addControl(key, group.get(key));
12832
12788
  // DON'T remove the control for this key from the outer group or it
12833
12789
  // goes awry. So DON'T uncomment the below line!
@@ -12837,7 +12793,7 @@
12837
12793
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
12838
12794
  finally {
12839
12795
  try {
12840
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12796
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
12841
12797
  }
12842
12798
  finally { if (e_1) throw e_1.error; }
12843
12799
  }
@@ -12968,6 +12924,7 @@
12968
12924
  this.formArray.removeAt(index);
12969
12925
  };
12970
12926
  WriteCollectionFieldComponent.prototype.resetIds = function (index) {
12927
+ var _a, _b;
12971
12928
  for (var i = index; i < this.collItems.length; i++) {
12972
12929
  var counter = i + 1;
12973
12930
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -12977,16 +12934,15 @@
12977
12934
  && this.collItems[i].caseField.id === counter.toString()) {
12978
12935
  this.collItems[i].caseField.id = i.toString();
12979
12936
  }
12980
- var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12981
- var idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
12937
+ var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12938
+ var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
12982
12939
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
12983
12940
  this.collItems[i].prefix = idPrefix1;
12984
12941
  }
12985
- var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
12986
- && this.collItems[i].container['component'].idPrefix ? true : false;
12942
+ var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
12987
12943
  var idPrefix2 = idPrefixAvailable ?
12988
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12989
- var idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
12944
+ this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12945
+ var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
12990
12946
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
12991
12947
  this.collItems[i].container['component'].idPrefix = idPrefix2;
12992
12948
  }
@@ -14342,6 +14298,257 @@
14342
14298
  }], null, null);
14343
14299
  })();
14344
14300
 
14301
+ var FixedListPipe = /** @class */ (function () {
14302
+ function FixedListPipe() {
14303
+ }
14304
+ FixedListPipe.prototype.transform = function (value, items) {
14305
+ if (!!items) {
14306
+ var item = items.find(function (i) { return i.code === value; });
14307
+ return item ? item.label : FixedListPipe.EMPTY;
14308
+ }
14309
+ else {
14310
+ return FixedListPipe.EMPTY;
14311
+ }
14312
+ };
14313
+ return FixedListPipe;
14314
+ }());
14315
+ FixedListPipe.EMPTY = '';
14316
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14317
+ FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14318
+ (function () {
14319
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14320
+ type: i0.Pipe,
14321
+ args: [{
14322
+ name: 'ccdFixedList'
14323
+ }]
14324
+ }], null, null);
14325
+ })();
14326
+
14327
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
14328
+ if (rf & 1) {
14329
+ i0__namespace.ɵɵelementStart(0, "div");
14330
+ i0__namespace.ɵɵtext(1);
14331
+ i0__namespace.ɵɵpipe(2, "ccdFixedList");
14332
+ i0__namespace.ɵɵelementEnd();
14333
+ }
14334
+ if (rf & 2) {
14335
+ var value_r1 = ctx.$implicit;
14336
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14337
+ i0__namespace.ɵɵadvance(1);
14338
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
14339
+ }
14340
+ }
14341
+ var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14342
+ __extends(ReadDynamicMultiSelectListFieldComponent, _super);
14343
+ function ReadDynamicMultiSelectListFieldComponent() {
14344
+ return _super !== null && _super.apply(this, arguments) || this;
14345
+ }
14346
+ ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14347
+ /**
14348
+ *
14349
+ * Reassigning list_items from formatted_list when list_items is empty
14350
+ */
14351
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
14352
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14353
+ }
14354
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14355
+ this.caseField.value = this.caseField.formatted_value.value;
14356
+ }
14357
+ _super.prototype.ngOnInit.call(this);
14358
+ };
14359
+ return ReadDynamicMultiSelectListFieldComponent;
14360
+ }(AbstractFieldReadComponent));
14361
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
14362
+ 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) {
14363
+ if (rf & 1) {
14364
+ i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
14365
+ }
14366
+ if (rf & 2) {
14367
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
14368
+ }
14369
+ }, 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}"] });
14370
+ var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
14371
+ (function () {
14372
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
14373
+ type: i0.Component,
14374
+ args: [{
14375
+ selector: 'ccd-read-dynamic-multi-select-list-field',
14376
+ templateUrl: './read-dynamic-multi-select-list-field.html',
14377
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
14378
+ }]
14379
+ }], null, null);
14380
+ })();
14381
+
14382
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
14383
+ if (rf & 1) {
14384
+ i0__namespace.ɵɵelementStart(0, "span", 5);
14385
+ i0__namespace.ɵɵtext(1);
14386
+ i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
14387
+ i0__namespace.ɵɵelementEnd();
14388
+ }
14389
+ if (rf & 2) {
14390
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14391
+ i0__namespace.ɵɵadvance(1);
14392
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
14393
+ }
14394
+ }
14395
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
14396
+ if (rf & 1) {
14397
+ i0__namespace.ɵɵelementStart(0, "span", 6);
14398
+ i0__namespace.ɵɵtext(1);
14399
+ i0__namespace.ɵɵelementEnd();
14400
+ }
14401
+ if (rf & 2) {
14402
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
14403
+ i0__namespace.ɵɵadvance(1);
14404
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
14405
+ }
14406
+ }
14407
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
14408
+ if (rf & 1) {
14409
+ i0__namespace.ɵɵelementStart(0, "span", 7);
14410
+ i0__namespace.ɵɵtext(1);
14411
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
14412
+ i0__namespace.ɵɵelementEnd();
14413
+ }
14414
+ if (rf & 2) {
14415
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
14416
+ i0__namespace.ɵɵadvance(1);
14417
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
14418
+ }
14419
+ }
14420
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
14421
+ if (rf & 1) {
14422
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
14423
+ i0__namespace.ɵɵelementContainerStart(0);
14424
+ i0__namespace.ɵɵelementStart(1, "div", 8);
14425
+ i0__namespace.ɵɵelementStart(2, "input", 9);
14426
+ 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); });
14427
+ i0__namespace.ɵɵelementEnd();
14428
+ i0__namespace.ɵɵelementStart(3, "label", 10);
14429
+ i0__namespace.ɵɵtext(4);
14430
+ i0__namespace.ɵɵelementEnd();
14431
+ i0__namespace.ɵɵelementEnd();
14432
+ i0__namespace.ɵɵelementContainerEnd();
14433
+ }
14434
+ if (rf & 2) {
14435
+ var checkbox_r4 = ctx.$implicit;
14436
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
14437
+ i0__namespace.ɵɵadvance(2);
14438
+ i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
14439
+ i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
14440
+ i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
14441
+ i0__namespace.ɵɵadvance(1);
14442
+ i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14443
+ i0__namespace.ɵɵadvance(1);
14444
+ i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
14445
+ }
14446
+ }
14447
+ var _c0$L = function (a0) { return { "error": a0 }; };
14448
+ var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14449
+ __extends(WriteDynamicMultiSelectListFieldComponent, _super);
14450
+ function WriteDynamicMultiSelectListFieldComponent() {
14451
+ return _super !== null && _super.apply(this, arguments) || this;
14452
+ }
14453
+ WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14454
+ var _this = this;
14455
+ this.checkboxes = new i2.FormArray([]);
14456
+ this.setInitialCaseList();
14457
+ this.setInitialCaseFieldValue();
14458
+ // Initialise array with existing values
14459
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
14460
+ var values = this.caseField.value;
14461
+ values.forEach(function (value) {
14462
+ _this.checkboxes.push(new i2.FormControl(value));
14463
+ });
14464
+ }
14465
+ this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
14466
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14467
+ };
14468
+ WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
14469
+ var _this = this;
14470
+ var target = event.target;
14471
+ if (!target || !target.value) {
14472
+ return;
14473
+ }
14474
+ var selectedListItem = this.getValueListItem(target.value);
14475
+ if (!this.isSelected(target.value)) {
14476
+ // Add a new control in the FormArray
14477
+ this.checkboxes.push(new i2.FormControl(selectedListItem));
14478
+ }
14479
+ else {
14480
+ // Remove the control from the FormArray
14481
+ this.checkboxes.controls.forEach(function (ctrl, i) {
14482
+ if (ctrl.value.code === target.value) {
14483
+ _this.checkboxes.removeAt(i);
14484
+ }
14485
+ });
14486
+ }
14487
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14488
+ };
14489
+ WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
14490
+ if (this.checkboxes && this.checkboxes.controls) {
14491
+ return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
14492
+ }
14493
+ };
14494
+ WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
14495
+ return this.caseField.list_items.find(function (i) { return i.code === value; });
14496
+ };
14497
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
14498
+ var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
14499
+ var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
14500
+ if (!hasListItems && hasFormattedListItems) {
14501
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14502
+ }
14503
+ };
14504
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
14505
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14506
+ this.caseField.value = this.caseField.formatted_value.value;
14507
+ }
14508
+ var isNull = this.caseField.value === undefined || this.caseField.value === '';
14509
+ if (isNull || !Array.isArray(this.caseField.value)) {
14510
+ this.caseField.value = [];
14511
+ }
14512
+ };
14513
+ return WriteDynamicMultiSelectListFieldComponent;
14514
+ }(AbstractFieldWriteComponent));
14515
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
14516
+ 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) {
14517
+ if (rf & 1) {
14518
+ i0__namespace.ɵɵelementStart(0, "div", 0);
14519
+ i0__namespace.ɵɵelementStart(1, "fieldset");
14520
+ i0__namespace.ɵɵelementStart(2, "legend");
14521
+ i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14522
+ i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14523
+ i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14524
+ i0__namespace.ɵɵelementEnd();
14525
+ i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14526
+ i0__namespace.ɵɵelementEnd();
14527
+ i0__namespace.ɵɵelementEnd();
14528
+ }
14529
+ if (rf & 2) {
14530
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
14531
+ i0__namespace.ɵɵadvance(3);
14532
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
14533
+ i0__namespace.ɵɵadvance(1);
14534
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
14535
+ i0__namespace.ɵɵadvance(1);
14536
+ i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
14537
+ i0__namespace.ɵɵadvance(1);
14538
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
14539
+ }
14540
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14541
+ var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
14542
+ (function () {
14543
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14544
+ type: i0.Component,
14545
+ args: [{
14546
+ selector: 'ccd-write-dynamic-multi-select-list-field',
14547
+ templateUrl: './write-dynamic-multi-select-list-field.html'
14548
+ }]
14549
+ }], null, null);
14550
+ })();
14551
+
14345
14552
  var DynamicRadioListPipe = /** @class */ (function () {
14346
14553
  function DynamicRadioListPipe() {
14347
14554
  }
@@ -14462,7 +14669,7 @@
14462
14669
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14463
14670
  }
14464
14671
  }
14465
- var _c0$L = function (a0) { return { selected: a0 }; };
14672
+ var _c0$K = function (a0) { return { selected: a0 }; };
14466
14673
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14467
14674
  if (rf & 1) {
14468
14675
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14475,7 +14682,7 @@
14475
14682
  if (rf & 2) {
14476
14683
  var radioButton_r5 = ctx.$implicit;
14477
14684
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14478
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14685
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14479
14686
  i0__namespace.ɵɵadvance(1);
14480
14687
  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);
14481
14688
  i0__namespace.ɵɵadvance(1);
@@ -14639,7 +14846,7 @@
14639
14846
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14640
14847
  }
14641
14848
  }
14642
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14849
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14643
14850
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14644
14851
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14645
14852
  __extends(WriteEmailFieldComponent, _super);
@@ -14664,7 +14871,7 @@
14664
14871
  i0__namespace.ɵɵelementEnd();
14665
14872
  }
14666
14873
  if (rf & 2) {
14667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14874
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14668
14875
  i0__namespace.ɵɵadvance(1);
14669
14876
  i0__namespace.ɵɵproperty("for", ctx.id());
14670
14877
  i0__namespace.ɵɵadvance(1);
@@ -14688,32 +14895,6 @@
14688
14895
  }], null, null);
14689
14896
  })();
14690
14897
 
14691
- var FixedListPipe = /** @class */ (function () {
14692
- function FixedListPipe() {
14693
- }
14694
- FixedListPipe.prototype.transform = function (value, items) {
14695
- if (!!items) {
14696
- var item = items.find(function (i) { return i.code === value; });
14697
- return item ? item.label : FixedListPipe.EMPTY;
14698
- }
14699
- else {
14700
- return FixedListPipe.EMPTY;
14701
- }
14702
- };
14703
- return FixedListPipe;
14704
- }());
14705
- FixedListPipe.EMPTY = '';
14706
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14707
- FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14708
- (function () {
14709
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14710
- type: i0.Pipe,
14711
- args: [{
14712
- name: 'ccdFixedList'
14713
- }]
14714
- }], null, null);
14715
- })();
14716
-
14717
14898
  var ReadFixedListFieldComponent = /** @class */ (function (_super) {
14718
14899
  __extends(ReadFixedListFieldComponent, _super);
14719
14900
  function ReadFixedListFieldComponent() {
@@ -14796,7 +14977,7 @@
14796
14977
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
14797
14978
  }
14798
14979
  }
14799
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14980
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14800
14981
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
14801
14982
  __extends(WriteFixedListFieldComponent, _super);
14802
14983
  function WriteFixedListFieldComponent() {
@@ -14845,7 +15026,7 @@
14845
15026
  i0__namespace.ɵɵelementEnd();
14846
15027
  }
14847
15028
  if (rf & 2) {
14848
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15029
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
14849
15030
  i0__namespace.ɵɵadvance(1);
14850
15031
  i0__namespace.ɵɵproperty("for", ctx.id());
14851
15032
  i0__namespace.ɵɵadvance(1);
@@ -14963,7 +15144,7 @@
14963
15144
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
14964
15145
  }
14965
15146
  }
14966
- var _c0$I = function (a0) { return { selected: a0 }; };
15147
+ var _c0$H = function (a0) { return { selected: a0 }; };
14967
15148
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
14968
15149
  if (rf & 1) {
14969
15150
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -14976,7 +15157,7 @@
14976
15157
  if (rf & 2) {
14977
15158
  var radioButton_r4 = ctx.$implicit;
14978
15159
  var ctx_r3 = i0__namespace.ɵɵnextContext();
14979
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15160
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
14980
15161
  i0__namespace.ɵɵadvance(1);
14981
15162
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
14982
15163
  i0__namespace.ɵɵadvance(1);
@@ -15146,7 +15327,7 @@
15146
15327
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15147
15328
  }
15148
15329
  }
15149
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15330
+ var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15150
15331
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15151
15332
  if (rf & 1) {
15152
15333
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15158,7 +15339,7 @@
15158
15339
  if (rf & 2) {
15159
15340
  var judicialUser_r5 = ctx.$implicit;
15160
15341
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15161
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15342
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15162
15343
  i0__namespace.ɵɵadvance(1);
15163
15344
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15164
15345
  }
@@ -15397,7 +15578,7 @@
15397
15578
  casesResponse.push(_this.mapResponse(result));
15398
15579
  });
15399
15580
  });
15400
- var caseLinks = casesResponse.map(function (item) {
15581
+ _this.linkedCases = casesResponse.map(function (item) {
15401
15582
  return {
15402
15583
  caseReference: item.caseReference,
15403
15584
  caseName: item.caseName,
@@ -15411,7 +15592,6 @@
15411
15592
  }),
15412
15593
  };
15413
15594
  });
15414
- _this.linkedCases = caseLinks;
15415
15595
  _this.serverLinkedApiError = null;
15416
15596
  }, function (err) {
15417
15597
  _this.serverLinkedApiError = {
@@ -15566,7 +15746,9 @@
15566
15746
  });
15567
15747
  };
15568
15748
  BeforeYouStartComponent.prototype.onBack = function () {
15569
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
15749
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
15750
+ window.location.hash = 'Linked cases';
15751
+ });
15570
15752
  };
15571
15753
  return BeforeYouStartComponent;
15572
15754
  }());
@@ -15946,7 +16128,7 @@
15946
16128
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
15947
16129
  }
15948
16130
  }
15949
- var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16131
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15950
16132
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
15951
16133
  if (rf & 1) {
15952
16134
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -15964,7 +16146,7 @@
15964
16146
  }
15965
16147
  if (rf & 2) {
15966
16148
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
15967
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
16149
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
15968
16150
  i0__namespace.ɵɵadvance(3);
15969
16151
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
15970
16152
  }
@@ -16021,11 +16203,11 @@
16021
16203
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16022
16204
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16023
16205
  i0__namespace.ɵɵadvance(1);
16024
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
16206
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
16025
16207
  i0__namespace.ɵɵadvance(3);
16026
16208
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16027
16209
  i0__namespace.ɵɵadvance(2);
16028
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
16210
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
16029
16211
  i0__namespace.ɵɵadvance(5);
16030
16212
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16031
16213
  i0__namespace.ɵɵadvance(2);
@@ -16459,7 +16641,7 @@
16459
16641
  i0__namespace.ɵɵadvance(4);
16460
16642
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16461
16643
  i0__namespace.ɵɵadvance(4);
16462
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
16644
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
16463
16645
  i0__namespace.ɵɵadvance(1);
16464
16646
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16465
16647
  i0__namespace.ɵɵadvance(18);
@@ -17057,7 +17239,9 @@
17057
17239
  this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
17058
17240
  };
17059
17241
  NoLinkedCasesComponent.prototype.onBack = function () {
17060
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
17242
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
17243
+ window.location.hash = 'Linked cases';
17244
+ });
17061
17245
  };
17062
17246
  return NoLinkedCasesComponent;
17063
17247
  }());
@@ -17141,7 +17325,7 @@
17141
17325
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17142
17326
  }
17143
17327
  }
17144
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17328
+ var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17145
17329
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17146
17330
  if (rf & 1) {
17147
17331
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17153,7 +17337,7 @@
17153
17337
  }
17154
17338
  if (rf & 2) {
17155
17339
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
17156
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17340
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17157
17341
  i0__namespace.ɵɵadvance(1);
17158
17342
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17159
17343
  i0__namespace.ɵɵadvance(2);
@@ -17329,6 +17513,7 @@
17329
17513
  }] });
17330
17514
  })();
17331
17515
 
17516
+ // tslint:disable:variable-name
17332
17517
  var LinkCaseReason = /** @class */ (function () {
17333
17518
  function LinkCaseReason() {
17334
17519
  }
@@ -17487,7 +17672,7 @@
17487
17672
  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'; });
17488
17673
  }
17489
17674
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
17490
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17675
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17491
17676
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17492
17677
  next: function (reasons) {
17493
17678
  _this.reasonListLoaded = true;
@@ -17522,7 +17707,9 @@
17522
17707
  }
17523
17708
  };
17524
17709
  ReadLinkedCasesFieldComponent.prototype.reloadCurrentRoute = function () {
17525
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id], { fragment: 'Linked cases' });
17710
+ this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
17711
+ window.location.hash = 'Linked cases';
17712
+ });
17526
17713
  };
17527
17714
  ReadLinkedCasesFieldComponent.prototype.getFailureLinkedToNotification = function (evt) {
17528
17715
  this.isServerLinkedToError = true;
@@ -17747,7 +17934,7 @@
17747
17934
  };
17748
17935
  WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
17749
17936
  var _this = this;
17750
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17937
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17751
17938
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17752
17939
  next: function (reasons) {
17753
17940
  // Sort in ascending order
@@ -17806,11 +17993,10 @@
17806
17993
  var _this = this;
17807
17994
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
17808
17995
  var caseViewFiltered = caseView.tabs.filter(function (tab) {
17809
- var linkField = tab.fields.some(function (_b) {
17996
+ return tab.fields.some(function (_b) {
17810
17997
  var field_type = _b.field_type;
17811
17998
  return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
17812
17999
  });
17813
- return linkField;
17814
18000
  });
17815
18001
  if (caseViewFiltered) {
17816
18002
  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; });
@@ -18093,7 +18279,7 @@
18093
18279
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18094
18280
  }
18095
18281
  }
18096
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18282
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18097
18283
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18098
18284
  __extends(WriteMoneyGbpFieldComponent, _super);
18099
18285
  function WriteMoneyGbpFieldComponent() {
@@ -18123,7 +18309,7 @@
18123
18309
  i0__namespace.ɵɵelementEnd();
18124
18310
  }
18125
18311
  if (rf & 2) {
18126
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18312
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18127
18313
  i0__namespace.ɵɵadvance(1);
18128
18314
  i0__namespace.ɵɵproperty("for", ctx.id());
18129
18315
  i0__namespace.ɵɵadvance(1);
@@ -18271,7 +18457,7 @@
18271
18457
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18272
18458
  }
18273
18459
  }
18274
- var _c0$D = function (a0) { return { "error": a0 }; };
18460
+ var _c0$C = function (a0) { return { "error": a0 }; };
18275
18461
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18276
18462
  __extends(WriteMultiSelectListFieldComponent, _super);
18277
18463
  function WriteMultiSelectListFieldComponent() {
@@ -18335,7 +18521,7 @@
18335
18521
  i0__namespace.ɵɵelementEnd();
18336
18522
  }
18337
18523
  if (rf & 2) {
18338
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18524
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18339
18525
  i0__namespace.ɵɵadvance(3);
18340
18526
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18341
18527
  i0__namespace.ɵɵadvance(1);
@@ -18426,7 +18612,7 @@
18426
18612
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18427
18613
  }
18428
18614
  }
18429
- var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18615
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18430
18616
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18431
18617
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18432
18618
  __extends(WriteNumberFieldComponent, _super);
@@ -18451,7 +18637,7 @@
18451
18637
  i0__namespace.ɵɵelementEnd();
18452
18638
  }
18453
18639
  if (rf & 2) {
18454
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
18640
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
18455
18641
  i0__namespace.ɵɵadvance(1);
18456
18642
  i0__namespace.ɵɵproperty("for", ctx.id());
18457
18643
  i0__namespace.ɵɵadvance(1);
@@ -18752,7 +18938,7 @@
18752
18938
  i0__namespace.ɵɵelementEnd();
18753
18939
  }
18754
18940
  }
18755
- var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
18941
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
18756
18942
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
18757
18943
  if (rf & 1) {
18758
18944
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -18768,7 +18954,7 @@
18768
18954
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
18769
18955
  var tmp_0_0 = null;
18770
18956
  var tmp_2_0 = null;
18771
- 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));
18957
+ 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));
18772
18958
  i0__namespace.ɵɵadvance(2);
18773
18959
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
18774
18960
  i0__namespace.ɵɵadvance(2);
@@ -19129,6 +19315,9 @@
19129
19315
  PaymentField.prototype.getRefundsUrl = function () {
19130
19316
  return this.appConfig.getRefundsUrl();
19131
19317
  };
19318
+ PaymentField.prototype.getNotificationUrl = function () {
19319
+ return this.appConfig.getNotificationUrl();
19320
+ };
19132
19321
  PaymentField.prototype.getUserRoles = function () {
19133
19322
  var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
19134
19323
  if (!userDetails || !userDetails.hasOwnProperty('roles')) {
@@ -19154,12 +19343,12 @@
19154
19343
  return CasePaymentHistoryViewerFieldComponent;
19155
19344
  }(PaymentField));
19156
19345
  CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
19157
- CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 15, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19346
+ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 16, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19158
19347
  if (rf & 1) {
19159
19348
  i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
19160
19349
  }
19161
19350
  if (rf & 2) {
19162
- i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19351
+ i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19163
19352
  }
19164
19353
  }, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
19165
19354
  (function () {
@@ -19172,231 +19361,6 @@
19172
19361
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19173
19362
  })();
19174
19363
 
19175
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
19176
- if (rf & 1) {
19177
- i0__namespace.ɵɵelementStart(0, "div");
19178
- i0__namespace.ɵɵtext(1);
19179
- i0__namespace.ɵɵpipe(2, "ccdFixedList");
19180
- i0__namespace.ɵɵelementEnd();
19181
- }
19182
- if (rf & 2) {
19183
- var value_r1 = ctx.$implicit;
19184
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19185
- i0__namespace.ɵɵadvance(1);
19186
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
19187
- }
19188
- }
19189
- var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19190
- __extends(ReadDynamicMultiSelectListFieldComponent, _super);
19191
- function ReadDynamicMultiSelectListFieldComponent() {
19192
- return _super !== null && _super.apply(this, arguments) || this;
19193
- }
19194
- ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19195
- /**
19196
- *
19197
- * Reassigning list_items from formatted_list when list_items is empty
19198
- */
19199
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
19200
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19201
- }
19202
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19203
- this.caseField.value = this.caseField.formatted_value.value;
19204
- }
19205
- _super.prototype.ngOnInit.call(this);
19206
- };
19207
- return ReadDynamicMultiSelectListFieldComponent;
19208
- }(AbstractFieldReadComponent));
19209
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
19210
- 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) {
19211
- if (rf & 1) {
19212
- i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
19213
- }
19214
- if (rf & 2) {
19215
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
19216
- }
19217
- }, 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}"] });
19218
- var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
19219
- (function () {
19220
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
19221
- type: i0.Component,
19222
- args: [{
19223
- selector: 'ccd-read-dynamic-multi-select-list-field',
19224
- templateUrl: './read-dynamic-multi-select-list-field.html',
19225
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
19226
- }]
19227
- }], null, null);
19228
- })();
19229
-
19230
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
19231
- if (rf & 1) {
19232
- i0__namespace.ɵɵelementStart(0, "span", 5);
19233
- i0__namespace.ɵɵtext(1);
19234
- i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
19235
- i0__namespace.ɵɵelementEnd();
19236
- }
19237
- if (rf & 2) {
19238
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19239
- i0__namespace.ɵɵadvance(1);
19240
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
19241
- }
19242
- }
19243
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
19244
- if (rf & 1) {
19245
- i0__namespace.ɵɵelementStart(0, "span", 6);
19246
- i0__namespace.ɵɵtext(1);
19247
- i0__namespace.ɵɵelementEnd();
19248
- }
19249
- if (rf & 2) {
19250
- var ctx_r1 = i0__namespace.ɵɵnextContext();
19251
- i0__namespace.ɵɵadvance(1);
19252
- i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
19253
- }
19254
- }
19255
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
19256
- if (rf & 1) {
19257
- i0__namespace.ɵɵelementStart(0, "span", 7);
19258
- i0__namespace.ɵɵtext(1);
19259
- i0__namespace.ɵɵpipe(2, "ccdFirstError");
19260
- i0__namespace.ɵɵelementEnd();
19261
- }
19262
- if (rf & 2) {
19263
- var ctx_r2 = i0__namespace.ɵɵnextContext();
19264
- i0__namespace.ɵɵadvance(1);
19265
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
19266
- }
19267
- }
19268
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
19269
- if (rf & 1) {
19270
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
19271
- i0__namespace.ɵɵelementContainerStart(0);
19272
- i0__namespace.ɵɵelementStart(1, "div", 8);
19273
- i0__namespace.ɵɵelementStart(2, "input", 9);
19274
- 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); });
19275
- i0__namespace.ɵɵelementEnd();
19276
- i0__namespace.ɵɵelementStart(3, "label", 10);
19277
- i0__namespace.ɵɵtext(4);
19278
- i0__namespace.ɵɵelementEnd();
19279
- i0__namespace.ɵɵelementEnd();
19280
- i0__namespace.ɵɵelementContainerEnd();
19281
- }
19282
- if (rf & 2) {
19283
- var checkbox_r4 = ctx.$implicit;
19284
- var ctx_r3 = i0__namespace.ɵɵnextContext();
19285
- i0__namespace.ɵɵadvance(2);
19286
- i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
19287
- i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
19288
- i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
19289
- i0__namespace.ɵɵadvance(1);
19290
- i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
19291
- i0__namespace.ɵɵadvance(1);
19292
- i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
19293
- }
19294
- }
19295
- var _c0$A = function (a0) { return { "error": a0 }; };
19296
- var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19297
- __extends(WriteDynamicMultiSelectListFieldComponent, _super);
19298
- function WriteDynamicMultiSelectListFieldComponent() {
19299
- return _super !== null && _super.apply(this, arguments) || this;
19300
- }
19301
- WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19302
- var _this = this;
19303
- this.checkboxes = new i2.FormArray([]);
19304
- this.setInitialCaseList();
19305
- this.setInitialCaseFieldValue();
19306
- // Initialise array with existing values
19307
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
19308
- var values = this.caseField.value;
19309
- values.forEach(function (value) {
19310
- _this.checkboxes.push(new i2.FormControl(value));
19311
- });
19312
- }
19313
- this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
19314
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19315
- };
19316
- WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
19317
- var _this = this;
19318
- var target = event.target;
19319
- if (!target || !target.value) {
19320
- return;
19321
- }
19322
- var selectedListItem = this.getValueListItem(target.value);
19323
- if (!this.isSelected(target.value)) {
19324
- // Add a new control in the FormArray
19325
- this.checkboxes.push(new i2.FormControl(selectedListItem));
19326
- }
19327
- else {
19328
- // Remove the control from the FormArray
19329
- this.checkboxes.controls.forEach(function (ctrl, i) {
19330
- if (ctrl.value.code === target.value) {
19331
- _this.checkboxes.removeAt(i);
19332
- }
19333
- });
19334
- }
19335
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19336
- };
19337
- WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
19338
- if (this.checkboxes && this.checkboxes.controls) {
19339
- return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
19340
- }
19341
- };
19342
- WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
19343
- return this.caseField.list_items.find(function (i) { return i.code === value; });
19344
- };
19345
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
19346
- var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
19347
- var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
19348
- if (!hasListItems && hasFormattedListItems) {
19349
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19350
- }
19351
- };
19352
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
19353
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19354
- this.caseField.value = this.caseField.formatted_value.value;
19355
- }
19356
- var isNull = this.caseField.value === undefined || this.caseField.value === '';
19357
- if (isNull || !Array.isArray(this.caseField.value)) {
19358
- this.caseField.value = [];
19359
- }
19360
- };
19361
- return WriteDynamicMultiSelectListFieldComponent;
19362
- }(AbstractFieldWriteComponent));
19363
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
19364
- 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) {
19365
- if (rf & 1) {
19366
- i0__namespace.ɵɵelementStart(0, "div", 0);
19367
- i0__namespace.ɵɵelementStart(1, "fieldset");
19368
- i0__namespace.ɵɵelementStart(2, "legend");
19369
- i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
19370
- i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
19371
- i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
19372
- i0__namespace.ɵɵelementEnd();
19373
- i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
19374
- i0__namespace.ɵɵelementEnd();
19375
- i0__namespace.ɵɵelementEnd();
19376
- }
19377
- if (rf & 2) {
19378
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
19379
- i0__namespace.ɵɵadvance(3);
19380
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
19381
- i0__namespace.ɵɵadvance(1);
19382
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
19383
- i0__namespace.ɵɵadvance(1);
19384
- i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
19385
- i0__namespace.ɵɵadvance(1);
19386
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
19387
- }
19388
- }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
19389
- var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
19390
- (function () {
19391
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
19392
- type: i0.Component,
19393
- args: [{
19394
- selector: 'ccd-write-dynamic-multi-select-list-field',
19395
- templateUrl: './write-dynamic-multi-select-list-field.html'
19396
- }]
19397
- }], null, null);
19398
- })();
19399
-
19400
19364
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19401
19365
  __extends(ReadPhoneUKFieldComponent, _super);
19402
19366
  function ReadPhoneUKFieldComponent() {
@@ -19597,7 +19561,7 @@
19597
19561
  WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
19598
19562
  if (this.browserService.isIEOrEdge()) {
19599
19563
  event.target.style.height = 'auto';
19600
- event.target.style.height = event.target.scrollHeight + 'px';
19564
+ event.target.style.height = event.target.scrollHeight + "px";
19601
19565
  event.target.scrollTop = event.target.scrollHeight;
19602
19566
  }
19603
19567
  };
@@ -19792,7 +19756,7 @@
19792
19756
  }
19793
19757
  if (rf & 2) {
19794
19758
  var ctx_r0 = i0__namespace.ɵɵnextContext();
19795
- i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
19759
+ i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
19796
19760
  }
19797
19761
  }
19798
19762
  var WaysToPayFieldComponent = /** @class */ (function (_super) {
@@ -19806,9 +19770,9 @@
19806
19770
  return WaysToPayFieldComponent;
19807
19771
  }(PaymentField));
19808
19772
  WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
19809
- WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
19773
+ WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
19810
19774
  if (rf & 1) {
19811
- i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 14, "ccpay-payment-lib", 0);
19775
+ i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
19812
19776
  }
19813
19777
  if (rf & 2) {
19814
19778
  i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
@@ -19837,6 +19801,7 @@
19837
19801
  return YesNoService.EMPTY;
19838
19802
  };
19839
19803
  YesNoService.prototype.isYes = function (value) {
19804
+ // tslint:disable-next-line:switch-default
19840
19805
  switch (typeof (value)) {
19841
19806
  case 'boolean':
19842
19807
  return value;
@@ -19846,6 +19811,7 @@
19846
19811
  return false;
19847
19812
  };
19848
19813
  YesNoService.prototype.isNo = function (value) {
19814
+ // tslint:disable-next-line:switch-default
19849
19815
  switch (typeof (value)) {
19850
19816
  case 'boolean':
19851
19817
  return !value;
@@ -20283,7 +20249,7 @@
20283
20249
  i0__namespace.ɵɵclassProp("grey-bar", ctx.canHaveGreyBar && !ctx.caseField.hiddenCannotChange);
20284
20250
  i0__namespace.ɵɵproperty("hidden", ctx.caseField.hidden);
20285
20251
  }
20286
- }, styles: [".form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
20252
+ }, styles: [".form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
20287
20253
  (function () {
20288
20254
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldWriteComponent, [{
20289
20255
  type: i0.Component,
@@ -20383,7 +20349,7 @@
20383
20349
  i0__namespace.ɵɵadvance(1);
20384
20350
  i0__namespace.ɵɵproperty("ngIf", ctx.withLabel && !ctx.isLabel() && (!ctx.isComplex() || ctx.isCaseLink()))("ngIfElse", _r1);
20385
20351
  }
20386
- }, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
20352
+ }, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
20387
20353
  var ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(FieldReadLabelComponent);
20388
20354
  (function () {
20389
20355
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldReadLabelComponent, [{
@@ -20819,6 +20785,7 @@
20819
20785
  return CaseFileViewCategory;
20820
20786
  }());
20821
20787
 
20788
+ // tslint:disable:variable-name
20822
20789
  var CaseFileViewDocument = /** @class */ (function () {
20823
20790
  function CaseFileViewDocument() {
20824
20791
  }
@@ -22172,7 +22139,7 @@
22172
22139
  // is expected not to have a party name)
22173
22140
  if (this.flagsData) {
22174
22141
  this.filteredFlagsData =
22175
- this.flagsData.filter(function (f) { return f.flags.partyName != null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22142
+ this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22176
22143
  }
22177
22144
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
22178
22145
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -23469,18 +23436,19 @@
23469
23436
  field.value = { CaseReference: value };
23470
23437
  return field;
23471
23438
  };
23472
- ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
23439
+ ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
23473
23440
  return classTransformer.plainToClassFromExist(new CaseField(), {
23474
23441
  id: id,
23475
23442
  label: label,
23476
23443
  display_context: 'READONLY',
23477
23444
  value: value,
23478
- field_type: field_type
23445
+ field_type: fieldType
23479
23446
  });
23480
23447
  };
23481
23448
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
23482
23449
  var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
23483
23450
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
23451
+ // tslint:disable-next-line:switch-default
23484
23452
  switch (this.columnsHorizontalLabel[column].type.type) {
23485
23453
  case 'Number':
23486
23454
  case 'MoneyGBP': {
@@ -24606,6 +24574,7 @@
24606
24574
  return FeeValue;
24607
24575
  }());
24608
24576
 
24577
+ // tslint:disable:variable-name
24609
24578
  var Fee = /** @class */ (function () {
24610
24579
  function Fee() {
24611
24580
  }
@@ -25311,7 +25280,7 @@
25311
25280
  function CcdPageFieldsPipe() {
25312
25281
  }
25313
25282
  CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
25314
- var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25283
+ var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25315
25284
  var control = dataFormGroup.controls['data'].get(key);
25316
25285
  return control['caseField'];
25317
25286
  }).filter(function (field) {
@@ -25331,7 +25300,7 @@
25331
25300
  field_type: {
25332
25301
  id: page.id,
25333
25302
  type: 'Complex',
25334
- complex_fields: complex_fields
25303
+ complex_fields: complexFields
25335
25304
  }
25336
25305
  });
25337
25306
  };
@@ -25510,11 +25479,11 @@
25510
25479
  }
25511
25480
  return childrenCaseFields;
25512
25481
  };
25513
- CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
25514
- return case_field.field_type.type === 'Complex';
25482
+ CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
25483
+ return caseField.field_type.type === 'Complex';
25515
25484
  };
25516
- CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
25517
- return case_field.field_type.type === 'Collection';
25485
+ CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
25486
+ return caseField.field_type.type === 'Collection';
25518
25487
  };
25519
25488
  CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
25520
25489
  return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
@@ -26715,7 +26684,7 @@
26715
26684
  if (caseField.field_type.type === 'Complex') {
26716
26685
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
26717
26686
  // handle both null and undefined values
26718
- if (caseField.value != null) {
26687
+ if (caseField.value !== null) {
26719
26688
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
26720
26689
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
26721
26690
  // parent)
@@ -26781,8 +26750,8 @@
26781
26750
  this.caseEdit.navigateToPage(pageId);
26782
26751
  };
26783
26752
  CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
26784
- this.ignoreWarning = errorContext.ignore_warning;
26785
- this.triggerText = errorContext.trigger_text;
26753
+ this.ignoreWarning = errorContext.ignoreWarning;
26754
+ this.triggerText = errorContext.triggerText;
26786
26755
  };
26787
26756
  CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
26788
26757
  if (null === this.editForm.get('data').get(field.id)) {
@@ -27414,6 +27383,7 @@
27414
27383
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
27415
27384
  ]
27416
27385
  });
27386
+ // tslint:disable-next-line:switch-default
27417
27387
  switch (portalType) {
27418
27388
  case EventCompletionPortalTypes.TaskCancelled:
27419
27389
  this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -27948,36 +27918,36 @@
27948
27918
  this.screenReaderCurrentLabel = "You're on page";
27949
27919
  this.pageChange = new i0.EventEmitter();
27950
27920
  this.pageBoundsCorrection = new i0.EventEmitter();
27951
- this._directionLinks = true;
27952
- this._autoHide = false;
27953
- this._responsive = false;
27921
+ this.pDirectionLinks = true;
27922
+ this.pAutoHide = false;
27923
+ this.pResponsive = false;
27954
27924
  }
27955
27925
  Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
27956
27926
  get: function () {
27957
- return this._directionLinks;
27927
+ return this.pDirectionLinks;
27958
27928
  },
27959
27929
  set: function (value) {
27960
- this._directionLinks = coerceToBoolean(value);
27930
+ this.pDirectionLinks = coerceToBoolean(value);
27961
27931
  },
27962
27932
  enumerable: false,
27963
27933
  configurable: true
27964
27934
  });
27965
27935
  Object.defineProperty(PaginationComponent.prototype, "autoHide", {
27966
27936
  get: function () {
27967
- return this._autoHide;
27937
+ return this.pAutoHide;
27968
27938
  },
27969
27939
  set: function (value) {
27970
- this._autoHide = coerceToBoolean(value);
27940
+ this.pAutoHide = coerceToBoolean(value);
27971
27941
  },
27972
27942
  enumerable: false,
27973
27943
  configurable: true
27974
27944
  });
27975
27945
  Object.defineProperty(PaginationComponent.prototype, "responsive", {
27976
27946
  get: function () {
27977
- return this._responsive;
27947
+ return this.pResponsive;
27978
27948
  },
27979
27949
  set: function (value) {
27980
- this._responsive = coerceToBoolean(value);
27950
+ this.pResponsive = coerceToBoolean(value);
27981
27951
  },
27982
27952
  enumerable: false,
27983
27953
  configurable: true
@@ -28744,7 +28714,7 @@
28744
28714
  var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
28745
28715
  workbasketInputs.forEach(function (item) {
28746
28716
  if (item.field.elementPath) {
28747
- item.field.id = item.field.id + '.' + item.field.elementPath;
28717
+ item.field.id = item.field.id + "." + item.field.elementPath;
28748
28718
  }
28749
28719
  item.field.label = item.label;
28750
28720
  if (formValue) {
@@ -28796,7 +28766,7 @@
28796
28766
  var value = formGroupLS[key];
28797
28767
  // Clear the filter form group control values if it has a value in local storage
28798
28768
  // The regionList form group control value should be ignored as it always contain the latest value
28799
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
28769
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
28800
28770
  this.formGroup.get(key).setValue(null);
28801
28771
  }
28802
28772
  }
@@ -29925,7 +29895,7 @@
29925
29895
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
29926
29896
  if (this.activityPollingService.isEnabled) {
29927
29897
  this.ngZone.runOutsideAngular(function () {
29928
- _this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
29898
+ _this.activitySubscription = _this.postEditActivity().subscribe(function () {
29929
29899
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
29930
29900
  });
29931
29901
  });
@@ -30001,7 +29971,9 @@
30001
29971
  };
30002
29972
  CaseEventTriggerComponent.prototype.cancel = function () {
30003
29973
  if (this.router.url && this.router.url.includes('linkCases')) {
30004
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: 'Linked cases' });
29974
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
29975
+ window.location.hash = 'Linked cases';
29976
+ });
30005
29977
  }
30006
29978
  else {
30007
29979
  return this.router.navigate([this.parentUrl]);
@@ -30599,9 +30571,9 @@
30599
30571
  i0__namespace.ɵɵelementEnd();
30600
30572
  }
30601
30573
  if (rf & 2) {
30602
- var field_r23 = i0__namespace.ɵɵnextContext(2).$implicit;
30574
+ var field_r24 = i0__namespace.ɵɵnextContext(2).$implicit;
30603
30575
  i0__namespace.ɵɵadvance(2);
30604
- i0__namespace.ɵɵtextInterpolate(field_r23.label);
30576
+ i0__namespace.ɵɵtextInterpolate(field_r24.label);
30605
30577
  }
30606
30578
  }
30607
30579
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) {
@@ -30616,14 +30588,14 @@
30616
30588
  i0__namespace.ɵɵelementEnd();
30617
30589
  }
30618
30590
  if (rf & 2) {
30619
- var field_r23 = i0__namespace.ɵɵnextContext().$implicit;
30620
- var ctx_r24 = i0__namespace.ɵɵnextContext(4);
30591
+ var field_r24 = i0__namespace.ɵɵnextContext().$implicit;
30592
+ var ctx_r25 = i0__namespace.ɵɵnextContext(4);
30621
30593
  i0__namespace.ɵɵadvance(1);
30622
- i0__namespace.ɵɵproperty("ngIf", !ctx_r24.isFieldToHaveNoLabel(field_r23));
30594
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r25.isFieldToHaveNoLabel(field_r24));
30623
30595
  i0__namespace.ɵɵadvance(1);
30624
- i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
30596
+ i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
30625
30597
  i0__namespace.ɵɵadvance(2);
30626
- i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r24.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r24.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r24.markdownUseHrefAsRouterLink);
30598
+ i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
30627
30599
  }
30628
30600
  }
30629
30601
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template(rf, ctx) {
@@ -30637,12 +30609,12 @@
30637
30609
  i0__namespace.ɵɵelementEnd();
30638
30610
  }
30639
30611
  if (rf & 2) {
30640
- var field_r23 = i0__namespace.ɵɵnextContext().$implicit;
30641
- var ctx_r25 = i0__namespace.ɵɵnextContext(4);
30612
+ var field_r24 = i0__namespace.ɵɵnextContext().$implicit;
30613
+ var ctx_r26 = i0__namespace.ɵɵnextContext(4);
30642
30614
  i0__namespace.ɵɵadvance(1);
30643
- i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r23.id);
30615
+ i0__namespace.ɵɵproperty("id", "case-viewer-field-read--" + field_r24.id);
30644
30616
  i0__namespace.ɵɵadvance(2);
30645
- i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r25.formGroup.controls["data"])("caseField", field_r23)("caseReference", ctx_r25.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r25.markdownUseHrefAsRouterLink);
30617
+ i0__namespace.ɵɵproperty("topLevelFormGroup", ctx_r26.formGroup.controls["data"])("caseField", field_r24)("caseReference", ctx_r26.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r26.markdownUseHrefAsRouterLink);
30646
30618
  }
30647
30619
  }
30648
30620
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_1_ng_container_2_Template(rf, ctx) {
@@ -30658,12 +30630,12 @@
30658
30630
  i0__namespace.ɵɵelementContainerEnd();
30659
30631
  }
30660
30632
  if (rf & 2) {
30661
- var field_r23 = ctx.$implicit;
30662
- var ctx_r22 = i0__namespace.ɵɵnextContext(4);
30633
+ var field_r24 = ctx.$implicit;
30634
+ var ctx_r23 = i0__namespace.ɵɵnextContext(4);
30663
30635
  i0__namespace.ɵɵadvance(1);
30664
- i0__namespace.ɵɵproperty("caseField", field_r23)("contextFields", ctx_r22.caseFields)("hidden", field_r23.hidden);
30636
+ i0__namespace.ɵɵproperty("caseField", field_r24)("contextFields", ctx_r23.caseFields)("hidden", field_r24.hidden);
30665
30637
  i0__namespace.ɵɵadvance(1);
30666
- i0__namespace.ɵɵproperty("ngSwitch", !i0__namespace.ɵɵpipeBind1(3, 6, field_r23));
30638
+ i0__namespace.ɵɵproperty("ngSwitch", !i0__namespace.ɵɵpipeBind1(3, 6, field_r24));
30667
30639
  i0__namespace.ɵɵadvance(2);
30668
30640
  i0__namespace.ɵɵproperty("ngSwitchCase", true);
30669
30641
  i0__namespace.ɵɵadvance(1);
@@ -30683,10 +30655,10 @@
30683
30655
  }
30684
30656
  if (rf & 2) {
30685
30657
  var tab_r20 = i0__namespace.ɵɵnextContext().$implicit;
30686
- var ctx_r21 = i0__namespace.ɵɵnextContext(2);
30658
+ var ctx_r22 = i0__namespace.ɵɵnextContext(2);
30687
30659
  i0__namespace.ɵɵclassMap(tab_r20.id);
30688
30660
  i0__namespace.ɵɵadvance(2);
30689
- 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"])));
30661
+ 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"])));
30690
30662
  }
30691
30663
  }
30692
30664
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) {
@@ -30705,8 +30677,8 @@
30705
30677
  i0__namespace.ɵɵelement(0, "mat-tab", 26);
30706
30678
  }
30707
30679
  if (rf & 2) {
30708
- var tab_r31 = ctx.$implicit;
30709
- i0__namespace.ɵɵproperty("id", tab_r31.id)("label", tab_r31.label);
30680
+ var tab_r32 = ctx.$implicit;
30681
+ i0__namespace.ɵɵproperty("id", tab_r32.id)("label", tab_r32.label);
30710
30682
  }
30711
30683
  }
30712
30684
  function CaseFullAccessViewComponent_ng_container_12_router_outlet_6_Template(rf, ctx) {
@@ -30716,10 +30688,10 @@
30716
30688
  }
30717
30689
  function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) {
30718
30690
  if (rf & 1) {
30719
- var _r33_1 = i0__namespace.ɵɵgetCurrentView();
30691
+ var _r34_1 = i0__namespace.ɵɵgetCurrentView();
30720
30692
  i0__namespace.ɵɵelementContainerStart(0);
30721
30693
  i0__namespace.ɵɵelementStart(1, "mat-tab-group", 23, 24);
30722
- i0__namespace.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r33_1); var ctx_r32 = i0__namespace.ɵɵnextContext(); return ctx_r32.tabChanged($event); });
30694
+ i0__namespace.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r34_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
30723
30695
  i0__namespace.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
30724
30696
  i0__namespace.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
30725
30697
  i0__namespace.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
@@ -30895,8 +30867,8 @@
30895
30867
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
30896
30868
  };
30897
30869
  CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
30898
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
30899
- this.triggerText = callbackErrorsContext.trigger_text;
30870
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
30871
+ this.triggerText = callbackErrorsContext.triggerText;
30900
30872
  };
30901
30873
  CaseFullAccessViewComponent.prototype.isDraft = function () {
30902
30874
  return Draft.isDraft(this.caseDetails.case_id);
@@ -30976,8 +30948,10 @@
30976
30948
  this.router.navigate([id], { relativeTo: this.route });
30977
30949
  }
30978
30950
  else {
30979
- var label = tabChangeEvent.tab.textLabel;
30980
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: label });
30951
+ var label_1 = tabChangeEvent.tab.textLabel;
30952
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
30953
+ window.location.hash = label_1;
30954
+ });
30981
30955
  }
30982
30956
  };
30983
30957
  CaseFullAccessViewComponent.prototype.onLinkClicked = function (triggerOutputEventText) {
@@ -31173,7 +31147,7 @@
31173
31147
  * or the empty string
31174
31148
  */
31175
31149
  PrintUrlPipe.prototype.transform = function (remoteUrl) {
31176
- if (remoteUrl && remoteUrl.length > 0) {
31150
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
31177
31151
  var printServiceUrlPathname = void 0;
31178
31152
  /**
31179
31153
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -31189,7 +31163,7 @@
31189
31163
  printServiceUrlPathname = urlParser.pathname;
31190
31164
  if (printServiceUrlPathname[0] !== '/') {
31191
31165
  // Fix for IE11; it returns the pathname without leading slash
31192
- printServiceUrlPathname = '/' + printServiceUrlPathname;
31166
+ printServiceUrlPathname = "/" + printServiceUrlPathname;
31193
31167
  }
31194
31168
  }
31195
31169
  else {
@@ -31379,21 +31353,20 @@
31379
31353
  };
31380
31354
  CaseViewerComponent.prototype.loadCaseDetails = function () {
31381
31355
  var _this = this;
31382
- if (this.route.snapshot.data.case) {
31383
- this.caseDetails = this.route.snapshot.data.case;
31384
- this.caseDetails.tabs = __spread(new Map(this.caseDetails.tabs.map(function (item) { return [item['label'], item]; })).values());
31385
- this.setUserAccessType(this.caseDetails);
31386
- }
31387
- else {
31356
+ if (!this.route.snapshot.data.case) {
31388
31357
  this.caseSubscription = this.caseNotifier.caseView.subscribe(function (caseDetails) {
31389
31358
  _this.caseDetails = caseDetails;
31390
31359
  _this.setUserAccessType(_this.caseDetails);
31391
31360
  });
31392
31361
  }
31362
+ else {
31363
+ this.caseDetails = this.route.snapshot.data.case;
31364
+ this.setUserAccessType(this.caseDetails);
31365
+ }
31393
31366
  };
31394
31367
  CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
31395
31368
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
31396
- var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID; });
31369
+ var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31397
31370
  var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31398
31371
  this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31399
31372
  this.userAccessType = accessProcess ? accessProcess.value : null;
@@ -31410,12 +31383,12 @@
31410
31383
  };
31411
31384
  return CaseViewerComponent;
31412
31385
  }());
31413
- CaseViewerComponent.METADATA_FIELD_ACCESS_PROCESS_ID = '[ACCESS_PROCESS]';
31386
+ CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID = '[ACCESS_PROCESS]';
31414
31387
  CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID = '[ACCESS_GRANTED]';
31415
31388
  CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES = ['CHALLENGED', 'SPECIFIC'];
31416
31389
  CaseViewerComponent.BASIC_USER_ACCESS_TYPES = 'BASIC';
31417
31390
  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)); };
31418
- 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) {
31391
+ 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) {
31419
31392
  if (rf & 1) {
31420
31393
  i0__namespace.ɵɵtemplate(0, CaseViewerComponent_div_0_Template, 3, 2, "div", 0);
31421
31394
  }
@@ -31438,6 +31411,8 @@
31438
31411
  type: i0.Input
31439
31412
  }], appendedTabs: [{
31440
31413
  type: i0.Input
31414
+ }], caseDetails: [{
31415
+ type: i0.Input
31441
31416
  }] });
31442
31417
  })();
31443
31418
 
@@ -32690,11 +32665,11 @@
32690
32665
  };
32691
32666
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
32692
32667
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
32693
- .subscribe(function (_response) {
32668
+ .subscribe(function () {
32694
32669
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
32695
32670
  // Angular 7.2!
32696
32671
  _this.router.navigate(['success'], { relativeTo: _this.route });
32697
- }, function (_error) {
32672
+ }, function () {
32698
32673
  // Navigate to error page
32699
32674
  });
32700
32675
  }
@@ -32708,7 +32683,7 @@
32708
32683
  }
32709
32684
  };
32710
32685
  CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
32711
- return input.value == null || input.value.trim().length === 0;
32686
+ return input.value === null || input.value.trim().length === 0;
32712
32687
  };
32713
32688
  return CaseChallengedAccessRequestComponent;
32714
32689
  }());
@@ -33332,11 +33307,11 @@
33332
33307
  };
33333
33308
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
33334
33309
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
33335
- .subscribe(function (_response) {
33310
+ .subscribe(function () {
33336
33311
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
33337
33312
  // Angular 7.2
33338
33313
  _this.router.navigate(['success'], { relativeTo: _this.route });
33339
- }, function (_error) {
33314
+ }, function () {
33340
33315
  // Navigate to error page
33341
33316
  });
33342
33317
  }
@@ -33351,7 +33326,7 @@
33351
33326
  }
33352
33327
  };
33353
33328
  CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
33354
- return input.value == null || input.value.trim().length === 0;
33329
+ return input.value === null || input.value.trim().length === 0;
33355
33330
  };
33356
33331
  return CaseSpecificAccessRequestComponent;
33357
33332
  }());
@@ -34252,7 +34227,7 @@
34252
34227
  }
34253
34228
  searchInputs.forEach(function (item) {
34254
34229
  if (item.field.elementPath) {
34255
- item.field.id = item.field.id + '.' + item.field.elementPath;
34230
+ item.field.id = item.field.id + "." + item.field.elementPath;
34256
34231
  }
34257
34232
  item.field.label = item.label;
34258
34233
  if (formValueObject) {
@@ -34531,7 +34506,7 @@
34531
34506
  if (rf & 2) {
34532
34507
  var ctx_r3 = i0__namespace.ɵɵnextContext(2);
34533
34508
  i0__namespace.ɵɵadvance(6);
34534
- 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. ");
34509
+ 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. ");
34535
34510
  }
34536
34511
  }
34537
34512
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
@@ -35090,7 +35065,7 @@
35090
35065
  };
35091
35066
  Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
35092
35067
  get: function () {
35093
- var total = this.paginationMetadata.total_results_count;
35068
+ var total = this.paginationMetadata.totalResultsCount;
35094
35069
  var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
35095
35070
  this.paginationLimitEnforced = maximumResultReached;
35096
35071
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -35241,7 +35216,7 @@
35241
35216
  return col;
35242
35217
  };
35243
35218
  SearchResultComponent.prototype.hasResults = function () {
35244
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
35219
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
35245
35220
  };
35246
35221
  SearchResultComponent.prototype.hasDrafts = function () {
35247
35222
  return this.resultView.hasDrafts();
@@ -35340,7 +35315,7 @@
35340
35315
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
35341
35316
  };
35342
35317
  SearchResultComponent.prototype.getTotalResults = function () {
35343
- var total = this.paginationMetadata.total_results_count + this.draftsCount;
35318
+ var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
35344
35319
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
35345
35320
  };
35346
35321
  SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
@@ -35498,6 +35473,7 @@
35498
35473
  })();
35499
35474
  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]);
35500
35475
 
35476
+ // tslint:disable:variable-name
35501
35477
  var ComplexFieldOverride = /** @class */ (function () {
35502
35478
  function ComplexFieldOverride() {
35503
35479
  }
@@ -35519,24 +35495,24 @@
35519
35495
  this.caseField.id = id;
35520
35496
  return this;
35521
35497
  };
35522
- CaseFieldBuilder.prototype.withFieldType = function (field_type) {
35523
- this.caseField.field_type = field_type;
35498
+ CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
35499
+ this.caseField.field_type = fieldType;
35524
35500
  return this;
35525
35501
  };
35526
- CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
35527
- this.caseField.display_context = display_context;
35502
+ CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
35503
+ this.caseField.display_context = displayContext;
35528
35504
  return this;
35529
35505
  };
35530
- CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
35531
- this.caseField.display_context_parameter = display_context_parameter;
35506
+ CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
35507
+ this.caseField.display_context_parameter = displayContextParameter;
35532
35508
  return this;
35533
35509
  };
35534
35510
  CaseFieldBuilder.prototype.withHidden = function (hidden) {
35535
35511
  this.caseField.hidden = hidden;
35536
35512
  return this;
35537
35513
  };
35538
- CaseFieldBuilder.prototype.withHintText = function (hint_text) {
35539
- this.caseField.hint_text = hint_text;
35514
+ CaseFieldBuilder.prototype.withHintText = function (hintText) {
35515
+ this.caseField.hint_text = hintText;
35540
35516
  return this;
35541
35517
  };
35542
35518
  CaseFieldBuilder.prototype.withLabel = function (label) {
@@ -35547,12 +35523,12 @@
35547
35523
  this.caseField.order = order;
35548
35524
  return this;
35549
35525
  };
35550
- CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
35551
- this.caseField.security_label = security_label;
35526
+ CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
35527
+ this.caseField.security_label = securityLabel;
35552
35528
  return this;
35553
35529
  };
35554
- CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
35555
- this.caseField.show_condition = show_condition;
35530
+ CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
35531
+ this.caseField.show_condition = showCondition;
35556
35532
  return this;
35557
35533
  };
35558
35534
  CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
@@ -35580,21 +35556,21 @@
35580
35556
  complex_fields: []
35581
35557
  };
35582
35558
  };
35583
- var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
35584
- if (wizard_pages === void 0) { wizard_pages = []; }
35585
- if (can_save_draft === void 0) { can_save_draft = false; }
35559
+ var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
35560
+ if (wizardPages === void 0) { wizardPages = []; }
35561
+ if (canSaveDraft === void 0) { canSaveDraft = false; }
35586
35562
  var eventTrigger = new CaseEventTrigger();
35587
35563
  eventTrigger.id = id;
35588
35564
  eventTrigger.name = name;
35589
- eventTrigger.case_id = case_id;
35590
- eventTrigger.show_summary = show_summary;
35591
- eventTrigger.wizard_pages = wizard_pages;
35565
+ eventTrigger.case_id = caseId;
35566
+ eventTrigger.show_summary = showSummary;
35567
+ eventTrigger.wizard_pages = wizardPages;
35592
35568
  eventTrigger.event_token = 'test-token';
35593
- eventTrigger.case_fields = case_fields;
35594
- eventTrigger.can_save_draft = can_save_draft;
35569
+ eventTrigger.case_fields = caseFields;
35570
+ eventTrigger.can_save_draft = canSaveDraft;
35595
35571
  return eventTrigger;
35596
35572
  };
35597
- var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields, retain_hidden_value, hidden) {
35573
+ var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
35598
35574
  if (typeComplexFields === void 0) { typeComplexFields = []; }
35599
35575
  return ({
35600
35576
  id: id || 'personFirstName',
@@ -35603,10 +35579,10 @@
35603
35579
  type: type || 'Text',
35604
35580
  complex_fields: typeComplexFields || []
35605
35581
  },
35606
- display_context: display_context || 'OPTIONAL',
35582
+ display_context: displayContext || 'OPTIONAL',
35607
35583
  label: label || 'First name',
35608
- show_summary_content_option: show_summary_content_option,
35609
- retain_hidden_value: retain_hidden_value || false,
35584
+ show_summary_content_option: showSummaryContentOption,
35585
+ retain_hidden_value: retainHiddenValue || false,
35610
35586
  hidden: hidden || false
35611
35587
  });
35612
35588
  };
@@ -35648,48 +35624,48 @@
35648
35624
  complexFieldOverride.display_context = 'HIDDEN';
35649
35625
  return complexFieldOverride;
35650
35626
  };
35651
- var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition, ACLs, hidden) {
35627
+ var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
35652
35628
  if (order === void 0) { order = undefined; }
35653
- if (show_condition === void 0) { show_condition = undefined; }
35654
- if (ACLs === void 0) { ACLs = undefined; }
35629
+ if (showCondition === void 0) { showCondition = undefined; }
35630
+ if (acls === void 0) { acls = undefined; }
35655
35631
  return CaseFieldBuilder.create()
35656
35632
  .withId(id || 'personFirstName')
35657
35633
  .withFieldType(fieldType || textFieldType())
35658
- .withDisplayContext(display_context || 'OPTIONAL')
35634
+ .withDisplayContext(displayContext || 'OPTIONAL')
35659
35635
  .withLabel(label || 'First name')
35660
35636
  .withHintText(hint || 'First name hint text')
35661
35637
  .withShowSummaryContentOption(0)
35662
35638
  .withOrder(order)
35663
- .withShowCondition(show_condition || undefined)
35664
- .withACLs(ACLs)
35639
+ .withShowCondition(showCondition || undefined)
35640
+ .withACLs(acls)
35665
35641
  .withHidden(hidden || false)
35666
35642
  .build();
35667
35643
  };
35668
- var newCaseField = function (id, label, hint, fieldType, display_context, order) {
35644
+ var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
35669
35645
  if (order === void 0) { order = undefined; }
35670
35646
  return CaseFieldBuilder.create()
35671
35647
  .withId(id || 'personFirstName')
35672
35648
  .withFieldType(fieldType || textFieldType())
35673
- .withDisplayContext(display_context || 'OPTIONAL')
35649
+ .withDisplayContext(displayContext || 'OPTIONAL')
35674
35650
  .withHintText(hint || 'First name hint text')
35675
35651
  .withLabel(label || 'First name')
35676
35652
  .withOrder(order)
35677
35653
  .withShowSummaryContentOption(0);
35678
35654
  };
35679
- var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
35680
- if (complex_fields === void 0) { complex_fields = []; }
35681
- if (collection_field_type === void 0) { collection_field_type = undefined; }
35655
+ var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
35656
+ if (complexFields === void 0) { complexFields = []; }
35657
+ if (collectionFieldType === void 0) { collectionFieldType = undefined; }
35682
35658
  return {
35683
35659
  id: typeId || 'Text',
35684
35660
  type: type || 'Text',
35685
- complex_fields: complex_fields || [],
35686
- collection_field_type: collection_field_type || undefined
35661
+ complex_fields: complexFields || [],
35662
+ collection_field_type: collectionFieldType || undefined
35687
35663
  };
35688
35664
  };
35689
35665
  var createFixedListFieldType = function (typeId, fixedListItems) {
35690
35666
  if (fixedListItems === void 0) { fixedListItems = []; }
35691
35667
  return {
35692
- id: 'FixedList-' + typeId,
35668
+ id: "FixedList-" + typeId,
35693
35669
  type: 'FixedList',
35694
35670
  fixed_list_items: fixedListItems || []
35695
35671
  };
@@ -35697,18 +35673,18 @@
35697
35673
  var createMultiSelectListFieldType = function (typeId, fixedListItems) {
35698
35674
  if (fixedListItems === void 0) { fixedListItems = []; }
35699
35675
  return {
35700
- id: 'MultiSelectList-' + typeId,
35676
+ id: "MultiSelectList-" + typeId,
35701
35677
  type: 'MultiSelectList',
35702
35678
  fixed_list_items: fixedListItems || []
35703
35679
  };
35704
35680
  };
35705
- var createACL = function (role, create, read, update, _delete) {
35681
+ var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
35706
35682
  return ({
35707
35683
  role: role || 'roleX',
35708
- create: create,
35709
- read: read,
35710
- update: update,
35711
- delete: _delete
35684
+ create: aclCreate,
35685
+ read: aclRead,
35686
+ update: aclUpdate,
35687
+ delete: aclDelete
35712
35688
  });
35713
35689
  };
35714
35690
 
@@ -35927,7 +35903,6 @@
35927
35903
  exports.FormatTranslatorService = FormatTranslatorService;
35928
35904
  exports.GreyBarService = GreyBarService;
35929
35905
  exports.HRef = HRef;
35930
- exports.HasLoadingState = HasLoadingState;
35931
35906
  exports.HeaderBarComponent = HeaderBarComponent;
35932
35907
  exports.HeadersModule = HeadersModule;
35933
35908
  exports.HttpError = HttpError;