@hmcts/ccd-case-ui-toolkit 6.14.1 → 6.14.2-go-to-page

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 (225) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +791 -804
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
  7. package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
  8. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
  9. package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
  10. package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
  11. package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
  12. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +4 -4
  13. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
  14. package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
  15. package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
  16. package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
  17. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
  18. package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
  19. package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
  20. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
  21. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
  22. package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
  23. package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
  24. package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
  25. package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
  26. package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +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 +92 -66
  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/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
  39. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
  40. package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
  41. package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
  42. package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
  43. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
  44. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
  45. package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
  46. package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
  47. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
  48. package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
  49. package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +2 -1
  50. package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
  51. package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
  52. package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
  53. package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
  54. package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
  55. package/esm2015/lib/shared/components/palette/palette.module.js +3 -3
  56. package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
  57. package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
  58. package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
  59. package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
  60. package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
  61. package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
  62. package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
  63. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
  64. package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
  65. package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
  66. package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
  67. package/esm2015/lib/shared/domain/case-details.model.js +2 -1
  68. package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
  69. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
  70. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
  71. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
  72. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
  73. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
  74. package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
  75. package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
  76. package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
  77. package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
  78. package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
  79. package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
  80. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  81. package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
  82. package/esm2015/lib/shared/domain/definition/case-field.model.js +2 -1
  83. package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
  84. package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
  85. package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
  86. package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
  87. package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
  88. package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
  89. package/esm2015/lib/shared/domain/search/field.model.js +1 -1
  90. package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
  91. package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
  92. package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
  93. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  94. package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
  95. package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
  96. package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
  97. package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
  98. package/esm2015/lib/shared/pipes/complex/index.js +2 -2
  99. package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
  100. package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
  101. package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
  102. package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
  103. package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
  104. package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
  105. package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
  106. package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
  107. package/esm2015/lib/shared/services/fields/fields.utils.js +5 -4
  108. package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
  109. package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
  110. package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
  111. package/esm2015/lib/shared/services/search/search.service.js +5 -10
  112. package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
  113. package/esm2015/lib/shared/services/window/window.service.js +1 -1
  114. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +759 -766
  115. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  116. package/lib/app.config.d.ts.map +1 -1
  117. package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
  118. package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
  119. package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
  120. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
  121. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  122. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  123. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  124. 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
  125. 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
  126. package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
  127. package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
  128. package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
  129. package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
  130. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  131. package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
  132. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  133. package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
  134. package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
  135. package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
  136. package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
  137. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  138. package/lib/shared/components/error/domain/error-context.d.ts +2 -2
  139. package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
  140. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  141. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  142. package/lib/shared/components/pagination/pagination.component.d.ts +4 -3
  143. package/lib/shared/components/pagination/pagination.component.d.ts.map +1 -1
  144. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  145. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  146. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  147. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  148. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  149. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  150. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  151. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  152. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  153. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  154. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  155. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  156. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  157. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  158. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  159. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  160. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  161. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  162. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  163. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  164. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  165. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  166. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  167. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  168. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  169. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  170. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  171. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  172. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  173. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  174. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  175. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  176. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  177. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  178. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  179. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  180. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  181. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  182. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  183. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  184. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  185. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  186. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  187. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  188. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  189. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  190. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  191. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  192. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  193. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  194. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  195. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  196. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  197. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  198. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  199. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  200. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  201. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  202. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  203. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  204. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  205. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  206. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  207. package/lib/shared/pipes/complex/index.d.ts +1 -1
  208. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  209. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  210. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  211. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  212. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  213. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  214. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  215. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  216. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  217. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  218. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  219. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  220. package/lib/shared/services/search/search.service.d.ts +0 -2
  221. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  222. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  223. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  224. package/package.json +2 -2
  225. package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
@@ -1036,22 +1036,22 @@
1036
1036
  }
1037
1037
  };
1038
1038
  DateInputComponent.prototype.dayId = function () {
1039
- return this.id + '-day';
1039
+ return this.id + "-day";
1040
1040
  };
1041
1041
  DateInputComponent.prototype.monthId = function () {
1042
- return this.id + '-month';
1042
+ return this.id + "-month";
1043
1043
  };
1044
1044
  DateInputComponent.prototype.yearId = function () {
1045
- return this.id + '-year';
1045
+ return this.id + "-year";
1046
1046
  };
1047
1047
  DateInputComponent.prototype.hourId = function () {
1048
- return this.id + '-hour';
1048
+ return this.id + "-hour";
1049
1049
  };
1050
1050
  DateInputComponent.prototype.minuteId = function () {
1051
- return this.id + '-minute';
1051
+ return this.id + "-minute";
1052
1052
  };
1053
1053
  DateInputComponent.prototype.secondId = function () {
1054
- return this.id + '-second';
1054
+ return this.id + "-second";
1055
1055
  };
1056
1056
  DateInputComponent.prototype.viewValue = function () {
1057
1057
  if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
@@ -1066,7 +1066,7 @@
1066
1066
  this.minute ? this.pad(this.minute) : '',
1067
1067
  this.second ? this.pad(this.second) : ''
1068
1068
  ].join(':');
1069
- return date + 'T' + time + '.000';
1069
+ return date + "T" + time + ".000";
1070
1070
  }
1071
1071
  else {
1072
1072
  return date;
@@ -2131,7 +2131,7 @@
2131
2131
  });
2132
2132
  ActivityService.handleHttpError = function (response) {
2133
2133
  var error = HttpErrorService.convertToHttpError(response);
2134
- if (response.status && response.status !== error.status) {
2134
+ if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
2135
2135
  error.status = response.status;
2136
2136
  }
2137
2137
  return error;
@@ -2139,12 +2139,11 @@
2139
2139
  ActivityService.prototype.getOptions = function () {
2140
2140
  var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
2141
2141
  var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
2142
- var options = {
2142
+ return {
2143
2143
  headers: headers,
2144
2144
  withCredentials: true,
2145
2145
  observe: 'body',
2146
2146
  };
2147
- return options;
2148
2147
  };
2149
2148
  ActivityService.prototype.getActivities = function () {
2150
2149
  var caseId = [];
@@ -2153,41 +2152,33 @@
2153
2152
  }
2154
2153
  try {
2155
2154
  var options = this.getOptions();
2156
- var url = this.activityUrl() + ("/cases/" + caseId.join(',') + "/activity");
2155
+ var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
2157
2156
  return this.http
2158
2157
  .get(url, options, false, ActivityService.handleHttpError)
2159
2158
  .pipe(operators.map(function (response) { return response; }));
2160
2159
  }
2161
2160
  catch (error) {
2162
- console.log('user may not be authenticated.' + error);
2161
+ console.log("user may not be authenticated." + error);
2163
2162
  }
2164
2163
  };
2165
2164
  ActivityService.prototype.postActivity = function (caseId, activity) {
2166
2165
  try {
2167
2166
  var options = this.getOptions();
2168
- var url = this.activityUrl() + ("/cases/" + caseId + "/activity");
2167
+ var url = this.activityUrl() + "/cases/" + caseId + "/activity";
2169
2168
  var body = { activity: activity };
2170
2169
  return this.http
2171
2170
  .post(url, body, options, false)
2172
2171
  .pipe(operators.map(function (response) { return response; }));
2173
2172
  }
2174
2173
  catch (error) {
2175
- console.log('user may not be authenticated.' + error);
2174
+ console.log("user may not be authenticated." + error);
2176
2175
  }
2177
2176
  };
2178
2177
  ActivityService.prototype.verifyUserIsAuthorized = function () {
2179
2178
  var _this = this;
2180
- if (this.sessionStorageService.getItem('userDetails') === undefined) {
2181
- return;
2182
- }
2183
- if (this.activityUrl() && this.userAuthorised === undefined) {
2179
+ if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
2184
2180
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
2185
- if ([401, 403].indexOf(error.status) > -1) {
2186
- _this.userAuthorised = false;
2187
- }
2188
- else {
2189
- _this.userAuthorised = true;
2190
- }
2181
+ _this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
2191
2182
  });
2192
2183
  }
2193
2184
  };
@@ -2300,7 +2291,7 @@
2300
2291
  requests.get(activity.caseId).next(activity);
2301
2292
  });
2302
2293
  }, function (err) {
2303
- console.log('error: ' + err);
2294
+ console.log("error: " + err);
2304
2295
  Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
2305
2296
  }); });
2306
2297
  });
@@ -2440,9 +2431,9 @@
2440
2431
  };
2441
2432
  ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
2442
2433
  var resultText = prefix;
2443
- resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + ' ' + activityInfo.surname; }).join(', ');
2434
+ resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
2444
2435
  if (unknownCount > 0) {
2445
- resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
2436
+ resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
2446
2437
  resultText += (unknownCount > 1 ? 's' : '');
2447
2438
  }
2448
2439
  else {
@@ -2450,10 +2441,10 @@
2450
2441
  }
2451
2442
  if (suffix.length > 0) {
2452
2443
  if (namesArray.length + unknownCount > 1) {
2453
- resultText += ' are ' + suffix;
2444
+ resultText += " are " + suffix;
2454
2445
  }
2455
2446
  else {
2456
- resultText += ' is ' + suffix;
2447
+ resultText += " is " + suffix;
2457
2448
  }
2458
2449
  }
2459
2450
  return resultText;
@@ -2792,7 +2783,7 @@
2792
2783
  break;
2793
2784
  case 'n':
2794
2785
  case 'N':
2795
- maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2786
+ maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
2796
2787
  break;
2797
2788
  case 'V':
2798
2789
  case 'O':
@@ -2926,9 +2917,9 @@
2926
2917
  resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
2927
2918
  if (match[4] && match[5] && match[6] && format !== 'short') {
2928
2919
  resultDate += ', ';
2929
- resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
2930
- resultDate += this.pad(offsetDate.getMinutes()) + ':';
2931
- resultDate += this.pad(offsetDate.getSeconds()) + ' ';
2920
+ resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
2921
+ resultDate += this.pad(offsetDate.getMinutes()) + ":";
2922
+ resultDate += this.pad(offsetDate.getSeconds()) + " ";
2932
2923
  resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
2933
2924
  }
2934
2925
  }
@@ -3303,6 +3294,7 @@
3303
3294
  }], null, null);
3304
3295
  })();
3305
3296
 
3297
+ // tslint:disable:variable-name
3306
3298
  var AddressModel = /** @class */ (function () {
3307
3299
  function AddressModel() {
3308
3300
  this.AddressLine1 = '';
@@ -3613,6 +3605,7 @@
3613
3605
  __metadata("design:type", Array)
3614
3606
  ], CaseEventTrigger.prototype, "wizard_pages", void 0);
3615
3607
 
3608
+ // tslint:disable:variable-name
3616
3609
  var CaseViewEvent = /** @class */ (function () {
3617
3610
  function CaseViewEvent() {
3618
3611
  }
@@ -3657,6 +3650,7 @@
3657
3650
  __metadata("design:type", Array)
3658
3651
  ], CaseType.prototype, "case_fields", void 0);
3659
3652
 
3653
+ // tslint:disable:variable-name
3660
3654
  var EventCaseField = /** @class */ (function () {
3661
3655
  function EventCaseField() {
3662
3656
  }
@@ -3707,6 +3701,7 @@
3707
3701
  return CasePrintDocument;
3708
3702
  }());
3709
3703
 
3704
+ // tslint:disable:variable-name
3710
3705
  var HRef = /** @class */ (function () {
3711
3706
  function HRef() {
3712
3707
  }
@@ -3744,25 +3739,25 @@
3744
3739
  OrganisationConverter.toSimpleAddress = function (organisationModel) {
3745
3740
  var simpleAddress = '';
3746
3741
  if (organisationModel.addressLine1) {
3747
- simpleAddress += organisationModel.addressLine1 + '<br>';
3742
+ simpleAddress += organisationModel.addressLine1 + "<br>";
3748
3743
  }
3749
3744
  if (organisationModel.addressLine2) {
3750
- simpleAddress += organisationModel.addressLine2 + '<br>';
3745
+ simpleAddress += organisationModel.addressLine2 + "<br>";
3751
3746
  }
3752
3747
  if (organisationModel.addressLine3) {
3753
- simpleAddress += organisationModel.addressLine3 + '<br>';
3748
+ simpleAddress += organisationModel.addressLine3 + "<br>";
3754
3749
  }
3755
3750
  if (organisationModel.townCity) {
3756
- simpleAddress += organisationModel.townCity + '<br>';
3751
+ simpleAddress += organisationModel.townCity + "<br>";
3757
3752
  }
3758
3753
  if (organisationModel.county) {
3759
- simpleAddress += organisationModel.county + '<br>';
3754
+ simpleAddress += organisationModel.county + "<br>";
3760
3755
  }
3761
3756
  if (organisationModel.country) {
3762
- simpleAddress += organisationModel.country + '<br>';
3757
+ simpleAddress += organisationModel.country + "<br>";
3763
3758
  }
3764
3759
  if (organisationModel.postCode) {
3765
- simpleAddress += organisationModel.postCode + '<br>';
3760
+ simpleAddress += organisationModel.postCode + "<br>";
3766
3761
  }
3767
3762
  return simpleAddress;
3768
3763
  };
@@ -3875,12 +3870,14 @@
3875
3870
  __metadata("design:type", Array)
3876
3871
  ], SearchResultView.prototype, "results", void 0);
3877
3872
 
3873
+ // tslint:disable:variable-name
3878
3874
  var CaseDetails = /** @class */ (function () {
3879
3875
  function CaseDetails() {
3880
3876
  }
3881
3877
  return CaseDetails;
3882
3878
  }());
3883
3879
 
3880
+ // tslint:disable:variable-name
3884
3881
  var CaseEventData = /** @class */ (function () {
3885
3882
  function CaseEventData() {
3886
3883
  }
@@ -3888,12 +3885,7 @@
3888
3885
  }());
3889
3886
 
3890
3887
  var WorkbasketInputModel = /** @class */ (function () {
3891
- function WorkbasketInputModel(label, order, field, metadata, display_context_parameter) {
3892
- this.label = label;
3893
- this.order = order;
3894
- this.field = field;
3895
- this.metadata = metadata;
3896
- this.display_context_parameter = display_context_parameter;
3888
+ function WorkbasketInputModel() {
3897
3889
  }
3898
3890
  return WorkbasketInputModel;
3899
3891
  }());
@@ -3941,9 +3933,9 @@
3941
3933
  });
3942
3934
  return valueMap;
3943
3935
  };
3944
- FieldsUtils.getType = function (elem) {
3945
- return Object.prototype.toString.call(elem).slice(8, -1);
3946
- };
3936
+ // public static getType(elem: any): string {
3937
+ // return Object.prototype.toString.call(elem).slice(8, -1);
3938
+ // }
3947
3939
  FieldsUtils.isObject = function (elem) {
3948
3940
  return typeof elem === 'object' && elem !== null;
3949
3941
  };
@@ -4452,6 +4444,7 @@
4452
4444
  var elements = (result[field.id] || field.value);
4453
4445
  if (elements) {
4454
4446
  elements.forEach(function (elem) {
4447
+ // tslint:disable-next-line:switch-default
4455
4448
  switch (field.field_type.collection_field_type.type) {
4456
4449
  case 'MoneyGBP': {
4457
4450
  elem.value = FieldsUtils.getMoneyGBP(elem.value);
@@ -4501,7 +4494,6 @@
4501
4494
  if (!condition) {
4502
4495
  return null;
4503
4496
  }
4504
- ;
4505
4497
  condition = condition.replace(/CONTAINS/g, ' CONTAINS');
4506
4498
  return peg.parse(condition.trim(), {});
4507
4499
  };
@@ -4515,14 +4507,12 @@
4515
4507
  if (!conditions || conditions.length === 0) {
4516
4508
  return true;
4517
4509
  }
4518
- ;
4519
4510
  var validJoinComparators = ['AND', 'OR'];
4520
- var result = conditions.reduce(function (accumulator, condition, index) {
4511
+ return conditions.reduce(function (accumulator, condition, index) {
4521
4512
  var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
4522
4513
  if (isJoinComparator(condition)) {
4523
4514
  return accumulator;
4524
4515
  }
4525
- ;
4526
4516
  var currentConditionResult = true;
4527
4517
  if (Array.isArray(condition)) {
4528
4518
  currentConditionResult = _this.evaluate(fields, condition);
@@ -4539,9 +4529,9 @@
4539
4529
  }
4540
4530
  return currentConditionResult;
4541
4531
  }, true);
4542
- return result;
4543
4532
  };
4544
4533
  ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
4534
+ // tslint:disable-next-line:switch-default
4545
4535
  switch (comparator) {
4546
4536
  case 'OR': return leftResult || rightResult;
4547
4537
  case 'AND': return leftResult && rightResult;
@@ -4631,8 +4621,7 @@
4631
4621
  }
4632
4622
  };
4633
4623
  ConditionParser.unquoted = function (str) {
4634
- var res = str.replace(/^"|"$/g, '');
4635
- return res;
4624
+ return str.replace(/^"|"$/g, '');
4636
4625
  };
4637
4626
  ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
4638
4627
  if (!fields) {
@@ -4746,8 +4735,8 @@
4746
4735
  if (originalCondition.indexOf(condition.fieldReference) > -1) {
4747
4736
  if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
4748
4737
  this.processedList.push(condition.fieldReference);
4749
- var regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
4750
- return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
4738
+ var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
4739
+ return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
4751
4740
  }
4752
4741
  else {
4753
4742
  return originalCondition;
@@ -4826,6 +4815,7 @@
4826
4815
  }
4827
4816
  // Consider what type of field this is.
4828
4817
  var ft = caseField.field_type;
4818
+ // tslint:disable-next-line:switch-default
4829
4819
  switch (ft.type) {
4830
4820
  case 'Collection':
4831
4821
  if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
@@ -5316,14 +5306,14 @@
5316
5306
  var formFields = form.getRawValue();
5317
5307
  var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
5318
5308
  currentPage.wizard_page_fields.forEach(function (wpf) {
5319
- var case_field = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
5320
- if (_this.hasShowConditionField(case_field, formFields)) {
5321
- var condition = new ShowCondition(case_field.show_condition);
5322
- if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(case_field))) {
5323
- _this.resetField(form, case_field);
5309
+ var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
5310
+ if (_this.hasShowConditionField(caseField, formFields)) {
5311
+ var condition = new ShowCondition(caseField.show_condition);
5312
+ if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
5313
+ _this.resetField(form, caseField);
5324
5314
  }
5325
5315
  }
5326
- _this.retainHiddenValueByFieldType(case_field, form);
5316
+ _this.retainHiddenValueByFieldType(caseField, form);
5327
5317
  });
5328
5318
  };
5329
5319
  FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
@@ -5354,13 +5344,13 @@
5354
5344
  FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
5355
5345
  return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
5356
5346
  };
5357
- FieldsPurger.prototype.hasShowConditionField = function (case_field, formFields) {
5358
- return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
5347
+ FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
5348
+ return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
5359
5349
  };
5360
- FieldsPurger.prototype.getShowConditionKey = function (show_condition) {
5350
+ FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
5361
5351
  // Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
5362
5352
  // Also need to allow for conditions specified using the "CONTAINS" keyword
5363
- return show_condition.split(/!=|=|CONTAINS/)[0];
5353
+ return showCondition.split(/!=|=|CONTAINS/)[0];
5364
5354
  };
5365
5355
  FieldsPurger.prototype.resetField = function (form, field) {
5366
5356
  var e_1, _a;
@@ -5456,8 +5446,8 @@
5456
5446
  FieldsPurger.prototype.resetPage = function (form, wizardPage) {
5457
5447
  var _this = this;
5458
5448
  wizardPage.wizard_page_fields.forEach(function (wpf) {
5459
- var case_field = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5460
- _this.resetField(form, case_field);
5449
+ var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
5450
+ _this.resetField(form, caseField);
5461
5451
  });
5462
5452
  };
5463
5453
  FieldsPurger.prototype.getType = function (elem) {
@@ -5467,8 +5457,8 @@
5467
5457
  return this.getType(elem) === 'Object';
5468
5458
  };
5469
5459
  // TODO: call isReadOnly on CaseFields once we make it available
5470
- FieldsPurger.prototype.isReadonly = function (case_field) {
5471
- return case_field.display_context.toUpperCase() === 'READONLY';
5460
+ FieldsPurger.prototype.isReadonly = function (caseField) {
5461
+ return caseField.display_context.toUpperCase() === 'READONLY';
5472
5462
  };
5473
5463
  /**
5474
5464
  * Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
@@ -5655,6 +5645,7 @@
5655
5645
  return;
5656
5646
  }
5657
5647
  caseFields.forEach(function (caseField) {
5648
+ // tslint:disable-next-line:switch-default
5658
5649
  switch (caseField.field_type.type) {
5659
5650
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
5660
5651
  _this.convertArrayToDynamicListOutput(caseField, data);
@@ -6363,7 +6354,6 @@
6363
6354
  });
6364
6355
  }
6365
6356
  }
6366
- ;
6367
6357
  });
6368
6358
  }
6369
6359
  };
@@ -6802,7 +6792,7 @@
6802
6792
  return addressModel;
6803
6793
  };
6804
6794
  AddressParser.prototype.parseAddressLine1 = function (classification, address) {
6805
- var addressLine = '';
6795
+ var addressLine;
6806
6796
  if (classification === AddressType.RD06) {
6807
6797
  addressLine =
6808
6798
  address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
@@ -6815,7 +6805,7 @@
6815
6805
  return this.removeNonAddressValues(addressLine);
6816
6806
  };
6817
6807
  AddressParser.prototype.parseAddressLine2 = function (classification, address) {
6818
- var addressLine = '';
6808
+ var addressLine;
6819
6809
  if (classification === AddressType.RD06) {
6820
6810
  addressLine = address.BUILDING_NAME + " ";
6821
6811
  }
@@ -6826,7 +6816,7 @@
6826
6816
  return this.removeNonAddressValues(addressLine);
6827
6817
  };
6828
6818
  AddressParser.prototype.parseAddressLine3 = function (classification, address) {
6829
- var addressLine = '';
6819
+ var addressLine;
6830
6820
  if (classification === AddressType.RD06) {
6831
6821
  addressLine =
6832
6822
  address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
@@ -6854,7 +6844,7 @@
6854
6844
  return value.replace(new RegExp('^,', 'gi'), '');
6855
6845
  };
6856
6846
  AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
6857
- return value ? ', ' + value : value;
6847
+ return value ? ", " + value : value;
6858
6848
  };
6859
6849
  return AddressParser;
6860
6850
  }());
@@ -7104,7 +7094,7 @@
7104
7094
  if (flagType) {
7105
7095
  url += "?flag-type=" + flagType;
7106
7096
  }
7107
- if (welshRequired != null) {
7097
+ if (typeof welshRequired === 'boolean') {
7108
7098
  // Check if flag-type has been added to the query string; if so, append welsh-required with '&'
7109
7099
  url.indexOf('?') > -1 ? url += '&' : url += '?';
7110
7100
  welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
@@ -7710,18 +7700,6 @@
7710
7700
  }], null, null);
7711
7701
  })();
7712
7702
 
7713
- var HasLoadingState = /** @class */ (function () {
7714
- function HasLoadingState() {
7715
- }
7716
- Object.defineProperty(HasLoadingState.prototype, "isLoading", {
7717
- get: function () {
7718
- return;
7719
- },
7720
- enumerable: false,
7721
- configurable: true
7722
- });
7723
- return HasLoadingState;
7724
- }());
7725
7703
  var LoadingService = /** @class */ (function () {
7726
7704
  function LoadingService() {
7727
7705
  this.registered = new Map();
@@ -7746,7 +7724,7 @@
7746
7724
  };
7747
7725
  LoadingService.prototype.generateToken = function () {
7748
7726
  var timestamp = window.performance.now();
7749
- return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
7727
+ return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
7750
7728
  };
7751
7729
  return LoadingService;
7752
7730
  }());
@@ -7767,10 +7745,7 @@
7767
7745
  }
7768
7746
  SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
7769
7747
  var _this = this;
7770
- var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
7771
- + ("/jurisdictions/" + jurisdictionId)
7772
- + ("/case-types/" + caseTypeId)
7773
- + "/cases";
7748
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
7774
7749
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7775
7750
  var loadingToken = this.loadingService.register();
7776
7751
  return this.httpService
@@ -7779,15 +7754,14 @@
7779
7754
  };
7780
7755
  SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
7781
7756
  var _this = this;
7782
- var url = this.appConfig.getCaseDataUrl() +
7783
- ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7757
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7784
7758
  var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
7785
7759
  var loadingToken = this.loadingService.register();
7786
7760
  return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
7787
7761
  };
7788
7762
  SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
7789
7763
  var _this = this;
7790
- var url = this.appConfig.getCaseDataUrl() + ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
7764
+ var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
7791
7765
  var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
7792
7766
  var body = {
7793
7767
  sort: sort,
@@ -7832,9 +7806,8 @@
7832
7806
  return SearchService;
7833
7807
  }());
7834
7808
  SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
7835
- SearchService.VIEW_SEARCH = 'SEARCH';
7809
+ // public static readonly VIEW_SEARCH = 'SEARCH';
7836
7810
  SearchService.VIEW_WORKBASKET = 'WORKBASKET';
7837
- SearchService.FIELD_PREFIX = 'case.';
7838
7811
  SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
7839
7812
  SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
7840
7813
  (function () {
@@ -7964,17 +7937,12 @@
7964
7937
  this.appConfig = appConfig;
7965
7938
  }
7966
7939
  DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
7967
- var url = this.appConfig.getApiUrl()
7968
- + "/caseworkers/:uid"
7969
- + ("/jurisdictions/" + jurisdictionId)
7970
- + ("/case-types?access=" + access);
7940
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
7971
7941
  return this.http
7972
7942
  .get(url).pipe(operators.map(function (response) { return response; }));
7973
7943
  };
7974
7944
  DefinitionsService.prototype.getJurisdictions = function (access) {
7975
- var url = this.appConfig.getApiUrl()
7976
- + "/caseworkers/:uid"
7977
- + ("/jurisdictions?access=" + access);
7945
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
7978
7946
  return this.http
7979
7947
  .get(url)
7980
7948
  .pipe(operators.map(function (response) { return response; }));
@@ -8056,8 +8024,8 @@
8056
8024
  compare: function (a, b) {
8057
8025
  var fieldA = a.case_fields[fieldId];
8058
8026
  var fieldB = b.case_fields[fieldId];
8059
- fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
8060
- fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
8027
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
8028
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
8061
8029
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8062
8030
  }
8063
8031
  };
@@ -8067,8 +8035,8 @@
8067
8035
  compare: function (a, b) {
8068
8036
  var fieldA = a.case_fields[fieldId];
8069
8037
  var fieldB = b.case_fields[fieldId];
8070
- fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
8071
- fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
8038
+ fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
8039
+ fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
8072
8040
  return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
8073
8041
  }
8074
8042
  };
@@ -8326,31 +8294,31 @@
8326
8294
  };
8327
8295
  WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
8328
8296
  var caseFieldIds = override.complex_field_element_id.split('.');
8329
- var case_field_leaf;
8297
+ var caseFieldLeaf;
8330
8298
  var children = this.getCaseFieldChildren(caseField);
8331
8299
  if (children.length > 0) {
8332
8300
  var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
8333
- case_field_leaf = this.getCaseFieldLeaf(tail, children);
8301
+ caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
8334
8302
  }
8335
8303
  else {
8336
- case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8304
+ caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
8337
8305
  }
8338
8306
  if (override.display_context !== 'HIDDEN') {
8339
- case_field_leaf.hidden = false;
8340
- case_field_leaf.display_context = override.display_context;
8307
+ caseFieldLeaf.hidden = false;
8308
+ caseFieldLeaf.display_context = override.display_context;
8341
8309
  if (override.label && override.label.length > 0) {
8342
- case_field_leaf.label = override.label;
8310
+ caseFieldLeaf.label = override.label;
8343
8311
  }
8344
8312
  if (override.hint_text && override.hint_text.length > 0) {
8345
- case_field_leaf.hint_text = override.hint_text;
8313
+ caseFieldLeaf.hint_text = override.hint_text;
8346
8314
  }
8347
8315
  if (override.show_condition && override.show_condition.length > 0) {
8348
- case_field_leaf.show_condition = override.show_condition;
8316
+ caseFieldLeaf.show_condition = override.show_condition;
8349
8317
  }
8350
8318
  }
8351
8319
  else {
8352
- case_field_leaf.hidden = true;
8353
- case_field_leaf.display_context = override.display_context;
8320
+ caseFieldLeaf.hidden = true;
8321
+ caseFieldLeaf.display_context = override.display_context;
8354
8322
  }
8355
8323
  };
8356
8324
  WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
@@ -8364,7 +8332,7 @@
8364
8332
  });
8365
8333
  };
8366
8334
  WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
8367
- return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
8335
+ return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
8368
8336
  };
8369
8337
  WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
8370
8338
  var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
@@ -8421,223 +8389,13 @@
8421
8389
  }], null, null);
8422
8390
  })();
8423
8391
 
8424
- var MULTIPLE_TASKS_FOUND = 'More than one task found!';
8425
- var WorkAllocationService = /** @class */ (function () {
8426
- function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
8427
- this.http = http;
8428
- this.appConfig = appConfig;
8429
- this.errorService = errorService;
8430
- this.alertService = alertService;
8431
- this.sessionStorageService = sessionStorageService;
8432
- // Check to see if work allocation is enabled
8433
- }
8434
- /**
8435
- * Call the API to get tasks matching the search criteria.
8436
- * @param searchRequest The search parameters that specify which tasks to match.
8437
- */
8438
- WorkAllocationService.prototype.searchTasks = function (searchRequest) {
8439
- var _this = this;
8440
- // Do not need to check if WA enabled as parent method will do that
8441
- var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
8442
- return this.http
8443
- .post(url, { searchRequest: searchRequest }, null, false)
8444
- .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
8445
- _this.errorService.setError(error);
8446
- // explicitly eat away 401 error and 400 error
8447
- if (error && error.status && (error.status === 401 || error.status === 400)) {
8448
- // do nothing
8449
- console.log('error status 401 or 400', error);
8450
- }
8451
- else {
8452
- return rxjs.throwError(error);
8453
- }
8454
- }));
8455
- };
8456
- WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
8457
- this.features = this.appConfig.getWAServiceConfig();
8458
- var enabled = false;
8459
- if (!jurisdiction || !caseType) {
8460
- var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
8461
- jurisdiction = caseInfo.jurisdiction;
8462
- caseType = caseInfo.caseType;
8463
- }
8464
- if (!this.features || !this.features.configurations) {
8465
- return false;
8466
- }
8467
- this.features.configurations.forEach(function (serviceConfig) {
8468
- if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
8469
- enabled = true;
8470
- }
8471
- });
8472
- return enabled;
8473
- };
8474
- /**
8475
- * Call the API to assign a task.
8476
- * @param taskId specifies which task should be assigned.
8477
- * @param userId specifies the user the task should be assigned to.
8478
- */
8479
- WorkAllocationService.prototype.assignTask = function (taskId, userId) {
8480
- var _this = this;
8481
- if (!this.isWAEnabled()) {
8482
- return rxjs.of(null);
8483
- }
8484
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
8485
- return this.http
8486
- .post(url, { userId: userId })
8487
- .pipe(operators.catchError(function (error) {
8488
- _this.errorService.setError(error);
8489
- return rxjs.throwError(error);
8490
- }));
8491
- };
8492
- /**
8493
- * Call the API to complete a task.
8494
- * @param taskId specifies which task should be completed.
8495
- */
8496
- WorkAllocationService.prototype.completeTask = function (taskId) {
8497
- var _this = this;
8498
- if (!this.isWAEnabled()) {
8499
- return rxjs.of(null);
8500
- }
8501
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8502
- return this.http
8503
- .post(url, {})
8504
- .pipe(operators.catchError(function (error) {
8505
- _this.errorService.setError(error);
8506
- // this will subscribe to get the user details and decide whether to display an error message
8507
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8508
- _this.handleTaskCompletionError(response);
8509
- });
8510
- return rxjs.throwError(error);
8511
- }));
8512
- };
8513
- /**
8514
- * Call the API to assign and complete a task.
8515
- * @param taskId specifies which task should be completed.
8516
- */
8517
- WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
8518
- var _this = this;
8519
- if (!this.isWAEnabled()) {
8520
- return rxjs.of(null);
8521
- }
8522
- var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
8523
- return this.http
8524
- .post(url, {
8525
- completion_options: {
8526
- assign_and_complete: true
8527
- }
8528
- })
8529
- .pipe(operators.catchError(function (error) {
8530
- _this.errorService.setError(error);
8531
- // this will subscribe to get the user details and decide whether to display an error message
8532
- _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
8533
- _this.handleTaskCompletionError(response);
8534
- });
8535
- return rxjs.throwError(error);
8536
- }));
8537
- };
8538
- /**
8539
- * Handles the response from the observable to get the user details when task is completed.
8540
- * @param response is the response given from the observable which contains the user detaild.
8541
- */
8542
- WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
8543
- var userDetails = response;
8544
- if (this.userIsCaseworker(userDetails.userInfo.roles)) {
8545
- // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
8546
- this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
8547
- this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
8548
- }
8549
- };
8550
- /**
8551
- * Returns true if the user's role is equivalent to a caseworker.
8552
- * @param roles is the list of roles found from the current user.
8553
- */
8554
- WorkAllocationService.prototype.userIsCaseworker = function (roles) {
8555
- var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
8556
- // When/if lib & target permanently change to es2016, replace indexOf with includes
8557
- return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
8558
- || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
8559
- };
8560
- /**
8561
- * Look for open tasks for a case and event combination. There are 5 possible scenarios:
8562
- * 1. No tasks found => Success.
8563
- * 2. One task found => Mark as done => Success.
8564
- * 3. One task found => Mark as done throws error => Failure.
8565
- * 4. More than one task found => Failure.
8566
- * 5. Search call throws an error => Failure.
8567
- * @param ccdId The ID of the case to find tasks for.
8568
- * @param eventId The ID of the event to find tasks for.
8569
- */
8570
- WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
8571
- var _this = this;
8572
- if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
8573
- return rxjs.of(null);
8574
- }
8575
- var taskSearchParameter = {
8576
- ccdId: ccdId,
8577
- eventId: eventId,
8578
- jurisdiction: jurisdiction,
8579
- caseTypeId: caseTypeId
8580
- };
8581
- return this.searchTasks(taskSearchParameter)
8582
- .pipe(operators.map(function (response) {
8583
- var tasks = response.tasks;
8584
- if (tasks && tasks.length > 0) {
8585
- if (tasks.length === 1) {
8586
- _this.completeTask(tasks[0].id).subscribe();
8587
- }
8588
- else {
8589
- // This is a problem. Throw an appropriate error.
8590
- throw new Error(MULTIPLE_TASKS_FOUND);
8591
- }
8592
- }
8593
- return true; // All good. Nothing to see here.
8594
- }), operators.catchError(function (error) {
8595
- // Simply rethrow it.
8596
- return rxjs.throwError(error);
8597
- }));
8598
- };
8599
- /**
8600
- * Return tasks for case and event.
8601
- */
8602
- WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
8603
- var defaultPayload = {
8604
- task_required_for_event: false,
8605
- tasks: []
8606
- };
8607
- if (!this.isWAEnabled()) {
8608
- return rxjs.of(defaultPayload);
8609
- }
8610
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
8611
- };
8612
- /**
8613
- * Call the API to get a task
8614
- */
8615
- WorkAllocationService.prototype.getTask = function (taskId) {
8616
- if (!this.isWAEnabled()) {
8617
- return rxjs.of({ task: null });
8618
- }
8619
- return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
8620
- };
8621
- return WorkAllocationService;
8622
- }());
8623
- WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
8624
- WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
8625
- WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
8626
- WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
8627
- (function () {
8628
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
8629
- type: i0.Injectable
8630
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
8631
- })();
8632
-
8633
8392
  var CasesService = /** @class */ (function () {
8634
- function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
8393
+ function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
8635
8394
  this.http = http;
8636
8395
  this.appConfig = appConfig;
8637
8396
  this.orderService = orderService;
8638
8397
  this.errorService = errorService;
8639
8398
  this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
8640
- this.workAllocationService = workAllocationService;
8641
8399
  this.loadingService = loadingService;
8642
8400
  this.sessionStorageService = sessionStorageService;
8643
8401
  this.get = this.getCaseView;
@@ -8656,11 +8414,7 @@
8656
8414
  };
8657
8415
  CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
8658
8416
  var _this = this;
8659
- var url = this.appConfig.getApiUrl()
8660
- + "/caseworkers/:uid"
8661
- + ("/jurisdictions/" + jurisdictionId)
8662
- + ("/case-types/" + caseTypeId)
8663
- + ("/cases/" + caseId);
8417
+ var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
8664
8418
  var loadingToken = this.loadingService.register();
8665
8419
  return this.http
8666
8420
  .get(url)
@@ -8712,7 +8466,7 @@
8712
8466
  CasesService.prototype.createEvent = function (caseDetails, eventData) {
8713
8467
  var _this = this;
8714
8468
  var caseId = caseDetails.case_id;
8715
- var url = this.appConfig.getCaseDataUrl() + ("/cases/" + caseId + "/events");
8469
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
8716
8470
  var headers = new i1$2.HttpHeaders()
8717
8471
  .set('experimental', 'true')
8718
8472
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
@@ -8726,9 +8480,8 @@
8726
8480
  };
8727
8481
  CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
8728
8482
  var _this = this;
8729
- var pageIdString = pageId ? '?pageId=' + pageId : '';
8730
- var url = this.appConfig.getCaseDataUrl()
8731
- + ("/case-types/" + ctid + "/validate" + pageIdString);
8483
+ var pageIdString = pageId ? "?pageId=" + pageId : '';
8484
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
8732
8485
  var headers = new i1$2.HttpHeaders()
8733
8486
  .set('experimental', 'true')
8734
8487
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
@@ -8746,8 +8499,7 @@
8746
8499
  if (eventData.ignore_warning) {
8747
8500
  ignoreWarning = 'true';
8748
8501
  }
8749
- var url = this.appConfig.getCaseDataUrl()
8750
- + ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
8502
+ var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
8751
8503
  var headers = new i1$2.HttpHeaders()
8752
8504
  .set('experimental', 'true')
8753
8505
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
@@ -8761,9 +8513,7 @@
8761
8513
  };
8762
8514
  CasesService.prototype.getPrintDocuments = function (caseId) {
8763
8515
  var _this = this;
8764
- var url = this.appConfig.getCaseDataUrl()
8765
- + ("/cases/" + caseId)
8766
- + "/documents";
8516
+ var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
8767
8517
  var headers = new i1$2.HttpHeaders()
8768
8518
  .set('experimental', 'true')
8769
8519
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
@@ -8872,12 +8622,12 @@
8872
8622
  CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
8873
8623
  CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
8874
8624
  CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
8875
- CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(WorkAllocationService), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8625
+ CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
8876
8626
  CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8877
8627
  (function () {
8878
8628
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
8879
8629
  type: i0.Injectable
8880
- }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8630
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
8881
8631
  })();
8882
8632
 
8883
8633
  var EventTriggerService = /** @class */ (function () {
@@ -9499,7 +9249,7 @@
9499
9249
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
9500
9250
  var formFields = editForm.getRawValue();
9501
9251
  var condition = ShowCondition.getInstance(caseField.show_condition);
9502
- if (path && path.indexOf('_' + caseField.id + '_') === -1) {
9252
+ if (path && path.indexOf("_" + caseField.id + "_") === -1) {
9503
9253
  path = "" + path + caseField.id;
9504
9254
  }
9505
9255
  return !condition.match(formFields.data, path);
@@ -9531,6 +9281,215 @@
9531
9281
  }], function () { return [{ type: CaseFieldService }]; }, null);
9532
9282
  })();
9533
9283
 
9284
+ var MULTIPLE_TASKS_FOUND = 'More than one task found!';
9285
+ var WorkAllocationService = /** @class */ (function () {
9286
+ function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
9287
+ this.http = http;
9288
+ this.appConfig = appConfig;
9289
+ this.errorService = errorService;
9290
+ this.alertService = alertService;
9291
+ this.sessionStorageService = sessionStorageService;
9292
+ // Check to see if work allocation is enabled
9293
+ }
9294
+ /**
9295
+ * Call the API to get tasks matching the search criteria.
9296
+ * @param searchRequest The search parameters that specify which tasks to match.
9297
+ */
9298
+ WorkAllocationService.prototype.searchTasks = function (searchRequest) {
9299
+ var _this = this;
9300
+ // Do not need to check if WA enabled as parent method will do that
9301
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
9302
+ return this.http
9303
+ .post(url, { searchRequest: searchRequest }, null, false)
9304
+ .pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
9305
+ _this.errorService.setError(error);
9306
+ // explicitly eat away 401 error and 400 error
9307
+ if (error && error.status && (error.status === 401 || error.status === 400)) {
9308
+ // do nothing
9309
+ console.log('error status 401 or 400', error);
9310
+ }
9311
+ else {
9312
+ return rxjs.throwError(error);
9313
+ }
9314
+ }));
9315
+ };
9316
+ WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
9317
+ this.features = this.appConfig.getWAServiceConfig();
9318
+ var enabled = false;
9319
+ if (!jurisdiction || !caseType) {
9320
+ var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
9321
+ jurisdiction = caseInfo.jurisdiction;
9322
+ caseType = caseInfo.caseType;
9323
+ }
9324
+ if (!this.features || !this.features.configurations) {
9325
+ return false;
9326
+ }
9327
+ this.features.configurations.forEach(function (serviceConfig) {
9328
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
9329
+ enabled = true;
9330
+ }
9331
+ });
9332
+ return enabled;
9333
+ };
9334
+ /**
9335
+ * Call the API to assign a task.
9336
+ * @param taskId specifies which task should be assigned.
9337
+ * @param userId specifies the user the task should be assigned to.
9338
+ */
9339
+ WorkAllocationService.prototype.assignTask = function (taskId, userId) {
9340
+ var _this = this;
9341
+ if (!this.isWAEnabled()) {
9342
+ return rxjs.of(null);
9343
+ }
9344
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
9345
+ return this.http
9346
+ .post(url, { userId: userId })
9347
+ .pipe(operators.catchError(function (error) {
9348
+ _this.errorService.setError(error);
9349
+ return rxjs.throwError(error);
9350
+ }));
9351
+ };
9352
+ /**
9353
+ * Call the API to complete a task.
9354
+ * @param taskId specifies which task should be completed.
9355
+ */
9356
+ WorkAllocationService.prototype.completeTask = function (taskId) {
9357
+ var _this = this;
9358
+ if (!this.isWAEnabled()) {
9359
+ return rxjs.of(null);
9360
+ }
9361
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9362
+ return this.http
9363
+ .post(url, {})
9364
+ .pipe(operators.catchError(function (error) {
9365
+ _this.errorService.setError(error);
9366
+ // this will subscribe to get the user details and decide whether to display an error message
9367
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9368
+ _this.handleTaskCompletionError(response);
9369
+ });
9370
+ return rxjs.throwError(error);
9371
+ }));
9372
+ };
9373
+ /**
9374
+ * Call the API to assign and complete a task.
9375
+ * @param taskId specifies which task should be completed.
9376
+ */
9377
+ WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
9378
+ var _this = this;
9379
+ if (!this.isWAEnabled()) {
9380
+ return rxjs.of(null);
9381
+ }
9382
+ var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
9383
+ return this.http
9384
+ .post(url, {
9385
+ completion_options: {
9386
+ assign_and_complete: true
9387
+ }
9388
+ })
9389
+ .pipe(operators.catchError(function (error) {
9390
+ _this.errorService.setError(error);
9391
+ // this will subscribe to get the user details and decide whether to display an error message
9392
+ _this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
9393
+ _this.handleTaskCompletionError(response);
9394
+ });
9395
+ return rxjs.throwError(error);
9396
+ }));
9397
+ };
9398
+ /**
9399
+ * Handles the response from the observable to get the user details when task is completed.
9400
+ * @param response is the response given from the observable which contains the user detaild.
9401
+ */
9402
+ WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
9403
+ var userDetails = response;
9404
+ if (this.userIsCaseworker(userDetails.userInfo.roles)) {
9405
+ // when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
9406
+ this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
9407
+ this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
9408
+ }
9409
+ };
9410
+ /**
9411
+ * Returns true if the user's role is equivalent to a caseworker.
9412
+ * @param roles is the list of roles found from the current user.
9413
+ */
9414
+ WorkAllocationService.prototype.userIsCaseworker = function (roles) {
9415
+ var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
9416
+ // When/if lib & target permanently change to es2016, replace indexOf with includes
9417
+ return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
9418
+ || (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
9419
+ };
9420
+ /**
9421
+ * Look for open tasks for a case and event combination. There are 5 possible scenarios:
9422
+ * 1. No tasks found => Success.
9423
+ * 2. One task found => Mark as done => Success.
9424
+ * 3. One task found => Mark as done throws error => Failure.
9425
+ * 4. More than one task found => Failure.
9426
+ * 5. Search call throws an error => Failure.
9427
+ * @param ccdId The ID of the case to find tasks for.
9428
+ * @param eventId The ID of the event to find tasks for.
9429
+ */
9430
+ WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
9431
+ var _this = this;
9432
+ if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
9433
+ return rxjs.of(null);
9434
+ }
9435
+ var taskSearchParameter = {
9436
+ ccdId: ccdId,
9437
+ eventId: eventId,
9438
+ jurisdiction: jurisdiction,
9439
+ caseTypeId: caseTypeId
9440
+ };
9441
+ return this.searchTasks(taskSearchParameter)
9442
+ .pipe(operators.map(function (response) {
9443
+ var tasks = response.tasks;
9444
+ if (tasks && tasks.length > 0) {
9445
+ if (tasks.length === 1) {
9446
+ _this.completeTask(tasks[0].id).subscribe();
9447
+ }
9448
+ else {
9449
+ // This is a problem. Throw an appropriate error.
9450
+ throw new Error(MULTIPLE_TASKS_FOUND);
9451
+ }
9452
+ }
9453
+ return true; // All good. Nothing to see here.
9454
+ }), operators.catchError(function (error) {
9455
+ // Simply rethrow it.
9456
+ return rxjs.throwError(error);
9457
+ }));
9458
+ };
9459
+ /**
9460
+ * Return tasks for case and event.
9461
+ */
9462
+ WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
9463
+ var defaultPayload = {
9464
+ task_required_for_event: false,
9465
+ tasks: []
9466
+ };
9467
+ if (!this.isWAEnabled()) {
9468
+ return rxjs.of(defaultPayload);
9469
+ }
9470
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
9471
+ };
9472
+ /**
9473
+ * Call the API to get a task
9474
+ */
9475
+ WorkAllocationService.prototype.getTask = function (taskId) {
9476
+ if (!this.isWAEnabled()) {
9477
+ return rxjs.of({ task: null });
9478
+ }
9479
+ return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
9480
+ };
9481
+ return WorkAllocationService;
9482
+ }());
9483
+ WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
9484
+ WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
9485
+ WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
9486
+ WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
9487
+ (function () {
9488
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
9489
+ type: i0.Injectable
9490
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
9491
+ })();
9492
+
9534
9493
  var CaseEditComponent = /** @class */ (function () {
9535
9494
  function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
9536
9495
  this.fb = fb;
@@ -10469,7 +10428,7 @@
10469
10428
  var label = casefield.label || 'Field';
10470
10429
  var id_1 = casefield.id;
10471
10430
  if (fieldElement['component'] && fieldElement['component'].parent) {
10472
- if (fieldElement['component'].idPrefix.indexOf('_' + id_1 + '_') === -1) {
10431
+ if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
10473
10432
  id_1 = "" + fieldElement['component'].idPrefix + id_1;
10474
10433
  }
10475
10434
  else {
@@ -10610,8 +10569,8 @@
10610
10569
  }
10611
10570
  };
10612
10571
  CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
10613
- this.ignoreWarning = errorContext.ignore_warning;
10614
- this.triggerText = errorContext.trigger_text;
10572
+ this.ignoreWarning = errorContext.ignoreWarning;
10573
+ this.triggerText = errorContext.triggerText;
10615
10574
  };
10616
10575
  CaseEditPageComponent.prototype.next = function () {
10617
10576
  this.resetErrors();
@@ -10957,12 +10916,12 @@
10957
10916
  CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
10958
10917
  var errorContext = new CallbackErrorsContext();
10959
10918
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
10960
- errorContext.ignore_warning = true;
10961
- errorContext.trigger_text = this.triggerTextIgnore;
10919
+ errorContext.ignoreWarning = true;
10920
+ errorContext.triggerText = this.triggerTextIgnore;
10962
10921
  }
10963
10922
  else {
10964
- errorContext.ignore_warning = false;
10965
- errorContext.trigger_text = this.triggerTextContinue;
10923
+ errorContext.ignoreWarning = false;
10924
+ errorContext.triggerText = this.triggerTextContinue;
10966
10925
  }
10967
10926
  return errorContext;
10968
10927
  };
@@ -11007,7 +10966,7 @@
11007
10966
 
11008
10967
  var AddressOption = /** @class */ (function () {
11009
10968
  function AddressOption(addressModel, description) {
11010
- if (description == null) {
10969
+ if (description === null) {
11011
10970
  this.value = addressModel;
11012
10971
  this.description = this.getDescription();
11013
10972
  }
@@ -11016,13 +10975,10 @@
11016
10975
  }
11017
10976
  }
11018
10977
  AddressOption.prototype.getDescription = function () {
11019
- return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
11020
- + this.prefixWithCommaIfPresent(this.value.AddressLine2)
11021
- + this.prefixWithCommaIfPresent(this.value.AddressLine3)
11022
- + ', ' + this.value.PostTown);
10978
+ return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
11023
10979
  };
11024
10980
  AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
11025
- return value ? ', ' + value : value;
10981
+ return value ? ", " + value : value;
11026
10982
  };
11027
10983
  AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
11028
10984
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -11166,7 +11122,7 @@
11166
11122
  this.missingPostcode = false;
11167
11123
  var postcode_1 = this.postcode.value;
11168
11124
  this.caseField.value = null;
11169
- this.addressOptions = new Array();
11125
+ this.addressOptions = [];
11170
11126
  this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
11171
11127
  result.forEach(function (address) {
11172
11128
  _this.addressOptions.push(new AddressOption(address, null));
@@ -11209,7 +11165,7 @@
11209
11165
  var hasAddress = false;
11210
11166
  if (address) {
11211
11167
  Object.keys(address).forEach(function (key) {
11212
- if (address[key] != null) {
11168
+ if (address[key] !== null) {
11213
11169
  hasAddress = true;
11214
11170
  }
11215
11171
  });
@@ -11232,7 +11188,7 @@
11232
11188
  };
11233
11189
  WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
11234
11190
  return numberOfAddresses === 0 ? 'No address found'
11235
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
11191
+ : "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
11236
11192
  };
11237
11193
  WriteAddressFieldComponent.prototype.setFormValue = function () {
11238
11194
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -12790,7 +12746,7 @@
12790
12746
  }
12791
12747
  };
12792
12748
  WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
12793
- var e_1, _a;
12749
+ var e_1, _c;
12794
12750
  if (isNew === void 0) { isNew = false; }
12795
12751
  /**
12796
12752
  * What follow is code that makes me want to go jump in the shower!
@@ -12826,8 +12782,8 @@
12826
12782
  if (!value) {
12827
12783
  value = new i2.FormGroup({});
12828
12784
  try {
12829
- for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
12830
- var key = _c.value;
12785
+ for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
12786
+ var key = _e.value;
12831
12787
  value.addControl(key, group.get(key));
12832
12788
  // DON'T remove the control for this key from the outer group or it
12833
12789
  // goes awry. So DON'T uncomment the below line!
@@ -12837,7 +12793,7 @@
12837
12793
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
12838
12794
  finally {
12839
12795
  try {
12840
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12796
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
12841
12797
  }
12842
12798
  finally { if (e_1) throw e_1.error; }
12843
12799
  }
@@ -12968,6 +12924,7 @@
12968
12924
  this.formArray.removeAt(index);
12969
12925
  };
12970
12926
  WriteCollectionFieldComponent.prototype.resetIds = function (index) {
12927
+ var _a, _b;
12971
12928
  for (var i = index; i < this.collItems.length; i++) {
12972
12929
  var counter = i + 1;
12973
12930
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -12977,16 +12934,15 @@
12977
12934
  && this.collItems[i].caseField.id === counter.toString()) {
12978
12935
  this.collItems[i].caseField.id = i.toString();
12979
12936
  }
12980
- var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12981
- var idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
12937
+ var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12938
+ var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
12982
12939
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
12983
12940
  this.collItems[i].prefix = idPrefix1;
12984
12941
  }
12985
- var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
12986
- && this.collItems[i].container['component'].idPrefix ? true : false;
12942
+ var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
12987
12943
  var idPrefix2 = idPrefixAvailable ?
12988
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12989
- var idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
12944
+ this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12945
+ var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
12990
12946
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
12991
12947
  this.collItems[i].container['component'].idPrefix = idPrefix2;
12992
12948
  }
@@ -14342,6 +14298,257 @@
14342
14298
  }], null, null);
14343
14299
  })();
14344
14300
 
14301
+ var FixedListPipe = /** @class */ (function () {
14302
+ function FixedListPipe() {
14303
+ }
14304
+ FixedListPipe.prototype.transform = function (value, items) {
14305
+ if (!!items) {
14306
+ var item = items.find(function (i) { return i.code === value; });
14307
+ return item ? item.label : FixedListPipe.EMPTY;
14308
+ }
14309
+ else {
14310
+ return FixedListPipe.EMPTY;
14311
+ }
14312
+ };
14313
+ return FixedListPipe;
14314
+ }());
14315
+ FixedListPipe.EMPTY = '';
14316
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14317
+ FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14318
+ (function () {
14319
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14320
+ type: i0.Pipe,
14321
+ args: [{
14322
+ name: 'ccdFixedList'
14323
+ }]
14324
+ }], null, null);
14325
+ })();
14326
+
14327
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
14328
+ if (rf & 1) {
14329
+ i0__namespace.ɵɵelementStart(0, "div");
14330
+ i0__namespace.ɵɵtext(1);
14331
+ i0__namespace.ɵɵpipe(2, "ccdFixedList");
14332
+ i0__namespace.ɵɵelementEnd();
14333
+ }
14334
+ if (rf & 2) {
14335
+ var value_r1 = ctx.$implicit;
14336
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14337
+ i0__namespace.ɵɵadvance(1);
14338
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
14339
+ }
14340
+ }
14341
+ var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14342
+ __extends(ReadDynamicMultiSelectListFieldComponent, _super);
14343
+ function ReadDynamicMultiSelectListFieldComponent() {
14344
+ return _super !== null && _super.apply(this, arguments) || this;
14345
+ }
14346
+ ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14347
+ /**
14348
+ *
14349
+ * Reassigning list_items from formatted_list when list_items is empty
14350
+ */
14351
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
14352
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14353
+ }
14354
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14355
+ this.caseField.value = this.caseField.formatted_value.value;
14356
+ }
14357
+ _super.prototype.ngOnInit.call(this);
14358
+ };
14359
+ return ReadDynamicMultiSelectListFieldComponent;
14360
+ }(AbstractFieldReadComponent));
14361
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
14362
+ ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
14363
+ if (rf & 1) {
14364
+ i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
14365
+ }
14366
+ if (rf & 2) {
14367
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
14368
+ }
14369
+ }, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
14370
+ var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
14371
+ (function () {
14372
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
14373
+ type: i0.Component,
14374
+ args: [{
14375
+ selector: 'ccd-read-dynamic-multi-select-list-field',
14376
+ templateUrl: './read-dynamic-multi-select-list-field.html',
14377
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
14378
+ }]
14379
+ }], null, null);
14380
+ })();
14381
+
14382
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
14383
+ if (rf & 1) {
14384
+ i0__namespace.ɵɵelementStart(0, "span", 5);
14385
+ i0__namespace.ɵɵtext(1);
14386
+ i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
14387
+ i0__namespace.ɵɵelementEnd();
14388
+ }
14389
+ if (rf & 2) {
14390
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14391
+ i0__namespace.ɵɵadvance(1);
14392
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
14393
+ }
14394
+ }
14395
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
14396
+ if (rf & 1) {
14397
+ i0__namespace.ɵɵelementStart(0, "span", 6);
14398
+ i0__namespace.ɵɵtext(1);
14399
+ i0__namespace.ɵɵelementEnd();
14400
+ }
14401
+ if (rf & 2) {
14402
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
14403
+ i0__namespace.ɵɵadvance(1);
14404
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
14405
+ }
14406
+ }
14407
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
14408
+ if (rf & 1) {
14409
+ i0__namespace.ɵɵelementStart(0, "span", 7);
14410
+ i0__namespace.ɵɵtext(1);
14411
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
14412
+ i0__namespace.ɵɵelementEnd();
14413
+ }
14414
+ if (rf & 2) {
14415
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
14416
+ i0__namespace.ɵɵadvance(1);
14417
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
14418
+ }
14419
+ }
14420
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
14421
+ if (rf & 1) {
14422
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
14423
+ i0__namespace.ɵɵelementContainerStart(0);
14424
+ i0__namespace.ɵɵelementStart(1, "div", 8);
14425
+ i0__namespace.ɵɵelementStart(2, "input", 9);
14426
+ i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
14427
+ i0__namespace.ɵɵelementEnd();
14428
+ i0__namespace.ɵɵelementStart(3, "label", 10);
14429
+ i0__namespace.ɵɵtext(4);
14430
+ i0__namespace.ɵɵelementEnd();
14431
+ i0__namespace.ɵɵelementEnd();
14432
+ i0__namespace.ɵɵelementContainerEnd();
14433
+ }
14434
+ if (rf & 2) {
14435
+ var checkbox_r4 = ctx.$implicit;
14436
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
14437
+ i0__namespace.ɵɵadvance(2);
14438
+ i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
14439
+ i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
14440
+ i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
14441
+ i0__namespace.ɵɵadvance(1);
14442
+ i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14443
+ i0__namespace.ɵɵadvance(1);
14444
+ i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
14445
+ }
14446
+ }
14447
+ var _c0$L = function (a0) { return { "error": a0 }; };
14448
+ var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14449
+ __extends(WriteDynamicMultiSelectListFieldComponent, _super);
14450
+ function WriteDynamicMultiSelectListFieldComponent() {
14451
+ return _super !== null && _super.apply(this, arguments) || this;
14452
+ }
14453
+ WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14454
+ var _this = this;
14455
+ this.checkboxes = new i2.FormArray([]);
14456
+ this.setInitialCaseList();
14457
+ this.setInitialCaseFieldValue();
14458
+ // Initialise array with existing values
14459
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
14460
+ var values = this.caseField.value;
14461
+ values.forEach(function (value) {
14462
+ _this.checkboxes.push(new i2.FormControl(value));
14463
+ });
14464
+ }
14465
+ this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
14466
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14467
+ };
14468
+ WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
14469
+ var _this = this;
14470
+ var target = event.target;
14471
+ if (!target || !target.value) {
14472
+ return;
14473
+ }
14474
+ var selectedListItem = this.getValueListItem(target.value);
14475
+ if (!this.isSelected(target.value)) {
14476
+ // Add a new control in the FormArray
14477
+ this.checkboxes.push(new i2.FormControl(selectedListItem));
14478
+ }
14479
+ else {
14480
+ // Remove the control from the FormArray
14481
+ this.checkboxes.controls.forEach(function (ctrl, i) {
14482
+ if (ctrl.value.code === target.value) {
14483
+ _this.checkboxes.removeAt(i);
14484
+ }
14485
+ });
14486
+ }
14487
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14488
+ };
14489
+ WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
14490
+ if (this.checkboxes && this.checkboxes.controls) {
14491
+ return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
14492
+ }
14493
+ };
14494
+ WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
14495
+ return this.caseField.list_items.find(function (i) { return i.code === value; });
14496
+ };
14497
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
14498
+ var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
14499
+ var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
14500
+ if (!hasListItems && hasFormattedListItems) {
14501
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14502
+ }
14503
+ };
14504
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
14505
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14506
+ this.caseField.value = this.caseField.formatted_value.value;
14507
+ }
14508
+ var isNull = this.caseField.value === undefined || this.caseField.value === '';
14509
+ if (isNull || !Array.isArray(this.caseField.value)) {
14510
+ this.caseField.value = [];
14511
+ }
14512
+ };
14513
+ return WriteDynamicMultiSelectListFieldComponent;
14514
+ }(AbstractFieldWriteComponent));
14515
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
14516
+ WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
14517
+ if (rf & 1) {
14518
+ i0__namespace.ɵɵelementStart(0, "div", 0);
14519
+ i0__namespace.ɵɵelementStart(1, "fieldset");
14520
+ i0__namespace.ɵɵelementStart(2, "legend");
14521
+ i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14522
+ i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14523
+ i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14524
+ i0__namespace.ɵɵelementEnd();
14525
+ i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14526
+ i0__namespace.ɵɵelementEnd();
14527
+ i0__namespace.ɵɵelementEnd();
14528
+ }
14529
+ if (rf & 2) {
14530
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
14531
+ i0__namespace.ɵɵadvance(3);
14532
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
14533
+ i0__namespace.ɵɵadvance(1);
14534
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
14535
+ i0__namespace.ɵɵadvance(1);
14536
+ i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
14537
+ i0__namespace.ɵɵadvance(1);
14538
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
14539
+ }
14540
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14541
+ var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
14542
+ (function () {
14543
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14544
+ type: i0.Component,
14545
+ args: [{
14546
+ selector: 'ccd-write-dynamic-multi-select-list-field',
14547
+ templateUrl: './write-dynamic-multi-select-list-field.html'
14548
+ }]
14549
+ }], null, null);
14550
+ })();
14551
+
14345
14552
  var DynamicRadioListPipe = /** @class */ (function () {
14346
14553
  function DynamicRadioListPipe() {
14347
14554
  }
@@ -14462,7 +14669,7 @@
14462
14669
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14463
14670
  }
14464
14671
  }
14465
- var _c0$L = function (a0) { return { selected: a0 }; };
14672
+ var _c0$K = function (a0) { return { selected: a0 }; };
14466
14673
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14467
14674
  if (rf & 1) {
14468
14675
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14475,7 +14682,7 @@
14475
14682
  if (rf & 2) {
14476
14683
  var radioButton_r5 = ctx.$implicit;
14477
14684
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14478
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14685
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14479
14686
  i0__namespace.ɵɵadvance(1);
14480
14687
  i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
14481
14688
  i0__namespace.ɵɵadvance(1);
@@ -14639,7 +14846,7 @@
14639
14846
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14640
14847
  }
14641
14848
  }
14642
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14849
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14643
14850
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14644
14851
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14645
14852
  __extends(WriteEmailFieldComponent, _super);
@@ -14664,7 +14871,7 @@
14664
14871
  i0__namespace.ɵɵelementEnd();
14665
14872
  }
14666
14873
  if (rf & 2) {
14667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14874
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14668
14875
  i0__namespace.ɵɵadvance(1);
14669
14876
  i0__namespace.ɵɵproperty("for", ctx.id());
14670
14877
  i0__namespace.ɵɵadvance(1);
@@ -14688,32 +14895,6 @@
14688
14895
  }], null, null);
14689
14896
  })();
14690
14897
 
14691
- var FixedListPipe = /** @class */ (function () {
14692
- function FixedListPipe() {
14693
- }
14694
- FixedListPipe.prototype.transform = function (value, items) {
14695
- if (!!items) {
14696
- var item = items.find(function (i) { return i.code === value; });
14697
- return item ? item.label : FixedListPipe.EMPTY;
14698
- }
14699
- else {
14700
- return FixedListPipe.EMPTY;
14701
- }
14702
- };
14703
- return FixedListPipe;
14704
- }());
14705
- FixedListPipe.EMPTY = '';
14706
- FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14707
- FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14708
- (function () {
14709
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14710
- type: i0.Pipe,
14711
- args: [{
14712
- name: 'ccdFixedList'
14713
- }]
14714
- }], null, null);
14715
- })();
14716
-
14717
14898
  var ReadFixedListFieldComponent = /** @class */ (function (_super) {
14718
14899
  __extends(ReadFixedListFieldComponent, _super);
14719
14900
  function ReadFixedListFieldComponent() {
@@ -14796,7 +14977,7 @@
14796
14977
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
14797
14978
  }
14798
14979
  }
14799
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14980
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14800
14981
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
14801
14982
  __extends(WriteFixedListFieldComponent, _super);
14802
14983
  function WriteFixedListFieldComponent() {
@@ -14845,7 +15026,7 @@
14845
15026
  i0__namespace.ɵɵelementEnd();
14846
15027
  }
14847
15028
  if (rf & 2) {
14848
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15029
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
14849
15030
  i0__namespace.ɵɵadvance(1);
14850
15031
  i0__namespace.ɵɵproperty("for", ctx.id());
14851
15032
  i0__namespace.ɵɵadvance(1);
@@ -14963,7 +15144,7 @@
14963
15144
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
14964
15145
  }
14965
15146
  }
14966
- var _c0$I = function (a0) { return { selected: a0 }; };
15147
+ var _c0$H = function (a0) { return { selected: a0 }; };
14967
15148
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
14968
15149
  if (rf & 1) {
14969
15150
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -14976,7 +15157,7 @@
14976
15157
  if (rf & 2) {
14977
15158
  var radioButton_r4 = ctx.$implicit;
14978
15159
  var ctx_r3 = i0__namespace.ɵɵnextContext();
14979
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15160
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
14980
15161
  i0__namespace.ɵɵadvance(1);
14981
15162
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
14982
15163
  i0__namespace.ɵɵadvance(1);
@@ -15146,7 +15327,7 @@
15146
15327
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15147
15328
  }
15148
15329
  }
15149
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15330
+ var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15150
15331
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15151
15332
  if (rf & 1) {
15152
15333
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15158,7 +15339,7 @@
15158
15339
  if (rf & 2) {
15159
15340
  var judicialUser_r5 = ctx.$implicit;
15160
15341
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15161
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15342
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15162
15343
  i0__namespace.ɵɵadvance(1);
15163
15344
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15164
15345
  }
@@ -15397,7 +15578,7 @@
15397
15578
  casesResponse.push(_this.mapResponse(result));
15398
15579
  });
15399
15580
  });
15400
- var caseLinks = casesResponse.map(function (item) {
15581
+ _this.linkedCases = casesResponse.map(function (item) {
15401
15582
  return {
15402
15583
  caseReference: item.caseReference,
15403
15584
  caseName: item.caseName,
@@ -15411,7 +15592,6 @@
15411
15592
  }),
15412
15593
  };
15413
15594
  });
15414
- _this.linkedCases = caseLinks;
15415
15595
  _this.serverLinkedApiError = null;
15416
15596
  }, function (err) {
15417
15597
  _this.serverLinkedApiError = {
@@ -15948,7 +16128,7 @@
15948
16128
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
15949
16129
  }
15950
16130
  }
15951
- var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16131
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15952
16132
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
15953
16133
  if (rf & 1) {
15954
16134
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -15966,7 +16146,7 @@
15966
16146
  }
15967
16147
  if (rf & 2) {
15968
16148
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
15969
- 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));
15970
16150
  i0__namespace.ɵɵadvance(3);
15971
16151
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
15972
16152
  }
@@ -16023,11 +16203,11 @@
16023
16203
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16024
16204
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16025
16205
  i0__namespace.ɵɵadvance(1);
16026
- 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));
16027
16207
  i0__namespace.ɵɵadvance(3);
16028
16208
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16029
16209
  i0__namespace.ɵɵadvance(2);
16030
- 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));
16031
16211
  i0__namespace.ɵɵadvance(5);
16032
16212
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16033
16213
  i0__namespace.ɵɵadvance(2);
@@ -16461,7 +16641,7 @@
16461
16641
  i0__namespace.ɵɵadvance(4);
16462
16642
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16463
16643
  i0__namespace.ɵɵadvance(4);
16464
- 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));
16465
16645
  i0__namespace.ɵɵadvance(1);
16466
16646
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16467
16647
  i0__namespace.ɵɵadvance(18);
@@ -17145,7 +17325,7 @@
17145
17325
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17146
17326
  }
17147
17327
  }
17148
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17328
+ var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17149
17329
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17150
17330
  if (rf & 1) {
17151
17331
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17157,7 +17337,7 @@
17157
17337
  }
17158
17338
  if (rf & 2) {
17159
17339
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
17160
- 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);
17161
17341
  i0__namespace.ɵɵadvance(1);
17162
17342
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17163
17343
  i0__namespace.ɵɵadvance(2);
@@ -17333,6 +17513,7 @@
17333
17513
  }] });
17334
17514
  })();
17335
17515
 
17516
+ // tslint:disable:variable-name
17336
17517
  var LinkCaseReason = /** @class */ (function () {
17337
17518
  function LinkCaseReason() {
17338
17519
  }
@@ -17491,7 +17672,7 @@
17491
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'; });
17492
17673
  }
17493
17674
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
17494
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17675
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17495
17676
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17496
17677
  next: function (reasons) {
17497
17678
  _this.reasonListLoaded = true;
@@ -17753,7 +17934,7 @@
17753
17934
  };
17754
17935
  WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
17755
17936
  var _this = this;
17756
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17937
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17757
17938
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17758
17939
  next: function (reasons) {
17759
17940
  // Sort in ascending order
@@ -17812,11 +17993,10 @@
17812
17993
  var _this = this;
17813
17994
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
17814
17995
  var caseViewFiltered = caseView.tabs.filter(function (tab) {
17815
- var linkField = tab.fields.some(function (_b) {
17996
+ return tab.fields.some(function (_b) {
17816
17997
  var field_type = _b.field_type;
17817
17998
  return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
17818
17999
  });
17819
- return linkField;
17820
18000
  });
17821
18001
  if (caseViewFiltered) {
17822
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; });
@@ -18099,7 +18279,7 @@
18099
18279
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18100
18280
  }
18101
18281
  }
18102
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18282
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18103
18283
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18104
18284
  __extends(WriteMoneyGbpFieldComponent, _super);
18105
18285
  function WriteMoneyGbpFieldComponent() {
@@ -18129,7 +18309,7 @@
18129
18309
  i0__namespace.ɵɵelementEnd();
18130
18310
  }
18131
18311
  if (rf & 2) {
18132
- 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)));
18133
18313
  i0__namespace.ɵɵadvance(1);
18134
18314
  i0__namespace.ɵɵproperty("for", ctx.id());
18135
18315
  i0__namespace.ɵɵadvance(1);
@@ -18277,7 +18457,7 @@
18277
18457
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18278
18458
  }
18279
18459
  }
18280
- var _c0$D = function (a0) { return { "error": a0 }; };
18460
+ var _c0$C = function (a0) { return { "error": a0 }; };
18281
18461
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18282
18462
  __extends(WriteMultiSelectListFieldComponent, _super);
18283
18463
  function WriteMultiSelectListFieldComponent() {
@@ -18341,7 +18521,7 @@
18341
18521
  i0__namespace.ɵɵelementEnd();
18342
18522
  }
18343
18523
  if (rf & 2) {
18344
- 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());
18345
18525
  i0__namespace.ɵɵadvance(3);
18346
18526
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18347
18527
  i0__namespace.ɵɵadvance(1);
@@ -18432,7 +18612,7 @@
18432
18612
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18433
18613
  }
18434
18614
  }
18435
- var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18615
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18436
18616
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18437
18617
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18438
18618
  __extends(WriteNumberFieldComponent, _super);
@@ -18457,7 +18637,7 @@
18457
18637
  i0__namespace.ɵɵelementEnd();
18458
18638
  }
18459
18639
  if (rf & 2) {
18460
- 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));
18461
18641
  i0__namespace.ɵɵadvance(1);
18462
18642
  i0__namespace.ɵɵproperty("for", ctx.id());
18463
18643
  i0__namespace.ɵɵadvance(1);
@@ -18758,7 +18938,7 @@
18758
18938
  i0__namespace.ɵɵelementEnd();
18759
18939
  }
18760
18940
  }
18761
- var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
18941
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
18762
18942
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
18763
18943
  if (rf & 1) {
18764
18944
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -18774,7 +18954,7 @@
18774
18954
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
18775
18955
  var tmp_0_0 = null;
18776
18956
  var tmp_2_0 = null;
18777
- 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));
18778
18958
  i0__namespace.ɵɵadvance(2);
18779
18959
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
18780
18960
  i0__namespace.ɵɵadvance(2);
@@ -19181,231 +19361,6 @@
19181
19361
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19182
19362
  })();
19183
19363
 
19184
- function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
19185
- if (rf & 1) {
19186
- i0__namespace.ɵɵelementStart(0, "div");
19187
- i0__namespace.ɵɵtext(1);
19188
- i0__namespace.ɵɵpipe(2, "ccdFixedList");
19189
- i0__namespace.ɵɵelementEnd();
19190
- }
19191
- if (rf & 2) {
19192
- var value_r1 = ctx.$implicit;
19193
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19194
- i0__namespace.ɵɵadvance(1);
19195
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
19196
- }
19197
- }
19198
- var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19199
- __extends(ReadDynamicMultiSelectListFieldComponent, _super);
19200
- function ReadDynamicMultiSelectListFieldComponent() {
19201
- return _super !== null && _super.apply(this, arguments) || this;
19202
- }
19203
- ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19204
- /**
19205
- *
19206
- * Reassigning list_items from formatted_list when list_items is empty
19207
- */
19208
- if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
19209
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19210
- }
19211
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19212
- this.caseField.value = this.caseField.formatted_value.value;
19213
- }
19214
- _super.prototype.ngOnInit.call(this);
19215
- };
19216
- return ReadDynamicMultiSelectListFieldComponent;
19217
- }(AbstractFieldReadComponent));
19218
- ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
19219
- 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) {
19220
- if (rf & 1) {
19221
- i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
19222
- }
19223
- if (rf & 2) {
19224
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
19225
- }
19226
- }, 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}"] });
19227
- var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
19228
- (function () {
19229
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
19230
- type: i0.Component,
19231
- args: [{
19232
- selector: 'ccd-read-dynamic-multi-select-list-field',
19233
- templateUrl: './read-dynamic-multi-select-list-field.html',
19234
- styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
19235
- }]
19236
- }], null, null);
19237
- })();
19238
-
19239
- function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
19240
- if (rf & 1) {
19241
- i0__namespace.ɵɵelementStart(0, "span", 5);
19242
- i0__namespace.ɵɵtext(1);
19243
- i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
19244
- i0__namespace.ɵɵelementEnd();
19245
- }
19246
- if (rf & 2) {
19247
- var ctx_r0 = i0__namespace.ɵɵnextContext();
19248
- i0__namespace.ɵɵadvance(1);
19249
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
19250
- }
19251
- }
19252
- function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
19253
- if (rf & 1) {
19254
- i0__namespace.ɵɵelementStart(0, "span", 6);
19255
- i0__namespace.ɵɵtext(1);
19256
- i0__namespace.ɵɵelementEnd();
19257
- }
19258
- if (rf & 2) {
19259
- var ctx_r1 = i0__namespace.ɵɵnextContext();
19260
- i0__namespace.ɵɵadvance(1);
19261
- i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
19262
- }
19263
- }
19264
- function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
19265
- if (rf & 1) {
19266
- i0__namespace.ɵɵelementStart(0, "span", 7);
19267
- i0__namespace.ɵɵtext(1);
19268
- i0__namespace.ɵɵpipe(2, "ccdFirstError");
19269
- i0__namespace.ɵɵelementEnd();
19270
- }
19271
- if (rf & 2) {
19272
- var ctx_r2 = i0__namespace.ɵɵnextContext();
19273
- i0__namespace.ɵɵadvance(1);
19274
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
19275
- }
19276
- }
19277
- function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
19278
- if (rf & 1) {
19279
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
19280
- i0__namespace.ɵɵelementContainerStart(0);
19281
- i0__namespace.ɵɵelementStart(1, "div", 8);
19282
- i0__namespace.ɵɵelementStart(2, "input", 9);
19283
- 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); });
19284
- i0__namespace.ɵɵelementEnd();
19285
- i0__namespace.ɵɵelementStart(3, "label", 10);
19286
- i0__namespace.ɵɵtext(4);
19287
- i0__namespace.ɵɵelementEnd();
19288
- i0__namespace.ɵɵelementEnd();
19289
- i0__namespace.ɵɵelementContainerEnd();
19290
- }
19291
- if (rf & 2) {
19292
- var checkbox_r4 = ctx.$implicit;
19293
- var ctx_r3 = i0__namespace.ɵɵnextContext();
19294
- i0__namespace.ɵɵadvance(2);
19295
- i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
19296
- i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
19297
- i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
19298
- i0__namespace.ɵɵadvance(1);
19299
- i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
19300
- i0__namespace.ɵɵadvance(1);
19301
- i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
19302
- }
19303
- }
19304
- var _c0$A = function (a0) { return { "error": a0 }; };
19305
- var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
19306
- __extends(WriteDynamicMultiSelectListFieldComponent, _super);
19307
- function WriteDynamicMultiSelectListFieldComponent() {
19308
- return _super !== null && _super.apply(this, arguments) || this;
19309
- }
19310
- WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
19311
- var _this = this;
19312
- this.checkboxes = new i2.FormArray([]);
19313
- this.setInitialCaseList();
19314
- this.setInitialCaseFieldValue();
19315
- // Initialise array with existing values
19316
- if (this.caseField.value && Array.isArray(this.caseField.value)) {
19317
- var values = this.caseField.value;
19318
- values.forEach(function (value) {
19319
- _this.checkboxes.push(new i2.FormControl(value));
19320
- });
19321
- }
19322
- this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
19323
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19324
- };
19325
- WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
19326
- var _this = this;
19327
- var target = event.target;
19328
- if (!target || !target.value) {
19329
- return;
19330
- }
19331
- var selectedListItem = this.getValueListItem(target.value);
19332
- if (!this.isSelected(target.value)) {
19333
- // Add a new control in the FormArray
19334
- this.checkboxes.push(new i2.FormControl(selectedListItem));
19335
- }
19336
- else {
19337
- // Remove the control from the FormArray
19338
- this.checkboxes.controls.forEach(function (ctrl, i) {
19339
- if (ctrl.value.code === target.value) {
19340
- _this.checkboxes.removeAt(i);
19341
- }
19342
- });
19343
- }
19344
- this.dynamicListFormControl.setValue(this.checkboxes.value);
19345
- };
19346
- WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
19347
- if (this.checkboxes && this.checkboxes.controls) {
19348
- return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
19349
- }
19350
- };
19351
- WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
19352
- return this.caseField.list_items.find(function (i) { return i.code === value; });
19353
- };
19354
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
19355
- var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
19356
- var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
19357
- if (!hasListItems && hasFormattedListItems) {
19358
- this.caseField.list_items = this.caseField.formatted_value.list_items;
19359
- }
19360
- };
19361
- WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
19362
- if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
19363
- this.caseField.value = this.caseField.formatted_value.value;
19364
- }
19365
- var isNull = this.caseField.value === undefined || this.caseField.value === '';
19366
- if (isNull || !Array.isArray(this.caseField.value)) {
19367
- this.caseField.value = [];
19368
- }
19369
- };
19370
- return WriteDynamicMultiSelectListFieldComponent;
19371
- }(AbstractFieldWriteComponent));
19372
- WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
19373
- 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) {
19374
- if (rf & 1) {
19375
- i0__namespace.ɵɵelementStart(0, "div", 0);
19376
- i0__namespace.ɵɵelementStart(1, "fieldset");
19377
- i0__namespace.ɵɵelementStart(2, "legend");
19378
- i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
19379
- i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
19380
- i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
19381
- i0__namespace.ɵɵelementEnd();
19382
- i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
19383
- i0__namespace.ɵɵelementEnd();
19384
- i0__namespace.ɵɵelementEnd();
19385
- }
19386
- if (rf & 2) {
19387
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
19388
- i0__namespace.ɵɵadvance(3);
19389
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
19390
- i0__namespace.ɵɵadvance(1);
19391
- i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
19392
- i0__namespace.ɵɵadvance(1);
19393
- i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
19394
- i0__namespace.ɵɵadvance(1);
19395
- i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
19396
- }
19397
- }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
19398
- var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
19399
- (function () {
19400
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
19401
- type: i0.Component,
19402
- args: [{
19403
- selector: 'ccd-write-dynamic-multi-select-list-field',
19404
- templateUrl: './write-dynamic-multi-select-list-field.html'
19405
- }]
19406
- }], null, null);
19407
- })();
19408
-
19409
19364
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19410
19365
  __extends(ReadPhoneUKFieldComponent, _super);
19411
19366
  function ReadPhoneUKFieldComponent() {
@@ -19606,7 +19561,7 @@
19606
19561
  WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
19607
19562
  if (this.browserService.isIEOrEdge()) {
19608
19563
  event.target.style.height = 'auto';
19609
- event.target.style.height = event.target.scrollHeight + 'px';
19564
+ event.target.style.height = event.target.scrollHeight + "px";
19610
19565
  event.target.scrollTop = event.target.scrollHeight;
19611
19566
  }
19612
19567
  };
@@ -19846,6 +19801,7 @@
19846
19801
  return YesNoService.EMPTY;
19847
19802
  };
19848
19803
  YesNoService.prototype.isYes = function (value) {
19804
+ // tslint:disable-next-line:switch-default
19849
19805
  switch (typeof (value)) {
19850
19806
  case 'boolean':
19851
19807
  return value;
@@ -19855,6 +19811,7 @@
19855
19811
  return false;
19856
19812
  };
19857
19813
  YesNoService.prototype.isNo = function (value) {
19814
+ // tslint:disable-next-line:switch-default
19858
19815
  switch (typeof (value)) {
19859
19816
  case 'boolean':
19860
19817
  return !value;
@@ -20828,6 +20785,7 @@
20828
20785
  return CaseFileViewCategory;
20829
20786
  }());
20830
20787
 
20788
+ // tslint:disable:variable-name
20831
20789
  var CaseFileViewDocument = /** @class */ (function () {
20832
20790
  function CaseFileViewDocument() {
20833
20791
  }
@@ -22181,7 +22139,7 @@
22181
22139
  // is expected not to have a party name)
22182
22140
  if (this.flagsData) {
22183
22141
  this.filteredFlagsData =
22184
- 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; });
22185
22143
  }
22186
22144
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
22187
22145
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -23478,18 +23436,19 @@
23478
23436
  field.value = { CaseReference: value };
23479
23437
  return field;
23480
23438
  };
23481
- ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
23439
+ ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
23482
23440
  return classTransformer.plainToClassFromExist(new CaseField(), {
23483
23441
  id: id,
23484
23442
  label: label,
23485
23443
  display_context: 'READONLY',
23486
23444
  value: value,
23487
- field_type: field_type
23445
+ field_type: fieldType
23488
23446
  });
23489
23447
  };
23490
23448
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
23491
23449
  var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
23492
23450
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
23451
+ // tslint:disable-next-line:switch-default
23493
23452
  switch (this.columnsHorizontalLabel[column].type.type) {
23494
23453
  case 'Number':
23495
23454
  case 'MoneyGBP': {
@@ -24615,6 +24574,7 @@
24615
24574
  return FeeValue;
24616
24575
  }());
24617
24576
 
24577
+ // tslint:disable:variable-name
24618
24578
  var Fee = /** @class */ (function () {
24619
24579
  function Fee() {
24620
24580
  }
@@ -25320,7 +25280,7 @@
25320
25280
  function CcdPageFieldsPipe() {
25321
25281
  }
25322
25282
  CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
25323
- var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25283
+ var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25324
25284
  var control = dataFormGroup.controls['data'].get(key);
25325
25285
  return control['caseField'];
25326
25286
  }).filter(function (field) {
@@ -25340,7 +25300,7 @@
25340
25300
  field_type: {
25341
25301
  id: page.id,
25342
25302
  type: 'Complex',
25343
- complex_fields: complex_fields
25303
+ complex_fields: complexFields
25344
25304
  }
25345
25305
  });
25346
25306
  };
@@ -25519,11 +25479,11 @@
25519
25479
  }
25520
25480
  return childrenCaseFields;
25521
25481
  };
25522
- CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
25523
- return case_field.field_type.type === 'Complex';
25482
+ CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
25483
+ return caseField.field_type.type === 'Complex';
25524
25484
  };
25525
- CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
25526
- return case_field.field_type.type === 'Collection';
25485
+ CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
25486
+ return caseField.field_type.type === 'Collection';
25527
25487
  };
25528
25488
  CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
25529
25489
  return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
@@ -26072,7 +26032,7 @@
26072
26032
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
26073
26033
  i0__namespace.ɵɵsetComponentScope(
26074
26034
  // ComponentLauncher web components
26075
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
26035
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.MediaViewerComponent], []);
26076
26036
  i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
26077
26037
  i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesFromReasonValuePipe]);
26078
26038
  i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
@@ -26724,7 +26684,7 @@
26724
26684
  if (caseField.field_type.type === 'Complex') {
26725
26685
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
26726
26686
  // handle both null and undefined values
26727
- if (caseField.value != null) {
26687
+ if (caseField.value !== null) {
26728
26688
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
26729
26689
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
26730
26690
  // parent)
@@ -26790,8 +26750,8 @@
26790
26750
  this.caseEdit.navigateToPage(pageId);
26791
26751
  };
26792
26752
  CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
26793
- this.ignoreWarning = errorContext.ignore_warning;
26794
- this.triggerText = errorContext.trigger_text;
26753
+ this.ignoreWarning = errorContext.ignoreWarning;
26754
+ this.triggerText = errorContext.triggerText;
26795
26755
  };
26796
26756
  CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
26797
26757
  if (null === this.editForm.get('data').get(field.id)) {
@@ -27423,6 +27383,7 @@
27423
27383
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
27424
27384
  ]
27425
27385
  });
27386
+ // tslint:disable-next-line:switch-default
27426
27387
  switch (portalType) {
27427
27388
  case EventCompletionPortalTypes.TaskCancelled:
27428
27389
  this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -27750,46 +27711,46 @@
27750
27711
 
27751
27712
  function PaginationComponent_ul_3_li_1_a_1_Template(rf, ctx) {
27752
27713
  if (rf & 1) {
27753
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
27754
- i0__namespace.ɵɵelementStart(0, "a", 12);
27755
- i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_1_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r8_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.previous(); })("click", function PaginationComponent_ul_3_li_1_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r8_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.previous(); });
27714
+ var _r9_1 = i0__namespace.ɵɵgetCurrentView();
27715
+ i0__namespace.ɵɵelementStart(0, "a", 15);
27716
+ i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_1_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r9_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.previous(); })("click", function PaginationComponent_ul_3_li_1_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r9_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.previous(); });
27756
27717
  i0__namespace.ɵɵtext(1);
27757
- i0__namespace.ɵɵelementStart(2, "span", 13);
27718
+ i0__namespace.ɵɵelementStart(2, "span", 16);
27758
27719
  i0__namespace.ɵɵtext(3);
27759
27720
  i0__namespace.ɵɵelementEnd();
27760
27721
  i0__namespace.ɵɵelementEnd();
27761
27722
  }
27762
27723
  if (rf & 2) {
27763
- var ctx_r5 = i0__namespace.ɵɵnextContext(3);
27764
- i0__namespace.ɵɵattribute("aria-label", ctx_r5.previousLabel + " " + ctx_r5.screenReaderPageLabel);
27724
+ var ctx_r6 = i0__namespace.ɵɵnextContext(3);
27725
+ i0__namespace.ɵɵattribute("aria-label", ctx_r6.previousLabel + " " + ctx_r6.screenReaderPageLabel);
27765
27726
  i0__namespace.ɵɵadvance(1);
27766
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.previousLabel, " ");
27727
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx_r6.previousLabel, " ");
27767
27728
  i0__namespace.ɵɵadvance(2);
27768
- i0__namespace.ɵɵtextInterpolate(ctx_r5.screenReaderPageLabel);
27729
+ i0__namespace.ɵɵtextInterpolate(ctx_r6.screenReaderPageLabel);
27769
27730
  }
27770
27731
  }
27771
27732
  function PaginationComponent_ul_3_li_1_span_2_Template(rf, ctx) {
27772
27733
  if (rf & 1) {
27773
27734
  i0__namespace.ɵɵelementStart(0, "span");
27774
27735
  i0__namespace.ɵɵtext(1);
27775
- i0__namespace.ɵɵelementStart(2, "span", 13);
27736
+ i0__namespace.ɵɵelementStart(2, "span", 16);
27776
27737
  i0__namespace.ɵɵtext(3);
27777
27738
  i0__namespace.ɵɵelementEnd();
27778
27739
  i0__namespace.ɵɵelementEnd();
27779
27740
  }
27780
27741
  if (rf & 2) {
27781
- var ctx_r6 = i0__namespace.ɵɵnextContext(3);
27742
+ var ctx_r7 = i0__namespace.ɵɵnextContext(3);
27782
27743
  i0__namespace.ɵɵadvance(1);
27783
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r6.previousLabel, " ");
27744
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.previousLabel, " ");
27784
27745
  i0__namespace.ɵɵadvance(2);
27785
- i0__namespace.ɵɵtextInterpolate(ctx_r6.screenReaderPageLabel);
27746
+ i0__namespace.ɵɵtextInterpolate(ctx_r7.screenReaderPageLabel);
27786
27747
  }
27787
27748
  }
27788
27749
  function PaginationComponent_ul_3_li_1_Template(rf, ctx) {
27789
27750
  if (rf & 1) {
27790
- i0__namespace.ɵɵelementStart(0, "li", 9);
27791
- i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_1_a_1_Template, 4, 3, "a", 10);
27792
- i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_1_span_2_Template, 4, 2, "span", 11);
27751
+ i0__namespace.ɵɵelementStart(0, "li", 12);
27752
+ i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_1_a_1_Template, 4, 3, "a", 13);
27753
+ i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_1_span_2_Template, 4, 2, "span", 14);
27793
27754
  i0__namespace.ɵɵelementEnd();
27794
27755
  }
27795
27756
  if (rf & 2) {
@@ -27804,10 +27765,10 @@
27804
27765
  }
27805
27766
  function PaginationComponent_ul_3_li_4_a_1_Template(rf, ctx) {
27806
27767
  if (rf & 1) {
27807
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
27808
- i0__namespace.ɵɵelementStart(0, "a", 12);
27809
- i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_4_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r15_1); var page_r10 = i0__namespace.ɵɵnextContext().$implicit; i0__namespace.ɵɵnextContext(2); var _r0 = i0__namespace.ɵɵreference(1); return _r0.setCurrent(page_r10.value); })("click", function PaginationComponent_ul_3_li_4_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r15_1); var page_r10 = i0__namespace.ɵɵnextContext().$implicit; i0__namespace.ɵɵnextContext(2); var _r0 = i0__namespace.ɵɵreference(1); return _r0.setCurrent(page_r10.value); });
27810
- i0__namespace.ɵɵelementStart(1, "span", 13);
27768
+ var _r16_1 = i0__namespace.ɵɵgetCurrentView();
27769
+ i0__namespace.ɵɵelementStart(0, "a", 15);
27770
+ i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_4_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var page_r11 = i0__namespace.ɵɵnextContext().$implicit; i0__namespace.ɵɵnextContext(2); var _r0 = i0__namespace.ɵɵreference(1); return _r0.setCurrent(page_r11.value); })("click", function PaginationComponent_ul_3_li_4_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var page_r11 = i0__namespace.ɵɵnextContext().$implicit; i0__namespace.ɵɵnextContext(2); var _r0 = i0__namespace.ɵɵreference(1); return _r0.setCurrent(page_r11.value); });
27771
+ i0__namespace.ɵɵelementStart(1, "span", 16);
27811
27772
  i0__namespace.ɵɵtext(2);
27812
27773
  i0__namespace.ɵɵelementEnd();
27813
27774
  i0__namespace.ɵɵelementStart(3, "span");
@@ -27817,18 +27778,18 @@
27817
27778
  i0__namespace.ɵɵelementEnd();
27818
27779
  }
27819
27780
  if (rf & 2) {
27820
- var page_r10 = i0__namespace.ɵɵnextContext().$implicit;
27821
- var ctx_r11 = i0__namespace.ɵɵnextContext(2);
27781
+ var page_r11 = i0__namespace.ɵɵnextContext().$implicit;
27782
+ var ctx_r12 = i0__namespace.ɵɵnextContext(2);
27822
27783
  i0__namespace.ɵɵadvance(2);
27823
- i0__namespace.ɵɵtextInterpolate1("", ctx_r11.screenReaderPageLabel, " ");
27784
+ i0__namespace.ɵɵtextInterpolate1("", ctx_r12.screenReaderPageLabel, " ");
27824
27785
  i0__namespace.ɵɵadvance(2);
27825
- i0__namespace.ɵɵtextInterpolate(page_r10.label === "..." ? page_r10.label : i0__namespace.ɵɵpipeBind2(5, 2, page_r10.label, ""));
27786
+ i0__namespace.ɵɵtextInterpolate(page_r11.label === "..." ? page_r11.label : i0__namespace.ɵɵpipeBind2(5, 2, page_r11.label, ""));
27826
27787
  }
27827
27788
  }
27828
27789
  function PaginationComponent_ul_3_li_4_ng_container_2_Template(rf, ctx) {
27829
27790
  if (rf & 1) {
27830
27791
  i0__namespace.ɵɵelementContainerStart(0);
27831
- i0__namespace.ɵɵelementStart(1, "span", 13);
27792
+ i0__namespace.ɵɵelementStart(1, "span", 16);
27832
27793
  i0__namespace.ɵɵtext(2);
27833
27794
  i0__namespace.ɵɵelementEnd();
27834
27795
  i0__namespace.ɵɵelementStart(3, "span");
@@ -27838,74 +27799,74 @@
27838
27799
  i0__namespace.ɵɵelementContainerEnd();
27839
27800
  }
27840
27801
  if (rf & 2) {
27841
- var page_r10 = i0__namespace.ɵɵnextContext().$implicit;
27842
- var ctx_r12 = i0__namespace.ɵɵnextContext(2);
27802
+ var page_r11 = i0__namespace.ɵɵnextContext().$implicit;
27803
+ var ctx_r13 = i0__namespace.ɵɵnextContext(2);
27843
27804
  i0__namespace.ɵɵadvance(2);
27844
- i0__namespace.ɵɵtextInterpolate1("", ctx_r12.screenReaderCurrentLabel, " ");
27805
+ i0__namespace.ɵɵtextInterpolate1("", ctx_r13.screenReaderCurrentLabel, " ");
27845
27806
  i0__namespace.ɵɵadvance(2);
27846
- i0__namespace.ɵɵtextInterpolate(page_r10.label === "..." ? page_r10.label : i0__namespace.ɵɵpipeBind2(5, 2, page_r10.label, ""));
27807
+ i0__namespace.ɵɵtextInterpolate(page_r11.label === "..." ? page_r11.label : i0__namespace.ɵɵpipeBind2(5, 2, page_r11.label, ""));
27847
27808
  }
27848
27809
  }
27849
27810
  function PaginationComponent_ul_3_li_4_Template(rf, ctx) {
27850
27811
  if (rf & 1) {
27851
27812
  i0__namespace.ɵɵelementStart(0, "li");
27852
- i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_4_a_1_Template, 6, 5, "a", 10);
27853
- i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_4_ng_container_2_Template, 6, 5, "ng-container", 11);
27813
+ i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_4_a_1_Template, 6, 5, "a", 13);
27814
+ i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_4_ng_container_2_Template, 6, 5, "ng-container", 14);
27854
27815
  i0__namespace.ɵɵelementEnd();
27855
27816
  }
27856
27817
  if (rf & 2) {
27857
- var page_r10 = ctx.$implicit;
27818
+ var page_r11 = ctx.$implicit;
27858
27819
  i0__namespace.ɵɵnextContext(2);
27859
27820
  var _r0 = i0__namespace.ɵɵreference(1);
27860
- i0__namespace.ɵɵclassProp("current", _r0.getCurrent() === page_r10.value)("ellipsis", page_r10.label === "...");
27821
+ i0__namespace.ɵɵclassProp("current", _r0.getCurrent() === page_r11.value)("ellipsis", page_r11.label === "...");
27861
27822
  i0__namespace.ɵɵadvance(1);
27862
- i0__namespace.ɵɵproperty("ngIf", _r0.getCurrent() !== page_r10.value);
27823
+ i0__namespace.ɵɵproperty("ngIf", _r0.getCurrent() !== page_r11.value);
27863
27824
  i0__namespace.ɵɵadvance(1);
27864
- i0__namespace.ɵɵproperty("ngIf", _r0.getCurrent() === page_r10.value);
27825
+ i0__namespace.ɵɵproperty("ngIf", _r0.getCurrent() === page_r11.value);
27865
27826
  }
27866
27827
  }
27867
27828
  function PaginationComponent_ul_3_li_5_a_1_Template(rf, ctx) {
27868
27829
  if (rf & 1) {
27869
- var _r23_1 = i0__namespace.ɵɵgetCurrentView();
27870
- i0__namespace.ɵɵelementStart(0, "a", 12);
27871
- i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_5_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r23_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.next(); })("click", function PaginationComponent_ul_3_li_5_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r23_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.next(); });
27830
+ var _r24_1 = i0__namespace.ɵɵgetCurrentView();
27831
+ i0__namespace.ɵɵelementStart(0, "a", 15);
27832
+ i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_ul_3_li_5_a_1_Template_a_keyup_enter_0_listener() { i0__namespace.ɵɵrestoreView(_r24_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.next(); })("click", function PaginationComponent_ul_3_li_5_a_1_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r24_1); i0__namespace.ɵɵnextContext(3); var _r0 = i0__namespace.ɵɵreference(1); return _r0.next(); });
27872
27833
  i0__namespace.ɵɵtext(1);
27873
- i0__namespace.ɵɵelementStart(2, "span", 13);
27834
+ i0__namespace.ɵɵelementStart(2, "span", 16);
27874
27835
  i0__namespace.ɵɵtext(3);
27875
27836
  i0__namespace.ɵɵelementEnd();
27876
27837
  i0__namespace.ɵɵelementEnd();
27877
27838
  }
27878
27839
  if (rf & 2) {
27879
- var ctx_r20 = i0__namespace.ɵɵnextContext(3);
27880
- i0__namespace.ɵɵattribute("aria-label", ctx_r20.nextLabel + " " + ctx_r20.screenReaderPageLabel);
27840
+ var ctx_r21 = i0__namespace.ɵɵnextContext(3);
27841
+ i0__namespace.ɵɵattribute("aria-label", ctx_r21.nextLabel + " " + ctx_r21.screenReaderPageLabel);
27881
27842
  i0__namespace.ɵɵadvance(1);
27882
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r20.nextLabel, " ");
27843
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx_r21.nextLabel, " ");
27883
27844
  i0__namespace.ɵɵadvance(2);
27884
- i0__namespace.ɵɵtextInterpolate(ctx_r20.screenReaderPageLabel);
27845
+ i0__namespace.ɵɵtextInterpolate(ctx_r21.screenReaderPageLabel);
27885
27846
  }
27886
27847
  }
27887
27848
  function PaginationComponent_ul_3_li_5_span_2_Template(rf, ctx) {
27888
27849
  if (rf & 1) {
27889
27850
  i0__namespace.ɵɵelementStart(0, "span");
27890
27851
  i0__namespace.ɵɵtext(1);
27891
- i0__namespace.ɵɵelementStart(2, "span", 13);
27852
+ i0__namespace.ɵɵelementStart(2, "span", 16);
27892
27853
  i0__namespace.ɵɵtext(3);
27893
27854
  i0__namespace.ɵɵelementEnd();
27894
27855
  i0__namespace.ɵɵelementEnd();
27895
27856
  }
27896
27857
  if (rf & 2) {
27897
- var ctx_r21 = i0__namespace.ɵɵnextContext(3);
27858
+ var ctx_r22 = i0__namespace.ɵɵnextContext(3);
27898
27859
  i0__namespace.ɵɵadvance(1);
27899
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r21.nextLabel, " ");
27860
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx_r22.nextLabel, " ");
27900
27861
  i0__namespace.ɵɵadvance(2);
27901
- i0__namespace.ɵɵtextInterpolate(ctx_r21.screenReaderPageLabel);
27862
+ i0__namespace.ɵɵtextInterpolate(ctx_r22.screenReaderPageLabel);
27902
27863
  }
27903
27864
  }
27904
27865
  function PaginationComponent_ul_3_li_5_Template(rf, ctx) {
27905
27866
  if (rf & 1) {
27906
- i0__namespace.ɵɵelementStart(0, "li", 14);
27907
- i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_5_a_1_Template, 4, 3, "a", 10);
27908
- i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_5_span_2_Template, 4, 2, "span", 11);
27867
+ i0__namespace.ɵɵelementStart(0, "li", 17);
27868
+ i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_5_a_1_Template, 4, 3, "a", 13);
27869
+ i0__namespace.ɵɵtemplate(2, PaginationComponent_ul_3_li_5_span_2_Template, 4, 2, "span", 14);
27909
27870
  i0__namespace.ɵɵelementEnd();
27910
27871
  }
27911
27872
  if (rf & 2) {
@@ -27920,13 +27881,13 @@
27920
27881
  }
27921
27882
  function PaginationComponent_ul_3_Template(rf, ctx) {
27922
27883
  if (rf & 1) {
27923
- i0__namespace.ɵɵelementStart(0, "ul", 4);
27924
- i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_1_Template, 3, 4, "li", 5);
27925
- i0__namespace.ɵɵelementStart(2, "li", 6);
27884
+ i0__namespace.ɵɵelementStart(0, "ul", 7);
27885
+ i0__namespace.ɵɵtemplate(1, PaginationComponent_ul_3_li_1_Template, 3, 4, "li", 8);
27886
+ i0__namespace.ɵɵelementStart(2, "li", 9);
27926
27887
  i0__namespace.ɵɵtext(3);
27927
27888
  i0__namespace.ɵɵelementEnd();
27928
- i0__namespace.ɵɵtemplate(4, PaginationComponent_ul_3_li_4_Template, 3, 6, "li", 7);
27929
- i0__namespace.ɵɵtemplate(5, PaginationComponent_ul_3_li_5_Template, 3, 4, "li", 8);
27889
+ i0__namespace.ɵɵtemplate(4, PaginationComponent_ul_3_li_4_Template, 3, 6, "li", 10);
27890
+ i0__namespace.ɵɵtemplate(5, PaginationComponent_ul_3_li_5_Template, 3, 4, "li", 11);
27930
27891
  i0__namespace.ɵɵelementEnd();
27931
27892
  }
27932
27893
  if (rf & 2) {
@@ -27957,50 +27918,76 @@
27957
27918
  this.screenReaderCurrentLabel = "You're on page";
27958
27919
  this.pageChange = new i0.EventEmitter();
27959
27920
  this.pageBoundsCorrection = new i0.EventEmitter();
27960
- this._directionLinks = true;
27961
- this._autoHide = false;
27962
- this._responsive = false;
27921
+ this.pDirectionLinks = true;
27922
+ this.pAutoHide = false;
27923
+ this.pResponsive = false;
27963
27924
  }
27964
27925
  Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
27965
27926
  get: function () {
27966
- return this._directionLinks;
27927
+ return this.pDirectionLinks;
27967
27928
  },
27968
27929
  set: function (value) {
27969
- this._directionLinks = coerceToBoolean(value);
27930
+ this.pDirectionLinks = coerceToBoolean(value);
27970
27931
  },
27971
27932
  enumerable: false,
27972
27933
  configurable: true
27973
27934
  });
27974
27935
  Object.defineProperty(PaginationComponent.prototype, "autoHide", {
27975
27936
  get: function () {
27976
- return this._autoHide;
27937
+ return this.pAutoHide;
27977
27938
  },
27978
27939
  set: function (value) {
27979
- this._autoHide = coerceToBoolean(value);
27940
+ this.pAutoHide = coerceToBoolean(value);
27980
27941
  },
27981
27942
  enumerable: false,
27982
27943
  configurable: true
27983
27944
  });
27984
27945
  Object.defineProperty(PaginationComponent.prototype, "responsive", {
27985
27946
  get: function () {
27986
- return this._responsive;
27947
+ return this.pResponsive;
27987
27948
  },
27988
27949
  set: function (value) {
27989
- this._responsive = coerceToBoolean(value);
27950
+ this.pResponsive = coerceToBoolean(value);
27990
27951
  },
27991
27952
  enumerable: false,
27992
27953
  configurable: true
27993
27954
  });
27955
+ PaginationComponent.prototype.goToPage = function ($event, p) {
27956
+ var pageNumber = Number($event.target.value);
27957
+ if ($event.target.value !== '' && pageNumber !== p.getCurrent()) {
27958
+ if (pageNumber > 0) {
27959
+ p.setCurrent(pageNumber);
27960
+ }
27961
+ else if (pageNumber < 0) {
27962
+ $event.target.value = (Math.abs(pageNumber)).toString();
27963
+ if (Math.abs(pageNumber) !== p.getCurrent()) {
27964
+ p.setCurrent(Math.abs(pageNumber));
27965
+ }
27966
+ }
27967
+ else {
27968
+ $event.target.value = '';
27969
+ }
27970
+ }
27971
+ };
27994
27972
  return PaginationComponent;
27995
27973
  }());
27996
27974
  PaginationComponent.ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
27997
- PaginationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 4, vars: 3, consts: [[3, "id", "maxSize", "pageChange", "pageBoundsCorrection"], ["p", "paginationApi"], ["role", "navigation", "aria-label", "Pagination"], ["class", "ngx-pagination", "role", "navigation", 3, "responsive", 4, "ngIf"], ["role", "navigation", 1, "ngx-pagination"], ["class", "pagination-previous", 3, "disabled", 4, "ngIf"], [1, "small-screen"], [3, "current", "ellipsis", 4, "ngFor", "ngForOf"], ["class", "pagination-next", 3, "disabled", 4, "ngIf"], [1, "pagination-previous"], ["tabindex", "0", 3, "keyup.enter", "click", 4, "ngIf"], [4, "ngIf"], ["tabindex", "0", 3, "keyup.enter", "click"], [1, "show-for-sr"], [1, "pagination-next"]], template: function PaginationComponent_Template(rf, ctx) {
27975
+ PaginationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 9, vars: 3, consts: [[3, "id", "maxSize", "pageChange", "pageBoundsCorrection"], ["p", "paginationApi"], ["role", "navigation", "aria-label", "Pagination", 1, "ngx-pagination-wrapper"], ["class", "ngx-pagination", "role", "navigation", 3, "responsive", 4, "ngIf"], [1, "ngx-go-to-page"], ["type", "number", "maxlength", "5", "min", "1", 1, "govuk-input", 3, "keyup.enter", "blur", "focus"], ["goToPageInput", ""], ["role", "navigation", 1, "ngx-pagination"], ["class", "pagination-previous", 3, "disabled", 4, "ngIf"], [1, "small-screen"], [3, "current", "ellipsis", 4, "ngFor", "ngForOf"], ["class", "pagination-next", 3, "disabled", 4, "ngIf"], [1, "pagination-previous"], ["tabindex", "0", 3, "keyup.enter", "click", 4, "ngIf"], [4, "ngIf"], ["tabindex", "0", 3, "keyup.enter", "click"], [1, "show-for-sr"], [1, "pagination-next"]], template: function PaginationComponent_Template(rf, ctx) {
27998
27976
  if (rf & 1) {
27977
+ var _r26_1 = i0__namespace.ɵɵgetCurrentView();
27999
27978
  i0__namespace.ɵɵelementStart(0, "pagination-template", 0, 1);
28000
27979
  i0__namespace.ɵɵlistener("pageChange", function PaginationComponent_Template_pagination_template_pageChange_0_listener($event) { return ctx.pageChange.emit($event); })("pageBoundsCorrection", function PaginationComponent_Template_pagination_template_pageBoundsCorrection_0_listener($event) { return ctx.pageBoundsCorrection.emit($event); });
28001
27980
  i0__namespace.ɵɵelementStart(2, "nav", 2);
28002
27981
  i0__namespace.ɵɵtemplate(3, PaginationComponent_ul_3_Template, 6, 8, "ul", 3);
28003
27982
  i0__namespace.ɵɵelementEnd();
27983
+ i0__namespace.ɵɵelementStart(4, "div", 4);
27984
+ i0__namespace.ɵɵelementStart(5, "span");
27985
+ i0__namespace.ɵɵtext(6, "Go to page");
27986
+ i0__namespace.ɵɵelementEnd();
27987
+ i0__namespace.ɵɵelementStart(7, "input", 5, 6);
27988
+ i0__namespace.ɵɵlistener("keyup.enter", function PaginationComponent_Template_input_keyup_enter_7_listener($event) { i0__namespace.ɵɵrestoreView(_r26_1); var _r0 = i0__namespace.ɵɵreference(1); ctx.goToPage($event, _r0); return $event.target.blur(); })("blur", function PaginationComponent_Template_input_blur_7_listener($event) { i0__namespace.ɵɵrestoreView(_r26_1); var _r0 = i0__namespace.ɵɵreference(1); return ctx.goToPage($event, _r0); })("focus", function PaginationComponent_Template_input_focus_7_listener() { i0__namespace.ɵɵrestoreView(_r26_1); var _r2 = i0__namespace.ɵɵreference(8); return _r2.select(); });
27989
+ i0__namespace.ɵɵelementEnd();
27990
+ i0__namespace.ɵɵelementEnd();
28004
27991
  i0__namespace.ɵɵelementEnd();
28005
27992
  }
28006
27993
  if (rf & 2) {
@@ -28009,7 +27996,7 @@
28009
27996
  i0__namespace.ɵɵadvance(3);
28010
27997
  i0__namespace.ɵɵproperty("ngIf", !(ctx.autoHide && _r0.pages.length <= 1));
28011
27998
  }
28012
- }, directives: [i1__namespace$6.PaginationControlsDirective, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [i1__namespace.DecimalPipe], styles: [".ngx-pagination[_ngcontent-%COMP%]{margin-left:0;margin-bottom:1rem;padding-top:25px;text-decoration:none;text-align:left;font-size:16px}.ngx-pagination[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%]:before{content:\" \";display:table}.ngx-pagination[_ngcontent-%COMP%]:after{clear:both}.ngx-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-right:.0625rem;border-radius:0;display:inline-block}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;padding:.1875rem .625rem;border-radius:0;color:#005da6}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:#e6e6e6}.ngx-pagination[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{padding:.1875rem .625rem;background:#fff;color:#4c2c92;cursor:default;font-weight:900}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{display:none}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]:hover{background:transparent}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer}.ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{margin-right:.5rem;border-width:3px 0 0 3px}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;transform:rotate(-45deg);content:\"\"}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{margin-left:.5rem;border-width:0 3px 3px 0}.ngx-pagination[_ngcontent-%COMP%] .show-for-sr[_ngcontent-%COMP%]{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ngx-pagination[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:none}@media screen and (max-width:601px){.ngx-pagination.responsive[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:inline-block}.ngx-pagination.responsive[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(.small-screen):not(.pagination-previous):not(.pagination-next){display:none}}"] });
27999
+ }, directives: [i1__namespace$6.PaginationControlsDirective, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [i1__namespace.DecimalPipe], styles: [".ngx-go-to-page[_ngcontent-%COMP%], .ngx-pagination-wrapper[_ngcontent-%COMP%]{display:inline-block}.ngx-go-to-page[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 10px 0 50px}.ngx-go-to-page[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:50px}.ngx-pagination[_ngcontent-%COMP%]{margin-left:0;margin-bottom:1rem;padding-top:25px;text-decoration:none;text-align:left;font-size:16px}.ngx-pagination[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%]:before{content:\" \";display:table}.ngx-pagination[_ngcontent-%COMP%]:after{clear:both}.ngx-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-right:.0625rem;border-radius:0;display:inline-block}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;padding:.1875rem .625rem;border-radius:0;color:#005da6}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:#e6e6e6}.ngx-pagination[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{padding:.1875rem .625rem;background:#fff;color:#4c2c92;cursor:default;font-weight:900}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{display:none}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]:hover{background:transparent}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer}.ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{margin-right:.5rem;border-width:3px 0 0 3px}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;transform:rotate(-45deg);content:\"\"}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{margin-left:.5rem;border-width:0 3px 3px 0}.ngx-pagination[_ngcontent-%COMP%] .show-for-sr[_ngcontent-%COMP%]{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ngx-pagination[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:none}@media screen and (max-width:601px){.ngx-pagination.responsive[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:inline-block}.ngx-pagination.responsive[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(.small-screen):not(.pagination-previous):not(.pagination-next){display:none}}"] });
28013
28000
  (function () {
28014
28001
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaginationComponent, [{
28015
28002
  type: i0.Component,
@@ -28753,7 +28740,7 @@
28753
28740
  var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
28754
28741
  workbasketInputs.forEach(function (item) {
28755
28742
  if (item.field.elementPath) {
28756
- item.field.id = item.field.id + '.' + item.field.elementPath;
28743
+ item.field.id = item.field.id + "." + item.field.elementPath;
28757
28744
  }
28758
28745
  item.field.label = item.label;
28759
28746
  if (formValue) {
@@ -28805,7 +28792,7 @@
28805
28792
  var value = formGroupLS[key];
28806
28793
  // Clear the filter form group control values if it has a value in local storage
28807
28794
  // The regionList form group control value should be ignored as it always contain the latest value
28808
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
28795
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
28809
28796
  this.formGroup.get(key).setValue(null);
28810
28797
  }
28811
28798
  }
@@ -29934,7 +29921,7 @@
29934
29921
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
29935
29922
  if (this.activityPollingService.isEnabled) {
29936
29923
  this.ngZone.runOutsideAngular(function () {
29937
- _this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
29924
+ _this.activitySubscription = _this.postEditActivity().subscribe(function () {
29938
29925
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
29939
29926
  });
29940
29927
  });
@@ -30906,8 +30893,8 @@
30906
30893
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
30907
30894
  };
30908
30895
  CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
30909
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
30910
- this.triggerText = callbackErrorsContext.trigger_text;
30896
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
30897
+ this.triggerText = callbackErrorsContext.triggerText;
30911
30898
  };
30912
30899
  CaseFullAccessViewComponent.prototype.isDraft = function () {
30913
30900
  return Draft.isDraft(this.caseDetails.case_id);
@@ -31186,7 +31173,7 @@
31186
31173
  * or the empty string
31187
31174
  */
31188
31175
  PrintUrlPipe.prototype.transform = function (remoteUrl) {
31189
- if (remoteUrl && remoteUrl.length > 0) {
31176
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
31190
31177
  var printServiceUrlPathname = void 0;
31191
31178
  /**
31192
31179
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -31202,7 +31189,7 @@
31202
31189
  printServiceUrlPathname = urlParser.pathname;
31203
31190
  if (printServiceUrlPathname[0] !== '/') {
31204
31191
  // Fix for IE11; it returns the pathname without leading slash
31205
- printServiceUrlPathname = '/' + printServiceUrlPathname;
31192
+ printServiceUrlPathname = "/" + printServiceUrlPathname;
31206
31193
  }
31207
31194
  }
31208
31195
  else {
@@ -31405,10 +31392,10 @@
31405
31392
  };
31406
31393
  CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
31407
31394
  if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
31408
- var access_process = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31409
- var access_granted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31410
- this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31411
- this.userAccessType = access_process ? access_process.value : null;
31395
+ var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31396
+ var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31397
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31398
+ this.userAccessType = accessProcess ? accessProcess.value : null;
31412
31399
  }
31413
31400
  };
31414
31401
  CaseViewerComponent.prototype.isDataLoaded = function () {
@@ -32704,11 +32691,11 @@
32704
32691
  };
32705
32692
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
32706
32693
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
32707
- .subscribe(function (_response) {
32694
+ .subscribe(function () {
32708
32695
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
32709
32696
  // Angular 7.2!
32710
32697
  _this.router.navigate(['success'], { relativeTo: _this.route });
32711
- }, function (_error) {
32698
+ }, function () {
32712
32699
  // Navigate to error page
32713
32700
  });
32714
32701
  }
@@ -32722,7 +32709,7 @@
32722
32709
  }
32723
32710
  };
32724
32711
  CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
32725
- return input.value == null || input.value.trim().length === 0;
32712
+ return input.value === null || input.value.trim().length === 0;
32726
32713
  };
32727
32714
  return CaseChallengedAccessRequestComponent;
32728
32715
  }());
@@ -33346,11 +33333,11 @@
33346
33333
  };
33347
33334
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
33348
33335
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
33349
- .subscribe(function (_response) {
33336
+ .subscribe(function () {
33350
33337
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
33351
33338
  // Angular 7.2
33352
33339
  _this.router.navigate(['success'], { relativeTo: _this.route });
33353
- }, function (_error) {
33340
+ }, function () {
33354
33341
  // Navigate to error page
33355
33342
  });
33356
33343
  }
@@ -33365,7 +33352,7 @@
33365
33352
  }
33366
33353
  };
33367
33354
  CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
33368
- return input.value == null || input.value.trim().length === 0;
33355
+ return input.value === null || input.value.trim().length === 0;
33369
33356
  };
33370
33357
  return CaseSpecificAccessRequestComponent;
33371
33358
  }());
@@ -34266,7 +34253,7 @@
34266
34253
  }
34267
34254
  searchInputs.forEach(function (item) {
34268
34255
  if (item.field.elementPath) {
34269
- item.field.id = item.field.id + '.' + item.field.elementPath;
34256
+ item.field.id = item.field.id + "." + item.field.elementPath;
34270
34257
  }
34271
34258
  item.field.label = item.label;
34272
34259
  if (formValueObject) {
@@ -34545,7 +34532,7 @@
34545
34532
  if (rf & 2) {
34546
34533
  var ctx_r3 = i0__namespace.ɵɵnextContext(2);
34547
34534
  i0__namespace.ɵɵadvance(6);
34548
- 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. ");
34535
+ 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. ");
34549
34536
  }
34550
34537
  }
34551
34538
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
@@ -35104,7 +35091,7 @@
35104
35091
  };
35105
35092
  Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
35106
35093
  get: function () {
35107
- var total = this.paginationMetadata.total_results_count;
35094
+ var total = this.paginationMetadata.totalResultsCount;
35108
35095
  var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
35109
35096
  this.paginationLimitEnforced = maximumResultReached;
35110
35097
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -35255,7 +35242,7 @@
35255
35242
  return col;
35256
35243
  };
35257
35244
  SearchResultComponent.prototype.hasResults = function () {
35258
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
35245
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
35259
35246
  };
35260
35247
  SearchResultComponent.prototype.hasDrafts = function () {
35261
35248
  return this.resultView.hasDrafts();
@@ -35354,7 +35341,7 @@
35354
35341
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
35355
35342
  };
35356
35343
  SearchResultComponent.prototype.getTotalResults = function () {
35357
- var total = this.paginationMetadata.total_results_count + this.draftsCount;
35344
+ var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
35358
35345
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
35359
35346
  };
35360
35347
  SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
@@ -35512,6 +35499,7 @@
35512
35499
  })();
35513
35500
  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]);
35514
35501
 
35502
+ // tslint:disable:variable-name
35515
35503
  var ComplexFieldOverride = /** @class */ (function () {
35516
35504
  function ComplexFieldOverride() {
35517
35505
  }
@@ -35533,24 +35521,24 @@
35533
35521
  this.caseField.id = id;
35534
35522
  return this;
35535
35523
  };
35536
- CaseFieldBuilder.prototype.withFieldType = function (field_type) {
35537
- this.caseField.field_type = field_type;
35524
+ CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
35525
+ this.caseField.field_type = fieldType;
35538
35526
  return this;
35539
35527
  };
35540
- CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
35541
- this.caseField.display_context = display_context;
35528
+ CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
35529
+ this.caseField.display_context = displayContext;
35542
35530
  return this;
35543
35531
  };
35544
- CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
35545
- this.caseField.display_context_parameter = display_context_parameter;
35532
+ CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
35533
+ this.caseField.display_context_parameter = displayContextParameter;
35546
35534
  return this;
35547
35535
  };
35548
35536
  CaseFieldBuilder.prototype.withHidden = function (hidden) {
35549
35537
  this.caseField.hidden = hidden;
35550
35538
  return this;
35551
35539
  };
35552
- CaseFieldBuilder.prototype.withHintText = function (hint_text) {
35553
- this.caseField.hint_text = hint_text;
35540
+ CaseFieldBuilder.prototype.withHintText = function (hintText) {
35541
+ this.caseField.hint_text = hintText;
35554
35542
  return this;
35555
35543
  };
35556
35544
  CaseFieldBuilder.prototype.withLabel = function (label) {
@@ -35561,12 +35549,12 @@
35561
35549
  this.caseField.order = order;
35562
35550
  return this;
35563
35551
  };
35564
- CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
35565
- this.caseField.security_label = security_label;
35552
+ CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
35553
+ this.caseField.security_label = securityLabel;
35566
35554
  return this;
35567
35555
  };
35568
- CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
35569
- this.caseField.show_condition = show_condition;
35556
+ CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
35557
+ this.caseField.show_condition = showCondition;
35570
35558
  return this;
35571
35559
  };
35572
35560
  CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
@@ -35594,21 +35582,21 @@
35594
35582
  complex_fields: []
35595
35583
  };
35596
35584
  };
35597
- var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
35598
- if (wizard_pages === void 0) { wizard_pages = []; }
35599
- if (can_save_draft === void 0) { can_save_draft = false; }
35585
+ var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
35586
+ if (wizardPages === void 0) { wizardPages = []; }
35587
+ if (canSaveDraft === void 0) { canSaveDraft = false; }
35600
35588
  var eventTrigger = new CaseEventTrigger();
35601
35589
  eventTrigger.id = id;
35602
35590
  eventTrigger.name = name;
35603
- eventTrigger.case_id = case_id;
35604
- eventTrigger.show_summary = show_summary;
35605
- eventTrigger.wizard_pages = wizard_pages;
35591
+ eventTrigger.case_id = caseId;
35592
+ eventTrigger.show_summary = showSummary;
35593
+ eventTrigger.wizard_pages = wizardPages;
35606
35594
  eventTrigger.event_token = 'test-token';
35607
- eventTrigger.case_fields = case_fields;
35608
- eventTrigger.can_save_draft = can_save_draft;
35595
+ eventTrigger.case_fields = caseFields;
35596
+ eventTrigger.can_save_draft = canSaveDraft;
35609
35597
  return eventTrigger;
35610
35598
  };
35611
- var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields, retain_hidden_value, hidden) {
35599
+ var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
35612
35600
  if (typeComplexFields === void 0) { typeComplexFields = []; }
35613
35601
  return ({
35614
35602
  id: id || 'personFirstName',
@@ -35617,10 +35605,10 @@
35617
35605
  type: type || 'Text',
35618
35606
  complex_fields: typeComplexFields || []
35619
35607
  },
35620
- display_context: display_context || 'OPTIONAL',
35608
+ display_context: displayContext || 'OPTIONAL',
35621
35609
  label: label || 'First name',
35622
- show_summary_content_option: show_summary_content_option,
35623
- retain_hidden_value: retain_hidden_value || false,
35610
+ show_summary_content_option: showSummaryContentOption,
35611
+ retain_hidden_value: retainHiddenValue || false,
35624
35612
  hidden: hidden || false
35625
35613
  });
35626
35614
  };
@@ -35662,48 +35650,48 @@
35662
35650
  complexFieldOverride.display_context = 'HIDDEN';
35663
35651
  return complexFieldOverride;
35664
35652
  };
35665
- var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition, ACLs, hidden) {
35653
+ var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
35666
35654
  if (order === void 0) { order = undefined; }
35667
- if (show_condition === void 0) { show_condition = undefined; }
35668
- if (ACLs === void 0) { ACLs = undefined; }
35655
+ if (showCondition === void 0) { showCondition = undefined; }
35656
+ if (acls === void 0) { acls = undefined; }
35669
35657
  return CaseFieldBuilder.create()
35670
35658
  .withId(id || 'personFirstName')
35671
35659
  .withFieldType(fieldType || textFieldType())
35672
- .withDisplayContext(display_context || 'OPTIONAL')
35660
+ .withDisplayContext(displayContext || 'OPTIONAL')
35673
35661
  .withLabel(label || 'First name')
35674
35662
  .withHintText(hint || 'First name hint text')
35675
35663
  .withShowSummaryContentOption(0)
35676
35664
  .withOrder(order)
35677
- .withShowCondition(show_condition || undefined)
35678
- .withACLs(ACLs)
35665
+ .withShowCondition(showCondition || undefined)
35666
+ .withACLs(acls)
35679
35667
  .withHidden(hidden || false)
35680
35668
  .build();
35681
35669
  };
35682
- var newCaseField = function (id, label, hint, fieldType, display_context, order) {
35670
+ var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
35683
35671
  if (order === void 0) { order = undefined; }
35684
35672
  return CaseFieldBuilder.create()
35685
35673
  .withId(id || 'personFirstName')
35686
35674
  .withFieldType(fieldType || textFieldType())
35687
- .withDisplayContext(display_context || 'OPTIONAL')
35675
+ .withDisplayContext(displayContext || 'OPTIONAL')
35688
35676
  .withHintText(hint || 'First name hint text')
35689
35677
  .withLabel(label || 'First name')
35690
35678
  .withOrder(order)
35691
35679
  .withShowSummaryContentOption(0);
35692
35680
  };
35693
- var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
35694
- if (complex_fields === void 0) { complex_fields = []; }
35695
- if (collection_field_type === void 0) { collection_field_type = undefined; }
35681
+ var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
35682
+ if (complexFields === void 0) { complexFields = []; }
35683
+ if (collectionFieldType === void 0) { collectionFieldType = undefined; }
35696
35684
  return {
35697
35685
  id: typeId || 'Text',
35698
35686
  type: type || 'Text',
35699
- complex_fields: complex_fields || [],
35700
- collection_field_type: collection_field_type || undefined
35687
+ complex_fields: complexFields || [],
35688
+ collection_field_type: collectionFieldType || undefined
35701
35689
  };
35702
35690
  };
35703
35691
  var createFixedListFieldType = function (typeId, fixedListItems) {
35704
35692
  if (fixedListItems === void 0) { fixedListItems = []; }
35705
35693
  return {
35706
- id: 'FixedList-' + typeId,
35694
+ id: "FixedList-" + typeId,
35707
35695
  type: 'FixedList',
35708
35696
  fixed_list_items: fixedListItems || []
35709
35697
  };
@@ -35711,18 +35699,18 @@
35711
35699
  var createMultiSelectListFieldType = function (typeId, fixedListItems) {
35712
35700
  if (fixedListItems === void 0) { fixedListItems = []; }
35713
35701
  return {
35714
- id: 'MultiSelectList-' + typeId,
35702
+ id: "MultiSelectList-" + typeId,
35715
35703
  type: 'MultiSelectList',
35716
35704
  fixed_list_items: fixedListItems || []
35717
35705
  };
35718
35706
  };
35719
- var createACL = function (role, create, read, update, _delete) {
35707
+ var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
35720
35708
  return ({
35721
35709
  role: role || 'roleX',
35722
- create: create,
35723
- read: read,
35724
- update: update,
35725
- delete: _delete
35710
+ create: aclCreate,
35711
+ read: aclRead,
35712
+ update: aclUpdate,
35713
+ delete: aclDelete
35726
35714
  });
35727
35715
  };
35728
35716
 
@@ -35941,7 +35929,6 @@
35941
35929
  exports.FormatTranslatorService = FormatTranslatorService;
35942
35930
  exports.GreyBarService = GreyBarService;
35943
35931
  exports.HRef = HRef;
35944
- exports.HasLoadingState = HasLoadingState;
35945
35932
  exports.HeaderBarComponent = HeaderBarComponent;
35946
35933
  exports.HeadersModule = HeadersModule;
35947
35934
  exports.HttpError = HttpError;