@hmcts/opal-frontend-common 0.0.67 → 0.0.68

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 (205) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +54 -8
  3. package/package.json +71 -38
  4. package/styles/styles.scss +10 -14
  5. package/types/package.json +4 -0
  6. package/components/abstract/abstract-nested-form-base/README.md +0 -89
  7. package/components/abstract/abstract-table-filter/README.md +0 -76
  8. package/components/govuk/govuk-tabs/govuk-tabs-list-item/README.md +0 -74
  9. package/components/govuk/govuk-tabs/govuk-tabs-panel/README.md +0 -52
  10. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-header/README.md +0 -43
  11. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/README.md +0 -81
  12. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-item/README.md +0 -53
  13. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-keyword/README.md +0 -59
  14. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/README.md +0 -55
  15. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/moj-filter-panel-selected-tag/README.md +0 -52
  16. package/fesm2022/hmcts-opal-frontend-common-access-denied.component-B14ZVnte.mjs.map +0 -1
  17. package/fesm2022/hmcts-opal-frontend-common-account-created.component-DMjRN8Y1.mjs.map +0 -1
  18. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base-interfaces.mjs.map +0 -1
  19. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs.map +0 -1
  20. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base-interfaces.mjs.map +0 -1
  21. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +0 -1
  22. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs.map +0 -1
  23. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base-interfaces.mjs.map +0 -1
  24. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs.map +0 -1
  25. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base-interfaces.mjs.map +0 -1
  26. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs.map +0 -1
  27. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-parent-base.mjs.map +0 -1
  28. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map +0 -1
  29. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-interfaces.mjs.map +0 -1
  30. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs.map +0 -1
  31. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-types.mjs.map +0 -1
  32. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs.map +0 -1
  33. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map +0 -1
  34. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-interfaces.mjs.map +0 -1
  35. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-types.mjs.map +0 -1
  36. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs.map +0 -1
  37. package/fesm2022/hmcts-opal-frontend-common-components-abstract-interfaces.mjs.map +0 -1
  38. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete-interfaces.mjs.map +0 -1
  39. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs.map +0 -1
  40. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs.map +0 -1
  41. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs.map +0 -1
  42. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs.map +0 -1
  43. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs.map +0 -1
  44. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs.map +0 -1
  45. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs.map +0 -1
  46. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs.map +0 -1
  47. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs.map +0 -1
  48. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs.map +0 -1
  49. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs.map +0 -1
  50. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs.map +0 -1
  51. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs.map +0 -1
  52. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs.map +0 -1
  53. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs.map +0 -1
  54. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs.map +0 -1
  55. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs.map +0 -1
  56. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs.map +0 -1
  57. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs.map +0 -1
  58. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs.map +0 -1
  59. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs.map +0 -1
  60. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes-interfaces.mjs.map +0 -1
  61. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs.map +0 -1
  62. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input-interfaces.mjs.map +0 -1
  63. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs.map +0 -1
  64. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs.map +0 -1
  65. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs.map +0 -1
  66. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer-interfaces.mjs.map +0 -1
  67. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs.map +0 -1
  68. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header-interfaces.mjs.map +0 -1
  69. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs.map +0 -1
  70. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption-types.mjs.map +0 -1
  71. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs.map +0 -1
  72. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs.map +0 -1
  73. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs.map +0 -1
  74. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs.map +0 -1
  75. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs.map +0 -1
  76. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs.map +0 -1
  77. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs.map +0 -1
  78. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio-interfaces.mjs.map +0 -1
  79. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs.map +0 -1
  80. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select-interfaces.mjs.map +0 -1
  81. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs.map +0 -1
  82. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs.map +0 -1
  83. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs.map +0 -1
  84. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs.map +0 -1
  85. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs.map +0 -1
  86. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs.map +0 -1
  87. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs.map +0 -1
  88. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs.map +0 -1
  89. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs.map +0 -1
  90. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +0 -1
  91. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs.map +0 -1
  92. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs.map +0 -1
  93. package/fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs.map +0 -1
  94. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs.map +0 -1
  95. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs.map +0 -1
  96. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs.map +0 -1
  97. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs.map +0 -1
  98. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs.map +0 -1
  99. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +0 -1
  100. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs.map +0 -1
  101. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs.map +0 -1
  102. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs.map +0 -1
  103. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs.map +0 -1
  104. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs.map +0 -1
  105. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs.map +0 -1
  106. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs.map +0 -1
  107. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs.map +0 -1
  108. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header-interfaces.mjs.map +0 -1
  109. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs.map +0 -1
  110. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-inset-text.mjs.map +0 -1
  111. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs.map +0 -1
  112. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs.map +0 -1
  113. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs.map +0 -1
  114. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs.map +0 -1
  115. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs.map +0 -1
  116. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs.map +0 -1
  117. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs.map +0 -1
  118. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs.map +0 -1
  119. package/fesm2022/hmcts-opal-frontend-common-concurrency-failure.component-CQS1DbQQ.mjs.map +0 -1
  120. package/fesm2022/hmcts-opal-frontend-common-constants.mjs.map +0 -1
  121. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +0 -1
  122. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs.map +0 -1
  123. package/fesm2022/hmcts-opal-frontend-common-directives-moj-multi-select.mjs.map +0 -1
  124. package/fesm2022/hmcts-opal-frontend-common-guards-account.mjs.map +0 -1
  125. package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs.map +0 -1
  126. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate-interfaces.mjs.map +0 -1
  127. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate-types.mjs.map +0 -1
  128. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate.mjs.map +0 -1
  129. package/fesm2022/hmcts-opal-frontend-common-guards-has-flow-state.mjs.map +0 -1
  130. package/fesm2022/hmcts-opal-frontend-common-guards-has-url-state-match.mjs.map +0 -1
  131. package/fesm2022/hmcts-opal-frontend-common-guards-helpers.mjs.map +0 -1
  132. package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs.map +0 -1
  133. package/fesm2022/hmcts-opal-frontend-common-guards-signed-in.mjs.map +0 -1
  134. package/fesm2022/hmcts-opal-frontend-common-guards-types.mjs.map +0 -1
  135. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error-constants.mjs.map +0 -1
  136. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error-interfaces.mjs.map +0 -1
  137. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs.map +0 -1
  138. package/fesm2022/hmcts-opal-frontend-common-internal-server-error.component-lCp06yT-.mjs.map +0 -1
  139. package/fesm2022/hmcts-opal-frontend-common-pages-access-denied.component-B14ZVnte.mjs.map +0 -1
  140. package/fesm2022/hmcts-opal-frontend-common-pages-account-created.component-DMjRN8Y1.mjs.map +0 -1
  141. package/fesm2022/hmcts-opal-frontend-common-pages-concurrency-failure.component-CQS1DbQQ.mjs.map +0 -1
  142. package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page-interfaces.mjs.map +0 -1
  143. package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page.mjs.map +0 -1
  144. package/fesm2022/hmcts-opal-frontend-common-pages-internal-server-error.component-lCp06yT-.mjs.map +0 -1
  145. package/fesm2022/hmcts-opal-frontend-common-pages-permission-denied.component-DYa3iGTj.mjs.map +0 -1
  146. package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs.map +0 -1
  147. package/fesm2022/hmcts-opal-frontend-common-pages-routing-interfaces.mjs.map +0 -1
  148. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in-stub.component-B87UHy9K.mjs.map +0 -1
  149. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-Ctc9YosM.mjs.map +0 -1
  150. package/fesm2022/hmcts-opal-frontend-common-pages.mjs.map +0 -1
  151. package/fesm2022/hmcts-opal-frontend-common-permission-denied.component-DYa3iGTj.mjs.map +0 -1
  152. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs.map +0 -1
  153. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs.map +0 -1
  154. package/fesm2022/hmcts-opal-frontend-common-pipes-monetary.mjs.map +0 -1
  155. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs.map +0 -1
  156. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs.map +0 -1
  157. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs.map +0 -1
  158. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs.map +0 -1
  159. package/fesm2022/hmcts-opal-frontend-common-services-auth-service-constants.mjs.map +0 -1
  160. package/fesm2022/hmcts-opal-frontend-common-services-auth-service-interfaces.mjs.map +0 -1
  161. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs.map +0 -1
  162. package/fesm2022/hmcts-opal-frontend-common-services-date-service-interfaces.mjs.map +0 -1
  163. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +0 -1
  164. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service-mocks.mjs.map +0 -1
  165. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs.map +0 -1
  166. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-interfaces.mjs.map +0 -1
  167. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-mocks.mjs.map +0 -1
  168. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs.map +0 -1
  169. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs.map +0 -1
  170. package/fesm2022/hmcts-opal-frontend-common-services-session-service-constants.mjs.map +0 -1
  171. package/fesm2022/hmcts-opal-frontend-common-services-session-service-interfaces.mjs.map +0 -1
  172. package/fesm2022/hmcts-opal-frontend-common-services-session-service-mocks.mjs.map +0 -1
  173. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +0 -1
  174. package/fesm2022/hmcts-opal-frontend-common-services-sort-service-interfaces.mjs.map +0 -1
  175. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs.map +0 -1
  176. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-interfaces.mjs.map +0 -1
  177. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-mocks.mjs.map +0 -1
  178. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs.map +0 -1
  179. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs.map +0 -1
  180. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-interfaces.mjs.map +0 -1
  181. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +0 -1
  182. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs.map +0 -1
  183. package/fesm2022/hmcts-opal-frontend-common-sign-in-stub.component-B87UHy9K.mjs.map +0 -1
  184. package/fesm2022/hmcts-opal-frontend-common-sign-in.component-BjLHMHMm.mjs.map +0 -1
  185. package/fesm2022/hmcts-opal-frontend-common-stores-global-constants.mjs.map +0 -1
  186. package/fesm2022/hmcts-opal-frontend-common-stores-global-interfaces.mjs.map +0 -1
  187. package/fesm2022/hmcts-opal-frontend-common-stores-global-types.mjs.map +0 -1
  188. package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs.map +0 -1
  189. package/fesm2022/hmcts-opal-frontend-common-types.mjs.map +0 -1
  190. package/fesm2022/hmcts-opal-frontend-common-validators-amount.mjs.map +0 -1
  191. package/fesm2022/hmcts-opal-frontend-common-validators-date-after-year.mjs.map +0 -1
  192. package/fesm2022/hmcts-opal-frontend-common-validators-date-before.mjs.map +0 -1
  193. package/fesm2022/hmcts-opal-frontend-common-validators-date-of-birth.mjs.map +0 -1
  194. package/fesm2022/hmcts-opal-frontend-common-validators-future-date.mjs.map +0 -1
  195. package/fesm2022/hmcts-opal-frontend-common-validators-invalid-value.mjs.map +0 -1
  196. package/fesm2022/hmcts-opal-frontend-common-validators-national-insurance-number.mjs.map +0 -1
  197. package/fesm2022/hmcts-opal-frontend-common-validators-optional-max-length.mjs.map +0 -1
  198. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-date.mjs.map +0 -1
  199. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-telephone.mjs.map +0 -1
  200. package/fesm2022/hmcts-opal-frontend-common-validators-over-eighteen.mjs.map +0 -1
  201. package/fesm2022/hmcts-opal-frontend-common-validators-past-date.mjs.map +0 -1
  202. package/fesm2022/hmcts-opal-frontend-common-validators-pattern-validator.mjs.map +0 -1
  203. package/fesm2022/hmcts-opal-frontend-common-validators-valid-value.mjs.map +0 -1
  204. package/fesm2022/hmcts-opal-frontend-common.mjs.map +0 -1
  205. package/guards/has-url-state-match/README.md +0 -160
@@ -1,52 +0,0 @@
1
- # GOV.UK Tab Panel Component
2
-
3
- This Angular component renders a GOV.UK-styled tab panel, used in conjunction with `govuk-tabs` and `govuk-tab-list-item`. It wraps content in a `<div>` with the appropriate GOV.UK class.
4
-
5
- ## Table of Contents
6
-
7
- - [Installation](#installation)
8
- - [Usage](#usage)
9
- - [Testing](#testing)
10
- - [Contributing](#contributing)
11
-
12
- ## Installation
13
-
14
- Each component in the `govuk-tabs` group is exported individually:
15
-
16
- ```typescript
17
- import { GovukTabPanelComponent } from 'opal-frontend-common/components/govuk/govuk-tabs/govuk-tab-panel';
18
- ```
19
-
20
- ## Usage
21
-
22
- Wrap your tab content in this component and provide a unique ID to link it with the corresponding tab.
23
-
24
- ### Example
25
-
26
- ```html
27
- <opal-lib-govuk-tab-panel id="panel-individuals">
28
- <h2 class="govuk-heading-m">Individuals</h2>
29
- <p>This is content for the Individuals tab.</p>
30
- </opal-lib-govuk-tab-panel>
31
- ```
32
-
33
- This renders:
34
-
35
- ```html
36
- <div class="govuk-tabs__panel" id="panel-individuals">
37
- <h2 class="govuk-heading-m">Individuals</h2>
38
- <p>This is content for the Individuals tab.</p>
39
- </div>
40
- ```
41
-
42
- ## Testing
43
-
44
- Unit tests for this component can be found in the `govuk-tab-panel.component.spec.ts` file. To run the tests:
45
-
46
- ```bash
47
- ng test
48
- ```
49
-
50
- ## Contributing
51
-
52
- Feel free to submit issues or pull requests to improve this component.
@@ -1,43 +0,0 @@
1
- # MojFilterPanelHeaderComponent
2
-
3
- The `MojFilterPanelHeaderComponent` is a structural header component used within the `MojFilterComponent`. It is designed to render a heading using the [MOJ Design System](https://design-patterns.service.justice.gov.uk/components/filter/) conventions.
4
-
5
- This component is intended to be used inside the `[mojFilterPanelHeader]` slot of the `MojFilterComponent`.
6
-
7
- ## Features
8
-
9
- - Renders a section header using MoJ-styled classes.
10
- - Accepts a `title` input with a default value of `"Filter"`.
11
- - Compatible with content projection (if needed).
12
-
13
- ## Usage
14
-
15
- ### Import
16
-
17
- ```ts
18
- import { MojFilterPanelHeaderComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
19
- ```
20
-
21
- ### In Template
22
-
23
- ```html
24
- <opal-lib-moj-filter-panel-header [title]="'Filter offences'"></opal-lib-moj-filter-panel-header>
25
- ```
26
-
27
- ## Inputs
28
-
29
- | Input | Type | Default | Description |
30
- | ----- | ------ | -------- | ---------------------------------- |
31
- | title | string | 'Filter' | The title to display in the header |
32
-
33
- ## Accessibility
34
-
35
- - Uses an `<h2>` element with the `govuk-heading-m` class for screen-reader-friendly headings.
36
- - You can override the title text using the `title` input to ensure headings remain meaningful and contextual.
37
-
38
- ## Testing
39
-
40
- Unit tests should verify:
41
-
42
- - The default title renders as `"Filter"`.
43
- - The custom title input renders correctly.
@@ -1,81 +0,0 @@
1
- # MojFilterPanelOptionComponent
2
-
3
- The `MojFilterPanelOptionComponent` is a structural subcomponent of `MojFilterComponent` used to wrap and layout filter controls and the "Apply filters" button using MoJ styling conventions.
4
-
5
- This component provides a submit button and two content projection slots:
6
-
7
- - `[mojFilterPanelKeyword]` — typically used to project a keyword input component
8
- - `[mojFilterPanelItems]` — typically used to project checkbox groups per filter category
9
-
10
- ## Features
11
-
12
- - GOV.UK-styled apply button
13
- - Emits a `applyFilters` event when clicked
14
- - Allows keyword and category controls to be projected via slots
15
-
16
- ## Usage
17
-
18
- ### Import
19
-
20
- ```ts
21
- import { MojFilterPanelOptionComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
22
- ```
23
-
24
- ### In Template
25
-
26
- ```html
27
- <opal-lib-moj-filter-panel-option (applyFilters)="onApplyFilters()">
28
- <ng-container mojFilterPanelKeyword>
29
- <opal-lib-moj-filter-panel-option-form-group-keyword
30
- (keywordChange)="onKeywordChange($event)"
31
- ></opal-lib-moj-filter-panel-option-form-group-keyword>
32
- </ng-container>
33
- <ng-container mojFilterPanelItems>
34
- @for (item of filterTags(); track item.categoryName) {
35
- <opal-lib-moj-filter-panel-option-form-group-item
36
- [options]="item"
37
- (changed)="onCategoryCheckboxChange($event)"
38
- ></opal-lib-moj-filter-panel-option-form-group-item>
39
- }
40
- </ng-container>
41
- </opal-lib-moj-filter-panel-option>
42
- ```
43
-
44
- ## Inputs
45
-
46
- | Input | Type | Default | Description |
47
- | ------------ | -------- | ----------------- | -------------------------------------- |
48
- | `buttonText` | `string` | `'Apply filters'` | The text displayed on the apply button |
49
-
50
- ## Outputs
51
-
52
- | Output | Type | Description |
53
- | -------------- | ------ | ---------------------------------------- |
54
- | `applyFilters` | `void` | Emitted when the apply button is clicked |
55
-
56
- ## Content Projection Slots
57
-
58
- | Slot | Description |
59
- | ------------------------- | --------------------------------------------- |
60
- | `[mojFilterPanelKeyword]` | Slot for projecting a keyword input component |
61
- | `[mojFilterPanelItems]` | Slot for projecting category checkbox groups |
62
-
63
- ## Accessibility
64
-
65
- - Uses a GOV.UK button with `data-module="govuk-button"` and `type="button"`.
66
- - Consumers should ensure appropriate ARIA labelling for projected input fields.
67
-
68
- ## Testing
69
-
70
- Unit tests should verify:
71
-
72
- - The apply button renders with custom `buttonText`
73
- - The `applyFilters` output emits on click
74
- - Projected content is rendered in the appropriate slot
75
-
76
- ## Related Subcomponents
77
-
78
- The following components are typically projected into this component via the documented slots:
79
-
80
- - [`MojFilterPanelOptionFormGroupKeywordComponent`](../moj-filter-panel-option-form-group-keyword) – renders a GOV.UK text input for keyword filtering
81
- - [`MojFilterPanelOptionFormGroupItemComponent`](../moj-filter-panel-option-form-group-item) – renders checkbox groups per filter category
@@ -1,53 +0,0 @@
1
- # MojFilterPanelOptionFormGroupItemComponent
2
-
3
- The `MojFilterPanelOptionFormGroupItemComponent` is a reusable form group subcomponent of the `MojFilterOptionComponent`. It renders a group of GOV.UK checkboxes for a specific filter category.
4
-
5
- This component is typically used inside the `[mojFilterPanelItems]` content projection slot of the `MojFilterOptionComponent`.
6
-
7
- ## Features
8
-
9
- - Renders checkboxes in a `<fieldset>` for a given filter category
10
- - Outputs the changed option and category context
11
- - Styled using GOV.UK checkbox and fieldset classes
12
-
13
- ## Usage
14
-
15
- ### Import
16
-
17
- ```ts
18
- import { MojFilterPanelOptionFormGroupItemComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-item';
19
- ```
20
-
21
- ### In Template
22
-
23
- ```html
24
- <opal-lib-moj-filter-panel-option-form-group-item
25
- [options]="{ categoryName: 'Status', options: statusOptions }"
26
- (changed)="onCategoryCheckboxChange($event)"
27
- ></opal-lib-moj-filter-panel-option-form-group-item>
28
- ```
29
-
30
- ## Inputs
31
-
32
- | Input | Type | Description |
33
- | ------- | ----------------------------------------------------------------- | ----------------------------------------------- |
34
- | options | `{ categoryName: string, options: IAbstractTableFilterOption[] }` | Filter category name and checkbox options array |
35
-
36
- ## Outputs
37
-
38
- | Output | Type | Description |
39
- | ------- | ------------------------------------------------------------ | -------------------------------------------- |
40
- | changed | `{ categoryName: string, item: IAbstractTableFilterOption }` | Emitted when a checkbox selection is toggled |
41
-
42
- ## Accessibility
43
-
44
- - Uses `<fieldset>` and `<legend>` for grouping related inputs.
45
- - Each checkbox input is labelled with a `<label>` and includes unique `id`/`name` attributes to support screen readers.
46
-
47
- ## Testing
48
-
49
- Unit tests should verify:
50
-
51
- - The correct number of checkboxes renders for the given options
52
- - The checkbox is checked based on the `selected` flag
53
- - The `changed` output emits with the expected payload
@@ -1,59 +0,0 @@
1
- # MojFilterPanelOptionFormGroupKeywordComponent
2
-
3
- The `MojFilterPanelOptionFormGroupKeywordComponent` is a simple, reusable keyword input subcomponent used within the `MojFilterPanelOptionComponent`.
4
-
5
- It renders a GOV.UK-styled input field with a label and emits the entered keyword string via `keywordChange`.
6
-
7
- This component is projected into `[mojFilterPanelKeyword]`.
8
-
9
- ## Features
10
-
11
- - GOV.UK-styled input field and label
12
- - Emits user input as a keyword string
13
- - Accepts configurable input ID, name, and label
14
-
15
- ## Usage
16
-
17
- ### Import
18
-
19
- ```ts
20
- import { MojFilterPanelOptionFormGroupKeywordComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
21
- ```
22
-
23
- ### In Template
24
-
25
- ```html
26
- <opal-lib-moj-filter-panel-option-form-group-keyword
27
- [inputId]="'keywords'"
28
- [inputName]="'keywords'"
29
- [labelValue]="'Search by keyword'"
30
- (keywordChange)="onKeywordChange($event)"
31
- ></opal-lib-moj-filter-panel-option-form-group-keyword>
32
- ```
33
-
34
- ## Inputs
35
-
36
- | Input | Type | Default | Description |
37
- | ------------ | ------ | ---------- | -------------------------------------- |
38
- | `inputId` | string | 'keywords' | The HTML ID applied to the input field |
39
- | `inputName` | string | 'keywords' | The name attribute for the input field |
40
- | `labelValue` | string | 'Keywords' | The visible label for the input |
41
-
42
- ## Outputs
43
-
44
- | Output | Type | Description |
45
- | --------------- | -------- | ----------------------------------- |
46
- | `keywordChange` | `string` | Emits the keyword string when typed |
47
-
48
- ## Accessibility
49
-
50
- - Label is properly linked to the input using `for`/`id`.
51
- - Uses `govuk-label--m` and `govuk-input` to ensure visual and accessibility compliance with GOV.UK design system.
52
-
53
- ## Testing
54
-
55
- Unit tests should verify:
56
-
57
- - The label renders correctly using `labelValue`
58
- - The input emits `keywordChange` with the expected string
59
- - Custom `inputId` and `inputName` values are respected
@@ -1,55 +0,0 @@
1
- # MojFilterPanelSelectedComponent
2
-
3
- The `MojFilterPanelSelectedComponent` is a structural subcomponent of the `MojFilterComponent`. It is responsible for rendering the selected filter heading and a clear filters action link. It typically wraps the `MojFilterPanelSelectedTagComponent` to show the selected tag groups.
4
-
5
- ## Features
6
-
7
- - Displays a heading and a "Clear filters" link using MoJ styles
8
- - Emits an event to clear all filters
9
- - Supports projecting selected tag display via `<ng-content>`
10
-
11
- ## Usage
12
-
13
- ### Import
14
-
15
- ```ts
16
- import { MojFilterPanelSelectedComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
17
- ```
18
-
19
- ### In Template
20
-
21
- ```html
22
- <opal-lib-moj-filter-panel-selected (clearFilters)="clearAllFilters()">
23
- <opal-lib-moj-filter-panel-selected-tag
24
- [filterData]="abstractSelectedTags()"
25
- (removeTagClicked)="removeTag($event)"
26
- ></opal-lib-moj-filter-panel-selected-tag>
27
- </opal-lib-moj-filter-panel-selected>
28
- ```
29
-
30
- ## Inputs
31
-
32
- | Input | Type | Default | Description |
33
- | -------------- | ------ | ------------------ | ----------------------------------------- |
34
- | `headingLabel` | string | 'Selected filters' | The heading text above the selected tags |
35
- | `linkLabel` | string | 'Clear filters' | The label text for the clear filters link |
36
-
37
- ## Outputs
38
-
39
- | Output | Type | Description |
40
- | -------------- | ---- | -------------------------------------- |
41
- | `clearFilters` | void | Emitted when the clear link is clicked |
42
-
43
- ## Accessibility
44
-
45
- - Heading uses `<h2>` with `govuk-heading-m` for screen reader support
46
- - "Clear filters" is rendered as a link (`<a>`) for consistency with MoJ pattern
47
- - The entire region is enclosed in `.moj-filter__selected` and `.moj-filter__selected-heading` wrappers
48
-
49
- ## Testing
50
-
51
- Unit tests should verify:
52
-
53
- - Default and custom `headingLabel` and `linkLabel` render
54
- - The `clearFilters` event emits when the link is clicked
55
- - Projected content inside `<ng-content>` renders as expected
@@ -1,52 +0,0 @@
1
- # MojFilterPanelSelectedTagComponent
2
-
3
- The `MojFilterPanelSelectedTagComponent` is a subcomponent of `MojFilterPanelSelectedComponent` and is responsible for rendering a list of selected filters grouped by category. Each tag is rendered with an accessible label and a remove action.
4
-
5
- ## Features
6
-
7
- - Displays selected filter tags grouped by their category
8
- - Emits a removal event when a tag is clicked
9
- - Supports accessible screen reader text via an input label prefix
10
-
11
- ## Usage
12
-
13
- ### Import
14
-
15
- ```ts
16
- import { MojFilterPanelSelectedTagComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
17
- ```
18
-
19
- ### In Template
20
-
21
- ```html
22
- <opal-lib-moj-filter-selected-tag
23
- [filterData]="abstractSelectedTags()"
24
- (removeTagClicked)="removeTag($event)"
25
- ></opal-lib-moj-filter-selected-tag>
26
- ```
27
-
28
- ## Inputs
29
-
30
- | Input | Type | Default | Description |
31
- | ----------------- | -------------------------------- | ---------------------- | ---------------------------------------------------------- |
32
- | `filterData` | `IAbstractTableFilterCategory[]` | `[]` | The grouped list of selected tags by category |
33
- | `ariaLabelPrefix` | `string` | `'Remove this filter'` | Screen reader prefix applied to each tag's accessible name |
34
-
35
- ## Outputs
36
-
37
- | Output | Type | Description |
38
- | ------------------ | --------------------------------------------------------- | ------------------------------------------- |
39
- | `removeTagClicked` | `{ categoryName: string; optionValue: string \| number }` | Emitted when a tag's remove link is clicked |
40
-
41
- ## Accessibility
42
-
43
- - Each tag is prefixed with a visually hidden span (using `govuk-visually-hidden`) for screen reader clarity.
44
- - The prefix is configurable via the `ariaLabelPrefix` input.
45
-
46
- ## Testing
47
-
48
- Unit tests should verify:
49
-
50
- - Tags are grouped and rendered correctly by category
51
- - The `removeTagClicked` event is emitted with the correct shape
52
- - The `ariaLabelPrefix` text appears in the correct visually hidden span
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-access-denied.component-B14ZVnte.mjs","sources":["../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.ts","../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { GovukButtonComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-button';\n\n@Component({\n selector: 'opal-lib-access-denied',\n imports: [GovukButtonComponent],\n templateUrl: './access-denied.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccessDeniedComponent {\n private readonly router = inject(Router);\n\n public handleGoBackButtonClick(): void {\n // For now, test page will act as our 'Dashboard' page\n this.router.navigate(['/']);\n }\n}\n","<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;MAUa,qBAAqB,CAAA;AACf,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjC,uBAAuB,GAAA;;QAE5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7B;uGANW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVlC,ihBAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDTY,oBAAoB,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAInB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,WACzB,CAAC,oBAAoB,CAAC,EAAA,eAAA,EAEd,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ihBAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-account-created.component-DMjRN8Y1.mjs","sources":["../../../projects/opal-frontend-common/pages/account-created/account-created.component.ts","../../../projects/opal-frontend-common/pages/account-created/account-created.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { GovukPanelComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-panel';\n\n@Component({\n selector: 'opal-lib-account-created',\n imports: [GovukPanelComponent],\n templateUrl: './account-created.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccountCreated {}\n","<div class=\"govuk-grid-column-two-thirds\">\n <opal-lib-govuk-panel panelTitle=\"User account created\"></opal-lib-govuk-panel>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h2 class=\"govuk-fieldset__heading\">Next steps</h2>\n </legend>\n <p class=\"govuk-body\">\n Your Opal account has been created but is not yet live. <br />\n Contact your team lead to activate it fully.\n </p>\n </fieldset>\n</div>\n"],"names":[],"mappings":";;;;MASa,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECT3B,0fAYA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDPY,mBAAmB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIlB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,WAC3B,CAAC,mBAAmB,CAAC,EAAA,eAAA,EAEb,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0fAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base-interfaces.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-alias-base/interfaces/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base-interfaces.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-alias-base/abstract-form-alias-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-alias-base/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.ts"],"sourcesContent":["import { FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { takeUntil } from 'rxjs';\nimport { Component, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core';\nimport { IAbstractFormAliasBaseAliasControls } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-alias-base/interfaces';\nimport { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';\nimport {\n IAbstractFormArrayControlValidation,\n IAbstractFormArrayControls,\n IAbstractFormArrayControl,\n} from '@hmcts/opal-frontend-common/components/abstract/interfaces';\nimport { GovukTextInputComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-text-input';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractFormAliasBaseComponent extends AbstractFormBaseComponent implements OnInit, OnDestroy {\n @ViewChildren('aliasFirstField') aliasFirstField!: QueryList<GovukTextInputComponent>;\n public aliasControls: IAbstractFormAliasBaseAliasControls[] = [];\n public aliasControlsValidation: IAbstractFormArrayControlValidation[] = [];\n public aliasFields: string[] = [];\n\n /**\n * Builds an array of form controls for the given form array.\n *\n * @param formControlCount - An array of numbers representing the number of form controls to create.\n * @param formArrayName - The name of the form array.\n * @param fieldNames - An array of field names.\n * @param controlValidation - An array of control validation objects.\n * @returns An array of form controls for the given form array.\n */\n private buildFormAliasControls(\n formControlCount: number[],\n formArrayName: string,\n fieldNames: string[],\n controlValidation: IAbstractFormArrayControlValidation[],\n ): IAbstractFormArrayControls[] {\n // Directly map each index to a control\n return formControlCount.map((_element, index) =>\n this.addAliasControls(index, formArrayName, fieldNames, controlValidation),\n );\n }\n\n /**\n * Adds alias controls to the form array.\n *\n * @param index - The index of the form array.\n * @param formArrayName - The name of the form array.\n * @param fieldNames - The names of the fields for the alias controls.\n * @param controlValidation - The validation rules for the alias controls.\n * @returns An object containing the form controls.\n */\n private addAliasControls(\n index: number,\n formArrayName: string,\n fieldNames: string[],\n controlValidation: IAbstractFormArrayControlValidation[],\n ): { [key: string]: IAbstractFormArrayControl } {\n const formAliases = this.form.get(formArrayName) as FormArray;\n const formAliasesFormGroup = new FormGroup({});\n\n // Create the form controls...\n const controls = this.createAliasControls(fieldNames, index);\n\n // Add the controls to the form group...\n this.addControlsToFormGroup(formAliasesFormGroup, controlValidation, index);\n\n // Add the form group to the form array...\n formAliases.push(formAliasesFormGroup);\n\n // Return the form controls...\n return controls;\n }\n\n /**\n * Removes all form alias controls from a FormArray and clears any associated error messages.\n *\n * @param formArrayControls - An array of form array controls.\n * @param formArrayName - The name of the FormArray.\n * @param fieldNames - An array of field names associated with the form array controls.\n * @returns An empty array of form array controls.\n */\n private removeAllFormAliasControls(\n formArrayControls: IAbstractFormArrayControls[],\n formArrayName: string,\n fieldNames: string[],\n ): [] {\n const control = this.form.get(formArrayName) as FormArray;\n\n // Clear the error messages...\n for (const [index] of formArrayControls.entries()) {\n this.removeFormAliasControlsErrors(index, formArrayControls, fieldNames);\n }\n\n // Reset the form array controls...\n control.clear();\n\n // Return en empty array of form array controls...\n return [];\n }\n\n /**\n * Creates a FormArray with the specified validators and controls.\n *\n * @param validators - An array of validators to apply to the FormArray.\n * @param controls - An optional array of initial FormControl instances to add to the FormArray.\n * @returns A new FormArray instance.\n */\n protected createFormAlias(validators: ValidatorFn[], controls: FormControl[] = []): FormArray {\n return new FormArray(controls, { validators: [...validators] });\n }\n\n /**\n * Removes a form alias control at the specified index from the given form array controls.\n *\n * @param index - The index of the form alias control to remove.\n * @param formArrayControls - The array of form array controls.\n * @returns The updated array of form array controls after removing the specified control.\n */\n protected removeFormAliasControl(\n index: number,\n formArrayControls: IAbstractFormArrayControls[],\n ): IAbstractFormArrayControls[] {\n formArrayControls.splice(index, 1);\n return formArrayControls;\n }\n\n /**\n * Sets up the alias form controls based on the provided alias count array and form array name.\n * If there are any aliases, the alias controls will be re-populated.\n *\n * @param aliasCountArray - An array containing the count of aliases.\n * @param formArrayName - The name of the form array.\n */\n protected setupAliasFormControls(aliasCountArray: number[], formArrayName: string): void {\n // Re-populate the alias controls if there are any aliases\n if (aliasCountArray.length) {\n this.aliasControls = this.buildFormAliasControls(\n aliasCountArray,\n formArrayName,\n this.aliasFields,\n this.aliasControlsValidation,\n );\n }\n }\n\n /**\n * Removes the form alias controls errors for a specific index in a form array.\n *\n * @param index - The index of the form array control.\n * @param formArrayControls - An array of form array controls.\n * @param fieldNames - An array of field names to remove errors from.\n */\n protected removeFormAliasControlsErrors(\n index: number,\n formArrayControls: IAbstractFormArrayControls[],\n fieldNames: string[],\n ): void {\n const formArrayControl = formArrayControls[index];\n\n if (formArrayControl) {\n for (const field of fieldNames) {\n delete this.formControlErrorMessages?.[formArrayControl[field].controlName];\n }\n }\n }\n\n /**\n * Creates alias controls for the given fields and index.\n * @param fields - The list of fields for which alias controls need to be created.\n * @param index - The index value used to generate unique identifiers for the controls.\n * @returns An object containing the alias controls.\n */\n protected createAliasControls(fields: string[], index: number): { [key: string]: IAbstractFormArrayControl } {\n return fields.reduce(\n (controls, field) => ({\n ...controls,\n [field]: {\n inputId: `${field}_${index}`,\n inputName: `${field}_${index}`,\n controlName: `${field}_${index}`,\n },\n }),\n {},\n );\n }\n\n /**\n * Sets up the alias checkbox listener.\n *\n * @param formCheckboxName - The name of the checkbox control in the form.\n * @param formArrayName - The name of the form array control in the form.\n */\n protected setUpAliasCheckboxListener(formCheckboxName: string, formArrayName: string): void {\n // Ensure any existing subscription is cleared to avoid memory leaks\n this['ngUnsubscribe'].next();\n this['ngUnsubscribe'].complete();\n\n const addAliasControl = this.form.get(formCheckboxName);\n if (!addAliasControl) {\n return;\n }\n\n addAliasControl.valueChanges.pipe(takeUntil(this['ngUnsubscribe'])).subscribe((shouldAddAlias) => {\n if (shouldAddAlias) {\n this.aliasControls = this.buildFormAliasControls(\n [0],\n formArrayName,\n this.aliasFields,\n this.aliasControlsValidation,\n );\n this.focusFirstAliasField();\n } else {\n this.aliasControls = this.removeAllFormAliasControls(this.aliasControls, formArrayName, this.aliasFields);\n }\n });\n }\n\n /**\n * Sets focus to the first input field of a newly added alias row.\n */\n public focusFirstAliasField(): void {\n this['changeDetectorRef'].detectChanges();\n setTimeout(() => {\n const index = this.aliasControls.length - 1;\n const inputId = this.aliasFirstField.get(index)?.inputId;\n if (inputId) {\n const el = document.getElementById(inputId);\n el?.focus();\n }\n }, 0);\n }\n\n /**\n * Removes a form alias control from a form array and updates the list of form array controls.\n * @param index - The index of the form alias control to be removed.\n * @param formArrayName - The name of the form array.\n * @param formArrayControls - The list of form array controls.\n * @param fieldNames - The names of the fields associated with the form array controls.\n * @returns The updated list of form array controls after removing the specified control.\n */\n public removeFormAliasControls(\n index: number,\n formArrayName: string,\n formArrayControls: IAbstractFormArrayControls[],\n fieldNames: string[],\n ): IAbstractFormArrayControls[] {\n // Get the form array...\n const control = this.form.get(formArrayName) as FormArray;\n\n // Remove the form array control based on index\n control.removeAt(index);\n\n // Then remove the form array controls errors...\n this.removeFormAliasControlsErrors(index, formArrayControls, fieldNames);\n\n // Return the new list of form array controls...\n return this.removeFormAliasControl(index, formArrayControls);\n }\n\n /**\n * Adds an alias to the specified index of the form array.\n * Sets user focus to the first field of the newly added alias.\n *\n * @param index - The index at which to add the alias.\n * @param formArrayName - The name of the form array.\n */\n public addAlias(index: number, formArrayName: string): void {\n this.aliasControls.push(\n this.addAliasControls(index, formArrayName, this.aliasFields, this.aliasControlsValidation),\n );\n this.focusFirstAliasField();\n }\n\n /**\n * Removes an alias from the form array.\n *\n * @param index - The index of the alias to remove.\n * @param formArrayName - The name of the form array.\n * @param event - The event object from the click event, used to prevent default behavior.\n */\n public removeAlias(index: number, formArrayName: string, event?: Event): void {\n event?.preventDefault();\n this.aliasControls = this.removeFormAliasControls(index, formArrayName, this.aliasControls, this.aliasFields);\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n }\n\n public override ngOnDestroy(): void {\n this['ngUnsubscribe'].next();\n this['ngUnsubscribe'].complete();\n super.ngOnDestroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAeM,MAAgB,8BAA+B,SAAQ,yBAAyB,CAAA;AACnD,IAAA,eAAe;IACzC,aAAa,GAA0C,EAAE;IACzD,uBAAuB,GAA0C,EAAE;IACnE,WAAW,GAAa,EAAE;AAEjC;;;;;;;;AAQG;AACK,IAAA,sBAAsB,CAC5B,gBAA0B,EAC1B,aAAqB,EACrB,UAAoB,EACpB,iBAAwD,EAAA;;QAGxD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,KAC1C,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAC3E;IACH;AAEA;;;;;;;;AAQG;AACK,IAAA,gBAAgB,CACtB,KAAa,EACb,aAAqB,EACrB,UAAoB,EACpB,iBAAwD,EAAA;QAExD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAc;AAC7D,QAAA,MAAM,oBAAoB,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC;;QAG9C,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAA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,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAC5F;QACD,IAAI,CAAC,oBAAoB,EAAE;IAC7B;AAEA;;;;;;AAMG;AACI,IAAA,WAAW,CAAC,KAAa,EAAE,aAAqB,EAAE,KAAa,EAAA;QACpE,KAAK,EAAE,cAAc,EAAE;AACvB,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC;IAC/G;IAEgB,QAAQ,GAAA;QACtB,KAAK,CAAC,QAAQ,EAAE;IAClB;IAEgB,WAAW,GAAA;AACzB,QAAA,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE;AAC5B,QAAA,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;QAChC,KAAK,CAAC,WAAW,EAAE;IACrB;uGAtRoB,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,sMAFxC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAHnD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;sBAEE,YAAY;uBAAC,iBAAiB;;;AChBjC;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-array-base-interfaces.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-array-base/interfaces/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base-interfaces.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-array-base/abstract-form-array-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-array-base/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.ts"],"sourcesContent":["import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';\nimport {\n IAbstractFormArrayControls,\n IAbstractFormArrayControlValidation,\n IAbstractFormArrayControl,\n} from '@hmcts/opal-frontend-common/components/abstract/interfaces';\nimport { AbstractControl, FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractFormArrayBaseComponent extends AbstractFormBaseComponent implements OnInit, OnDestroy {\n public formArrayControls: IAbstractFormArrayControls[] = [];\n public formArrayControlsValidation: IAbstractFormArrayControlValidation[] = [];\n public formArrayFields: string[] = [];\n\n /**\n * Builds an array of form controls for a form array.\n *\n * @param formControlCount - An array of numbers representing the number of form controls to create.\n * @param formArrayName - The name of the form array.\n * @param fieldNames - An array of field names for the form controls.\n * @param controlValidation - An array of control validation configurations.\n * @returns An array of form controls for the form array.\n */\n private buildFormArrayControls(\n formControlCount: number[],\n formArrayName: string,\n fieldNames: string[],\n controlValidation: IAbstractFormArrayControlValidation[],\n ): IAbstractFormArrayControls[] {\n // Directly map each index to a control\n return formControlCount.map((_element, index) =>\n this.addFormArrayControls(index, formArrayName, fieldNames, controlValidation),\n );\n }\n\n /**\n * Adds form array controls to the specified form array.\n *\n * @param index - The index at which the form array controls should be added.\n * @param formArrayName - The name of the form array.\n * @param fieldNames - The names of the form controls to be created.\n * @param controlValidation - The validation rules for the form controls.\n * @returns An object containing the form controls that were added.\n */\n private addFormArrayControls(\n index: number,\n formArrayName: string,\n fieldNames: string[],\n controlValidation: IAbstractFormArrayControlValidation[],\n ): { [key: string]: IAbstractFormArrayControl } {\n const formArray = this.form.get(formArrayName) as FormArray;\n const formArrayFormGroup = new FormGroup({});\n\n // Create the form controls...\n const controls = this.createFormArrayControls(fieldNames, index);\n\n // Add the controls to the form group...\n this.addControlsToFormGroup(formArrayFormGroup, controlValidation, index);\n\n // Add the form group to the form array...\n formArray.push(formArrayFormGroup);\n\n // Return the form controls...\n return controls;\n }\n\n /**\n * Creates a new instance of FormArray with the specified validators and controls.\n *\n * @param validators - An array of validator functions to be applied to the form array.\n * @param controls - An optional array of form controls to initialize the form array with.\n * @returns A new instance of FormArray.\n */\n protected createFormArray(validators: ValidatorFn[], controls: FormControl[] = []): FormArray {\n return new FormArray(controls, { validators: [...validators] });\n }\n\n /**\n * Sets up the form array form controls based on the provided parameters.\n *\n * @param formArrayCountArray - An array of numbers representing the count of form array controls.\n * @param formArrayName - The name of the form array.\n */\n protected setupFormArrayFormControls(formArrayCountArray: number[], formArrayName: string): void {\n if (formArrayCountArray.length) {\n this.formArrayControls = this.buildFormArrayControls(\n formArrayCountArray,\n formArrayName,\n this.formArrayFields,\n this.formArrayControlsValidation,\n );\n }\n }\n\n /**\n * Creates an object with form array controls based on the given fields and index.\n *\n * @param fields - An array of field names.\n * @param index - The index of the form array.\n * @returns An object with form array controls.\n */\n protected createFormArrayControls(fields: string[], index: number): { [key: string]: IAbstractFormArrayControl } {\n return fields.reduce(\n (controls, field) => ({\n ...controls,\n [field]: {\n inputId: `${field}_${index}`,\n inputName: `${field}_${index}`,\n controlName: `${field}_${index}`,\n },\n }),\n {},\n );\n }\n\n /**\n * Removes form array controls errors for a specific index.\n *\n * @param index - The index of the form array control.\n * @param formArrayControls - An array of form array controls.\n * @param fieldNames - An array of field names to remove errors from.\n */\n protected removeFormArrayControlsErrors(\n index: number,\n formArrayControls: IAbstractFormArrayControls[],\n fieldNames: string[],\n ): void {\n const formArrayControl = formArrayControls[index];\n\n if (formArrayControl) {\n for (const field of fieldNames) {\n delete this.formControlErrorMessages?.[formArrayControl[field].controlName];\n }\n }\n }\n\n /**\n * Removes a form array control at the specified index from the given array of form array controls.\n *\n * @param index - The index of the form array control to be removed.\n * @param formArrayControls - The array of form array controls.\n * @returns The updated array of form array controls after removing the specified control.\n */\n protected removeFormArrayControl(\n index: number,\n formArrayControls: IAbstractFormArrayControls[],\n ): IAbstractFormArrayControls[] {\n formArrayControls.splice(index, 1);\n return formArrayControls;\n }\n\n /**\n * Retrieves the value of a form control or returns a default value if the control is null or undefined.\n *\n * @param control - The form control to retrieve the value from.\n * @param defaultValue - The default value to return if the control is null or undefined.\n * @returns The value of the control if it exists, otherwise the default value.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected getControlValueOrDefault(control: AbstractControl | null, defaultValue: any): any {\n return control?.value ?? defaultValue;\n }\n\n /**\n * Removes a form array control at the specified index and updates the form array controls and errors.\n *\n * @param index - The index of the form array control to remove.\n * @param formArrayName - The name of the form array.\n * @param formArrayControls - The list of form array controls.\n * @param fieldNames - The names of the fields associated with the form array controls.\n * @returns The updated list of form array controls.\n */\n public removeFormArrayControls(\n index: number,\n formArrayName: string,\n formArrayControls: IAbstractFormArrayControls[],\n fieldNames: string[],\n ): IAbstractFormArrayControls[] {\n // Get the form array...\n const control = this.form.get(formArrayName) as FormArray;\n\n // Remove the form array control based on index\n control.removeAt(index);\n\n // Then remove the form array controls errors...\n this.removeFormArrayControlsErrors(index, formArrayControls, fieldNames);\n\n // Return the new list of form array controls...\n return this.removeFormArrayControl(index, formArrayControls);\n }\n\n /**\n * Removes controls from a form array at the specified index.\n *\n * @param index - The index at which to remove the controls.\n * @param formArrayName - The name of the form array.\n */\n public removeControlsFromFormArray(index: number, formArrayName: string): void {\n this.formArrayControls = this.removeFormArrayControls(\n index,\n formArrayName,\n this.formArrayControls,\n this.formArrayFields,\n );\n }\n\n /**\n * Removes a form array control from the specified form array.\n *\n * @param formArrayControl - The form array control to remove.\n * @param formArrayName - The name of the form array.\n */\n public removeFormArrayControlFromArray(formArrayControl: IAbstractFormArrayControls, formArrayName: string): void {\n const formArrayControlIndex = this.formArrayControls.indexOf(formArrayControl);\n this.removeFormArrayControls(formArrayControlIndex, formArrayName, this.formArrayControls, this.formArrayFields);\n }\n\n /**\n * Retrieves the FormGroup at the specified index from a FormArray.\n *\n * @param index - The index of the FormGroup to retrieve.\n * @param formArrayName - The name of the FormArray.\n * @returns The FormGroup at the specified index.\n */\n public getFormArrayFormGroup(index: number, formArrayName: string): FormGroup {\n const formArray = this.form.get(formArrayName) as FormArray;\n return formArray.controls[index] as FormGroup;\n }\n\n /**\n * Retrieves the FormControl from a FormGroup within a FormArray at the specified index.\n *\n * @param formGroup - The FormGroup containing the FormControl.\n * @param controlName - The name of the FormControl.\n * @param index - The index of the FormArray.\n * @returns The FormControl at the specified index.\n */\n public getFormArrayFormGroupControl(formGroup: FormGroup, controlName: string, index: number): FormControl {\n return formGroup.controls[`${controlName}_${index}`] as FormControl;\n }\n\n /**\n * Adds validators to a specific form control within a form array group.\n *\n * @param formGroup - The form group containing the form array.\n * @param controlName - The name of the form control within the form array group.\n * @param index - The index of the form array group within the form array.\n * @param validators - An array of validator functions to be added to the form control.\n */\n public addFormArrayFormGroupControlValidators(formControl: FormControl, validators: ValidatorFn[]): void {\n formControl.setValidators(validators);\n formControl.updateValueAndValidity({ emitEvent: false });\n }\n\n /**\n * Removes validators from a specific form control within a form array group.\n * @param formGroup - The form group containing the form array.\n * @param controlName - The name of the form control within the form array group.\n * @param index - The index of the form array group within the form array.\n */\n public removeFormArrayFormGroupControlValidators(formControl: FormControl): void {\n formControl.clearValidators();\n formControl.setErrors(null);\n formControl.setValue(null, { emitEvent: false });\n formControl.updateValueAndValidity({ emitEvent: false });\n }\n\n /**\n * Reverses the form array data by appending the index to each key in the objects.\n *\n * @param data - An array of objects containing form data.\n * @returns An array of objects with keys modified to include their index in the original array.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public addIndexToFormArrayData(data: any[]): { [key: string]: any }[] {\n return data.map((item, index) =>\n Object.entries(item).reduce(\n (indexedObject, [key, value]) => {\n if (value !== undefined) {\n indexedObject[`${key}_${index}`] = value;\n }\n return indexedObject;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n {} as { [key: string]: any },\n ),\n );\n }\n\n /**\n * Adds controls to the form array at the specified index.\n *\n * @param index - The index at which the controls should be added.\n * @param formArrayName - The name of the form array.\n */\n public addControlsToFormArray(index: number, formArrayName: string): void {\n this.formArrayControls.push(\n this.addFormArrayControls(index, formArrayName, this.formArrayFields, this.formArrayControlsValidation),\n );\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n }\n\n public override ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n super.ngOnDestroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAYM,MAAgB,8BAA+B,SAAQ,yBAAyB,CAAA;IAC7E,iBAAiB,GAAiC,EAAE;IACpD,2BAA2B,GAA0C,EAAE;IACvE,eAAe,GAAa,EAAE;AAErC;;;;;;;;AAQG;AACK,IAAA,sBAAsB,CAC5B,gBAA0B,EAC1B,aAAqB,EACrB,UAAoB,EACpB,iBAAwD,EAAA;;QAGxD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,KAC1C,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAC/E;IACH;AAEA;;;;;;;;AAQG;AACK,IAAA,oBAAoB,CAC1B,KAAa,EACb,aAAqB,EACrB,UAAoB,EACpB,iBAAwD,EAAA;QAExD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAc;AAC3D,QAAA,MAAM,kBAAkB,GAAG,IAAI,S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AE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC9B,YAAA,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,aAAa,CAAC,GAAG,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,CAAC,GAAG,KAAK;YAC1C;AACA,YAAA,OAAO,aAAa;QACtB,CAAC;;QAED,EAA4B,CAC7B,CACF;IACH;AAEA;;;;;AAKG;IACI,sBAAsB,CAAC,KAAa,EAAE,aAAqB,EAAA;QAChE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CACzB,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,2BAA2B,CAAC,CACxG;IACH;IAEgB,QAAQ,GAAA;QACtB,KAAK,CAAC,QAAQ,EAAE;IAClB;IAEgB,WAAW,GAAA;AACzB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;AACzB,QAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;QAC7B,KAAK,CAAC,WAAW,EAAE;IACrB;uGA5SoB,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,+FAFxC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAHnD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-array-parent-base/abstract-form-array-parent-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-array-parent-base/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.ts"],"sourcesContent":["import { AbstractFormParentBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-parent-base';\n\nexport abstract class AbstractFormArrayParentBaseComponent extends AbstractFormParentBaseComponent {\n /**\n * Removes index suffixes from keys in an array of objects and restructures the data.\n *\n * This function takes an array of objects where keys have an index suffix (e.g., `key_0`, `key_1`),\n * and returns a new array of objects where the keys are grouped by their base name without the index.\n *\n * @param data - The array of objects with indexed keys.\n * @returns A new array of objects with keys grouped by their base name.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public removeIndexFromFormArrayData(data: any[]): any[] {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return data.reduce((result: any[], indexedObject) => {\n let currentIndex!: number;\n for (const key of Object.keys(indexedObject)) {\n const match = new RegExp(/^(.*)_(\\d+)$/).exec(key);\n if (match) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, baseKey, index] = match;\n const idx = Number.parseInt(index, 10);\n\n currentIndex = idx; // Set the current index based on the last indexed key\n\n result[idx] = result[idx] ?? {};\n result[idx][baseKey] = indexedObject[key];\n } else {\n // For non-indexed keys, use the currentIndex if available\n result[currentIndex] = result[currentIndex] ?? {};\n result[currentIndex][key] = indexedObject[key];\n }\n }\n return result;\n }, []);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEM,MAAgB,oCAAqC,SAAQ,+BAA+B,CAAA;AAChG;;;;;;;;AAQG;;AAEI,IAAA,4BAA4B,CAAC,IAAW,EAAA;;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAa,EAAE,aAAa,KAAI;AAClD,YAAA,IAAI,YAAqB;YACzB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;AAC5C,gBAAA,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;gBAClD,IAAI,KAAK,EAAE;;oBAET,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,KAAK;oBACjC,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;AAEtC,oBAAA,YAAY,GAAG,GAAG,CAAC;oBAEnB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;oBAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC;gBAC3C;qBAAO;;oBAEL,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;oBACjD,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC;gBAChD;YACF;AACA,YAAA,OAAO,MAAM;QACf,CAAC,EAAE,EAAE,CAAC;IACR;AACD;;ACrCD;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base-interfaces.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-array-removal-base/interfaces/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base-interfaces.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-array-removal-base/abstract-form-array-removal-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-array-removal-base/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.ts"],"sourcesContent":["import { FormArray, FormGroup } from '@angular/forms';\nimport { Component, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { IAbstractFormArrayRemovalBaseControlValue } from './interfaces/abstract-form-array-removal-base-control-value.interface';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractFormArrayRemovalComponent {\n private readonly router = inject(Router);\n private readonly activatedRoute = inject(ActivatedRoute);\n\n protected getFormArrayControlValue(\n formArray: FormArray,\n controlName: string,\n rowIndex: number,\n defaultValue: IAbstractFormArrayRemovalBaseControlValue[keyof IAbstractFormArrayRemovalBaseControlValue],\n ): IAbstractFormArrayRemovalBaseControlValue[keyof IAbstractFormArrayRemovalBaseControlValue] {\n const value = formArray.controls[rowIndex]?.get(controlName)?.value;\n\n if (typeof value === 'string' && !Number.isNaN(Number(value))) {\n return Number(value);\n }\n\n return value ?? defaultValue;\n }\n\n /**\n * Removes a control from the given form array at the specified index and renumbers the remaining controls.\n *\n * @param formArray - The form array from which to remove the control.\n * @param removeIndex - The index of the control to remove.\n * @param fieldNames - The names of the fields associated with the controls.\n * @param dynamicFieldPrefix - The prefix used for dynamically generated field names.\n */\n protected removeControlAndRenumber(\n formArray: FormArray,\n removeIndex: number,\n fieldNames: string[],\n dynamicFieldPrefix: string,\n ): void {\n formArray.removeAt(removeIndex);\n this.renumberControls(formArray, removeIndex, fieldNames, dynamicFieldPrefix);\n }\n\n /**\n * Renumber the controls in a FormArray starting from a specific index.\n * This method updates the control keys of each FormGroup within the FormArray.\n *\n * @param formArray - The FormArray to renumber the controls for.\n * @param startIndex - The index to start renumbering the controls from.\n * @param fieldNames - The names of the fields in the FormGroup.\n * @param dynamicFieldPrefix - The prefix to use for dynamic field names.\n */\n protected renumberControls(\n formArray: FormArray,\n startIndex: number,\n fieldNames: string[],\n dynamicFieldPrefix: string,\n ): void {\n const formGroups = formArray.controls.slice(startIndex);\n for (const [index, formGroup] of formGroups.entries()) {\n this.updateControlKeys(formGroup as FormGroup, index + startIndex, fieldNames, dynamicFieldPrefix);\n }\n }\n\n /**\n * Updates the control keys in a form group based on the provided parameters.\n * @param formGroup - The form group to update.\n * @param index - The index of the form group within an array.\n * @param fieldNames - An array of field names to update.\n * @param dynamicFieldPrefix - The prefix to use for dynamic field keys.\n */\n protected updateControlKeys(\n formGroup: FormGroup,\n index: number,\n fieldNames: string[],\n dynamicFieldPrefix: string,\n ): void {\n for (const field of fieldNames) {\n const currentKey = `${dynamicFieldPrefix}_${field}_${index + 1}`;\n const newKey = `${dynamicFieldPrefix}_${field}_${index}`;\n\n // Retrieve the current control, if it exists\n const control = formGroup.get(currentKey);\n\n if (control) {\n // Remove the old control first, then add it with the new key\n formGroup.removeControl(currentKey);\n\n // Add the control with the updated key\n formGroup.addControl(newKey, control);\n }\n }\n }\n\n /**\n * Handles route with the supplied route\n *\n * @param route string of route\n * @param nonRelative boolean indicating if route is relative to the parent\n */\n public handleRoute(route: string, nonRelative: boolean = false, event?: Event): void {\n if (event) {\n event.preventDefault();\n }\n if (nonRelative) {\n this.router.navigate([route]);\n } else {\n this.router.navigate([route], { relativeTo: this.activatedRoute.parent });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAQsB,iCAAiC,CAAA;AACpC,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAE9C,IAAA,wBAAwB,CAChC,SAAoB,EACpB,WAAmB,EACnB,QAAgB,EAChB,YAAwG,EAAA;AAExG,QAAA,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK;AAEnE,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;AAC7D,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB;QA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;;;;AAKG;AACI,IAAA,WAAW,CAAC,KAAa,EAAE,WAAA,GAAuB,KAAK,EAAE,KAAa,EAAA;QAC3E,IAAI,KAAK,EAAE;YACT,KAAK,CAAC,cAAc,EAAE;QACxB;QACA,IAAI,WAAW,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;QAC/B;aAAO;AACL,YAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3E;IACF;uGAvGoB,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iCAAiC,wEAF3C,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAHtD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-base-interfaces.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-base/interfaces/hmcts-opal-frontend-common-components-abstract-abstract-form-base-interfaces.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG"}