@hmcts/ccd-case-ui-toolkit 6.14.1-v1 → 6.14.2-clear-validation-errors

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 (224) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +709 -747
  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 +5 -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 +10 -10
  36. package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
  37. package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
  38. package/esm2015/lib/shared/components/palette/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 +2 -2
  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 +699 -731
  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 +3 -3
  143. package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
  144. package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
  145. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  146. package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
  147. package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
  148. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  149. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
  150. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  151. package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  152. package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
  153. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
  154. package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
  155. package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
  156. package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
  157. package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
  158. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  159. package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
  160. package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
  161. package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
  162. package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
  163. package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
  164. package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
  165. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  166. package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
  167. package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
  168. package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
  169. package/lib/shared/domain/case-details.model.d.ts.map +1 -1
  170. package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
  171. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
  172. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  173. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
  174. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  175. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  176. package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
  177. package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
  178. package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
  179. package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
  180. package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
  181. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
  182. package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
  183. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  184. package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
  185. package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
  186. package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
  187. package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
  188. package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
  189. package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
  190. package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
  191. package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
  192. package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
  193. package/lib/shared/domain/search/field.model.d.ts.map +1 -1
  194. package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
  195. package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
  196. package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
  197. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  198. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
  199. package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
  200. package/lib/shared/fixture/case-field-builder.d.ts +6 -6
  201. package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
  202. package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
  203. package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
  204. package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
  205. package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
  206. package/lib/shared/pipes/complex/index.d.ts +1 -1
  207. package/lib/shared/pipes/pipes.module.d.ts +1 -1
  208. package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
  209. package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
  210. package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
  211. package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
  212. package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
  213. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  214. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  215. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  216. package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
  217. package/lib/shared/services/loading/loading.service.d.ts +1 -4
  218. package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
  219. package/lib/shared/services/search/search.service.d.ts +0 -2
  220. package/lib/shared/services/search/search.service.d.ts.map +1 -1
  221. package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
  222. package/lib/shared/services/window/window.service.d.ts.map +1 -1
  223. package/package.json +2 -2
  224. 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();
@@ -10657,6 +10616,7 @@
10657
10616
  else {
10658
10617
  this.caseEdit.cancelled.emit();
10659
10618
  }
10619
+ this.caseEditDataService.clearFormValidationErrors();
10660
10620
  };
10661
10621
  CaseEditPageComponent.prototype.submitting = function () {
10662
10622
  return this.isSubmitting;
@@ -10957,12 +10917,12 @@
10957
10917
  CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
10958
10918
  var errorContext = new CallbackErrorsContext();
10959
10919
  if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
10960
- errorContext.ignore_warning = true;
10961
- errorContext.trigger_text = this.triggerTextIgnore;
10920
+ errorContext.ignoreWarning = true;
10921
+ errorContext.triggerText = this.triggerTextIgnore;
10962
10922
  }
10963
10923
  else {
10964
- errorContext.ignore_warning = false;
10965
- errorContext.trigger_text = this.triggerTextContinue;
10924
+ errorContext.ignoreWarning = false;
10925
+ errorContext.triggerText = this.triggerTextContinue;
10966
10926
  }
10967
10927
  return errorContext;
10968
10928
  };
@@ -11007,7 +10967,7 @@
11007
10967
 
11008
10968
  var AddressOption = /** @class */ (function () {
11009
10969
  function AddressOption(addressModel, description) {
11010
- if (description == null) {
10970
+ if (description === null) {
11011
10971
  this.value = addressModel;
11012
10972
  this.description = this.getDescription();
11013
10973
  }
@@ -11016,13 +10976,10 @@
11016
10976
  }
11017
10977
  }
11018
10978
  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);
10979
+ return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
11023
10980
  };
11024
10981
  AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
11025
- return value ? ', ' + value : value;
10982
+ return value ? ", " + value : value;
11026
10983
  };
11027
10984
  AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
11028
10985
  return value.replace(new RegExp('^,', 'gi'), '');
@@ -11166,7 +11123,7 @@
11166
11123
  this.missingPostcode = false;
11167
11124
  var postcode_1 = this.postcode.value;
11168
11125
  this.caseField.value = null;
11169
- this.addressOptions = new Array();
11126
+ this.addressOptions = [];
11170
11127
  this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
11171
11128
  result.forEach(function (address) {
11172
11129
  _this.addressOptions.push(new AddressOption(address, null));
@@ -11209,7 +11166,7 @@
11209
11166
  var hasAddress = false;
11210
11167
  if (address) {
11211
11168
  Object.keys(address).forEach(function (key) {
11212
- if (address[key] != null) {
11169
+ if (address[key] !== null) {
11213
11170
  hasAddress = true;
11214
11171
  }
11215
11172
  });
@@ -11232,7 +11189,7 @@
11232
11189
  };
11233
11190
  WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
11234
11191
  return numberOfAddresses === 0 ? 'No address found'
11235
- : numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
11192
+ : "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
11236
11193
  };
11237
11194
  WriteAddressFieldComponent.prototype.setFormValue = function () {
11238
11195
  if (this.writeComplexFieldComponent.complexGroup) {
@@ -12790,7 +12747,7 @@
12790
12747
  }
12791
12748
  };
12792
12749
  WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
12793
- var e_1, _a;
12750
+ var e_1, _c;
12794
12751
  if (isNew === void 0) { isNew = false; }
12795
12752
  /**
12796
12753
  * What follow is code that makes me want to go jump in the shower!
@@ -12826,8 +12783,8 @@
12826
12783
  if (!value) {
12827
12784
  value = new i2.FormGroup({});
12828
12785
  try {
12829
- for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
12830
- var key = _c.value;
12786
+ for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
12787
+ var key = _e.value;
12831
12788
  value.addControl(key, group.get(key));
12832
12789
  // DON'T remove the control for this key from the outer group or it
12833
12790
  // goes awry. So DON'T uncomment the below line!
@@ -12837,7 +12794,7 @@
12837
12794
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
12838
12795
  finally {
12839
12796
  try {
12840
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12797
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
12841
12798
  }
12842
12799
  finally { if (e_1) throw e_1.error; }
12843
12800
  }
@@ -12968,6 +12925,7 @@
12968
12925
  this.formArray.removeAt(index);
12969
12926
  };
12970
12927
  WriteCollectionFieldComponent.prototype.resetIds = function (index) {
12928
+ var _a, _b;
12971
12929
  for (var i = index; i < this.collItems.length; i++) {
12972
12930
  var counter = i + 1;
12973
12931
  if (this.collItems[i].index && this.collItems[i].index === counter) {
@@ -12977,16 +12935,15 @@
12977
12935
  && this.collItems[i].caseField.id === counter.toString()) {
12978
12936
  this.collItems[i].caseField.id = i.toString();
12979
12937
  }
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());
12938
+ var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12939
+ var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
12982
12940
  if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
12983
12941
  this.collItems[i].prefix = idPrefix1;
12984
12942
  }
12985
- var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
12986
- && this.collItems[i].container['component'].idPrefix ? true : false;
12943
+ 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
12944
  var idPrefix2 = idPrefixAvailable ?
12988
- this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
12989
- var idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
12945
+ this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
12946
+ var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
12990
12947
  if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
12991
12948
  this.collItems[i].container['component'].idPrefix = idPrefix2;
12992
12949
  }
@@ -14342,6 +14299,257 @@
14342
14299
  }], null, null);
14343
14300
  })();
14344
14301
 
14302
+ var FixedListPipe = /** @class */ (function () {
14303
+ function FixedListPipe() {
14304
+ }
14305
+ FixedListPipe.prototype.transform = function (value, items) {
14306
+ if (!!items) {
14307
+ var item = items.find(function (i) { return i.code === value; });
14308
+ return item ? item.label : FixedListPipe.EMPTY;
14309
+ }
14310
+ else {
14311
+ return FixedListPipe.EMPTY;
14312
+ }
14313
+ };
14314
+ return FixedListPipe;
14315
+ }());
14316
+ FixedListPipe.EMPTY = '';
14317
+ FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
14318
+ FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
14319
+ (function () {
14320
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
14321
+ type: i0.Pipe,
14322
+ args: [{
14323
+ name: 'ccdFixedList'
14324
+ }]
14325
+ }], null, null);
14326
+ })();
14327
+
14328
+ function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
14329
+ if (rf & 1) {
14330
+ i0__namespace.ɵɵelementStart(0, "div");
14331
+ i0__namespace.ɵɵtext(1);
14332
+ i0__namespace.ɵɵpipe(2, "ccdFixedList");
14333
+ i0__namespace.ɵɵelementEnd();
14334
+ }
14335
+ if (rf & 2) {
14336
+ var value_r1 = ctx.$implicit;
14337
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14338
+ i0__namespace.ɵɵadvance(1);
14339
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
14340
+ }
14341
+ }
14342
+ var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14343
+ __extends(ReadDynamicMultiSelectListFieldComponent, _super);
14344
+ function ReadDynamicMultiSelectListFieldComponent() {
14345
+ return _super !== null && _super.apply(this, arguments) || this;
14346
+ }
14347
+ ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14348
+ /**
14349
+ *
14350
+ * Reassigning list_items from formatted_list when list_items is empty
14351
+ */
14352
+ if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
14353
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14354
+ }
14355
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14356
+ this.caseField.value = this.caseField.formatted_value.value;
14357
+ }
14358
+ _super.prototype.ngOnInit.call(this);
14359
+ };
14360
+ return ReadDynamicMultiSelectListFieldComponent;
14361
+ }(AbstractFieldReadComponent));
14362
+ ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
14363
+ 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) {
14364
+ if (rf & 1) {
14365
+ i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
14366
+ }
14367
+ if (rf & 2) {
14368
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
14369
+ }
14370
+ }, 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}"] });
14371
+ var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
14372
+ (function () {
14373
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
14374
+ type: i0.Component,
14375
+ args: [{
14376
+ selector: 'ccd-read-dynamic-multi-select-list-field',
14377
+ templateUrl: './read-dynamic-multi-select-list-field.html',
14378
+ styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
14379
+ }]
14380
+ }], null, null);
14381
+ })();
14382
+
14383
+ function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
14384
+ if (rf & 1) {
14385
+ i0__namespace.ɵɵelementStart(0, "span", 5);
14386
+ i0__namespace.ɵɵtext(1);
14387
+ i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
14388
+ i0__namespace.ɵɵelementEnd();
14389
+ }
14390
+ if (rf & 2) {
14391
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
14392
+ i0__namespace.ɵɵadvance(1);
14393
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
14394
+ }
14395
+ }
14396
+ function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
14397
+ if (rf & 1) {
14398
+ i0__namespace.ɵɵelementStart(0, "span", 6);
14399
+ i0__namespace.ɵɵtext(1);
14400
+ i0__namespace.ɵɵelementEnd();
14401
+ }
14402
+ if (rf & 2) {
14403
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
14404
+ i0__namespace.ɵɵadvance(1);
14405
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
14406
+ }
14407
+ }
14408
+ function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
14409
+ if (rf & 1) {
14410
+ i0__namespace.ɵɵelementStart(0, "span", 7);
14411
+ i0__namespace.ɵɵtext(1);
14412
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
14413
+ i0__namespace.ɵɵelementEnd();
14414
+ }
14415
+ if (rf & 2) {
14416
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
14417
+ i0__namespace.ɵɵadvance(1);
14418
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
14419
+ }
14420
+ }
14421
+ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
14422
+ if (rf & 1) {
14423
+ var _r6_1 = i0__namespace.ɵɵgetCurrentView();
14424
+ i0__namespace.ɵɵelementContainerStart(0);
14425
+ i0__namespace.ɵɵelementStart(1, "div", 8);
14426
+ i0__namespace.ɵɵelementStart(2, "input", 9);
14427
+ 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); });
14428
+ i0__namespace.ɵɵelementEnd();
14429
+ i0__namespace.ɵɵelementStart(3, "label", 10);
14430
+ i0__namespace.ɵɵtext(4);
14431
+ i0__namespace.ɵɵelementEnd();
14432
+ i0__namespace.ɵɵelementEnd();
14433
+ i0__namespace.ɵɵelementContainerEnd();
14434
+ }
14435
+ if (rf & 2) {
14436
+ var checkbox_r4 = ctx.$implicit;
14437
+ var ctx_r3 = i0__namespace.ɵɵnextContext();
14438
+ i0__namespace.ɵɵadvance(2);
14439
+ i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
14440
+ i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
14441
+ i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
14442
+ i0__namespace.ɵɵadvance(1);
14443
+ i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
14444
+ i0__namespace.ɵɵadvance(1);
14445
+ i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
14446
+ }
14447
+ }
14448
+ var _c0$L = function (a0) { return { "error": a0 }; };
14449
+ var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
14450
+ __extends(WriteDynamicMultiSelectListFieldComponent, _super);
14451
+ function WriteDynamicMultiSelectListFieldComponent() {
14452
+ return _super !== null && _super.apply(this, arguments) || this;
14453
+ }
14454
+ WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
14455
+ var _this = this;
14456
+ this.checkboxes = new i2.FormArray([]);
14457
+ this.setInitialCaseList();
14458
+ this.setInitialCaseFieldValue();
14459
+ // Initialise array with existing values
14460
+ if (this.caseField.value && Array.isArray(this.caseField.value)) {
14461
+ var values = this.caseField.value;
14462
+ values.forEach(function (value) {
14463
+ _this.checkboxes.push(new i2.FormControl(value));
14464
+ });
14465
+ }
14466
+ this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
14467
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14468
+ };
14469
+ WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
14470
+ var _this = this;
14471
+ var target = event.target;
14472
+ if (!target || !target.value) {
14473
+ return;
14474
+ }
14475
+ var selectedListItem = this.getValueListItem(target.value);
14476
+ if (!this.isSelected(target.value)) {
14477
+ // Add a new control in the FormArray
14478
+ this.checkboxes.push(new i2.FormControl(selectedListItem));
14479
+ }
14480
+ else {
14481
+ // Remove the control from the FormArray
14482
+ this.checkboxes.controls.forEach(function (ctrl, i) {
14483
+ if (ctrl.value.code === target.value) {
14484
+ _this.checkboxes.removeAt(i);
14485
+ }
14486
+ });
14487
+ }
14488
+ this.dynamicListFormControl.setValue(this.checkboxes.value);
14489
+ };
14490
+ WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
14491
+ if (this.checkboxes && this.checkboxes.controls) {
14492
+ return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
14493
+ }
14494
+ };
14495
+ WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
14496
+ return this.caseField.list_items.find(function (i) { return i.code === value; });
14497
+ };
14498
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
14499
+ var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
14500
+ var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
14501
+ if (!hasListItems && hasFormattedListItems) {
14502
+ this.caseField.list_items = this.caseField.formatted_value.list_items;
14503
+ }
14504
+ };
14505
+ WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
14506
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
14507
+ this.caseField.value = this.caseField.formatted_value.value;
14508
+ }
14509
+ var isNull = this.caseField.value === undefined || this.caseField.value === '';
14510
+ if (isNull || !Array.isArray(this.caseField.value)) {
14511
+ this.caseField.value = [];
14512
+ }
14513
+ };
14514
+ return WriteDynamicMultiSelectListFieldComponent;
14515
+ }(AbstractFieldWriteComponent));
14516
+ WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
14517
+ 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) {
14518
+ if (rf & 1) {
14519
+ i0__namespace.ɵɵelementStart(0, "div", 0);
14520
+ i0__namespace.ɵɵelementStart(1, "fieldset");
14521
+ i0__namespace.ɵɵelementStart(2, "legend");
14522
+ i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
14523
+ i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
14524
+ i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
14525
+ i0__namespace.ɵɵelementEnd();
14526
+ i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
14527
+ i0__namespace.ɵɵelementEnd();
14528
+ i0__namespace.ɵɵelementEnd();
14529
+ }
14530
+ if (rf & 2) {
14531
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
14532
+ i0__namespace.ɵɵadvance(3);
14533
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
14534
+ i0__namespace.ɵɵadvance(1);
14535
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
14536
+ i0__namespace.ɵɵadvance(1);
14537
+ i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
14538
+ i0__namespace.ɵɵadvance(1);
14539
+ i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
14540
+ }
14541
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14542
+ var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
14543
+ (function () {
14544
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
14545
+ type: i0.Component,
14546
+ args: [{
14547
+ selector: 'ccd-write-dynamic-multi-select-list-field',
14548
+ templateUrl: './write-dynamic-multi-select-list-field.html'
14549
+ }]
14550
+ }], null, null);
14551
+ })();
14552
+
14345
14553
  var DynamicRadioListPipe = /** @class */ (function () {
14346
14554
  function DynamicRadioListPipe() {
14347
14555
  }
@@ -14462,7 +14670,7 @@
14462
14670
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
14463
14671
  }
14464
14672
  }
14465
- var _c0$L = function (a0) { return { selected: a0 }; };
14673
+ var _c0$K = function (a0) { return { selected: a0 }; };
14466
14674
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
14467
14675
  if (rf & 1) {
14468
14676
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -14475,7 +14683,7 @@
14475
14683
  if (rf & 2) {
14476
14684
  var radioButton_r5 = ctx.$implicit;
14477
14685
  var ctx_r4 = i0__namespace.ɵɵnextContext();
14478
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14686
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14479
14687
  i0__namespace.ɵɵadvance(1);
14480
14688
  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
14689
  i0__namespace.ɵɵadvance(1);
@@ -14639,7 +14847,7 @@
14639
14847
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
14640
14848
  }
14641
14849
  }
14642
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14850
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14643
14851
  var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14644
14852
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
14645
14853
  __extends(WriteEmailFieldComponent, _super);
@@ -14664,7 +14872,7 @@
14664
14872
  i0__namespace.ɵɵelementEnd();
14665
14873
  }
14666
14874
  if (rf & 2) {
14667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14875
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14668
14876
  i0__namespace.ɵɵadvance(1);
14669
14877
  i0__namespace.ɵɵproperty("for", ctx.id());
14670
14878
  i0__namespace.ɵɵadvance(1);
@@ -14688,32 +14896,6 @@
14688
14896
  }], null, null);
14689
14897
  })();
14690
14898
 
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
14899
  var ReadFixedListFieldComponent = /** @class */ (function (_super) {
14718
14900
  __extends(ReadFixedListFieldComponent, _super);
14719
14901
  function ReadFixedListFieldComponent() {
@@ -14796,7 +14978,7 @@
14796
14978
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
14797
14979
  }
14798
14980
  }
14799
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14981
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14800
14982
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
14801
14983
  __extends(WriteFixedListFieldComponent, _super);
14802
14984
  function WriteFixedListFieldComponent() {
@@ -14845,7 +15027,7 @@
14845
15027
  i0__namespace.ɵɵelementEnd();
14846
15028
  }
14847
15029
  if (rf & 2) {
14848
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15030
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
14849
15031
  i0__namespace.ɵɵadvance(1);
14850
15032
  i0__namespace.ɵɵproperty("for", ctx.id());
14851
15033
  i0__namespace.ɵɵadvance(1);
@@ -14963,7 +15145,7 @@
14963
15145
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
14964
15146
  }
14965
15147
  }
14966
- var _c0$I = function (a0) { return { selected: a0 }; };
15148
+ var _c0$H = function (a0) { return { selected: a0 }; };
14967
15149
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
14968
15150
  if (rf & 1) {
14969
15151
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -14976,7 +15158,7 @@
14976
15158
  if (rf & 2) {
14977
15159
  var radioButton_r4 = ctx.$implicit;
14978
15160
  var ctx_r3 = i0__namespace.ɵɵnextContext();
14979
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15161
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
14980
15162
  i0__namespace.ɵɵadvance(1);
14981
15163
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
14982
15164
  i0__namespace.ɵɵadvance(1);
@@ -15146,7 +15328,7 @@
15146
15328
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15147
15329
  }
15148
15330
  }
15149
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15331
+ var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15150
15332
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15151
15333
  if (rf & 1) {
15152
15334
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15158,7 +15340,7 @@
15158
15340
  if (rf & 2) {
15159
15341
  var judicialUser_r5 = ctx.$implicit;
15160
15342
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15161
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15343
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15162
15344
  i0__namespace.ɵɵadvance(1);
15163
15345
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15164
15346
  }
@@ -15397,7 +15579,7 @@
15397
15579
  casesResponse.push(_this.mapResponse(result));
15398
15580
  });
15399
15581
  });
15400
- var caseLinks = casesResponse.map(function (item) {
15582
+ _this.linkedCases = casesResponse.map(function (item) {
15401
15583
  return {
15402
15584
  caseReference: item.caseReference,
15403
15585
  caseName: item.caseName,
@@ -15411,7 +15593,6 @@
15411
15593
  }),
15412
15594
  };
15413
15595
  });
15414
- _this.linkedCases = caseLinks;
15415
15596
  _this.serverLinkedApiError = null;
15416
15597
  }, function (err) {
15417
15598
  _this.serverLinkedApiError = {
@@ -15948,7 +16129,7 @@
15948
16129
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
15949
16130
  }
15950
16131
  }
15951
- var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
16132
+ var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
15952
16133
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
15953
16134
  if (rf & 1) {
15954
16135
  i0__namespace.ɵɵelementStart(0, "div", 35);
@@ -15966,7 +16147,7 @@
15966
16147
  }
15967
16148
  if (rf & 2) {
15968
16149
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
15969
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
16150
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
15970
16151
  i0__namespace.ɵɵadvance(3);
15971
16152
  i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
15972
16153
  }
@@ -16023,11 +16204,11 @@
16023
16204
  var ctx_r0 = i0__namespace.ɵɵnextContext();
16024
16205
  i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
16025
16206
  i0__namespace.ɵɵadvance(1);
16026
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
16207
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
16027
16208
  i0__namespace.ɵɵadvance(3);
16028
16209
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
16029
16210
  i0__namespace.ɵɵadvance(2);
16030
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
16211
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
16031
16212
  i0__namespace.ɵɵadvance(5);
16032
16213
  i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
16033
16214
  i0__namespace.ɵɵadvance(2);
@@ -16461,7 +16642,7 @@
16461
16642
  i0__namespace.ɵɵadvance(4);
16462
16643
  i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
16463
16644
  i0__namespace.ɵɵadvance(4);
16464
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
16645
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
16465
16646
  i0__namespace.ɵɵadvance(1);
16466
16647
  i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
16467
16648
  i0__namespace.ɵɵadvance(18);
@@ -17145,7 +17326,7 @@
17145
17326
  i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
17146
17327
  }
17147
17328
  }
17148
- var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
17329
+ var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
17149
17330
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
17150
17331
  if (rf & 1) {
17151
17332
  i0__namespace.ɵɵelementStart(0, "div", 7);
@@ -17157,7 +17338,7 @@
17157
17338
  }
17158
17339
  if (rf & 2) {
17159
17340
  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);
17341
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17161
17342
  i0__namespace.ɵɵadvance(1);
17162
17343
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17163
17344
  i0__namespace.ɵɵadvance(2);
@@ -17333,6 +17514,7 @@
17333
17514
  }] });
17334
17515
  })();
17335
17516
 
17517
+ // tslint:disable:variable-name
17336
17518
  var LinkCaseReason = /** @class */ (function () {
17337
17519
  function LinkCaseReason() {
17338
17520
  }
@@ -17491,7 +17673,7 @@
17491
17673
  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
17674
  }
17493
17675
  this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
17494
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17676
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17495
17677
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17496
17678
  next: function (reasons) {
17497
17679
  _this.reasonListLoaded = true;
@@ -17753,7 +17935,7 @@
17753
17935
  };
17754
17936
  WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
17755
17937
  var _this = this;
17756
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
17938
+ var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
17757
17939
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
17758
17940
  next: function (reasons) {
17759
17941
  // Sort in ascending order
@@ -17812,11 +17994,10 @@
17812
17994
  var _this = this;
17813
17995
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
17814
17996
  var caseViewFiltered = caseView.tabs.filter(function (tab) {
17815
- var linkField = tab.fields.some(function (_b) {
17997
+ return tab.fields.some(function (_b) {
17816
17998
  var field_type = _b.field_type;
17817
17999
  return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
17818
18000
  });
17819
- return linkField;
17820
18001
  });
17821
18002
  if (caseViewFiltered) {
17822
18003
  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 +18280,7 @@
18099
18280
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
18100
18281
  }
18101
18282
  }
18102
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
18283
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
18103
18284
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
18104
18285
  __extends(WriteMoneyGbpFieldComponent, _super);
18105
18286
  function WriteMoneyGbpFieldComponent() {
@@ -18129,7 +18310,7 @@
18129
18310
  i0__namespace.ɵɵelementEnd();
18130
18311
  }
18131
18312
  if (rf & 2) {
18132
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18313
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
18133
18314
  i0__namespace.ɵɵadvance(1);
18134
18315
  i0__namespace.ɵɵproperty("for", ctx.id());
18135
18316
  i0__namespace.ɵɵadvance(1);
@@ -18277,7 +18458,7 @@
18277
18458
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
18278
18459
  }
18279
18460
  }
18280
- var _c0$D = function (a0) { return { "error": a0 }; };
18461
+ var _c0$C = function (a0) { return { "error": a0 }; };
18281
18462
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
18282
18463
  __extends(WriteMultiSelectListFieldComponent, _super);
18283
18464
  function WriteMultiSelectListFieldComponent() {
@@ -18341,7 +18522,7 @@
18341
18522
  i0__namespace.ɵɵelementEnd();
18342
18523
  }
18343
18524
  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());
18525
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
18345
18526
  i0__namespace.ɵɵadvance(3);
18346
18527
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18347
18528
  i0__namespace.ɵɵadvance(1);
@@ -18432,7 +18613,7 @@
18432
18613
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
18433
18614
  }
18434
18615
  }
18435
- var _c0$C = function (a0) { return { "form-group-error": a0 }; };
18616
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
18436
18617
  var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
18437
18618
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
18438
18619
  __extends(WriteNumberFieldComponent, _super);
@@ -18457,7 +18638,7 @@
18457
18638
  i0__namespace.ɵɵelementEnd();
18458
18639
  }
18459
18640
  if (rf & 2) {
18460
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
18641
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
18461
18642
  i0__namespace.ɵɵadvance(1);
18462
18643
  i0__namespace.ɵɵproperty("for", ctx.id());
18463
18644
  i0__namespace.ɵɵadvance(1);
@@ -18758,7 +18939,7 @@
18758
18939
  i0__namespace.ɵɵelementEnd();
18759
18940
  }
18760
18941
  }
18761
- var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
18942
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
18762
18943
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
18763
18944
  if (rf & 1) {
18764
18945
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -18774,7 +18955,7 @@
18774
18955
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
18775
18956
  var tmp_0_0 = null;
18776
18957
  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));
18958
+ 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
18959
  i0__namespace.ɵɵadvance(2);
18779
18960
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
18780
18961
  i0__namespace.ɵɵadvance(2);
@@ -19181,231 +19362,6 @@
19181
19362
  }], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
19182
19363
  })();
19183
19364
 
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
19365
  var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
19410
19366
  __extends(ReadPhoneUKFieldComponent, _super);
19411
19367
  function ReadPhoneUKFieldComponent() {
@@ -19606,7 +19562,7 @@
19606
19562
  WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
19607
19563
  if (this.browserService.isIEOrEdge()) {
19608
19564
  event.target.style.height = 'auto';
19609
- event.target.style.height = event.target.scrollHeight + 'px';
19565
+ event.target.style.height = event.target.scrollHeight + "px";
19610
19566
  event.target.scrollTop = event.target.scrollHeight;
19611
19567
  }
19612
19568
  };
@@ -19846,6 +19802,7 @@
19846
19802
  return YesNoService.EMPTY;
19847
19803
  };
19848
19804
  YesNoService.prototype.isYes = function (value) {
19805
+ // tslint:disable-next-line:switch-default
19849
19806
  switch (typeof (value)) {
19850
19807
  case 'boolean':
19851
19808
  return value;
@@ -19855,6 +19812,7 @@
19855
19812
  return false;
19856
19813
  };
19857
19814
  YesNoService.prototype.isNo = function (value) {
19815
+ // tslint:disable-next-line:switch-default
19858
19816
  switch (typeof (value)) {
19859
19817
  case 'boolean':
19860
19818
  return !value;
@@ -20828,6 +20786,7 @@
20828
20786
  return CaseFileViewCategory;
20829
20787
  }());
20830
20788
 
20789
+ // tslint:disable:variable-name
20831
20790
  var CaseFileViewDocument = /** @class */ (function () {
20832
20791
  function CaseFileViewDocument() {
20833
20792
  }
@@ -22181,7 +22140,7 @@
22181
22140
  // is expected not to have a party name)
22182
22141
  if (this.flagsData) {
22183
22142
  this.filteredFlagsData =
22184
- this.flagsData.filter(function (f) { return f.flags.partyName != null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22143
+ this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
22185
22144
  }
22186
22145
  // Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
22187
22146
  if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
@@ -23478,18 +23437,19 @@
23478
23437
  field.value = { CaseReference: value };
23479
23438
  return field;
23480
23439
  };
23481
- ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
23440
+ ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
23482
23441
  return classTransformer.plainToClassFromExist(new CaseField(), {
23483
23442
  id: id,
23484
23443
  label: label,
23485
23444
  display_context: 'READONLY',
23486
23445
  value: value,
23487
- field_type: field_type
23446
+ field_type: fieldType
23488
23447
  });
23489
23448
  };
23490
23449
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
23491
23450
  var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
23492
23451
  || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
23452
+ // tslint:disable-next-line:switch-default
23493
23453
  switch (this.columnsHorizontalLabel[column].type.type) {
23494
23454
  case 'Number':
23495
23455
  case 'MoneyGBP': {
@@ -24615,6 +24575,7 @@
24615
24575
  return FeeValue;
24616
24576
  }());
24617
24577
 
24578
+ // tslint:disable:variable-name
24618
24579
  var Fee = /** @class */ (function () {
24619
24580
  function Fee() {
24620
24581
  }
@@ -25320,7 +25281,7 @@
25320
25281
  function CcdPageFieldsPipe() {
25321
25282
  }
25322
25283
  CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
25323
- var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25284
+ var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
25324
25285
  var control = dataFormGroup.controls['data'].get(key);
25325
25286
  return control['caseField'];
25326
25287
  }).filter(function (field) {
@@ -25340,7 +25301,7 @@
25340
25301
  field_type: {
25341
25302
  id: page.id,
25342
25303
  type: 'Complex',
25343
- complex_fields: complex_fields
25304
+ complex_fields: complexFields
25344
25305
  }
25345
25306
  });
25346
25307
  };
@@ -25519,11 +25480,11 @@
25519
25480
  }
25520
25481
  return childrenCaseFields;
25521
25482
  };
25522
- CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
25523
- return case_field.field_type.type === 'Complex';
25483
+ CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
25484
+ return caseField.field_type.type === 'Complex';
25524
25485
  };
25525
- CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
25526
- return case_field.field_type.type === 'Collection';
25486
+ CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
25487
+ return caseField.field_type.type === 'Collection';
25527
25488
  };
25528
25489
  CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
25529
25490
  return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
@@ -26724,7 +26685,7 @@
26724
26685
  if (caseField.field_type.type === 'Complex') {
26725
26686
  // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
26726
26687
  // handle both null and undefined values
26727
- if (caseField.value != null) {
26688
+ if (caseField.value !== null) {
26728
26689
  // Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
26729
26690
  // CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
26730
26691
  // parent)
@@ -26790,8 +26751,8 @@
26790
26751
  this.caseEdit.navigateToPage(pageId);
26791
26752
  };
26792
26753
  CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
26793
- this.ignoreWarning = errorContext.ignore_warning;
26794
- this.triggerText = errorContext.trigger_text;
26754
+ this.ignoreWarning = errorContext.ignoreWarning;
26755
+ this.triggerText = errorContext.triggerText;
26795
26756
  };
26796
26757
  CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
26797
26758
  if (null === this.editForm.get('data').get(field.id)) {
@@ -27423,6 +27384,7 @@
27423
27384
  { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
27424
27385
  ]
27425
27386
  });
27387
+ // tslint:disable-next-line:switch-default
27426
27388
  switch (portalType) {
27427
27389
  case EventCompletionPortalTypes.TaskCancelled:
27428
27390
  this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
@@ -27957,36 +27919,36 @@
27957
27919
  this.screenReaderCurrentLabel = "You're on page";
27958
27920
  this.pageChange = new i0.EventEmitter();
27959
27921
  this.pageBoundsCorrection = new i0.EventEmitter();
27960
- this._directionLinks = true;
27961
- this._autoHide = false;
27962
- this._responsive = false;
27922
+ this.pDirectionLinks = true;
27923
+ this.pAutoHide = false;
27924
+ this.pResponsive = false;
27963
27925
  }
27964
27926
  Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
27965
27927
  get: function () {
27966
- return this._directionLinks;
27928
+ return this.pDirectionLinks;
27967
27929
  },
27968
27930
  set: function (value) {
27969
- this._directionLinks = coerceToBoolean(value);
27931
+ this.pDirectionLinks = coerceToBoolean(value);
27970
27932
  },
27971
27933
  enumerable: false,
27972
27934
  configurable: true
27973
27935
  });
27974
27936
  Object.defineProperty(PaginationComponent.prototype, "autoHide", {
27975
27937
  get: function () {
27976
- return this._autoHide;
27938
+ return this.pAutoHide;
27977
27939
  },
27978
27940
  set: function (value) {
27979
- this._autoHide = coerceToBoolean(value);
27941
+ this.pAutoHide = coerceToBoolean(value);
27980
27942
  },
27981
27943
  enumerable: false,
27982
27944
  configurable: true
27983
27945
  });
27984
27946
  Object.defineProperty(PaginationComponent.prototype, "responsive", {
27985
27947
  get: function () {
27986
- return this._responsive;
27948
+ return this.pResponsive;
27987
27949
  },
27988
27950
  set: function (value) {
27989
- this._responsive = coerceToBoolean(value);
27951
+ this.pResponsive = coerceToBoolean(value);
27990
27952
  },
27991
27953
  enumerable: false,
27992
27954
  configurable: true
@@ -28753,7 +28715,7 @@
28753
28715
  var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
28754
28716
  workbasketInputs.forEach(function (item) {
28755
28717
  if (item.field.elementPath) {
28756
- item.field.id = item.field.id + '.' + item.field.elementPath;
28718
+ item.field.id = item.field.id + "." + item.field.elementPath;
28757
28719
  }
28758
28720
  item.field.label = item.label;
28759
28721
  if (formValue) {
@@ -28805,7 +28767,7 @@
28805
28767
  var value = formGroupLS[key];
28806
28768
  // Clear the filter form group control values if it has a value in local storage
28807
28769
  // 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) {
28770
+ if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
28809
28771
  this.formGroup.get(key).setValue(null);
28810
28772
  }
28811
28773
  }
@@ -29934,7 +29896,7 @@
29934
29896
  this.eventTrigger = this.route.snapshot.data.eventTrigger;
29935
29897
  if (this.activityPollingService.isEnabled) {
29936
29898
  this.ngZone.runOutsideAngular(function () {
29937
- _this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
29899
+ _this.activitySubscription = _this.postEditActivity().subscribe(function () {
29938
29900
  // console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
29939
29901
  });
29940
29902
  });
@@ -30906,8 +30868,8 @@
30906
30868
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
30907
30869
  };
30908
30870
  CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
30909
- this.ignoreWarning = callbackErrorsContext.ignore_warning;
30910
- this.triggerText = callbackErrorsContext.trigger_text;
30871
+ this.ignoreWarning = callbackErrorsContext.ignoreWarning;
30872
+ this.triggerText = callbackErrorsContext.triggerText;
30911
30873
  };
30912
30874
  CaseFullAccessViewComponent.prototype.isDraft = function () {
30913
30875
  return Draft.isDraft(this.caseDetails.case_id);
@@ -31186,7 +31148,7 @@
31186
31148
  * or the empty string
31187
31149
  */
31188
31150
  PrintUrlPipe.prototype.transform = function (remoteUrl) {
31189
- if (remoteUrl && remoteUrl.length > 0) {
31151
+ if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
31190
31152
  var printServiceUrlPathname = void 0;
31191
31153
  /**
31192
31154
  * Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
@@ -31202,7 +31164,7 @@
31202
31164
  printServiceUrlPathname = urlParser.pathname;
31203
31165
  if (printServiceUrlPathname[0] !== '/') {
31204
31166
  // Fix for IE11; it returns the pathname without leading slash
31205
- printServiceUrlPathname = '/' + printServiceUrlPathname;
31167
+ printServiceUrlPathname = "/" + printServiceUrlPathname;
31206
31168
  }
31207
31169
  }
31208
31170
  else {
@@ -31405,10 +31367,10 @@
31405
31367
  };
31406
31368
  CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
31407
31369
  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;
31370
+ var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
31371
+ var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
31372
+ this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
31373
+ this.userAccessType = accessProcess ? accessProcess.value : null;
31412
31374
  }
31413
31375
  };
31414
31376
  CaseViewerComponent.prototype.isDataLoaded = function () {
@@ -32704,11 +32666,11 @@
32704
32666
  };
32705
32667
  this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
32706
32668
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
32707
- .subscribe(function (_response) {
32669
+ .subscribe(function () {
32708
32670
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
32709
32671
  // Angular 7.2!
32710
32672
  _this.router.navigate(['success'], { relativeTo: _this.route });
32711
- }, function (_error) {
32673
+ }, function () {
32712
32674
  // Navigate to error page
32713
32675
  });
32714
32676
  }
@@ -32722,7 +32684,7 @@
32722
32684
  }
32723
32685
  };
32724
32686
  CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
32725
- return input.value == null || input.value.trim().length === 0;
32687
+ return input.value === null || input.value.trim().length === 0;
32726
32688
  };
32727
32689
  return CaseChallengedAccessRequestComponent;
32728
32690
  }());
@@ -33346,11 +33308,11 @@
33346
33308
  };
33347
33309
  this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
33348
33310
  .pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
33349
- .subscribe(function (_response) {
33311
+ .subscribe(function () {
33350
33312
  // Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
33351
33313
  // Angular 7.2
33352
33314
  _this.router.navigate(['success'], { relativeTo: _this.route });
33353
- }, function (_error) {
33315
+ }, function () {
33354
33316
  // Navigate to error page
33355
33317
  });
33356
33318
  }
@@ -33365,7 +33327,7 @@
33365
33327
  }
33366
33328
  };
33367
33329
  CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
33368
- return input.value == null || input.value.trim().length === 0;
33330
+ return input.value === null || input.value.trim().length === 0;
33369
33331
  };
33370
33332
  return CaseSpecificAccessRequestComponent;
33371
33333
  }());
@@ -34266,7 +34228,7 @@
34266
34228
  }
34267
34229
  searchInputs.forEach(function (item) {
34268
34230
  if (item.field.elementPath) {
34269
- item.field.id = item.field.id + '.' + item.field.elementPath;
34231
+ item.field.id = item.field.id + "." + item.field.elementPath;
34270
34232
  }
34271
34233
  item.field.label = item.label;
34272
34234
  if (formValueObject) {
@@ -34545,7 +34507,7 @@
34545
34507
  if (rf & 2) {
34546
34508
  var ctx_r3 = i0__namespace.ɵɵnextContext(2);
34547
34509
  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. ");
34510
+ 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
34511
  }
34550
34512
  }
34551
34513
  function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
@@ -35104,7 +35066,7 @@
35104
35066
  };
35105
35067
  Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
35106
35068
  get: function () {
35107
- var total = this.paginationMetadata.total_results_count;
35069
+ var total = this.paginationMetadata.totalResultsCount;
35108
35070
  var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
35109
35071
  this.paginationLimitEnforced = maximumResultReached;
35110
35072
  return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
@@ -35255,7 +35217,7 @@
35255
35217
  return col;
35256
35218
  };
35257
35219
  SearchResultComponent.prototype.hasResults = function () {
35258
- return this.resultView.results.length && this.paginationMetadata.total_pages_count;
35220
+ return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
35259
35221
  };
35260
35222
  SearchResultComponent.prototype.hasDrafts = function () {
35261
35223
  return this.resultView.hasDrafts();
@@ -35354,7 +35316,7 @@
35354
35316
  return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
35355
35317
  };
35356
35318
  SearchResultComponent.prototype.getTotalResults = function () {
35357
- var total = this.paginationMetadata.total_results_count + this.draftsCount;
35319
+ var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
35358
35320
  return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
35359
35321
  };
35360
35322
  SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
@@ -35512,6 +35474,7 @@
35512
35474
  })();
35513
35475
  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
35476
 
35477
+ // tslint:disable:variable-name
35515
35478
  var ComplexFieldOverride = /** @class */ (function () {
35516
35479
  function ComplexFieldOverride() {
35517
35480
  }
@@ -35533,24 +35496,24 @@
35533
35496
  this.caseField.id = id;
35534
35497
  return this;
35535
35498
  };
35536
- CaseFieldBuilder.prototype.withFieldType = function (field_type) {
35537
- this.caseField.field_type = field_type;
35499
+ CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
35500
+ this.caseField.field_type = fieldType;
35538
35501
  return this;
35539
35502
  };
35540
- CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
35541
- this.caseField.display_context = display_context;
35503
+ CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
35504
+ this.caseField.display_context = displayContext;
35542
35505
  return this;
35543
35506
  };
35544
- CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
35545
- this.caseField.display_context_parameter = display_context_parameter;
35507
+ CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
35508
+ this.caseField.display_context_parameter = displayContextParameter;
35546
35509
  return this;
35547
35510
  };
35548
35511
  CaseFieldBuilder.prototype.withHidden = function (hidden) {
35549
35512
  this.caseField.hidden = hidden;
35550
35513
  return this;
35551
35514
  };
35552
- CaseFieldBuilder.prototype.withHintText = function (hint_text) {
35553
- this.caseField.hint_text = hint_text;
35515
+ CaseFieldBuilder.prototype.withHintText = function (hintText) {
35516
+ this.caseField.hint_text = hintText;
35554
35517
  return this;
35555
35518
  };
35556
35519
  CaseFieldBuilder.prototype.withLabel = function (label) {
@@ -35561,12 +35524,12 @@
35561
35524
  this.caseField.order = order;
35562
35525
  return this;
35563
35526
  };
35564
- CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
35565
- this.caseField.security_label = security_label;
35527
+ CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
35528
+ this.caseField.security_label = securityLabel;
35566
35529
  return this;
35567
35530
  };
35568
- CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
35569
- this.caseField.show_condition = show_condition;
35531
+ CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
35532
+ this.caseField.show_condition = showCondition;
35570
35533
  return this;
35571
35534
  };
35572
35535
  CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
@@ -35594,21 +35557,21 @@
35594
35557
  complex_fields: []
35595
35558
  };
35596
35559
  };
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; }
35560
+ var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
35561
+ if (wizardPages === void 0) { wizardPages = []; }
35562
+ if (canSaveDraft === void 0) { canSaveDraft = false; }
35600
35563
  var eventTrigger = new CaseEventTrigger();
35601
35564
  eventTrigger.id = id;
35602
35565
  eventTrigger.name = name;
35603
- eventTrigger.case_id = case_id;
35604
- eventTrigger.show_summary = show_summary;
35605
- eventTrigger.wizard_pages = wizard_pages;
35566
+ eventTrigger.case_id = caseId;
35567
+ eventTrigger.show_summary = showSummary;
35568
+ eventTrigger.wizard_pages = wizardPages;
35606
35569
  eventTrigger.event_token = 'test-token';
35607
- eventTrigger.case_fields = case_fields;
35608
- eventTrigger.can_save_draft = can_save_draft;
35570
+ eventTrigger.case_fields = caseFields;
35571
+ eventTrigger.can_save_draft = canSaveDraft;
35609
35572
  return eventTrigger;
35610
35573
  };
35611
- var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields, retain_hidden_value, hidden) {
35574
+ var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
35612
35575
  if (typeComplexFields === void 0) { typeComplexFields = []; }
35613
35576
  return ({
35614
35577
  id: id || 'personFirstName',
@@ -35617,10 +35580,10 @@
35617
35580
  type: type || 'Text',
35618
35581
  complex_fields: typeComplexFields || []
35619
35582
  },
35620
- display_context: display_context || 'OPTIONAL',
35583
+ display_context: displayContext || 'OPTIONAL',
35621
35584
  label: label || 'First name',
35622
- show_summary_content_option: show_summary_content_option,
35623
- retain_hidden_value: retain_hidden_value || false,
35585
+ show_summary_content_option: showSummaryContentOption,
35586
+ retain_hidden_value: retainHiddenValue || false,
35624
35587
  hidden: hidden || false
35625
35588
  });
35626
35589
  };
@@ -35662,48 +35625,48 @@
35662
35625
  complexFieldOverride.display_context = 'HIDDEN';
35663
35626
  return complexFieldOverride;
35664
35627
  };
35665
- var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition, ACLs, hidden) {
35628
+ var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
35666
35629
  if (order === void 0) { order = undefined; }
35667
- if (show_condition === void 0) { show_condition = undefined; }
35668
- if (ACLs === void 0) { ACLs = undefined; }
35630
+ if (showCondition === void 0) { showCondition = undefined; }
35631
+ if (acls === void 0) { acls = undefined; }
35669
35632
  return CaseFieldBuilder.create()
35670
35633
  .withId(id || 'personFirstName')
35671
35634
  .withFieldType(fieldType || textFieldType())
35672
- .withDisplayContext(display_context || 'OPTIONAL')
35635
+ .withDisplayContext(displayContext || 'OPTIONAL')
35673
35636
  .withLabel(label || 'First name')
35674
35637
  .withHintText(hint || 'First name hint text')
35675
35638
  .withShowSummaryContentOption(0)
35676
35639
  .withOrder(order)
35677
- .withShowCondition(show_condition || undefined)
35678
- .withACLs(ACLs)
35640
+ .withShowCondition(showCondition || undefined)
35641
+ .withACLs(acls)
35679
35642
  .withHidden(hidden || false)
35680
35643
  .build();
35681
35644
  };
35682
- var newCaseField = function (id, label, hint, fieldType, display_context, order) {
35645
+ var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
35683
35646
  if (order === void 0) { order = undefined; }
35684
35647
  return CaseFieldBuilder.create()
35685
35648
  .withId(id || 'personFirstName')
35686
35649
  .withFieldType(fieldType || textFieldType())
35687
- .withDisplayContext(display_context || 'OPTIONAL')
35650
+ .withDisplayContext(displayContext || 'OPTIONAL')
35688
35651
  .withHintText(hint || 'First name hint text')
35689
35652
  .withLabel(label || 'First name')
35690
35653
  .withOrder(order)
35691
35654
  .withShowSummaryContentOption(0);
35692
35655
  };
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; }
35656
+ var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
35657
+ if (complexFields === void 0) { complexFields = []; }
35658
+ if (collectionFieldType === void 0) { collectionFieldType = undefined; }
35696
35659
  return {
35697
35660
  id: typeId || 'Text',
35698
35661
  type: type || 'Text',
35699
- complex_fields: complex_fields || [],
35700
- collection_field_type: collection_field_type || undefined
35662
+ complex_fields: complexFields || [],
35663
+ collection_field_type: collectionFieldType || undefined
35701
35664
  };
35702
35665
  };
35703
35666
  var createFixedListFieldType = function (typeId, fixedListItems) {
35704
35667
  if (fixedListItems === void 0) { fixedListItems = []; }
35705
35668
  return {
35706
- id: 'FixedList-' + typeId,
35669
+ id: "FixedList-" + typeId,
35707
35670
  type: 'FixedList',
35708
35671
  fixed_list_items: fixedListItems || []
35709
35672
  };
@@ -35711,18 +35674,18 @@
35711
35674
  var createMultiSelectListFieldType = function (typeId, fixedListItems) {
35712
35675
  if (fixedListItems === void 0) { fixedListItems = []; }
35713
35676
  return {
35714
- id: 'MultiSelectList-' + typeId,
35677
+ id: "MultiSelectList-" + typeId,
35715
35678
  type: 'MultiSelectList',
35716
35679
  fixed_list_items: fixedListItems || []
35717
35680
  };
35718
35681
  };
35719
- var createACL = function (role, create, read, update, _delete) {
35682
+ var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
35720
35683
  return ({
35721
35684
  role: role || 'roleX',
35722
- create: create,
35723
- read: read,
35724
- update: update,
35725
- delete: _delete
35685
+ create: aclCreate,
35686
+ read: aclRead,
35687
+ update: aclUpdate,
35688
+ delete: aclDelete
35726
35689
  });
35727
35690
  };
35728
35691
 
@@ -35941,7 +35904,6 @@
35941
35904
  exports.FormatTranslatorService = FormatTranslatorService;
35942
35905
  exports.GreyBarService = GreyBarService;
35943
35906
  exports.HRef = HRef;
35944
- exports.HasLoadingState = HasLoadingState;
35945
35907
  exports.HeaderBarComponent = HeaderBarComponent;
35946
35908
  exports.HeadersModule = HeadersModule;
35947
35909
  exports.HttpError = HttpError;