@hmcts/ccd-case-ui-toolkit 6.14.5-case-flag-dual-error-msg-fix → 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 (233) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +716 -790
  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 -5
  13. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
  14. package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
  15. package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
  16. package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
  17. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
  18. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
  19. package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
  20. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
  21. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
  22. package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
  23. package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
  24. package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
  25. package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
  26. package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +2 -2
  27. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +3 -3
  28. package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
  29. package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
  30. package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
  31. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
  32. package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
  33. package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
  34. package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
  35. package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
  36. package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
  37. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  38. package/esm2015/lib/shared/components/palette/base-field/field-read-label.component.js +1 -1
  39. package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +1 -1
  40. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  41. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +8 -22
  42. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.js +7 -20
  43. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  44. package/esm2015/lib/shared/components/palette/case-flag/write-case-flag-field.component.js +1 -12
  45. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  46. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  47. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
  48. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  49. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  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/domain/linked-cases.model.js +2 -1
  54. package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
  55. package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
  56. package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
  57. package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
  58. package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
  59. package/esm2015/lib/shared/components/palette/palette.module.js +2 -2
  60. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  61. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  62. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  63. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
  64. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  65. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  66. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  67. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  68. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
  69. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
  70. package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
  71. package/esm2015/lib/shared/domain/case-details.model.js +2 -1
  72. package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
  73. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  74. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
  75. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  76. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
  77. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
  78. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
  79. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
  80. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
  81. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
  82. package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
  83. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  84. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  85. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  86. package/esm2015/lib/shared/domain/definition/case-field.model.js +2 -1
  87. package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
  88. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
  89. package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
  90. package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
  91. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  92. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  93. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  94. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  95. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
  96. package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
  97. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  98. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
  99. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  100. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  101. package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
  102. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  103. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  104. package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
  105. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  106. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  107. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  108. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  109. package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
  110. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  111. package/esm2015/lib/shared/services/fields/fields.utils.js +5 -4
  112. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
  113. package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
  114. package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
  115. package/esm2015/lib/shared/services/search/search.service.js +5 -10
  116. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  117. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  118. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +699 -767
  119. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  120. package/lib/app.config.d.ts.map +1 -1
  121. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  122. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  123. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  124. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
  125. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  126. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  127. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  128. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
  129. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  130. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  131. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  132. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  133. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  134. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  135. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  136. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  137. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  138. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  139. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  140. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  141. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  142. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  143. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  144. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  145. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  146. package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
  147. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  148. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  149. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts +2 -7
  150. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  151. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts +1 -4
  152. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts.map +1 -1
  153. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  154. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +2 -4
  155. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
  156. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  157. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  158. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  159. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  160. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  161. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  162. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  163. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  164. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  165. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  166. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  167. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  168. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  169. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  170. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  171. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  172. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  173. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  174. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  175. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  176. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  177. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  178. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  179. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  180. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  181. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  182. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  183. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  184. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  185. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  186. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  187. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  188. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  189. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  190. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  191. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  192. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  193. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  194. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  195. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  196. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  197. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  198. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  199. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  200. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  201. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  202. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  203. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  204. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  205. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  206. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  207. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  208. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  209. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  210. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  211. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  212. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  213. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  214. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  215. package/lib/shared/pipes/complex/index.d.ts +1 -1
  216. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  217. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  218. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  219. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  220. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  221. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  222. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  223. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  224. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  225. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  226. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  227. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  228. package/lib/shared/services/search/search.service.d.ts +0 -2
  229. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  230. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  231. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  232. package/package.json +2 -2
  233. 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 {
@@ -10519,7 +10478,6 @@
10519
10478
  id: id_1,
10520
10479
  message: "Please select Next to complete the " + action + " of the " + (action === 'update' ? 'selected ' : '') + "case flag"
10521
10480
  });
10522
- _this.caseEditDataService.setFormValidationErrors(_this.validationErrors);
10523
10481
  }
10524
10482
  else {
10525
10483
  _this.validationErrors.push({ id: id_1, message: "Select or fill the required " + casefield.label + " field" });
@@ -10611,8 +10569,8 @@
10611
10569
  }
10612
10570
  };
10613
10571
  CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
10614
- this.ignoreWarning = errorContext.ignore_warning;
10615
- this.triggerText = errorContext.trigger_text;
10572
+ this.ignoreWarning = errorContext.ignoreWarning;
10573
+ this.triggerText = errorContext.triggerText;
10616
10574
  };
10617
10575
  CaseEditPageComponent.prototype.next = function () {
10618
10576
  this.resetErrors();
@@ -10958,12 +10916,12 @@
10958
10916
  CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
10959
10917
  var errorContext = new CallbackErrorsContext();
10960
10918
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
10961
- errorContext.ignore_warning = true;
10962
- errorContext.trigger_text = this.triggerTextIgnore;
10919
+ errorContext.ignoreWarning = true;
10920
+ errorContext.triggerText = this.triggerTextIgnore;
10963
10921
  }
10964
10922
  else {
10965
- errorContext.ignore_warning = false;
10966
- errorContext.trigger_text = this.triggerTextContinue;
10923
+ errorContext.ignoreWarning = false;
10924
+ errorContext.triggerText = this.triggerTextContinue;
10967
10925
  }
10968
10926
  return errorContext;
10969
10927
  };
@@ -11008,7 +10966,7 @@
11008
10966
 
11009
10967
  var AddressOption = /** @class */ (function () {
11010
10968
  function AddressOption(addressModel, description) {
11011
- if (description == null) {
10969
+ if (description === null) {
11012
10970
  this.value = addressModel;
11013
10971
  this.description = this.getDescription();
11014
10972
  }
@@ -11017,13 +10975,10 @@
11017
10975
  }
11018
10976
  }
11019
10977
  AddressOption.prototype.getDescription = function () {
11020
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
11021
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
11022
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
11023
- + ', ' + 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);
11024
10979
  };
11025
10980
  AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
11026
- return value ? ', ' + value : value;
10981
+ return value ? ", " + value : value;
11027
10982
  };
11028
10983
  AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
11029
10984
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -11167,7 +11122,7 @@
11167
11122
  this.missingPostcode = false;
11168
11123
  var postcode_1 = this.postcode.value;
11169
11124
  this.caseField.value = null;
11170
- this.addressOptions = new Array();
11125
+ this.addressOptions = [];
11171
11126
  this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
11172
11127
  result.forEach(function (address) {
11173
11128
  _this.addressOptions.push(new AddressOption(address, null));
@@ -11210,7 +11165,7 @@
11210
11165
  var hasAddress = false;
11211
11166
  if (address) {
11212
11167
  Object.keys(address).forEach(function (key) {
11213
- if (address[key] != null) {
11168
+ if (address[key] !== null) {
11214
11169
  hasAddress = true;
11215
11170
  }
11216
11171
  });
@@ -11233,7 +11188,7 @@
11233
11188
  };
11234
11189
  WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
11235
11190
  return numberOfAddresses === 0 ? 'No address found'
11236
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
11191
+ : "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
11237
11192
  };
11238
11193
  WriteAddressFieldComponent.prototype.setFormValue = function () {
11239
11194
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -11996,13 +11951,6 @@
11996
11951
  });
11997
11952
  }
11998
11953
  }
11999
- this.caseValidationErrorsSubscription$ = this.caseEditDataService.caseFormValidationErrors$.subscribe({
12000
- next: function (validationErrors) {
12001
- if (validationErrors.length) {
12002
- _this.errorMessages = [];
12003
- }
12004
- }
12005
- });
12006
11954
  };
12007
11955
  WriteCaseFlagFieldComponent.prototype.setDisplayContextParameterUpdate = function (caseFields) {
12008
11956
  var _this = this;
@@ -12234,10 +12182,6 @@
12234
12182
  this.formGroup.updateValueAndValidity();
12235
12183
  this.caseEditDataService.setTriggerSubmitEvent(true);
12236
12184
  };
12237
- WriteCaseFlagFieldComponent.prototype.ngOnDestroy = function () {
12238
- var _a;
12239
- (_a = this.caseValidationErrorsSubscription$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
12240
- };
12241
12185
  return WriteCaseFlagFieldComponent;
12242
12186
  }(AbstractFieldWriteComponent));
12243
12187
  WriteCaseFlagFieldComponent.ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
@@ -12802,7 +12746,7 @@
12802
12746
  }
12803
12747
  };
12804
12748
  WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
12805
- var e_1, _a;
12749
+ var e_1, _c;
12806
12750
  if (isNew === void 0) { isNew = false; }
12807
12751
  /**
12808
12752
  * What follow is code that makes me want to go jump in the shower!
@@ -12838,8 +12782,8 @@
12838
12782
  if (!value) {
12839
12783
  value = new i2.FormGroup({});
12840
12784
  try {
12841
- for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
12842
- 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;
12843
12787
  value.addControl(key, group.get(key));
12844
12788
  // DON'T remove the control for this key from the outer group or it
12845
12789
  // goes awry. So DON'T uncomment the below line!
@@ -12849,7 +12793,7 @@
12849
12793
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
12850
12794
  finally {
12851
12795
  try {
12852
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12796
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
12853
12797
  }
12854
12798
  finally { if (e_1) throw e_1.error; }
12855
12799
  }
@@ -12980,6 +12924,7 @@
12980
12924
  this.formArray.removeAt(index);
12981
12925
  };
12982
12926
  WriteCollectionFieldComponent.prototype.resetIds = function (index) {
12927
+ var _a, _b;
12983
12928
  for (var i = index; i < this.collItems.length; i++) {
12984
12929
  var counter = i + 1;
12985
12930
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -12989,16 +12934,15 @@
12989
12934
  && this.collItems[i].caseField.id === counter.toString()) {
12990
12935
  this.collItems[i].caseField.id = i.toString();
12991
12936
  }
12992
- var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12993
- 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());
12994
12939
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
12995
12940
  this.collItems[i].prefix = idPrefix1;
12996
12941
  }
12997
- var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
12998
- && 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);
12999
12943
  var idPrefix2 = idPrefixAvailable ?
13000
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
13001
- 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());
13002
12946
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
13003
12947
  this.collItems[i].container['component'].idPrefix = idPrefix2;
13004
12948
  }
@@ -14354,6 +14298,257 @@
14354
14298
  }], null, null);
14355
14299
  })();
14356
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
+
14357
14552
  var DynamicRadioListPipe = /** @class */ (function () {
14358
14553
  function DynamicRadioListPipe() {
14359
14554
  }
@@ -14474,7 +14669,7 @@
14474
14669
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14475
14670
  }
14476
14671
  }
14477
- var _c0$L = function (a0) { return { selected: a0 }; };
14672
+ var _c0$K = function (a0) { return { selected: a0 }; };
14478
14673
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14479
14674
  if (rf & 1) {
14480
14675
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14487,7 +14682,7 @@
14487
14682
  if (rf & 2) {
14488
14683
  var radioButton_r5 = ctx.$implicit;
14489
14684
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14490
- 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));
14491
14686
  i0__namespace.ɵɵadvance(1);
14492
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);
14493
14688
  i0__namespace.ɵɵadvance(1);
@@ -14651,7 +14846,7 @@
14651
14846
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14652
14847
  }
14653
14848
  }
14654
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14849
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14655
14850
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14656
14851
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14657
14852
  __extends(WriteEmailFieldComponent, _super);
@@ -14676,7 +14871,7 @@
14676
14871
  i0__namespace.ɵɵelementEnd();
14677
14872
  }
14678
14873
  if (rf & 2) {
14679
- 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)));
14680
14875
  i0__namespace.ɵɵadvance(1);
14681
14876
  i0__namespace.ɵɵproperty("for", ctx.id());
14682
14877
  i0__namespace.ɵɵadvance(1);
@@ -14700,32 +14895,6 @@
14700
14895
  }], null, null);
14701
14896
  })();
14702
14897
 
14703
- var FixedListPipe = /** @class */ (function () {
14704
- function FixedListPipe() {
14705
- }
14706
- FixedListPipe.prototype.transform = function (value, items) {
14707
- if (!!items) {
14708
- var item = items.find(function (i) { return i.code === value; });
14709
- return item ? item.label : FixedListPipe.EMPTY;
14710
- }
14711
- else {
14712
- return FixedListPipe.EMPTY;
14713
- }
14714
- };
14715
- return FixedListPipe;
14716
- }());
14717
- FixedListPipe.EMPTY = '';
14718
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14719
- FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14720
- (function () {
14721
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14722
- type: i0.Pipe,
14723
- args: [{
14724
- name: 'ccdFixedList'
14725
- }]
14726
- }], null, null);
14727
- })();
14728
-
14729
14898
  var ReadFixedListFieldComponent = /** @class */ (function (_super) {
14730
14899
  __extends(ReadFixedListFieldComponent, _super);
14731
14900
  function ReadFixedListFieldComponent() {
@@ -14808,7 +14977,7 @@
14808
14977
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
14809
14978
  }
14810
14979
  }
14811
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14980
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14812
14981
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
14813
14982
  __extends(WriteFixedListFieldComponent, _super);
14814
14983
  function WriteFixedListFieldComponent() {
@@ -14857,7 +15026,7 @@
14857
15026
  i0__namespace.ɵɵelementEnd();
14858
15027
  }
14859
15028
  if (rf & 2) {
14860
- 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)));
14861
15030
  i0__namespace.ɵɵadvance(1);
14862
15031
  i0__namespace.ɵɵproperty("for", ctx.id());
14863
15032
  i0__namespace.ɵɵadvance(1);
@@ -14975,7 +15144,7 @@
14975
15144
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
14976
15145
  }
14977
15146
  }
14978
- var _c0$I = function (a0) { return { selected: a0 }; };
15147
+ var _c0$H = function (a0) { return { selected: a0 }; };
14979
15148
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
14980
15149
  if (rf & 1) {
14981
15150
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -14988,7 +15157,7 @@
14988
15157
  if (rf & 2) {
14989
15158
  var radioButton_r4 = ctx.$implicit;
14990
15159
  var ctx_r3 = i0__namespace.ɵɵnextContext();
14991
- 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));
14992
15161
  i0__namespace.ɵɵadvance(1);
14993
15162
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
14994
15163
  i0__namespace.ɵɵadvance(1);
@@ -15158,7 +15327,7 @@
15158
15327
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15159
15328
  }
15160
15329
  }
15161
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15330
+ var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15162
15331
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15163
15332
  if (rf & 1) {
15164
15333
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15170,7 +15339,7 @@
15170
15339
  if (rf & 2) {
15171
15340
  var judicialUser_r5 = ctx.$implicit;
15172
15341
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15173
- 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);
15174
15343
  i0__namespace.ɵɵadvance(1);
15175
15344
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15176
15345
  }
@@ -15409,7 +15578,7 @@
15409
15578
  casesResponse.push(_this.mapResponse(result));
15410
15579
  });
15411
15580
  });
15412
- var caseLinks = casesResponse.map(function (item) {
15581
+ _this.linkedCases = casesResponse.map(function (item) {
15413
15582
  return {
15414
15583
  caseReference: item.caseReference,
15415
15584
  caseName: item.caseName,
@@ -15423,7 +15592,6 @@
15423
15592
  }),
15424
15593
  };
15425
15594
  });
15426
- _this.linkedCases = caseLinks;
15427
15595
  _this.serverLinkedApiError = null;
15428
15596
  }, function (err) {
15429
15597
  _this.serverLinkedApiError = {
@@ -15960,7 +16128,7 @@
15960
16128
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
15961
16129
  }
15962
16130
  }
15963
- var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16131
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15964
16132
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
15965
16133
  if (rf & 1) {
15966
16134
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -15978,7 +16146,7 @@
15978
16146
  }
15979
16147
  if (rf & 2) {
15980
16148
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
15981
- 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));
15982
16150
  i0__namespace.ɵɵadvance(3);
15983
16151
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
15984
16152
  }
@@ -16035,11 +16203,11 @@
16035
16203
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16036
16204
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16037
16205
  i0__namespace.ɵɵadvance(1);
16038
- 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));
16039
16207
  i0__namespace.ɵɵadvance(3);
16040
16208
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16041
16209
  i0__namespace.ɵɵadvance(2);
16042
- 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));
16043
16211
  i0__namespace.ɵɵadvance(5);
16044
16212
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16045
16213
  i0__namespace.ɵɵadvance(2);
@@ -16473,7 +16641,7 @@
16473
16641
  i0__namespace.ɵɵadvance(4);
16474
16642
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16475
16643
  i0__namespace.ɵɵadvance(4);
16476
- 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));
16477
16645
  i0__namespace.ɵɵadvance(1);
16478
16646
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16479
16647
  i0__namespace.ɵɵadvance(18);
@@ -17157,7 +17325,7 @@
17157
17325
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17158
17326
  }
17159
17327
  }
17160
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17328
+ var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17161
17329
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17162
17330
  if (rf & 1) {
17163
17331
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17169,7 +17337,7 @@
17169
17337
  }
17170
17338
  if (rf & 2) {
17171
17339
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
17172
- 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);
17173
17341
  i0__namespace.ɵɵadvance(1);
17174
17342
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17175
17343
  i0__namespace.ɵɵadvance(2);
@@ -17345,6 +17513,7 @@
17345
17513
  }] });
17346
17514
  })();
17347
17515
 
17516
+ // tslint:disable:variable-name
17348
17517
  var LinkCaseReason = /** @class */ (function () {
17349
17518
  function LinkCaseReason() {
17350
17519
  }
@@ -17503,7 +17672,7 @@
17503
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'; });
17504
17673
  }
17505
17674
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
17506
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17675
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17507
17676
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17508
17677
  next: function (reasons) {
17509
17678
  _this.reasonListLoaded = true;
@@ -17765,7 +17934,7 @@
17765
17934
  };
17766
17935
  WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
17767
17936
  var _this = this;
17768
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17937
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17769
17938
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17770
17939
  next: function (reasons) {
17771
17940
  // Sort in ascending order
@@ -17824,11 +17993,10 @@
17824
17993
  var _this = this;
17825
17994
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
17826
17995
  var caseViewFiltered = caseView.tabs.filter(function (tab) {
17827
- var linkField = tab.fields.some(function (_b) {
17996
+ return tab.fields.some(function (_b) {
17828
17997
  var field_type = _b.field_type;
17829
17998
  return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
17830
17999
  });
17831
- return linkField;
17832
18000
  });
17833
18001
  if (caseViewFiltered) {
17834
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; });
@@ -18111,7 +18279,7 @@
18111
18279
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18112
18280
  }
18113
18281
  }
18114
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18282
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18115
18283
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18116
18284
  __extends(WriteMoneyGbpFieldComponent, _super);
18117
18285
  function WriteMoneyGbpFieldComponent() {
@@ -18141,7 +18309,7 @@
18141
18309
  i0__namespace.ɵɵelementEnd();
18142
18310
  }
18143
18311
  if (rf & 2) {
18144
- 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)));
18145
18313
  i0__namespace.ɵɵadvance(1);
18146
18314
  i0__namespace.ɵɵproperty("for", ctx.id());
18147
18315
  i0__namespace.ɵɵadvance(1);
@@ -18289,7 +18457,7 @@
18289
18457
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18290
18458
  }
18291
18459
  }
18292
- var _c0$D = function (a0) { return { "error": a0 }; };
18460
+ var _c0$C = function (a0) { return { "error": a0 }; };
18293
18461
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18294
18462
  __extends(WriteMultiSelectListFieldComponent, _super);
18295
18463
  function WriteMultiSelectListFieldComponent() {
@@ -18353,7 +18521,7 @@
18353
18521
  i0__namespace.ɵɵelementEnd();
18354
18522
  }
18355
18523
  if (rf & 2) {
18356
- 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());
18357
18525
  i0__namespace.ɵɵadvance(3);
18358
18526
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18359
18527
  i0__namespace.ɵɵadvance(1);
@@ -18444,7 +18612,7 @@
18444
18612
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18445
18613
  }
18446
18614
  }
18447
- var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18615
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18448
18616
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18449
18617
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18450
18618
  __extends(WriteNumberFieldComponent, _super);
@@ -18469,7 +18637,7 @@
18469
18637
  i0__namespace.ɵɵelementEnd();
18470
18638
  }
18471
18639
  if (rf & 2) {
18472
- 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));
18473
18641
  i0__namespace.ɵɵadvance(1);
18474
18642
  i0__namespace.ɵɵproperty("for", ctx.id());
18475
18643
  i0__namespace.ɵɵadvance(1);
@@ -18770,7 +18938,7 @@
18770
18938
  i0__namespace.ɵɵelementEnd();
18771
18939
  }
18772
18940
  }
18773
- var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
18941
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
18774
18942
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
18775
18943
  if (rf & 1) {
18776
18944
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -18786,7 +18954,7 @@
18786
18954
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
18787
18955
  var tmp_0_0 = null;
18788
18956
  var tmp_2_0 = null;
18789
- 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));
18790
18958
  i0__namespace.ɵɵadvance(2);
18791
18959
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
18792
18960
  i0__namespace.ɵɵadvance(2);
@@ -19193,231 +19361,6 @@
19193
19361
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19194
19362
  })();
19195
19363
 
19196
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
19197
- if (rf & 1) {
19198
- i0__namespace.ɵɵelementStart(0, "div");
19199
- i0__namespace.ɵɵtext(1);
19200
- i0__namespace.ɵɵpipe(2, "ccdFixedList");
19201
- i0__namespace.ɵɵelementEnd();
19202
- }
19203
- if (rf & 2) {
19204
- var value_r1 = ctx.$implicit;
19205
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19206
- i0__namespace.ɵɵadvance(1);
19207
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
19208
- }
19209
- }
19210
- var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19211
- __extends(ReadDynamicMultiSelectListFieldComponent, _super);
19212
- function ReadDynamicMultiSelectListFieldComponent() {
19213
- return _super !== null && _super.apply(this, arguments) || this;
19214
- }
19215
- ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19216
- /**
19217
- *
19218
- * Reassigning list_items from formatted_list when list_items is empty
19219
- */
19220
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
19221
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19222
- }
19223
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19224
- this.caseField.value = this.caseField.formatted_value.value;
19225
- }
19226
- _super.prototype.ngOnInit.call(this);
19227
- };
19228
- return ReadDynamicMultiSelectListFieldComponent;
19229
- }(AbstractFieldReadComponent));
19230
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
19231
- 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) {
19232
- if (rf & 1) {
19233
- i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
19234
- }
19235
- if (rf & 2) {
19236
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
19237
- }
19238
- }, 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}"] });
19239
- var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
19240
- (function () {
19241
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
19242
- type: i0.Component,
19243
- args: [{
19244
- selector: 'ccd-read-dynamic-multi-select-list-field',
19245
- templateUrl: './read-dynamic-multi-select-list-field.html',
19246
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
19247
- }]
19248
- }], null, null);
19249
- })();
19250
-
19251
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
19252
- if (rf & 1) {
19253
- i0__namespace.ɵɵelementStart(0, "span", 5);
19254
- i0__namespace.ɵɵtext(1);
19255
- i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
19256
- i0__namespace.ɵɵelementEnd();
19257
- }
19258
- if (rf & 2) {
19259
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19260
- i0__namespace.ɵɵadvance(1);
19261
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
19262
- }
19263
- }
19264
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
19265
- if (rf & 1) {
19266
- i0__namespace.ɵɵelementStart(0, "span", 6);
19267
- i0__namespace.ɵɵtext(1);
19268
- i0__namespace.ɵɵelementEnd();
19269
- }
19270
- if (rf & 2) {
19271
- var ctx_r1 = i0__namespace.ɵɵnextContext();
19272
- i0__namespace.ɵɵadvance(1);
19273
- i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
19274
- }
19275
- }
19276
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
19277
- if (rf & 1) {
19278
- i0__namespace.ɵɵelementStart(0, "span", 7);
19279
- i0__namespace.ɵɵtext(1);
19280
- i0__namespace.ɵɵpipe(2, "ccdFirstError");
19281
- i0__namespace.ɵɵelementEnd();
19282
- }
19283
- if (rf & 2) {
19284
- var ctx_r2 = i0__namespace.ɵɵnextContext();
19285
- i0__namespace.ɵɵadvance(1);
19286
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
19287
- }
19288
- }
19289
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
19290
- if (rf & 1) {
19291
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
19292
- i0__namespace.ɵɵelementContainerStart(0);
19293
- i0__namespace.ɵɵelementStart(1, "div", 8);
19294
- i0__namespace.ɵɵelementStart(2, "input", 9);
19295
- 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); });
19296
- i0__namespace.ɵɵelementEnd();
19297
- i0__namespace.ɵɵelementStart(3, "label", 10);
19298
- i0__namespace.ɵɵtext(4);
19299
- i0__namespace.ɵɵelementEnd();
19300
- i0__namespace.ɵɵelementEnd();
19301
- i0__namespace.ɵɵelementContainerEnd();
19302
- }
19303
- if (rf & 2) {
19304
- var checkbox_r4 = ctx.$implicit;
19305
- var ctx_r3 = i0__namespace.ɵɵnextContext();
19306
- i0__namespace.ɵɵadvance(2);
19307
- i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
19308
- i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
19309
- i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
19310
- i0__namespace.ɵɵadvance(1);
19311
- i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
19312
- i0__namespace.ɵɵadvance(1);
19313
- i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
19314
- }
19315
- }
19316
- var _c0$A = function (a0) { return { "error": a0 }; };
19317
- var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19318
- __extends(WriteDynamicMultiSelectListFieldComponent, _super);
19319
- function WriteDynamicMultiSelectListFieldComponent() {
19320
- return _super !== null && _super.apply(this, arguments) || this;
19321
- }
19322
- WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19323
- var _this = this;
19324
- this.checkboxes = new i2.FormArray([]);
19325
- this.setInitialCaseList();
19326
- this.setInitialCaseFieldValue();
19327
- // Initialise array with existing values
19328
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
19329
- var values = this.caseField.value;
19330
- values.forEach(function (value) {
19331
- _this.checkboxes.push(new i2.FormControl(value));
19332
- });
19333
- }
19334
- this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
19335
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19336
- };
19337
- WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
19338
- var _this = this;
19339
- var target = event.target;
19340
- if (!target || !target.value) {
19341
- return;
19342
- }
19343
- var selectedListItem = this.getValueListItem(target.value);
19344
- if (!this.isSelected(target.value)) {
19345
- // Add a new control in the FormArray
19346
- this.checkboxes.push(new i2.FormControl(selectedListItem));
19347
- }
19348
- else {
19349
- // Remove the control from the FormArray
19350
- this.checkboxes.controls.forEach(function (ctrl, i) {
19351
- if (ctrl.value.code === target.value) {
19352
- _this.checkboxes.removeAt(i);
19353
- }
19354
- });
19355
- }
19356
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19357
- };
19358
- WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
19359
- if (this.checkboxes && this.checkboxes.controls) {
19360
- return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
19361
- }
19362
- };
19363
- WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
19364
- return this.caseField.list_items.find(function (i) { return i.code === value; });
19365
- };
19366
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
19367
- var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
19368
- var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
19369
- if (!hasListItems && hasFormattedListItems) {
19370
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19371
- }
19372
- };
19373
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
19374
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19375
- this.caseField.value = this.caseField.formatted_value.value;
19376
- }
19377
- var isNull = this.caseField.value === undefined || this.caseField.value === '';
19378
- if (isNull || !Array.isArray(this.caseField.value)) {
19379
- this.caseField.value = [];
19380
- }
19381
- };
19382
- return WriteDynamicMultiSelectListFieldComponent;
19383
- }(AbstractFieldWriteComponent));
19384
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
19385
- 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) {
19386
- if (rf & 1) {
19387
- i0__namespace.ɵɵelementStart(0, "div", 0);
19388
- i0__namespace.ɵɵelementStart(1, "fieldset");
19389
- i0__namespace.ɵɵelementStart(2, "legend");
19390
- i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
19391
- i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
19392
- i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
19393
- i0__namespace.ɵɵelementEnd();
19394
- i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
19395
- i0__namespace.ɵɵelementEnd();
19396
- i0__namespace.ɵɵelementEnd();
19397
- }
19398
- if (rf & 2) {
19399
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
19400
- i0__namespace.ɵɵadvance(3);
19401
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
19402
- i0__namespace.ɵɵadvance(1);
19403
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
19404
- i0__namespace.ɵɵadvance(1);
19405
- i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
19406
- i0__namespace.ɵɵadvance(1);
19407
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
19408
- }
19409
- }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
19410
- var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
19411
- (function () {
19412
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
19413
- type: i0.Component,
19414
- args: [{
19415
- selector: 'ccd-write-dynamic-multi-select-list-field',
19416
- templateUrl: './write-dynamic-multi-select-list-field.html'
19417
- }]
19418
- }], null, null);
19419
- })();
19420
-
19421
19364
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19422
19365
  __extends(ReadPhoneUKFieldComponent, _super);
19423
19366
  function ReadPhoneUKFieldComponent() {
@@ -19618,7 +19561,7 @@
19618
19561
  WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
19619
19562
  if (this.browserService.isIEOrEdge()) {
19620
19563
  event.target.style.height = 'auto';
19621
- event.target.style.height = event.target.scrollHeight + 'px';
19564
+ event.target.style.height = event.target.scrollHeight + "px";
19622
19565
  event.target.scrollTop = event.target.scrollHeight;
19623
19566
  }
19624
19567
  };
@@ -19858,6 +19801,7 @@
19858
19801
  return YesNoService.EMPTY;
19859
19802
  };
19860
19803
  YesNoService.prototype.isYes = function (value) {
19804
+ // tslint:disable-next-line:switch-default
19861
19805
  switch (typeof (value)) {
19862
19806
  case 'boolean':
19863
19807
  return value;
@@ -19867,6 +19811,7 @@
19867
19811
  return false;
19868
19812
  };
19869
19813
  YesNoService.prototype.isNo = function (value) {
19814
+ // tslint:disable-next-line:switch-default
19870
19815
  switch (typeof (value)) {
19871
19816
  case 'boolean':
19872
19817
  return !value;
@@ -20304,7 +20249,7 @@
20304
20249
  i0__namespace.ɵɵclassProp("grey-bar", ctx.canHaveGreyBar && !ctx.caseField.hiddenCannotChange);
20305
20250
  i0__namespace.ɵɵproperty("hidden", ctx.caseField.hidden);
20306
20251
  }
20307
- }, 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}"] });
20308
20253
  (function () {
20309
20254
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldWriteComponent, [{
20310
20255
  type: i0.Component,
@@ -20404,7 +20349,7 @@
20404
20349
  i0__namespace.ɵɵadvance(1);
20405
20350
  i0__namespace.ɵɵproperty("ngIf", ctx.withLabel && !ctx.isLabel() && (!ctx.isComplex() || ctx.isCaseLink()))("ngIfElse", _r1);
20406
20351
  }
20407
- }, 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}"] });
20408
20353
  var ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(FieldReadLabelComponent);
20409
20354
  (function () {
20410
20355
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldReadLabelComponent, [{
@@ -20840,6 +20785,7 @@
20840
20785
  return CaseFileViewCategory;
20841
20786
  }());
20842
20787
 
20788
+ // tslint:disable:variable-name
20843
20789
  var CaseFileViewDocument = /** @class */ (function () {
20844
20790
  function CaseFileViewDocument() {
20845
20791
  }
@@ -21583,9 +21529,8 @@
21583
21529
  }
21584
21530
  }
21585
21531
  var SelectFlagTypeComponent = /** @class */ (function () {
21586
- function SelectFlagTypeComponent(caseFlagRefdataService, caseEditDataService) {
21532
+ function SelectFlagTypeComponent(caseFlagRefdataService) {
21587
21533
  this.caseFlagRefdataService = caseFlagRefdataService;
21588
- this.caseEditDataService = caseEditDataService;
21589
21534
  this.caseFlagStateEmitter = new i0.EventEmitter();
21590
21535
  this.flagCommentsOptionalEmitter = new i0.EventEmitter();
21591
21536
  this.flagTypeNotSelectedErrorMessage = '';
@@ -21640,21 +21585,11 @@
21640
21585
  error: function (error) { return _this.onRefdataError(error); }
21641
21586
  });
21642
21587
  }
21643
- this.caseValidationErrorsSubscription$ = this.caseEditDataService.caseFormValidationErrors$.subscribe({
21644
- next: function (validationErrors) {
21645
- if (validationErrors.length) {
21646
- _this.errorMessages = [];
21647
- _this.flagTypeNotSelectedErrorMessage = '';
21648
- _this.flagTypeErrorMessage = '';
21649
- }
21650
- }
21651
- });
21652
21588
  };
21653
21589
  SelectFlagTypeComponent.prototype.ngOnDestroy = function () {
21654
21590
  if (this.flagRefdata$) {
21655
21591
  this.flagRefdata$.unsubscribe();
21656
21592
  }
21657
- this.caseValidationErrorsSubscription$.unsubscribe();
21658
21593
  };
21659
21594
  SelectFlagTypeComponent.prototype.onFlagTypeChanged = function (flagType) {
21660
21595
  this.selectedFlagType = flagType;
@@ -21720,7 +21655,7 @@
21720
21655
  };
21721
21656
  return SelectFlagTypeComponent;
21722
21657
  }());
21723
- SelectFlagTypeComponent.ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
21658
+ SelectFlagTypeComponent.ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService)); };
21724
21659
  SelectFlagTypeComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId", hmctsServiceId: "hmctsServiceId" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, decls: 11, vars: 9, consts: [[1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName", "change"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagTypeComponent_Template(rf, ctx) {
21725
21660
  if (rf & 1) {
21726
21661
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -21765,7 +21700,7 @@
21765
21700
  templateUrl: './select-flag-type.component.html',
21766
21701
  styleUrls: ['./select-flag-type.component.scss']
21767
21702
  }]
21768
- }], function () { return [{ type: CaseFlagRefdataService }, { type: CaseEditDataService }]; }, { formGroup: [{
21703
+ }], function () { return [{ type: CaseFlagRefdataService }]; }, { formGroup: [{
21769
21704
  type: i0.Input
21770
21705
  }], jurisdiction: [{
21771
21706
  type: i0.Input
@@ -22188,8 +22123,7 @@
22188
22123
  }
22189
22124
  var _c0$o = function (a0) { return { "form-group-error": a0 }; };
22190
22125
  var SelectFlagLocationComponent = /** @class */ (function () {
22191
- function SelectFlagLocationComponent(caseEditDataService) {
22192
- this.caseEditDataService = caseEditDataService;
22126
+ function SelectFlagLocationComponent() {
22193
22127
  this.caseFlagStateEmitter = new i0.EventEmitter();
22194
22128
  this.errorMessages = [];
22195
22129
  this.flagLocationNotSelectedErrorMessage = null;
@@ -22205,7 +22139,7 @@
22205
22139
  // is expected not to have a party name)
22206
22140
  if (this.flagsData) {
22207
22141
  this.filteredFlagsData =
22208
- 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; });
22209
22143
  }
22210
22144
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
22211
22145
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -22217,14 +22151,6 @@
22217
22151
  // flags in future)
22218
22152
  this.onCaseFlagsConfigError();
22219
22153
  }
22220
- this.caseValidationErrorsSubscription$ = this.caseEditDataService.caseFormValidationErrors$.subscribe({
22221
- next: function (validationErrors) {
22222
- if (validationErrors.length) {
22223
- _this.errorMessages = [];
22224
- _this.flagLocationNotSelectedErrorMessage = null;
22225
- }
22226
- }
22227
- });
22228
22154
  };
22229
22155
  SelectFlagLocationComponent.prototype.onNext = function () {
22230
22156
  // Validate flag location selection
@@ -22259,12 +22185,9 @@
22259
22185
  // Return case flag field state and error messages to the parent
22260
22186
  this.caseFlagStateEmitter.emit({ currentCaseFlagFieldState: exports.CaseFlagFieldState.FLAG_TYPE, errorMessages: this.errorMessages });
22261
22187
  };
22262
- SelectFlagLocationComponent.prototype.ngOnDestroy = function () {
22263
- this.caseValidationErrorsSubscription$.unsubscribe();
22264
- };
22265
22188
  return SelectFlagLocationComponent;
22266
22189
  }());
22267
- SelectFlagLocationComponent.ɵfac = function SelectFlagLocationComponent_Factory(t) { return new (t || SelectFlagLocationComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
22190
+ SelectFlagLocationComponent.ɵfac = function SelectFlagLocationComponent_Factory(t) { return new (t || SelectFlagLocationComponent)(); };
22268
22191
  SelectFlagLocationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagLocationComponent, selectors: [["ccd-select-flag-location"]], inputs: { formGroup: "formGroup", flagsData: "flagsData" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 10, vars: 8, consts: [[1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-location-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], ["id", "flag-location-heading", 1, "govuk-fieldset__heading"], ["id", "flag-location-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-location-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [4, "ngIf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagLocationComponent_Template(rf, ctx) {
22269
22192
  if (rf & 1) {
22270
22193
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -22305,7 +22228,7 @@
22305
22228
  selector: 'ccd-select-flag-location',
22306
22229
  templateUrl: './select-flag-location.component.html'
22307
22230
  }]
22308
- }], function () { return [{ type: CaseEditDataService }]; }, { formGroup: [{
22231
+ }], null, { formGroup: [{
22309
22232
  type: i0.Input
22310
22233
  }], flagsData: [{
22311
22234
  type: i0.Input
@@ -23513,18 +23436,19 @@
23513
23436
  field.value = { CaseReference: value };
23514
23437
  return field;
23515
23438
  };
23516
- ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
23439
+ ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
23517
23440
  return classTransformer.plainToClassFromExist(new CaseField(), {
23518
23441
  id: id,
23519
23442
  label: label,
23520
23443
  display_context: 'READONLY',
23521
23444
  value: value,
23522
- field_type: field_type
23445
+ field_type: fieldType
23523
23446
  });
23524
23447
  };
23525
23448
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
23526
23449
  var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
23527
23450
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
23451
+ // tslint:disable-next-line:switch-default
23528
23452
  switch (this.columnsHorizontalLabel[column].type.type) {
23529
23453
  case 'Number':
23530
23454
  case 'MoneyGBP': {
@@ -24650,6 +24574,7 @@
24650
24574
  return FeeValue;
24651
24575
  }());
24652
24576
 
24577
+ // tslint:disable:variable-name
24653
24578
  var Fee = /** @class */ (function () {
24654
24579
  function Fee() {
24655
24580
  }
@@ -25355,7 +25280,7 @@
25355
25280
  function CcdPageFieldsPipe() {
25356
25281
  }
25357
25282
  CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
25358
- var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25283
+ var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25359
25284
  var control = dataFormGroup.controls['data'].get(key);
25360
25285
  return control['caseField'];
25361
25286
  }).filter(function (field) {
@@ -25375,7 +25300,7 @@
25375
25300
  field_type: {
25376
25301
  id: page.id,
25377
25302
  type: 'Complex',
25378
- complex_fields: complex_fields
25303
+ complex_fields: complexFields
25379
25304
  }
25380
25305
  });
25381
25306
  };
@@ -25554,11 +25479,11 @@
25554
25479
  }
25555
25480
  return childrenCaseFields;
25556
25481
  };
25557
- CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
25558
- return case_field.field_type.type === 'Complex';
25482
+ CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
25483
+ return caseField.field_type.type === 'Complex';
25559
25484
  };
25560
- CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
25561
- return case_field.field_type.type === 'Collection';
25485
+ CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
25486
+ return caseField.field_type.type === 'Collection';
25562
25487
  };
25563
25488
  CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
25564
25489
  return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
@@ -26759,7 +26684,7 @@
26759
26684
  if (caseField.field_type.type === 'Complex') {
26760
26685
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
26761
26686
  // handle both null and undefined values
26762
- if (caseField.value != null) {
26687
+ if (caseField.value !== null) {
26763
26688
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
26764
26689
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
26765
26690
  // parent)
@@ -26825,8 +26750,8 @@
26825
26750
  this.caseEdit.navigateToPage(pageId);
26826
26751
  };
26827
26752
  CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
26828
- this.ignoreWarning = errorContext.ignore_warning;
26829
- this.triggerText = errorContext.trigger_text;
26753
+ this.ignoreWarning = errorContext.ignoreWarning;
26754
+ this.triggerText = errorContext.triggerText;
26830
26755
  };
26831
26756
  CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
26832
26757
  if (null === this.editForm.get('data').get(field.id)) {
@@ -27458,6 +27383,7 @@
27458
27383
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
27459
27384
  ]
27460
27385
  });
27386
+ // tslint:disable-next-line:switch-default
27461
27387
  switch (portalType) {
27462
27388
  case EventCompletionPortalTypes.TaskCancelled:
27463
27389
  this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -27992,36 +27918,36 @@
27992
27918
  this.screenReaderCurrentLabel = "You're on page";
27993
27919
  this.pageChange = new i0.EventEmitter();
27994
27920
  this.pageBoundsCorrection = new i0.EventEmitter();
27995
- this._directionLinks = true;
27996
- this._autoHide = false;
27997
- this._responsive = false;
27921
+ this.pDirectionLinks = true;
27922
+ this.pAutoHide = false;
27923
+ this.pResponsive = false;
27998
27924
  }
27999
27925
  Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
28000
27926
  get: function () {
28001
- return this._directionLinks;
27927
+ return this.pDirectionLinks;
28002
27928
  },
28003
27929
  set: function (value) {
28004
- this._directionLinks = coerceToBoolean(value);
27930
+ this.pDirectionLinks = coerceToBoolean(value);
28005
27931
  },
28006
27932
  enumerable: false,
28007
27933
  configurable: true
28008
27934
  });
28009
27935
  Object.defineProperty(PaginationComponent.prototype, "autoHide", {
28010
27936
  get: function () {
28011
- return this._autoHide;
27937
+ return this.pAutoHide;
28012
27938
  },
28013
27939
  set: function (value) {
28014
- this._autoHide = coerceToBoolean(value);
27940
+ this.pAutoHide = coerceToBoolean(value);
28015
27941
  },
28016
27942
  enumerable: false,
28017
27943
  configurable: true
28018
27944
  });
28019
27945
  Object.defineProperty(PaginationComponent.prototype, "responsive", {
28020
27946
  get: function () {
28021
- return this._responsive;
27947
+ return this.pResponsive;
28022
27948
  },
28023
27949
  set: function (value) {
28024
- this._responsive = coerceToBoolean(value);
27950
+ this.pResponsive = coerceToBoolean(value);
28025
27951
  },
28026
27952
  enumerable: false,
28027
27953
  configurable: true
@@ -28788,7 +28714,7 @@
28788
28714
  var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
28789
28715
  workbasketInputs.forEach(function (item) {
28790
28716
  if (item.field.elementPath) {
28791
- item.field.id = item.field.id + '.' + item.field.elementPath;
28717
+ item.field.id = item.field.id + "." + item.field.elementPath;
28792
28718
  }
28793
28719
  item.field.label = item.label;
28794
28720
  if (formValue) {
@@ -28840,7 +28766,7 @@
28840
28766
  var value = formGroupLS[key];
28841
28767
  // Clear the filter form group control values if it has a value in local storage
28842
28768
  // The regionList form group control value should be ignored as it always contain the latest value
28843
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
28769
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
28844
28770
  this.formGroup.get(key).setValue(null);
28845
28771
  }
28846
28772
  }
@@ -29969,7 +29895,7 @@
29969
29895
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
29970
29896
  if (this.activityPollingService.isEnabled) {
29971
29897
  this.ngZone.runOutsideAngular(function () {
29972
- _this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
29898
+ _this.activitySubscription = _this.postEditActivity().subscribe(function () {
29973
29899
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
29974
29900
  });
29975
29901
  });
@@ -30941,8 +30867,8 @@
30941
30867
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
30942
30868
  };
30943
30869
  CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
30944
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
30945
- this.triggerText = callbackErrorsContext.trigger_text;
30870
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
30871
+ this.triggerText = callbackErrorsContext.triggerText;
30946
30872
  };
30947
30873
  CaseFullAccessViewComponent.prototype.isDraft = function () {
30948
30874
  return Draft.isDraft(this.caseDetails.case_id);
@@ -31221,7 +31147,7 @@
31221
31147
  * or the empty string
31222
31148
  */
31223
31149
  PrintUrlPipe.prototype.transform = function (remoteUrl) {
31224
- if (remoteUrl && remoteUrl.length > 0) {
31150
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
31225
31151
  var printServiceUrlPathname = void 0;
31226
31152
  /**
31227
31153
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -31237,7 +31163,7 @@
31237
31163
  printServiceUrlPathname = urlParser.pathname;
31238
31164
  if (printServiceUrlPathname[0] !== '/') {
31239
31165
  // Fix for IE11; it returns the pathname without leading slash
31240
- printServiceUrlPathname = '/' + printServiceUrlPathname;
31166
+ printServiceUrlPathname = "/" + printServiceUrlPathname;
31241
31167
  }
31242
31168
  }
31243
31169
  else {
@@ -31440,10 +31366,10 @@
31440
31366
  };
31441
31367
  CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
31442
31368
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
31443
- var access_process = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31444
- var access_granted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31445
- this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31446
- this.userAccessType = access_process ? access_process.value : null;
31369
+ var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31370
+ var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31371
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31372
+ this.userAccessType = accessProcess ? accessProcess.value : null;
31447
31373
  }
31448
31374
  };
31449
31375
  CaseViewerComponent.prototype.isDataLoaded = function () {
@@ -32739,11 +32665,11 @@
32739
32665
  };
32740
32666
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
32741
32667
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
32742
- .subscribe(function (_response) {
32668
+ .subscribe(function () {
32743
32669
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
32744
32670
  // Angular 7.2!
32745
32671
  _this.router.navigate(['success'], { relativeTo: _this.route });
32746
- }, function (_error) {
32672
+ }, function () {
32747
32673
  // Navigate to error page
32748
32674
  });
32749
32675
  }
@@ -32757,7 +32683,7 @@
32757
32683
  }
32758
32684
  };
32759
32685
  CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
32760
- return input.value == null || input.value.trim().length === 0;
32686
+ return input.value === null || input.value.trim().length === 0;
32761
32687
  };
32762
32688
  return CaseChallengedAccessRequestComponent;
32763
32689
  }());
@@ -33381,11 +33307,11 @@
33381
33307
  };
33382
33308
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
33383
33309
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
33384
- .subscribe(function (_response) {
33310
+ .subscribe(function () {
33385
33311
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
33386
33312
  // Angular 7.2
33387
33313
  _this.router.navigate(['success'], { relativeTo: _this.route });
33388
- }, function (_error) {
33314
+ }, function () {
33389
33315
  // Navigate to error page
33390
33316
  });
33391
33317
  }
@@ -33400,7 +33326,7 @@
33400
33326
  }
33401
33327
  };
33402
33328
  CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
33403
- return input.value == null || input.value.trim().length === 0;
33329
+ return input.value === null || input.value.trim().length === 0;
33404
33330
  };
33405
33331
  return CaseSpecificAccessRequestComponent;
33406
33332
  }());
@@ -34301,7 +34227,7 @@
34301
34227
  }
34302
34228
  searchInputs.forEach(function (item) {
34303
34229
  if (item.field.elementPath) {
34304
- item.field.id = item.field.id + '.' + item.field.elementPath;
34230
+ item.field.id = item.field.id + "." + item.field.elementPath;
34305
34231
  }
34306
34232
  item.field.label = item.label;
34307
34233
  if (formValueObject) {
@@ -34580,7 +34506,7 @@
34580
34506
  if (rf & 2) {
34581
34507
  var ctx_r3 = i0__namespace.ɵɵnextContext(2);
34582
34508
  i0__namespace.ɵɵadvance(6);
34583
- 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. ");
34584
34510
  }
34585
34511
  }
34586
34512
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
@@ -35139,7 +35065,7 @@
35139
35065
  };
35140
35066
  Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
35141
35067
  get: function () {
35142
- var total = this.paginationMetadata.total_results_count;
35068
+ var total = this.paginationMetadata.totalResultsCount;
35143
35069
  var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
35144
35070
  this.paginationLimitEnforced = maximumResultReached;
35145
35071
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -35290,7 +35216,7 @@
35290
35216
  return col;
35291
35217
  };
35292
35218
  SearchResultComponent.prototype.hasResults = function () {
35293
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
35219
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
35294
35220
  };
35295
35221
  SearchResultComponent.prototype.hasDrafts = function () {
35296
35222
  return this.resultView.hasDrafts();
@@ -35389,7 +35315,7 @@
35389
35315
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
35390
35316
  };
35391
35317
  SearchResultComponent.prototype.getTotalResults = function () {
35392
- var total = this.paginationMetadata.total_results_count + this.draftsCount;
35318
+ var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
35393
35319
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
35394
35320
  };
35395
35321
  SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
@@ -35547,6 +35473,7 @@
35547
35473
  })();
35548
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]);
35549
35475
 
35476
+ // tslint:disable:variable-name
35550
35477
  var ComplexFieldOverride = /** @class */ (function () {
35551
35478
  function ComplexFieldOverride() {
35552
35479
  }
@@ -35568,24 +35495,24 @@
35568
35495
  this.caseField.id = id;
35569
35496
  return this;
35570
35497
  };
35571
- CaseFieldBuilder.prototype.withFieldType = function (field_type) {
35572
- this.caseField.field_type = field_type;
35498
+ CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
35499
+ this.caseField.field_type = fieldType;
35573
35500
  return this;
35574
35501
  };
35575
- CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
35576
- this.caseField.display_context = display_context;
35502
+ CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
35503
+ this.caseField.display_context = displayContext;
35577
35504
  return this;
35578
35505
  };
35579
- CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
35580
- this.caseField.display_context_parameter = display_context_parameter;
35506
+ CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
35507
+ this.caseField.display_context_parameter = displayContextParameter;
35581
35508
  return this;
35582
35509
  };
35583
35510
  CaseFieldBuilder.prototype.withHidden = function (hidden) {
35584
35511
  this.caseField.hidden = hidden;
35585
35512
  return this;
35586
35513
  };
35587
- CaseFieldBuilder.prototype.withHintText = function (hint_text) {
35588
- this.caseField.hint_text = hint_text;
35514
+ CaseFieldBuilder.prototype.withHintText = function (hintText) {
35515
+ this.caseField.hint_text = hintText;
35589
35516
  return this;
35590
35517
  };
35591
35518
  CaseFieldBuilder.prototype.withLabel = function (label) {
@@ -35596,12 +35523,12 @@
35596
35523
  this.caseField.order = order;
35597
35524
  return this;
35598
35525
  };
35599
- CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
35600
- this.caseField.security_label = security_label;
35526
+ CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
35527
+ this.caseField.security_label = securityLabel;
35601
35528
  return this;
35602
35529
  };
35603
- CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
35604
- this.caseField.show_condition = show_condition;
35530
+ CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
35531
+ this.caseField.show_condition = showCondition;
35605
35532
  return this;
35606
35533
  };
35607
35534
  CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
@@ -35629,21 +35556,21 @@
35629
35556
  complex_fields: []
35630
35557
  };
35631
35558
  };
35632
- var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
35633
- if (wizard_pages === void 0) { wizard_pages = []; }
35634
- 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; }
35635
35562
  var eventTrigger = new CaseEventTrigger();
35636
35563
  eventTrigger.id = id;
35637
35564
  eventTrigger.name = name;
35638
- eventTrigger.case_id = case_id;
35639
- eventTrigger.show_summary = show_summary;
35640
- eventTrigger.wizard_pages = wizard_pages;
35565
+ eventTrigger.case_id = caseId;
35566
+ eventTrigger.show_summary = showSummary;
35567
+ eventTrigger.wizard_pages = wizardPages;
35641
35568
  eventTrigger.event_token = 'test-token';
35642
- eventTrigger.case_fields = case_fields;
35643
- eventTrigger.can_save_draft = can_save_draft;
35569
+ eventTrigger.case_fields = caseFields;
35570
+ eventTrigger.can_save_draft = canSaveDraft;
35644
35571
  return eventTrigger;
35645
35572
  };
35646
- 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) {
35647
35574
  if (typeComplexFields === void 0) { typeComplexFields = []; }
35648
35575
  return ({
35649
35576
  id: id || 'personFirstName',
@@ -35652,10 +35579,10 @@
35652
35579
  type: type || 'Text',
35653
35580
  complex_fields: typeComplexFields || []
35654
35581
  },
35655
- display_context: display_context || 'OPTIONAL',
35582
+ display_context: displayContext || 'OPTIONAL',
35656
35583
  label: label || 'First name',
35657
- show_summary_content_option: show_summary_content_option,
35658
- retain_hidden_value: retain_hidden_value || false,
35584
+ show_summary_content_option: showSummaryContentOption,
35585
+ retain_hidden_value: retainHiddenValue || false,
35659
35586
  hidden: hidden || false
35660
35587
  });
35661
35588
  };
@@ -35697,48 +35624,48 @@
35697
35624
  complexFieldOverride.display_context = 'HIDDEN';
35698
35625
  return complexFieldOverride;
35699
35626
  };
35700
- 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) {
35701
35628
  if (order === void 0) { order = undefined; }
35702
- if (show_condition === void 0) { show_condition = undefined; }
35703
- if (ACLs === void 0) { ACLs = undefined; }
35629
+ if (showCondition === void 0) { showCondition = undefined; }
35630
+ if (acls === void 0) { acls = undefined; }
35704
35631
  return CaseFieldBuilder.create()
35705
35632
  .withId(id || 'personFirstName')
35706
35633
  .withFieldType(fieldType || textFieldType())
35707
- .withDisplayContext(display_context || 'OPTIONAL')
35634
+ .withDisplayContext(displayContext || 'OPTIONAL')
35708
35635
  .withLabel(label || 'First name')
35709
35636
  .withHintText(hint || 'First name hint text')
35710
35637
  .withShowSummaryContentOption(0)
35711
35638
  .withOrder(order)
35712
- .withShowCondition(show_condition || undefined)
35713
- .withACLs(ACLs)
35639
+ .withShowCondition(showCondition || undefined)
35640
+ .withACLs(acls)
35714
35641
  .withHidden(hidden || false)
35715
35642
  .build();
35716
35643
  };
35717
- var newCaseField = function (id, label, hint, fieldType, display_context, order) {
35644
+ var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
35718
35645
  if (order === void 0) { order = undefined; }
35719
35646
  return CaseFieldBuilder.create()
35720
35647
  .withId(id || 'personFirstName')
35721
35648
  .withFieldType(fieldType || textFieldType())
35722
- .withDisplayContext(display_context || 'OPTIONAL')
35649
+ .withDisplayContext(displayContext || 'OPTIONAL')
35723
35650
  .withHintText(hint || 'First name hint text')
35724
35651
  .withLabel(label || 'First name')
35725
35652
  .withOrder(order)
35726
35653
  .withShowSummaryContentOption(0);
35727
35654
  };
35728
- var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
35729
- if (complex_fields === void 0) { complex_fields = []; }
35730
- 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; }
35731
35658
  return {
35732
35659
  id: typeId || 'Text',
35733
35660
  type: type || 'Text',
35734
- complex_fields: complex_fields || [],
35735
- collection_field_type: collection_field_type || undefined
35661
+ complex_fields: complexFields || [],
35662
+ collection_field_type: collectionFieldType || undefined
35736
35663
  };
35737
35664
  };
35738
35665
  var createFixedListFieldType = function (typeId, fixedListItems) {
35739
35666
  if (fixedListItems === void 0) { fixedListItems = []; }
35740
35667
  return {
35741
- id: 'FixedList-' + typeId,
35668
+ id: "FixedList-" + typeId,
35742
35669
  type: 'FixedList',
35743
35670
  fixed_list_items: fixedListItems || []
35744
35671
  };
@@ -35746,18 +35673,18 @@
35746
35673
  var createMultiSelectListFieldType = function (typeId, fixedListItems) {
35747
35674
  if (fixedListItems === void 0) { fixedListItems = []; }
35748
35675
  return {
35749
- id: 'MultiSelectList-' + typeId,
35676
+ id: "MultiSelectList-" + typeId,
35750
35677
  type: 'MultiSelectList',
35751
35678
  fixed_list_items: fixedListItems || []
35752
35679
  };
35753
35680
  };
35754
- var createACL = function (role, create, read, update, _delete) {
35681
+ var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
35755
35682
  return ({
35756
35683
  role: role || 'roleX',
35757
- create: create,
35758
- read: read,
35759
- update: update,
35760
- delete: _delete
35684
+ create: aclCreate,
35685
+ read: aclRead,
35686
+ update: aclUpdate,
35687
+ delete: aclDelete
35761
35688
  });
35762
35689
  };
35763
35690
 
@@ -35976,7 +35903,6 @@
35976
35903
  exports.FormatTranslatorService = FormatTranslatorService;
35977
35904
  exports.GreyBarService = GreyBarService;
35978
35905
  exports.HRef = HRef;
35979
- exports.HasLoadingState = HasLoadingState;
35980
35906
  exports.HeaderBarComponent = HeaderBarComponent;
35981
35907
  exports.HeadersModule = HeadersModule;
35982
35908
  exports.HttpError = HttpError;