@hmcts/opal-frontend-common 0.0.47 → 0.0.49

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/components/abstract/abstract-form-base/index.d.ts +4 -1
  2. package/fesm2022/{hmcts-opal-frontend-common-access-denied.component-dFPqF73L.mjs → hmcts-opal-frontend-common-access-denied.component-CwC-AqJA.mjs} +4 -4
  3. package/fesm2022/{hmcts-opal-frontend-common-access-denied.component-dFPqF73L.mjs.map → hmcts-opal-frontend-common-access-denied.component-CwC-AqJA.mjs.map} +1 -1
  4. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
  5. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs.map +1 -1
  6. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
  7. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +1 -1
  8. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
  9. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs.map +1 -1
  10. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +9 -4
  11. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs.map +1 -1
  12. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +3 -3
  13. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map +1 -1
  14. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
  15. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs.map +1 -1
  16. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
  17. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs.map +1 -1
  18. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +3 -3
  19. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs.map +1 -1
  20. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
  21. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs.map +1 -1
  22. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
  23. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs.map +1 -1
  24. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
  25. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs.map +1 -1
  26. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
  27. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs.map +1 -1
  28. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
  29. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs.map +1 -1
  30. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
  31. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs.map +1 -1
  32. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
  33. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs.map +1 -1
  34. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
  35. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs.map +1 -1
  36. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
  37. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs.map +1 -1
  38. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
  39. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs.map +1 -1
  40. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
  41. 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 +1 -1
  42. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
  43. 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 +1 -1
  44. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
  45. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs.map +1 -1
  46. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
  47. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs.map +1 -1
  48. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
  49. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs.map +1 -1
  50. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
  51. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs.map +1 -1
  52. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
  53. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs.map +1 -1
  54. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
  55. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs.map +1 -1
  56. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
  57. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs.map +1 -1
  58. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
  59. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs.map +1 -1
  60. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
  61. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs.map +1 -1
  62. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
  63. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs.map +1 -1
  64. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
  65. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs.map +1 -1
  66. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
  67. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs.map +1 -1
  68. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
  69. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs.map +1 -1
  70. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
  71. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs.map +1 -1
  72. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
  73. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs.map +1 -1
  74. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
  75. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs.map +1 -1
  76. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
  77. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs.map +1 -1
  78. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
  79. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs.map +1 -1
  80. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
  81. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs.map +1 -1
  82. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
  83. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs.map +1 -1
  84. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
  85. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs.map +1 -1
  86. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
  87. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs.map +1 -1
  88. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
  89. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs.map +1 -1
  90. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
  91. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs.map +1 -1
  92. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
  93. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs.map +1 -1
  94. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
  95. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs.map +1 -1
  96. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
  97. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs.map +1 -1
  98. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
  99. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs.map +1 -1
  100. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
  101. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs.map +1 -1
  102. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
  103. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs.map +1 -1
  104. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
  105. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs.map +1 -1
  106. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
  107. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs.map +1 -1
  108. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
  109. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +1 -1
  110. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
  111. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs.map +1 -1
  112. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
  113. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs.map +1 -1
  114. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
  115. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs.map +1 -1
  116. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
  117. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs.map +1 -1
  118. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
  119. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs.map +1 -1
  120. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
  121. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs.map +1 -1
  122. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
  123. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs.map +1 -1
  124. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
  125. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +1 -1
  126. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
  127. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs.map +1 -1
  128. 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 +3 -3
  129. 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 +1 -1
  130. 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 +3 -3
  131. 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 +1 -1
  132. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
  133. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs.map +1 -1
  134. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
  135. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs.map +1 -1
  136. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
  137. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs.map +1 -1
  138. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
  139. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs.map +1 -1
  140. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
  141. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs.map +1 -1
  142. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
  143. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs.map +1 -1
  144. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
  145. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs.map +1 -1
  146. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
  147. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs.map +1 -1
  148. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
  149. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs.map +1 -1
  150. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
  151. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs.map +1 -1
  152. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
  153. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs.map +1 -1
  154. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
  155. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs.map +1 -1
  156. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
  157. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs.map +1 -1
  158. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
  159. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs.map +1 -1
  160. package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-B44V5uH3.mjs → hmcts-opal-frontend-common-concurrency-failure.component-apu3f4Gj.mjs} +4 -4
  161. package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-B44V5uH3.mjs.map → hmcts-opal-frontend-common-concurrency-failure.component-apu3f4Gj.mjs.map} +1 -1
  162. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
  163. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +1 -1
  164. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
  165. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs.map +1 -1
  166. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs +2 -1
  167. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs.map +1 -1
  168. package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component--U40lt8r.mjs → hmcts-opal-frontend-common-internal-server-error.component-BSeyK7ia.mjs} +4 -4
  169. package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component--U40lt8r.mjs.map → hmcts-opal-frontend-common-internal-server-error.component-BSeyK7ia.mjs.map} +1 -1
  170. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-dFPqF73L.mjs → hmcts-opal-frontend-common-pages-access-denied.component-CwC-AqJA.mjs} +4 -4
  171. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-dFPqF73L.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-CwC-AqJA.mjs.map} +1 -1
  172. package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-B44V5uH3.mjs → hmcts-opal-frontend-common-pages-concurrency-failure.component-apu3f4Gj.mjs} +4 -4
  173. package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-B44V5uH3.mjs.map → hmcts-opal-frontend-common-pages-concurrency-failure.component-apu3f4Gj.mjs.map} +1 -1
  174. package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component--U40lt8r.mjs → hmcts-opal-frontend-common-pages-internal-server-error.component-BSeyK7ia.mjs} +4 -4
  175. package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component--U40lt8r.mjs.map → hmcts-opal-frontend-common-pages-internal-server-error.component-BSeyK7ia.mjs.map} +1 -1
  176. package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-DhK3JRl_.mjs → hmcts-opal-frontend-common-pages-permission-denied.component-BwvbwXWg.mjs} +4 -4
  177. package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-DhK3JRl_.mjs.map → hmcts-opal-frontend-common-pages-permission-denied.component-BwvbwXWg.mjs.map} +1 -1
  178. package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs +1 -1
  179. package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs.map +1 -1
  180. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-c5YhkBED.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-D1xiH9Ej.mjs} +4 -4
  181. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-c5YhkBED.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-D1xiH9Ej.mjs.map} +1 -1
  182. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DX9aGho7.mjs → hmcts-opal-frontend-common-pages-sign-in.component-F-Cw2Ifc.mjs} +4 -4
  183. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DX9aGho7.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-F-Cw2Ifc.mjs.map} +1 -1
  184. package/fesm2022/hmcts-opal-frontend-common-pages.mjs +5 -5
  185. package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-DhK3JRl_.mjs → hmcts-opal-frontend-common-permission-denied.component-BwvbwXWg.mjs} +4 -4
  186. package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-DhK3JRl_.mjs.map → hmcts-opal-frontend-common-permission-denied.component-BwvbwXWg.mjs.map} +1 -1
  187. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
  188. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs.map +1 -1
  189. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
  190. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs.map +1 -1
  191. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +3 -3
  192. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs.map +1 -1
  193. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
  194. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs.map +1 -1
  195. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
  196. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs.map +1 -1
  197. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
  198. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs.map +1 -1
  199. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
  200. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs.map +1 -1
  201. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
  202. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +1 -1
  203. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
  204. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs.map +1 -1
  205. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +3 -3
  206. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs.map +1 -1
  207. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +3 -3
  208. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs.map +1 -1
  209. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +3 -3
  210. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +1 -1
  211. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
  212. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs.map +1 -1
  213. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
  214. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs.map +1 -1
  215. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
  216. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +1 -1
  217. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
  218. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs.map +1 -1
  219. package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-c5YhkBED.mjs → hmcts-opal-frontend-common-sign-in-stub.component-D1xiH9Ej.mjs} +4 -4
  220. package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-c5YhkBED.mjs.map → hmcts-opal-frontend-common-sign-in-stub.component-D1xiH9Ej.mjs.map} +1 -1
  221. package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-DrkgJ0xr.mjs → hmcts-opal-frontend-common-sign-in.component-BB2B6CH-.mjs} +4 -4
  222. package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-DrkgJ0xr.mjs.map → hmcts-opal-frontend-common-sign-in.component-BB2B6CH-.mjs.map} +1 -1
  223. package/fesm2022/hmcts-opal-frontend-common.mjs +5 -5
  224. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/abstract-nested-form-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { AbstractControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';\nimport { merge } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {\n /**\n * Installs all controls from a **detached** builder group into a target FormGroup (defaults to `this.form`).\n *\n * @param source A FormGroup created locally (its controls must not already belong to another parent).\n * @param target The FormGroup to install the controls into. Defaults to `this.form`.\n *\n * Notes:\n * - This method **moves** the control instances from `source` into `target` (no cloning).\n * - If a control already has a parent, Angular will throw when adding it to `target`.\n */\n protected addControlsToNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n for (const [name, ctrl] of Object.entries(source.controls)) {\n target.addControl(name, ctrl);\n }\n }\n\n /**\n * Removes controls from `target` whose names are present in `source` (defaults to `this.form`).\n *\n * @param source A FormGroup whose control names identify which controls to remove.\n * @param target The FormGroup to remove controls from. Defaults to `this.form`.\n *\n * Use this with the same builder group you used to add controls so you only remove what you added.\n */\n protected removeControlsFromNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n for (const name of Object.keys(source.controls)) {\n target.removeControl(name);\n }\n }\n\n /**\n * Adds or removes one or more validators on a control and updates validity without emitting events.\n *\n * @param control The control to modify. If null/undefined, the method no-ops and returns `false`.\n * @param validators A single `ValidatorFn` or an array of `ValidatorFn`s to add/remove.\n * @param present When `true`, validators are added; when `false`, the same validators are removed.\n * @returns The `present` flag (for convenient inline use in conditionals).\n */\n protected setValidatorPresence(\n control: AbstractControl | null,\n validators: ValidatorFn | ValidatorFn[],\n present: boolean,\n ): boolean {\n if (!control) return false;\n const list = Array.isArray(validators) ? validators : [validators];\n if (present) {\n control.addValidators(list);\n } else {\n control.removeValidators(list);\n }\n control.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n return present;\n }\n\n /**\n * Truthy-value helper used by multiple sub-forms.\n *\n * Returns `false` for `null`/`undefined`. For strings, trims whitespace and checks for non-zero length.\n * For all other types, returns `true` (treat non-string values as present).\n */\n protected hasValue(v: unknown): boolean {\n if (v == null) return false;\n return typeof v === 'string' ? v.trim().length > 0 : true;\n }\n\n /**\n * Resets a list of controls and re-computes validity without emitting value-change events.\n *\n * For each control: clears errors, resets the value to `null`, and calls `updateValueAndValidity`.\n * This means built-in validators (e.g. `required`) will be re-applied after reset.\n */\n protected resetAndValidateControls(controls: (AbstractControl | null)[]): void {\n for (const c of controls) {\n if (!c) continue;\n c.setErrors(null);\n c.reset(null, { emitEvent: false });\n c.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n }\n }\n\n /**\n * Resets a FormGroup’s value/state and re-computes validity without emitting value-change events.\n *\n * Performs: `group.reset(undefined)`, marks pristine/untouched, then `updateValueAndValidity`.\n */\n protected resetAndValidateFormGroup(group: FormGroup): void {\n group.reset(undefined, { emitEvent: false });\n group.markAsPristine();\n group.markAsUntouched();\n group.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n }\n\n /**\n * Subscribes a handler to the `valueChanges` of multiple controls, with auto-unsubscribe on destroy.\n *\n * @param handler Function invoked whenever **any** provided control emits a value change.\n * @param controls One or more controls to observe; falsy entries are ignored.\n *\n * Implementation detail: merges the streams and unsubscribes via `takeUntil(this.ngUnsubscribe)`.\n */\n protected subscribeValidation(handler: () => void, ...controls: (AbstractControl | null)[]): void {\n const streams = controls.filter(Boolean).map((c) => c!.valueChanges);\n if (!streams.length) return;\n merge(...streams)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(handler);\n }\n\n /**\n * @inheritdoc\n *\n * Handles cleanup logic when the component is destroyed.\n *\n * - Clears local child error definitions and emits an empty map to the parent.\n * - Removes all controls added by this sub-form from the parent form, if nested.\n * - Calls the base class's `ngOnDestroy` for additional teardown.\n */\n public override ngOnDestroy(): void {\n // Remove controls this sub-form added to the parent (if nested)\n if (this.form?.parent) {\n for (const name of Object.keys(this.form.controls)) {\n this.form.removeControl(name);\n }\n }\n\n super.ngOnDestroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AASM,MAAgB,+BAAgC,SAAQ,yBAAyB,CAAA;AACrF;;;;;;;;;AASG;AACO,IAAA,4BAA4B,CAAC,MAAiB,EAAE,MAAA,GAAoB,IAAI,CAAC,IAAI,EAAA;AACrF,QAAA,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC1D,YAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC;QAC/B;IACF;AAEA;;;;;;;AAOG;AACO,IAAA,iCAAiC,CAAC,MAAiB,EAAE,MA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AA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,+BAA+B,+FAFzC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAHpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/abstract-nested-form-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-nested-form-base/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { AbstractControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { AbstractFormBaseComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-form-base';\nimport { merge } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractNestedFormBaseComponent extends AbstractFormBaseComponent {\n /**\n * Installs all controls from a **detached** builder group into a target FormGroup (defaults to `this.form`).\n *\n * @param source A FormGroup created locally (its controls must not already belong to another parent).\n * @param target The FormGroup to install the controls into. Defaults to `this.form`.\n *\n * Notes:\n * - This method **moves** the control instances from `source` into `target` (no cloning).\n * - If a control already has a parent, Angular will throw when adding it to `target`.\n */\n protected addControlsToNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n for (const [name, ctrl] of Object.entries(source.controls)) {\n target.addControl(name, ctrl);\n }\n }\n\n /**\n * Removes controls from `target` whose names are present in `source` (defaults to `this.form`).\n *\n * @param source A FormGroup whose control names identify which controls to remove.\n * @param target The FormGroup to remove controls from. Defaults to `this.form`.\n *\n * Use this with the same builder group you used to add controls so you only remove what you added.\n */\n protected removeControlsFromNestedFormGroup(source: FormGroup, target: FormGroup = this.form): void {\n for (const name of Object.keys(source.controls)) {\n target.removeControl(name);\n }\n }\n\n /**\n * Adds or removes one or more validators on a control and updates validity without emitting events.\n *\n * @param control The control to modify. If null/undefined, the method no-ops and returns `false`.\n * @param validators A single `ValidatorFn` or an array of `ValidatorFn`s to add/remove.\n * @param present When `true`, validators are added; when `false`, the same validators are removed.\n * @returns The `present` flag (for convenient inline use in conditionals).\n */\n protected setValidatorPresence(\n control: AbstractControl | null,\n validators: ValidatorFn | ValidatorFn[],\n present: boolean,\n ): boolean {\n if (!control) return false;\n const list = Array.isArray(validators) ? validators : [validators];\n if (present) {\n control.addValidators(list);\n } else {\n control.removeValidators(list);\n }\n control.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n return present;\n }\n\n /**\n * Truthy-value helper used by multiple sub-forms.\n *\n * Returns `false` for `null`/`undefined`. For strings, trims whitespace and checks for non-zero length.\n * For all other types, returns `true` (treat non-string values as present).\n */\n protected hasValue(v: unknown): boolean {\n if (v == null) return false;\n return typeof v === 'string' ? v.trim().length > 0 : true;\n }\n\n /**\n * Resets a list of controls and re-computes validity without emitting value-change events.\n *\n * For each control: clears errors, resets the value to `null`, and calls `updateValueAndValidity`.\n * This means built-in validators (e.g. `required`) will be re-applied after reset.\n */\n protected resetAndValidateControls(controls: (AbstractControl | null)[]): void {\n for (const c of controls) {\n if (!c) continue;\n c.setErrors(null);\n c.reset(null, { emitEvent: false });\n c.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n }\n }\n\n /**\n * Resets a FormGroup’s value/state and re-computes validity without emitting value-change events.\n *\n * Performs: `group.reset(undefined)`, marks pristine/untouched, then `updateValueAndValidity`.\n */\n protected resetAndValidateFormGroup(group: FormGroup): void {\n group.reset(undefined, { emitEvent: false });\n group.markAsPristine();\n group.markAsUntouched();\n group.updateValueAndValidity({ emitEvent: false, onlySelf: true });\n }\n\n /**\n * Subscribes a handler to the `valueChanges` of multiple controls, with auto-unsubscribe on destroy.\n *\n * @param handler Function invoked whenever **any** provided control emits a value change.\n * @param controls One or more controls to observe; falsy entries are ignored.\n *\n * Implementation detail: merges the streams and unsubscribes via `takeUntil(this.ngUnsubscribe)`.\n */\n protected subscribeValidation(handler: () => void, ...controls: (AbstractControl | null)[]): void {\n const streams = controls.filter(Boolean).map((c) => c!.valueChanges);\n if (!streams.length) return;\n merge(...streams)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(handler);\n }\n\n /**\n * @inheritdoc\n *\n * Handles cleanup logic when the component is destroyed.\n *\n * - Clears local child error definitions and emits an empty map to the parent.\n * - Removes all controls added by this sub-form from the parent form, if nested.\n * - Calls the base class's `ngOnDestroy` for additional teardown.\n */\n public override ngOnDestroy(): void {\n // Remove controls this sub-form added to the parent (if nested)\n if (this.form?.parent) {\n for (const name of Object.keys(this.form.controls)) {\n this.form.removeControl(name);\n }\n }\n\n super.ngOnDestroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AASM,MAAgB,+BAAgC,SAAQ,yBAAyB,CAAA;AACrF;;;;;;;;;AASG;AACO,IAAA,4BAA4B,CAAC,MAAiB,EAAE,MAAA,GAAoB,IAAI,CAAC,IAAI,EAAA;AACrF,QAAA,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC1D,YAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC;QAC/B;IACF;AAEA;;;;;;;AAOG;AACO,IAAA,iCAAiC,CAAC,MAAiB,EAAE,MAAA,GAAoB,IAAI,CAAC,IAAI,EAAA;AAC1F,QAAA,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC/C,YAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC;QAC5B;IACF;AAEA;;;;;;;AAOG;AACO,IAAA,oBAAoB,CAC5B,OAA+B,EAC/B,UAAuC,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61,10 +61,10 @@ class AbstractSortableTablePaginationComponent extends AbstractSortableTableComp
61
61
  const totalPages = Math.ceil(this.displayTableDataSignal().length / this.itemsPerPageSignal());
62
62
  this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));
63
63
  }
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
65
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
64
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractSortableTablePaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
65
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AbstractSortableTablePaginationComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractSortableTablePaginationComponent, decorators: [{
68
68
  type: Component,
69
69
  args: [{
70
70
  template: '',
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table-pagination/abstract-sortable-table-pagination.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table-pagination/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.ts"],"sourcesContent":["import { Component, computed, signal } from '@angular/core';\nimport { AbstractSortableTableComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractSortableTablePaginationComponent extends AbstractSortableTableComponent {\n // Signal for the current page. Used to calculate the start and end indices for pagination.\n public currentPageSignal = signal(1);\n\n // Signal for the number of items per page. Determines how many items are displayed on each page.\n public itemsPerPageSignal = signal(10);\n\n // Signal for the start index (1-based). Automatically updates when `currentPageSignal` or `itemsPerPageSignal` changes.\n public startIndexComputed = computed(() => {\n const currentPage = this.currentPageSignal();\n return (currentPage - 1) * this.itemsPerPageSignal() + 1;\n });\n\n /**\n * Computes the end index for the current page of the sorted table data.\n * Ensures the end index does not exceed the total number of items.\n *\n * @returns The zero-based index of the last item to display on the current page.\n */\n public endIndexComputed = computed(() => {\n return Math.min(this.sortedTableDataSignal().length, this.startIndexComputed() + this.itemsPerPageSignal() - 1);\n });\n\n // Computed signal for paginated table data. Reactively slices `displayTableDataSignal` based on `startIndexComputed` and `endIndexComputed`.\n public paginatedTableDataComputed = computed(() => {\n const data = this.sortedTableDataSignal(); // Full table data\n\n return data.slice(this.startIndexComputed() - 1, this.endIndexComputed()); // Return paginated data subset\n });\n\n /**\n * Handles sorting changes and resets the page to the first page.\n *\n * @param event - The sorting event containing:\n * - `key`: The column key to sort by.\n * - `sortType`: The sorting order, either 'ascending' or 'descending'.\n *\n * Resets `currentPageSignal` to 1 and triggers re-sorting of `displayTableDataSignal`.\n */\n public override onSortChange(event: { key: string; sortType: 'ascending' | 'descending' }): void {\n super.onSortChange(event); // Update the sort state and sort the data\n this.currentPageSignal.set(1); // Reset the page to the first page\n }\n\n /**\n * Applies the current filters to the table data.\n *\n * Overrides the base implementation to additionally reset the pagination to the first page\n * after filters are applied.\n *\n * @override\n */\n public override onApplyFilters(): void {\n super.onApplyFilters();\n this.currentPageSignal.set(1); // Reset to first page after filtering\n }\n\n /**\n * Handles the event when the page is changed.\n *\n * @param newPage - The new page number to set. If the provided page number is out of range,\n * it will be clamped between 1 and the total number of pages.\n */\n public onPageChange(newPage: number): void {\n const totalPages = Math.ceil(this.displayTableDataSignal().length / this.itemsPerPageSignal());\n this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAMM,MAAgB,wCAAyC,SAAQ,8BAA8B,CAAA;;AAE5F,IAAA,iBAAiB,GAAG,MAAM,CAAC,CAAC,6DAAC;;AAG7B,IAAA,kBAAkB,GAAG,MAAM,CAAC,EAAE,8DAAC;;AAG/B,IAAA,kBAAkB,GAAG,QAAQ,CAAC,MAAK;AACxC,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,EAAE;AAC5C,QAAA,OAAO,CAAC,WAAW,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC;AAC1D,IAAA,CAAC,8DAAC;AAEF;;;;;AAKG;AACI,IAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAK;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AACjH,IAAA,CAAC,4DAAC;;AAGK,IAAA,0BAA0B,GAAG,QAAQ,CAAC,MAAK;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;AAE1C,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC5E,IAAA,CAAC,sEAAC;AAEF;;;;;;;;AAQG;AACa,IAAA,YAAY,CAAC,KAA4D,EAAA;AACvF,QAAA,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;AAEA;;;;;;;AAOG;IACa,cAAc,GAAA;QAC5B,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;AAEA;;;;;AAKG;AACI,IAAA,YAAY,CAAC,OAAe,EAAA;AACjC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC9F,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IACxE;uGAlEoB,wCAAwC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wCAAwC,+FAFlD,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAH7D,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table-pagination/abstract-sortable-table-pagination.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table-pagination/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.ts"],"sourcesContent":["import { Component, computed, signal } from '@angular/core';\nimport { AbstractSortableTableComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractSortableTablePaginationComponent extends AbstractSortableTableComponent {\n // Signal for the current page. Used to calculate the start and end indices for pagination.\n public currentPageSignal = signal(1);\n\n // Signal for the number of items per page. Determines how many items are displayed on each page.\n public itemsPerPageSignal = signal(10);\n\n // Signal for the start index (1-based). Automatically updates when `currentPageSignal` or `itemsPerPageSignal` changes.\n public startIndexComputed = computed(() => {\n const currentPage = this.currentPageSignal();\n return (currentPage - 1) * this.itemsPerPageSignal() + 1;\n });\n\n /**\n * Computes the end index for the current page of the sorted table data.\n * Ensures the end index does not exceed the total number of items.\n *\n * @returns The zero-based index of the last item to display on the current page.\n */\n public endIndexComputed = computed(() => {\n return Math.min(this.sortedTableDataSignal().length, this.startIndexComputed() + this.itemsPerPageSignal() - 1);\n });\n\n // Computed signal for paginated table data. Reactively slices `displayTableDataSignal` based on `startIndexComputed` and `endIndexComputed`.\n public paginatedTableDataComputed = computed(() => {\n const data = this.sortedTableDataSignal(); // Full table data\n\n return data.slice(this.startIndexComputed() - 1, this.endIndexComputed()); // Return paginated data subset\n });\n\n /**\n * Handles sorting changes and resets the page to the first page.\n *\n * @param event - The sorting event containing:\n * - `key`: The column key to sort by.\n * - `sortType`: The sorting order, either 'ascending' or 'descending'.\n *\n * Resets `currentPageSignal` to 1 and triggers re-sorting of `displayTableDataSignal`.\n */\n public override onSortChange(event: { key: string; sortType: 'ascending' | 'descending' }): void {\n super.onSortChange(event); // Update the sort state and sort the data\n this.currentPageSignal.set(1); // Reset the page to the first page\n }\n\n /**\n * Applies the current filters to the table data.\n *\n * Overrides the base implementation to additionally reset the pagination to the first page\n * after filters are applied.\n *\n * @override\n */\n public override onApplyFilters(): void {\n super.onApplyFilters();\n this.currentPageSignal.set(1); // Reset to first page after filtering\n }\n\n /**\n * Handles the event when the page is changed.\n *\n * @param newPage - The new page number to set. If the provided page number is out of range,\n * it will be clamped between 1 and the total number of pages.\n */\n public onPageChange(newPage: number): void {\n const totalPages = Math.ceil(this.displayTableDataSignal().length / this.itemsPerPageSignal());\n this.currentPageSignal.set(Math.max(1, Math.min(newPage, totalPages)));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAMM,MAAgB,wCAAyC,SAAQ,8BAA8B,CAAA;;AAE5F,IAAA,iBAAiB,GAAG,MAAM,CAAC,CAAC,6DAAC;;AAG7B,IAAA,kBAAkB,GAAG,MAAM,CAAC,EAAE,8DAAC;;AAG/B,IAAA,kBAAkB,GAAG,QAAQ,CAAC,MAAK;AACxC,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,EAAE;AAC5C,QAAA,OAAO,CAAC,WAAW,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC;AAC1D,IAAA,CAAC,8DAAC;AAEF;;;;;AAKG;AACI,IAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAK;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AACjH,IAAA,CAAC,4DAAC;;AAGK,IAAA,0BAA0B,GAAG,QAAQ,CAAC,MAAK;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;AAE1C,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC5E,IAAA,CAAC,sEAAC;AAEF;;;;;;;;AAQG;AACa,IAAA,YAAY,CAAC,KAA4D,EAAA;AACvF,QAAA,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;AAEA;;;;;;;AAOG;IACa,cAAc,GAAA;QAC5B,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;AAEA;;;;;AAKG;AACI,IAAA,YAAY,CAAC,OAAe,EAAA;AACjC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC9F,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IACxE;wGAlEoB,wCAAwC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wCAAwC,+FAFlD,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEQ,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAH7D,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -185,10 +185,10 @@ class AbstractSortableTableComponent extends AbstractTableFilterComponent {
185
185
  this.onSortChange({ key, sortType });
186
186
  }
187
187
  }
188
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractSortableTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
189
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractSortableTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
189
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AbstractSortableTableComponent, isStandalone: true, selector: "ng-component", outputs: { abstractSortState: "abstractSortState" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
190
190
  }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractSortableTableComponent, decorators: [{
192
192
  type: Component,
193
193
  args: [{
194
194
  template: '',
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table/abstract-sortable-table.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.ts"],"sourcesContent":["import { Component, EventEmitter, OnInit, Output, effect, inject, signal } from '@angular/core';\nimport {\n IAbstractSortState,\n IAbstractTableData,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/interfaces';\nimport { SortService } from '@hmcts/opal-frontend-common/services/sort-service';\nimport {\n SortableValuesType,\n SortDirectionType,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';\nimport { AbstractTableFilterComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractSortableTableComponent extends AbstractTableFilterComponent implements OnInit {\n private readonly sortService = inject(SortService);\n\n /**\n * Synchronizes the sorted table data with the current filter and sort state.\n *\n * This effect observes changes to the filtered table data and the sort state signals.\n * If no active sort key is found (i.e., no sorting is applied), it sets the sorted table data\n * to a shallow copy of the filtered data. Otherwise, sorting logic should be applied elsewhere.\n *\n * @protected\n */\n protected syncSortedDataEffect = effect(() => {\n const filtered = this.filteredTableDataSignal();\n const currentSort = this.sortStateSignal();\n\n const activeSortKey = Object.keys(currentSort).find((k) => currentSort[k] !== 'none');\n\n if (!activeSortKey) {\n // No sort applied – use filtered data directly\n this.sortedTableDataSignal.set([...filtered]);\n }\n });\n\n public override displayTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public override filteredTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public sortedTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public abstractExistingSortState: IAbstractSortState | null = null;\n public sortStateSignal = signal<IAbstractSortState>({});\n public sortedColumnTitleSignal = signal<string>('');\n public sortedColumnDirectionSignal = signal<SortDirectionType>('none');\n\n @Output() abstractSortState = new EventEmitter<IAbstractSortState>();\n\n /**\n * Creates an initial sort state for a table based on the provided table data.\n *\n * @param tableData - Array of table data objects representing table rows.\n * @returns Initial sort state object with column names as keys and 'none' as values.\n */\n private createSortState(tableData: IAbstractTableData<SortableValuesType>[] | null): IAbstractSortState {\n return tableData?.length\n ? Object.keys(tableData[0]).reduce<IAbstractSortState>((state, key) => {\n state[key] = 'none';\n return state;\n }, {})\n : {};\n }\n /**\n * Initializes the sort state for the sortable table component.\n *\n * This method sets the initial sort state based on the existing sort state or creates a new one\n * if none exists. It then updates the sort state signal with the initial sort state.\n *\n * If an existing sort state is found, it iterates over each entry and triggers the sort change\n * for each key that has a sort type other than 'none'.\n *\n * @private\n * @returns {void}\n */\n private initialiseSortState(): void {\n const existingSortState = this.abstractExistingSortState;\n const initialSortState = existingSortState || this.createSortState(this.displayTableDataSignal());\n this.applyFilterState();\n\n this.sortStateSignal.set(initialSortState);\n\n if (existingSortState) {\n for (const [key, sortType] of Object.entries(existingSortState)) {\n if (sortType !== 'none') {\n this.onSortChange({ key, sortType });\n }\n }\n }\n this.getSortedColumn();\n }\n\n /**\n * Updates the sort state for a given column key and sort type.\n * Resets the sort state for all other columns to 'none'.\n *\n * @param key - The column to sort by.\n * @param sortType - Sorting order ('ascending' or 'descending').\n */\n private updateSortState(key: string, sortType: 'ascending' | 'descending'): void {\n this.sortStateSignal.set(\n Object.keys(this.sortStateSignal()).reduce<IAbstractSortState>((state, columnKey) => {\n state[columnKey] = columnKey === key ? sortType : 'none';\n return state;\n }, {}),\n );\n }\n\n /**\n * Retrieves the sorted table data based on the specified key and sort type.\n *\n * @param key - The key of the property to sort by.\n * @param sortType - The type of sorting to apply, either 'ascending' or 'descending'.\n * @returns An array of sorted table data objects.\n */\n private getSortedTableData(\n key: string,\n sortType: 'ascending' | 'descending',\n ): IAbstractTableData<SortableValuesType>[] {\n return sortType === 'ascending'\n ? (this.sortService.sortObjectArrayAsc(\n this.filteredTableDataSignal(),\n key,\n ) as IAbstractTableData<SortableValuesType>[])\n : (this.sortService.sortObjectArrayDesc(\n this.filteredTableDataSignal(),\n key,\n ) as IAbstractTableData<SortableValuesType>[]);\n }\n\n /**\n * Determines the first column with a sort state other than 'none' and updates the sorted column signals accordingly.\n *\n * - If a sorted column is found, updates the `sortedColumnTitleSignal` and `sortedColumnDirectionSignal` with the column key and state.\n * - If no sorted column is found, sets the `sortedColumnTitleSignal` to an empty string and `sortedColumnDirectionSignal` to 'none'.\n *\n * @private\n * @returns {void}\n */\n private getSortedColumn(): void {\n // Find the first column that has a sort state other than 'none'\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const sortedColumn = Object.entries(this.sortStateSignal()).find(([_, state]) => state !== 'none');\n\n // If a sorted column is found, set the signal to the sorted column key and state\n if (sortedColumn) {\n const [columnKey, state] = sortedColumn;\n this.sortedColumnTitleSignal.set(columnKey);\n this.sortedColumnDirectionSignal.set(state);\n } else {\n // Otherwise, set the signal to null\n this.sortedColumnTitleSignal.set('');\n this.sortedColumnDirectionSignal.set('none');\n }\n }\n\n /**\n * Handles the change in sorting for the table.\n *\n * @param event - An object containing the key to sort by and the sort type.\n * @param event.key - The key of the column to sort.\n * @param event.sortType - The type of sorting to apply ('ascending' or 'descending').\n *\n * This method updates the sort state, sorts the table data based on the provided key and sort type,\n * updates the table data signal, and emits the updated sort state.\n */\n protected onSortChange(event: { key: string; sortType: 'ascending' | 'descending' }): void {\n const { key, sortType } = event;\n\n this.updateSortState(key, sortType);\n this.getSortedColumn();\n const sortedData = this.getSortedTableData(key, sortType);\n\n // Update the table data signal\n this.sortedTableDataSignal.set(sortedData);\n\n // Emit the updated sort state\n this.abstractSortState.emit(this.sortStateSignal());\n }\n\n /**\n * Lifecycle hook to initialise the sort state.\n */\n public ngOnInit(): void {\n this.initialiseSortState();\n }\n /**\n * Applies the current filters to the table data and updates the sorted data accordingly.\n *\n * This method overrides the parent implementation to additionally handle sorting.\n * If there is an active sort key, it applies the corresponding sort to the filtered data.\n * If no sort key is active, it simply updates the sorted data to match the filtered data.\n *\n * @override\n */\n public override onApplyFilters(): void {\n super.onApplyFilters();\n\n const key = this.sortedColumnTitleSignal();\n const sortType = this.sortedColumnDirectionSignal();\n\n if (!key || sortType === 'none') {\n this.sortedTableDataSignal.set([...this.filteredTableDataSignal()]);\n } else {\n this.onSortChange({ key, sortType });\n }\n }\n\n /**\n * Clears all filters applied to the table and restores the data to its unfiltered state.\n * If a sort is currently active, re-applies the sort after clearing filters.\n * Otherwise, resets the sorted table data to match the filtered data.\n *\n * @override\n */\n public override clearAllFilters(): void {\n super.clearAllFilters();\n\n const key = this.sortedColumnTitleSignal();\n const sortType = this.sortedColumnDirectionSignal();\n\n if (!key || sortType === 'none') {\n this.sortedTableDataSignal.set([...this.filteredTableDataSignal()]);\n } else {\n this.onSortChange({ key, sortType });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAeM,MAAgB,8BAA+B,SAAQ,4BAA4B,CAAA;AACtE,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;;;AA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/B,YAAA,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;QACrE;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;QACtC;IACF;AAEA;;;;;;AAMG;IACa,eAAe,GAAA;QAC7B,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,uBAAuB,EAAE;AAC1C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,EAAE;AAEnD,QAAA,IAAI,CAAC,GAAG,IAAI,QAAQ,KAAK,MAAM,EAAE;AAC/B,YAAA,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;QACrE;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;QACtC;IACF;uGAnNoB,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,oJAFxC,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;;sBAiCE;;;AC/CH;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table/abstract-sortable-table.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-sortable-table/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.ts"],"sourcesContent":["import { Component, EventEmitter, OnInit, Output, effect, inject, signal } from '@angular/core';\nimport {\n IAbstractSortState,\n IAbstractTableData,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/interfaces';\nimport { SortService } from '@hmcts/opal-frontend-common/services/sort-service';\nimport {\n SortableValuesType,\n SortDirectionType,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';\nimport { AbstractTableFilterComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractSortableTableComponent extends AbstractTableFilterComponent implements OnInit {\n private readonly sortService = inject(SortService);\n\n /**\n * Synchronizes the sorted table data with the current filter and sort state.\n *\n * This effect observes changes to the filtered table data and the sort state signals.\n * If no active sort key is found (i.e., no sorting is applied), it sets the sorted table data\n * to a shallow copy of the filtered data. Otherwise, sorting logic should be applied elsewhere.\n *\n * @protected\n */\n protected syncSortedDataEffect = effect(() => {\n const filtered = this.filteredTableDataSignal();\n const currentSort = this.sortStateSignal();\n\n const activeSortKey = Object.keys(currentSort).find((k) => currentSort[k] !== 'none');\n\n if (!activeSortKey) {\n // No sort applied – use filtered data directly\n this.sortedTableDataSignal.set([...filtered]);\n }\n });\n\n public override displayTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public override filteredTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public sortedTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public abstractExistingSortState: IAbstractSortState | null = null;\n public sortStateSignal = signal<IAbstractSortState>({});\n public sortedColumnTitleSignal = signal<string>('');\n public sortedColumnDirectionSignal = signal<SortDirectionType>('none');\n\n @Output() abstractSortState = new EventEmitter<IAbstractSortState>();\n\n /**\n * Creates an initial sort state for a table based on the provided table data.\n *\n * @param tableData - Array of table data objects representing table rows.\n * @returns Initial sort state object with column names as keys and 'none' as values.\n */\n private createSortState(tableData: IAbstractTableData<SortableValuesType>[] | null): IAbstractSortState {\n return tableData?.length\n ? Object.keys(tableData[0]).reduce<IAbstractSortState>((state, key) => {\n state[key] = 'none';\n return state;\n }, {})\n : {};\n }\n /**\n * Initializes the sort state for the sortable table component.\n *\n * This method sets the initial sort state based on the existing sort state or creates a new one\n * if none exists. It then updates the sort state signal with the initial sort state.\n *\n * If an existing sort state is found, it iterates over each entry and triggers the sort change\n * for each key that has a sort type other than 'none'.\n *\n * @private\n * @returns {void}\n */\n private initialiseSortState(): void {\n const existingSortState = this.abstractExistingSortState;\n const initialSortState = existingSortState || this.createSortState(this.displayTableDataSignal());\n this.applyFilterState();\n\n this.sortStateSignal.set(initialSortState);\n\n if (existingSortState) {\n for (const [key, sortType] of Object.entries(existingSortState)) {\n if (sortType !== 'none') {\n this.onSortChange({ key, sortType });\n }\n }\n }\n this.getSortedColumn();\n }\n\n /**\n * Updates the sort state for a given column key and sort type.\n * Resets the sort state for all other columns to 'none'.\n *\n * @param key - The column to sort by.\n * @param sortType - Sorting order ('ascending' or 'descending').\n */\n private updateSortState(key: string, sortType: 'ascending' | 'descending'): void {\n this.sortStateSignal.set(\n Object.keys(this.sortStateSignal()).reduce<IAbstractSortState>((state, columnKey) => {\n state[columnKey] = columnKey === key ? sortType : 'none';\n return state;\n }, {}),\n );\n }\n\n /**\n * Retrieves the sorted table data based on the specified key and sort type.\n *\n * @param key - The key of the property to sort by.\n * @param sortType - The type of sorting to apply, either 'ascending' or 'descending'.\n * @returns An array of sorted table data objects.\n */\n private getSortedTableData(\n key: string,\n sortType: 'ascending' | 'descending',\n ): IAbstractTableData<SortableValuesType>[] {\n return sortType === 'ascending'\n ? (this.sortService.sortObjectArrayAsc(\n this.filteredTableDataSignal(),\n key,\n ) as IAbstractTableData<SortableValuesType>[])\n : (this.sortService.sortObjectArrayDesc(\n this.filteredTableDataSignal(),\n key,\n ) as IAbstractTableData<SortableValuesType>[]);\n }\n\n /**\n * Determines the first column with a sort state other than 'none' and updates the sorted column signals accordingly.\n *\n * - If a sorted column is found, updates the `sortedColumnTitleSignal` and `sortedColumnDirectionSignal` with the column key and state.\n * - If no sorted column is found, sets the `sortedColumnTitleSignal` to an empty string and `sortedColumnDirectionSignal` to 'none'.\n *\n * @private\n * @returns {void}\n */\n private getSortedColumn(): void {\n // Find the first column that has a sort state other than 'none'\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const sortedColumn = Object.entries(this.sortStateSignal()).find(([_, state]) => state !== 'none');\n\n // If a sorted column is found, set the signal to the sorted column key and state\n if (sortedColumn) {\n const [columnKey, state] = sortedColumn;\n this.sortedColumnTitleSignal.set(columnKey);\n this.sortedColumnDirectionSignal.set(state);\n } else {\n // Otherwise, set the signal to null\n this.sortedColumnTitleSignal.set('');\n this.sortedColumnDirectionSignal.set('none');\n }\n }\n\n /**\n * Handles the change in sorting for the table.\n *\n * @param event - An object containing the key to sort by and the sort type.\n * @param event.key - The key of the column to sort.\n * @param event.sortType - The type of sorting to apply ('ascending' or 'descending').\n *\n * This method updates the sort state, sorts the table data based on the provided key and sort type,\n * updates the table data signal, and emits the updated sort state.\n */\n protected onSortChange(event: { key: string; sortType: 'ascending' | 'descending' }): void {\n const { key, sortType } = event;\n\n this.updateSortState(key, sortType);\n this.getSortedColumn();\n const sortedData = this.getSortedTableData(key, sortType);\n\n // Update the table data signal\n this.sortedTableDataSignal.set(sortedData);\n\n // Emit the updated sort state\n this.abstractSortState.emit(this.sortStateSignal());\n }\n\n /**\n * Lifecycle hook to initialise the sort state.\n */\n public ngOnInit(): void {\n this.initialiseSortState();\n }\n /**\n * Applies the current filters to the table data and updates the sorted data accordingly.\n *\n * This method overrides the parent implementation to additionally handle sorting.\n * If there is an active sort key, it applies the corresponding sort to the filtered data.\n * If no sort key is active, it simply updates the sorted data to match the filtered data.\n *\n * @override\n */\n public override onApplyFilters(): void {\n super.onApplyFilters();\n\n const key = this.sortedColumnTitleSignal();\n const sortType = this.sortedColumnDirectionSignal();\n\n if (!key || sortType === 'none') {\n this.sortedTableDataSignal.set([...this.filteredTableDataSignal()]);\n } else {\n this.onSortChange({ key, sortType });\n }\n }\n\n /**\n * Clears all filters applied to the table and restores the data to its unfiltered state.\n * If a sort is currently active, re-applies the sort after clearing filters.\n * Otherwise, resets the sorted table data to match the filtered data.\n *\n * @override\n */\n public override clearAllFilters(): void {\n super.clearAllFilters();\n\n const key = this.sortedColumnTitleSignal();\n const sortType = this.sortedColumnDirectionSignal();\n\n if (!key || sortType === 'none') {\n this.sortedTableDataSignal.set([...this.filteredTableDataSignal()]);\n } else {\n this.onSortChange({ key, sortType });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAeM,MAAgB,8BAA+B,SAAQ,4BAA4B,CAAA;AACtE,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;;;AAQG;AACO,IAAA,oBAAoB,GAAG,MAAM,CAAC,MAAK;AAC3C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,EAAE;AAC/C,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE;QAE1C,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;QAErF,IAAI,CAAC,aAAa,EAAE;;YAElB,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC/C;AACF,IAAA,CAAC,gEAAC;AAEc,IAAA,sBAAsB,GAAG,MAAM,CAA2C,EAAE,kEAAC;AAC7E,IAAA,uBAAuB,GAAG,MAAM,CAA2C,EAAE,mEAAC;AACvF,IAAA,qBAAqB,GAAG,MAAM,CAA2C,EAAE,iEAAC;IAC5E,yBAAyB,GAA8B,IAAI;AAC3D,IAAA,eAAe,GAAG,MAAM,CAAqB,EAAE,2DAA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,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,8BAA8B,oJAFxC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEQ,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAHnD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;sBAiCE;;;AC/CH;;AAEG;;;;"}
@@ -168,10 +168,10 @@ class AbstractTableFilterComponent {
168
168
  this.appliedKeyword.set(keyword);
169
169
  this.applyFilterState();
170
170
  }
171
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractTableFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: AbstractTableFilterComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
171
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractTableFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AbstractTableFilterComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
173
173
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AbstractTableFilterComponent, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AbstractTableFilterComponent, decorators: [{
175
175
  type: Component,
176
176
  args: [{ template: '' }]
177
177
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-table-filter/abstract-table-filter.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-table-filter/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.ts"],"sourcesContent":["import { Component, signal, computed, Signal } from '@angular/core';\nimport {\n IAbstractTableData,\n IAbstractTableFilterCategory,\n IAbstractTableFilterOption,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/interfaces';\nimport { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/types';\n\n@Component({ template: '' })\nexport abstract class AbstractTableFilterComponent {\n public displayTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public filteredTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public filterTags = signal<IAbstractTableFilterCategory[]>([]);\n public keyword = signal<string>('');\n public appliedFilterTags = signal<IAbstractTableFilterCategory[]>([]);\n public appliedKeyword = signal<string>('');\n\n /**\n * A computed signal that returns the currently selected filter tags.\n * It filters the filterTags signal to include only those options that are selected,\n * grouped by their category name.\n *\n * @returns An array of filter categories each containing only the selected options.\n */\n public abstractSelectedTags: Signal<IAbstractTableFilterCategory[]> = computed(() =>\n this.getSelectedOptionsFromTags(this.filterTags()),\n );\n\n /**\n * Determines whether a given item matches a specific filter option within a category.\n * @param item The data item to test.\n * @param categoryName The category name to check within the item.\n * @param option The filter option to match against.\n * @returns True if the item's value for the category matches the option's value; otherwise false.\n */\n protected matchItemWithFilterOption(\n item: IAbstractTableData<SortableValuesType>,\n categoryName: string,\n option: IAbstractTableFilterOption,\n ): boolean {\n return item?.[categoryName] === option.value;\n }\n\n /**\n * Determines whether a given item matches the keyword filter.\n * Checks if any value in the item contains the keyword (case-insensitive).\n * @param item The data item to test.\n * @param keyword The keyword to match against.\n * @returns True if any value in the item contains the keyword; otherwise false.\n */\n protected matchItemWithKeyword(item: IAbstractTableData<SortableValuesType>, keyword: string): boolean {\n return Object.values(item).some((value) => value?.toString().toLowerCase().includes(keyword));\n }\n\n /**\n * Extracts and returns categories from the provided tags that have at least one selected option.\n *\n * For each category in the input array, this method filters its options to include only those marked as selected.\n * Only categories with at least one selected option are included in the returned array.\n *\n * @param tags - An array of category objects, each containing a list of options.\n * @returns An array of category objects, each with only the selected options, and only categories with at least one selected option.\n */\n protected getSelectedOptionsFromTags(tags: IAbstractTableFilterCategory[]): IAbstractTableFilterCategory[] {\n return tags\n .map((group) => ({\n categoryName: group.categoryName,\n options: group.options.filter((option) => option.selected),\n }))\n .filter((group) => group.options.length > 0);\n }\n\n /**\n * Updates the keyword used to filter the table data.\n * @param newKeyword The new keyword string to filter by.\n */\n public onKeywordChange(newKeyword: string): void {\n this.keyword.set(newKeyword);\n }\n\n /**\n * Updates the selection state of a filter option within a category.\n * @param categoryName The name of the filter category.\n * @param optionValue The value of the filter option to update.\n * @param selected Whether the option is selected (true) or deselected (false).\n */\n public onCategoryCheckboxChange(categoryName: string, optionValue: string | number, selected: boolean): void {\n const updatedFilterTags = this.filterTags().map((group) => {\n if (group.categoryName === categoryName) {\n return {\n ...group,\n options: group.options.map((option) => (option.value === optionValue ? { ...option, selected } : option)),\n };\n }\n return group;\n });\n this.filterTags.set(updatedFilterTags);\n }\n\n /**\n * Removes a selected filter tag by deselecting the corresponding filter option.\n * @param categoryName The name of the filter category.\n * @param optionValue The value of the filter option to remove.\n */\n public removeTag(categoryName: string, optionValue: string | number): void {\n this.onCategoryCheckboxChange(categoryName, optionValue, false);\n }\n\n /**\n * Clears all applied filters and resets the filter state.\n *\n * This method performs the following actions:\n * - Resets the keyword and applied keyword to empty strings.\n * - Iterates through all filter tag groups and sets each option's `selected` property to `false`.\n * - Updates both the current and applied filter tags with the cleared state.\n * - Applies the updated filter state.\n */\n public clearAllFilters(): void {\n this.keyword.set('');\n this.appliedKeyword.set('');\n\n const clearedFilterTags = this.filterTags().map((group) => ({\n ...group,\n options: group.options.map((option) => ({ ...option, selected: false })),\n }));\n\n this.filterTags.set(clearedFilterTags);\n this.appliedFilterTags.set(clearedFilterTags);\n\n this.applyFilterState();\n }\n\n /**\n * Initializes and updates the filtered table data based on the currently applied keyword and filter tags.\n *\n * This method performs the following steps:\n * 1. Retrieves the current table data, applied keyword, and filter tags.\n * 2. If filter tags are present, filters the data to include only items that match all selected filter options.\n * 3. If a keyword is present, further filters the data to include only items that match the keyword.\n * 4. Updates the filtered table data signal with the resulting filtered data.\n *\n * @remarks\n * - Filtering by tags requires each item to match every group of filter tags.\n * - Filtering by keyword is case-insensitive and trims whitespace.\n */\n public applyFilterState(): void {\n const data = this.displayTableDataSignal();\n const keyword = this.appliedKeyword().toLowerCase().trim();\n const tags = this.appliedFilterTags();\n\n const selectedTagGroups = this.getSelectedOptionsFromTags(tags);\n\n let filtered = data;\n\n if (selectedTagGroups.length > 0) {\n filtered = filtered.filter((item) =>\n selectedTagGroups.every((group) =>\n group.options.some((option) => this.matchItemWithFilterOption(item, group.categoryName, option)),\n ),\n );\n }\n\n if (keyword) {\n filtered = filtered.filter((item) => this.matchItemWithKeyword(item, keyword));\n }\n\n this.filteredTableDataSignal.set(filtered);\n }\n\n /**\n * Applies the current filter tags and keyword to the table data.\n *\n * This method updates the `appliedFilterTags` and `appliedKeyword` properties\n * with the current filter values, then re-initialises the filtered data set\n * by invoking `applyFilterState()`.\n *\n * Typically called when the user confirms or applies filter changes in the UI.\n */\n public onApplyFilters(): void {\n this.appliedFilterTags.set(this.filterTags());\n this.appliedKeyword.set(this.keyword());\n this.applyFilterState();\n }\n\n /**\n * Sets the data to be displayed in the table.\n *\n * @param data - An array of table data objects conforming to the `IAbstractTableData<SortableValuesType>` interface.\n */\n public setTableData(data: IAbstractTableData<SortableValuesType>[]): void {\n this.displayTableDataSignal.set(data);\n }\n\n /**\n * Resets the filter and keyword state to the provided values and reapplies them.\n *\n * @param tags - The filter tag state to apply (including selected values).\n * @param keyword - The keyword string to apply (optional, defaults to empty).\n */\n public resetFiltersTo(tags: IAbstractTableFilterCategory[], keyword: string = ''): void {\n this.filterTags.set(tags);\n this.keyword.set(keyword);\n this.appliedFilterTags.set(tags);\n this.appliedKeyword.set(keyword);\n this.applyFilterState();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASsB,4BAA4B,CAAA;AACzC,IAAA,sBAAsB,GAAG,MAAM,CAA2C,EAAE,kEAAC;AAC7E,IAAA,uBAAuB,GAAG,MAAM,CAA2C,EAAE,mEAAC;AAC9E,IAAA,UAAU,GAAG,MAAM,CAAiC,EAAE,sDAAC;AACvD,IAAA,OAAO,GAAG,MAAM,CAAS,EAAE,mDAAC;AAC5B,IAAA,iBAAiB,GAAG,MAAM,CAAiC,EAAE,6DAAC;AAC9D,IAAA,cAAc,GAAG,MAAM,CAAS,EAAE,0DAAC;AAE1C;;;;;;AAMG;AACI,IAAA,oBAAoB,GAA2C,QAAQ,CAAC,MAC7E,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,gEACnD;AAED;;;;;;AAMG;AACO,IAAA,yBAAyB,CACjC,IAA4C,EAC5C,YAAoB,EACpB,MAAkC,EAAA;QAElC,OAAO,IAAI,GAAG,YAAY,CAAC,KAAK,MAAM,CAAC,KAAK;IAC9C;AAEA;;;;;;AAMG;IACO,oBAAoB,CAAC,IAA4C,EAAE,OAAe,EAAA;QAC1F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/F;AAEA;;;;;;;;AAQG;AACO,IAAA,0BAA0B,CAAC,IAAoC,EAAA;AACvE,QAAA,OAAO;AACJ,aAAA,GAAG,CAAC,CAAC,KAAK,MAAM;YACf,YAAY,EAAE,KAAK,CAAC,YAAY;AAChC,YAAA,OAAO,EAAE,KAAK,CAA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AG,CAAC,QAAQ,CAAC;IAC5C;AAEA;;;;;;;;AAQG;IACI,cAAc,GAAA;QACnB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACvC,IAAI,CAAC,gBAAgB,EAAE;IACzB;AAEA;;;;AAIG;AACI,IAAA,YAAY,CAAC,IAA8C,EAAA;AAChE,QAAA,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC;IACvC;AAEA;;;;;AAKG;AACI,IAAA,cAAc,CAAC,IAAoC,EAAE,OAAA,GAAkB,EAAE,EAAA;AAC9E,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AACzB,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC;AAChC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,gBAAgB,EAAE;IACzB;uGApMoB,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,wEAD3B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FACH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADjD,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;;;ACR3B;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-table-filter/abstract-table-filter.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-table-filter/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.ts"],"sourcesContent":["import { Component, signal, computed, Signal } from '@angular/core';\nimport {\n IAbstractTableData,\n IAbstractTableFilterCategory,\n IAbstractTableFilterOption,\n} from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/interfaces';\nimport { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/types';\n\n@Component({ template: '' })\nexport abstract class AbstractTableFilterComponent {\n public displayTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public filteredTableDataSignal = signal<IAbstractTableData<SortableValuesType>[]>([]);\n public filterTags = signal<IAbstractTableFilterCategory[]>([]);\n public keyword = signal<string>('');\n public appliedFilterTags = signal<IAbstractTableFilterCategory[]>([]);\n public appliedKeyword = signal<string>('');\n\n /**\n * A computed signal that returns the currently selected filter tags.\n * It filters the filterTags signal to include only those options that are selected,\n * grouped by their category name.\n *\n * @returns An array of filter categories each containing only the selected options.\n */\n public abstractSelectedTags: Signal<IAbstractTableFilterCategory[]> = computed(() =>\n this.getSelectedOptionsFromTags(this.filterTags()),\n );\n\n /**\n * Determines whether a given item matches a specific filter option within a category.\n * @param item The data item to test.\n * @param categoryName The category name to check within the item.\n * @param option The filter option to match against.\n * @returns True if the item's value for the category matches the option's value; otherwise false.\n */\n protected matchItemWithFilterOption(\n item: IAbstractTableData<SortableValuesType>,\n categoryName: string,\n option: IAbstractTableFilterOption,\n ): boolean {\n return item?.[categoryName] === option.value;\n }\n\n /**\n * Determines whether a given item matches the keyword filter.\n * Checks if any value in the item contains the keyword (case-insensitive).\n * @param item The data item to test.\n * @param keyword The keyword to match against.\n * @returns True if any value in the item contains the keyword; otherwise false.\n */\n protected matchItemWithKeyword(item: IAbstractTableData<SortableValuesType>, keyword: string): boolean {\n return Object.values(item).some((value) => value?.toString().toLowerCase().includes(keyword));\n }\n\n /**\n * Extracts and returns categories from the provided tags that have at least one selected option.\n *\n * For each category in the input array, this method filters its options to include only those marked as selected.\n * Only categories with at least one selected option are included in the returned array.\n *\n * @param tags - An array of category objects, each containing a list of options.\n * @returns An array of category objects, each with only the selected options, and only categories with at least one selected option.\n */\n protected getSelectedOptionsFromTags(tags: IAbstractTableFilterCategory[]): IAbstractTableFilterCategory[] {\n return tags\n .map((group) => ({\n categoryName: group.categoryName,\n options: group.options.filter((option) => option.selected),\n }))\n .filter((group) => group.options.length > 0);\n }\n\n /**\n * Updates the keyword used to filter the table data.\n * @param newKeyword The new keyword string to filter by.\n */\n public onKeywordChange(newKeyword: string): void {\n this.keyword.set(newKeyword);\n }\n\n /**\n * Updates the selection state of a filter option within a category.\n * @param categoryName The name of the filter category.\n * @param optionValue The value of the filter option to update.\n * @param selected Whether the option is selected (true) or deselected (false).\n */\n public onCategoryCheckboxChange(categoryName: string, optionValue: string | number, selected: boolean): void {\n const updatedFilterTags = this.filterTags().map((group) => {\n if (group.categoryName === categoryName) {\n return {\n ...group,\n options: group.options.map((option) => (option.value === optionValue ? { ...option, selected } : option)),\n };\n }\n return group;\n });\n this.filterTags.set(updatedFilterTags);\n }\n\n /**\n * Removes a selected filter tag by deselecting the corresponding filter option.\n * @param categoryName The name of the filter category.\n * @param optionValue The value of the filter option to remove.\n */\n public removeTag(categoryName: string, optionValue: string | number): void {\n this.onCategoryCheckboxChange(categoryName, optionValue, false);\n }\n\n /**\n * Clears all applied filters and resets the filter state.\n *\n * This method performs the following actions:\n * - Resets the keyword and applied keyword to empty strings.\n * - Iterates through all filter tag groups and sets each option's `selected` property to `false`.\n * - Updates both the current and applied filter tags with the cleared state.\n * - Applies the updated filter state.\n */\n public clearAllFilters(): void {\n this.keyword.set('');\n this.appliedKeyword.set('');\n\n const clearedFilterTags = this.filterTags().map((group) => ({\n ...group,\n options: group.options.map((option) => ({ ...option, selected: false })),\n }));\n\n this.filterTags.set(clearedFilterTags);\n this.appliedFilterTags.set(clearedFilterTags);\n\n this.applyFilterState();\n }\n\n /**\n * Initializes and updates the filtered table data based on the currently applied keyword and filter tags.\n *\n * This method performs the following steps:\n * 1. Retrieves the current table data, applied keyword, and filter tags.\n * 2. If filter tags are present, filters the data to include only items that match all selected filter options.\n * 3. If a keyword is present, further filters the data to include only items that match the keyword.\n * 4. Updates the filtered table data signal with the resulting filtered data.\n *\n * @remarks\n * - Filtering by tags requires each item to match every group of filter tags.\n * - Filtering by keyword is case-insensitive and trims whitespace.\n */\n public applyFilterState(): void {\n const data = this.displayTableDataSignal();\n const keyword = this.appliedKeyword().toLowerCase().trim();\n const tags = this.appliedFilterTags();\n\n const selectedTagGroups = this.getSelectedOptionsFromTags(tags);\n\n let filtered = data;\n\n if (selectedTagGroups.length > 0) {\n filtered = filtered.filter((item) =>\n selectedTagGroups.every((group) =>\n group.options.some((option) => this.matchItemWithFilterOption(item, group.categoryName, option)),\n ),\n );\n }\n\n if (keyword) {\n filtered = filtered.filter((item) => this.matchItemWithKeyword(item, keyword));\n }\n\n this.filteredTableDataSignal.set(filtered);\n }\n\n /**\n * Applies the current filter tags and keyword to the table data.\n *\n * This method updates the `appliedFilterTags` and `appliedKeyword` properties\n * with the current filter values, then re-initialises the filtered data set\n * by invoking `applyFilterState()`.\n *\n * Typically called when the user confirms or applies filter changes in the UI.\n */\n public onApplyFilters(): void {\n this.appliedFilterTags.set(this.filterTags());\n this.appliedKeyword.set(this.keyword());\n this.applyFilterState();\n }\n\n /**\n * Sets the data to be displayed in the table.\n *\n * @param data - An array of table data objects conforming to the `IAbstractTableData<SortableValuesType>` interface.\n */\n public setTableData(data: IAbstractTableData<SortableValuesType>[]): void {\n this.displayTableDataSignal.set(data);\n }\n\n /**\n * Resets the filter and keyword state to the provided values and reapplies them.\n *\n * @param tags - The filter tag state to apply (including selected values).\n * @param keyword - The keyword string to apply (optional, defaults to empty).\n */\n public resetFiltersTo(tags: IAbstractTableFilterCategory[], keyword: string = ''): void {\n this.filterTags.set(tags);\n this.keyword.set(keyword);\n this.appliedFilterTags.set(tags);\n this.appliedKeyword.set(keyword);\n this.applyFilterState();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASsB,4BAA4B,CAAA;AACzC,IAAA,sBAAsB,GAAG,MAAM,CAA2C,EAAE,kEAAC;AAC7E,IAAA,uBAAuB,GAAG,MAAM,CAA2C,EAAE,mEAAC;AAC9E,IAAA,UAAU,GAAG,MAAM,CAAiC,EAAE,sDAAC;AACvD,IAAA,OAAO,GAAG,MAAM,CAAS,EAAE,mDAAC;AAC5B,IAAA,iBAAiB,GAAG,MAAM,CAAiC,EAAE,6DAAC;AAC9D,IAAA,cAAc,GAAG,MAAM,CAAS,EAAE,0DAAC;AAE1C;;;;;;AAMG;AACI,IAAA,oBAAoB,GAA2C,QAAQ,CAAC,MAC7E,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,gEACnD;AAED;;;;;;AAMG;AACO,IAAA,yBAAyB,CACjC,IAA4C,EAC5C,YAAoB,EACpB,MAAkC,EAAA;QAElC,OAAO,IAAI,GAAG,YAAY,CAAC,KAAK,MAAM,CAAC,KAAK;IAC9C;AAEA;;;;;;AAMG;IACO,oBAAoB,CAAC,IAA4C,EAAE,OAAe,EAAA;QAC1F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/F;AAEA;;;;;;;;AAQG;AACO,IAAA,0BAA0B,CAAC,IAAoC,EAAA;AACvE,QAAA,OAAO;AACJ,aAAA,GAAG,CAAC,CAAC,KAAK,MAAM;YACf,YAAY,EAAE,KAAK,CAAC,YAAY;AAChC,YAAA,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC;AAC3D,SAAA,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C,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACvC,IAAI,CAAC,gBAAgB,EAAE;IACzB;AAEA;;;;AAIG;AACI,IAAA,YAAY,CAAC,IAA8C,EAAA;AAChE,QAAA,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC;IACvC;AAEA;;;;;AAKG;AACI,IAAA,cAAc,CAAC,IAAoC,EAAE,OAAA,GAAkB,EAAE,EAAA;AAC9E,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AACzB,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC;AAChC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,gBAAgB,EAAE;IACzB;wGApMoB,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,4BAA4B,wEAD3B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FACH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADjD,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;;;ACR3B;;AAEG;;;;"}
@@ -134,10 +134,10 @@ class AlphagovAccessibleAutocompleteComponent {
134
134
  this.ngUnsubscribe.next();
135
135
  this.ngUnsubscribe.complete();
136
136
  }
137
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
138
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: AlphagovAccessibleAutocompleteComponent, isStandalone: true, selector: "opal-lib-alphagov-accessible-autocomplete", inputs: { labelText: "labelText", labelClasses: "labelClasses", inputId: "inputId", inputName: "inputName", inputClasses: "inputClasses", hintText: "hintText", autoCompleteItems: "autoCompleteItems", showAllValues: "showAllValues", errors: "errors", control: "control" }, viewQueries: [{ propertyName: "autocompleteContainer", first: true, predicate: ["autocomplete"], descendants: true }], ngImport: i0, template: "<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n", styles: [":host ::ng-deep .autocomplete__option{font-family:GDS Transport,arial,sans-serif}:host ::ng-deep .govuk-input--error input{border-color:#d4351c}:host ::ng-deep .autocomplete__input{background-color:#fff}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
137
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
138
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AlphagovAccessibleAutocompleteComponent, isStandalone: true, selector: "opal-lib-alphagov-accessible-autocomplete", inputs: { labelText: "labelText", labelClasses: "labelClasses", inputId: "inputId", inputName: "inputName", inputClasses: "inputClasses", hintText: "hintText", autoCompleteItems: "autoCompleteItems", showAllValues: "showAllValues", errors: "errors", control: "control" }, viewQueries: [{ propertyName: "autocompleteContainer", first: true, predicate: ["autocomplete"], descendants: true }], ngImport: i0, template: "<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n", styles: [":host ::ng-deep .autocomplete__option{font-family:GDS Transport,arial,sans-serif}:host ::ng-deep .govuk-input--error input{border-color:#d4351c}:host ::ng-deep .autocomplete__input{background-color:#fff}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AlphagovAccessibleAutocompleteComponent, decorators: [{
141
141
  type: Component,
142
142
  args: [{ selector: 'opal-lib-alphagov-accessible-autocomplete', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n", styles: [":host ::ng-deep .autocomplete__option{font-family:GDS Transport,arial,sans-serif}:host ::ng-deep .govuk-input--error input{border-color:#d4351c}:host ::ng-deep .autocomplete__input{background-color:#fff}:host ::ng-deep .autocomplete__dropdown-arrow-down{z-index:1!important;pointer-events:none!important}\n"] }]
143
143
  }], ctorParameters: () => [], propDecorators: { labelText: [{
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs","sources":["../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.ts","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.html","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n afterNextRender,\n inject,\n} from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IAlphagovAccessibleAutocompleteItem } from './interfaces/alphagov-accessible-autocomplete-item.interface';\nimport { AccessibleAutocompleteProps } from 'accessible-autocomplete';\nimport { Subject, pairwise, startWith, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'opal-lib-alphagov-accessible-autocomplete',\n imports: [ReactiveFormsModule],\n templateUrl: './alphagov-accessible-autocomplete.component.html',\n styleUrl: './alphagov-accessible-autocomplete.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlphagovAccessibleAutocompleteComponent implements OnInit, OnDestroy {\n private readonly changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n private _control!: FormControl;\n private readonly ngUnsubscribe = new Subject<void>();\n\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) hintText!: string;\n @Input({ required: true }) autoCompleteItems: IAlphagovAccessibleAutocompleteItem[] = [];\n @Input() showAllValues = true;\n @Input({ required: false }) errors: string | null = null;\n\n @ViewChild('autocomplete') autocompleteContainer!: ElementRef<HTMLElement>;\n\n public autoCompleteId!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n constructor() {\n afterNextRender(() => {\n // Only trigger the render of the component in the browser\n this.configureAutoComplete();\n });\n }\n\n /**\n * Gets the control for the alphagov-accessible-autocomplete component.\n * @returns The control for the component.\n */\n get getControl() {\n return this._control;\n }\n\n /**\n * Handles the confirmation of a selected name.\n *\n * @param selectedName - The selected name.\n * @returns void\n */\n\n private handleOnConfirm(selectedName: string | undefined): void {\n // selectedName is populated on selecting an option but is undefined onBlur, so we need to grab the input value directly from the input\n const control = this._control;\n const name = selectedName ?? (document.querySelector(`#${this.autoCompleteId}`) as HTMLInputElement).value;\n const selectedItem = this.autoCompleteItems.find((item) => item.name === name) ?? null;\n const previousValue = control.value;\n const selectedValue = selectedItem?.value ?? null;\n\n control.setValue(selectedValue);\n control.markAsTouched();\n\n // Handles initial empty state when the user clicks away from the input\n if (selectedItem === null && previousValue === null) {\n control.markAsPristine();\n } else if (selectedItem?.value !== previousValue) {\n control.markAsDirty();\n }\n\n control.updateValueAndValidity();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Retrieves the default value for the autocomplete component.\n *\n * @returns The default value as a string.\n */\n\n private getDefaultValue() {\n return this.autoCompleteItems.find((item) => item.value === this._control.value)?.name ?? '';\n }\n\n /**\n * Builds the props object for the AccessibleAutocomplete component.\n * @returns The props object for the AccessibleAutocomplete component.\n */\n private buildAutoCompleteProps(): AccessibleAutocompleteProps {\n return {\n id: this.autoCompleteId,\n element: this.autocompleteContainer.nativeElement,\n source: this.autoCompleteItems.map((item) => item.name),\n name: this.autoCompleteId,\n showAllValues: this.showAllValues,\n defaultValue: this.getDefaultValue(),\n dropdownArrow: ({ className }) => this.renderDropdownArrow(className),\n onConfirm: (selectedName: string) => this.handleOnConfirm(selectedName),\n };\n }\n\n /**\n * Renders a custom dropdown arrow.\n * @param className – The class to apply to the SVG.\n * @returns An SVG string for the dropdown arrow.\n */\n private renderDropdownArrow(className: string): string {\n return `\n <svg class=\"${className}\" style=\"top: 8px;\" viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9\n c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7\n c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3z\"></path>\n </svg>`;\n }\n\n /**\n * Configures the auto-complete functionality using the accessible-autocomplete library.\n */\n private configureAutoComplete(): void {\n import('accessible-autocomplete').then((accessibleAutocomplete) => {\n accessibleAutocomplete.default(this.buildAutoCompleteProps());\n });\n }\n\n /**\n * Sets up the control subscription for value changes.\n * Whenever the control value changes, this method is called to handle the changes.\n * If the new value is null, it clears the autocomplete container and configures the autocomplete.\n */\n private setupControlSub(): void {\n this._control.valueChanges\n .pipe(startWith(null), pairwise(), takeUntil(this.ngUnsubscribe))\n .subscribe(([prev, next]) => {\n // If both values are null, we don't need to do anything\n if (prev === null && next === null) {\n return;\n }\n\n // Otherwise, next is null, we need to clear the autocomplete\n if (next === null) {\n this.autocompleteContainer.nativeElement.innerHTML = '';\n this.configureAutoComplete();\n }\n });\n }\n\n ngOnInit(): void {\n this.autoCompleteId = this.inputId + '-autocomplete';\n this.setupControlSub();\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAwBa,uCAAuC,CAAA;AACjC,IAAA,cAAc,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AACtE,IAAA,QAAQ;AACC,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AAEzB,IAAA,SAAS;AACR,IAAA,YAAY;AACb,IAAA,OAAO;AACP,IAAA,SAAS;AACR,IAAA,YAAY;AACZ,IAAA,QAAQ;IACT,iBAAiB,GAA0C,EAAE;IAC/E,aAAa,GAAG,IAAI;IACD,MAAM,GAAkB,IAAI;AAE7B,IAAA,qBAAqB;AAEzC,IAAA,cAAc;IAErB,IAA+B,OAAO,CAAC,eAAuC,EAAA;;AAE5E,QAAA,IAAI,CAAC,QAAQ,GAAG,eAA8B;IAChD;AAEA,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;;YAEnB,IAAI,CAAC,qBAAqB,EAAE;AAC9B,QAAA,CAAC,CAAC;IACJ;AAEA;;;AAGG;AACH,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,QAAQ;IACtB;AAEA;;;;;AAKG;AAEK,IAAA,eAAe,CAAC,YAAgC,EAAA;;AAEtD,QAAA,MAAM,OAAO,GAA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AA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKlB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBAPnD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2CAA2C,WAC5C,CAAC,mBAAmB,CAAC,EAAA,eAAA,EAGb,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,oxBAAA,EAAA,MAAA,EAAA,CAAA,oTAAA,CAAA,EAAA;;sBAO9C,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBACzB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBACzB,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBACzB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB;;sBACA,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,SAAS;uBAAC,cAAc;;sBAIxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AE3C3B;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs","sources":["../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.ts","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.html","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n afterNextRender,\n inject,\n} from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IAlphagovAccessibleAutocompleteItem } from './interfaces/alphagov-accessible-autocomplete-item.interface';\nimport { AccessibleAutocompleteProps } from 'accessible-autocomplete';\nimport { Subject, pairwise, startWith, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'opal-lib-alphagov-accessible-autocomplete',\n imports: [ReactiveFormsModule],\n templateUrl: './alphagov-accessible-autocomplete.component.html',\n styleUrl: './alphagov-accessible-autocomplete.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlphagovAccessibleAutocompleteComponent implements OnInit, OnDestroy {\n private readonly changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n private _control!: FormControl;\n private readonly ngUnsubscribe = new Subject<void>();\n\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) hintText!: string;\n @Input({ required: true }) autoCompleteItems: IAlphagovAccessibleAutocompleteItem[] = [];\n @Input() showAllValues = true;\n @Input({ required: false }) errors: string | null = null;\n\n @ViewChild('autocomplete') autocompleteContainer!: ElementRef<HTMLElement>;\n\n public autoCompleteId!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n constructor() {\n afterNextRender(() => {\n // Only trigger the render of the component in the browser\n this.configureAutoComplete();\n });\n }\n\n /**\n * Gets the control for the alphagov-accessible-autocomplete component.\n * @returns The control for the component.\n */\n get getControl() {\n return this._control;\n }\n\n /**\n * Handles the confirmation of a selected name.\n *\n * @param selectedName - The selected name.\n * @returns void\n */\n\n private handleOnConfirm(selectedName: string | undefined): void {\n // selectedName is populated on selecting an option but is undefined onBlur, so we need to grab the input value directly from the input\n const control = this._control;\n const name = selectedName ?? (document.querySelector(`#${this.autoCompleteId}`) as HTMLInputElement).value;\n const selectedItem = this.autoCompleteItems.find((item) => item.name === name) ?? null;\n const previousValue = control.value;\n const selectedValue = selectedItem?.value ?? null;\n\n control.setValue(selectedValue);\n control.markAsTouched();\n\n // Handles initial empty state when the user clicks away from the input\n if (selectedItem === null && previousValue === null) {\n control.markAsPristine();\n } else if (selectedItem?.value !== previousValue) {\n control.markAsDirty();\n }\n\n control.updateValueAndValidity();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Retrieves the default value for the autocomplete component.\n *\n * @returns The default value as a string.\n */\n\n private getDefaultValue() {\n return this.autoCompleteItems.find((item) => item.value === this._control.value)?.name ?? '';\n }\n\n /**\n * Builds the props object for the AccessibleAutocomplete component.\n * @returns The props object for the AccessibleAutocomplete component.\n */\n private buildAutoCompleteProps(): AccessibleAutocompleteProps {\n return {\n id: this.autoCompleteId,\n element: this.autocompleteContainer.nativeElement,\n source: this.autoCompleteItems.map((item) => item.name),\n name: this.autoCompleteId,\n showAllValues: this.showAllValues,\n defaultValue: this.getDefaultValue(),\n dropdownArrow: ({ className }) => this.renderDropdownArrow(className),\n onConfirm: (selectedName: string) => this.handleOnConfirm(selectedName),\n };\n }\n\n /**\n * Renders a custom dropdown arrow.\n * @param className – The class to apply to the SVG.\n * @returns An SVG string for the dropdown arrow.\n */\n private renderDropdownArrow(className: string): string {\n return `\n <svg class=\"${className}\" style=\"top: 8px;\" viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9\n c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7\n c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3z\"></path>\n </svg>`;\n }\n\n /**\n * Configures the auto-complete functionality using the accessible-autocomplete library.\n */\n private configureAutoComplete(): void {\n import('accessible-autocomplete').then((accessibleAutocomplete) => {\n accessibleAutocomplete.default(this.buildAutoCompleteProps());\n });\n }\n\n /**\n * Sets up the control subscription for value changes.\n * Whenever the control value changes, this method is called to handle the changes.\n * If the new value is null, it clears the autocomplete container and configures the autocomplete.\n */\n private setupControlSub(): void {\n this._control.valueChanges\n .pipe(startWith(null), pairwise(), takeUntil(this.ngUnsubscribe))\n .subscribe(([prev, next]) => {\n // If both values are null, we don't need to do anything\n if (prev === null && next === null) {\n return;\n }\n\n // Otherwise, next is null, we need to clear the autocomplete\n if (next === null) {\n this.autocompleteContainer.nativeElement.innerHTML = '';\n this.configureAutoComplete();\n }\n });\n }\n\n ngOnInit(): void {\n this.autoCompleteId = this.inputId + '-autocomplete';\n this.setupControlSub();\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"hidden\"\n [formControl]=\"getControl\"\n [attr.aria-describedby]=\"hintText ? inputId + '-hint' : null\"\n />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAwBa,uCAAuC,CAAA;AACjC,IAAA,cAAc,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AACtE,IAAA,QAA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QAAQ,EAAE,KAAK,EAAE;;sBACzB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB;;sBACA,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,SAAS;uBAAC,cAAc;;sBAIxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AE3C3B;;AAEG;;;;"}
@@ -3,10 +3,10 @@ import { HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  class CustomAccountInformationItemLabelComponent {
5
5
  hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-font-weight-bold govuk-!-margin-0';
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomAccountInformationItemLabelComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomAccountInformationItemLabelComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
8
  }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemLabelComponent, decorators: [{
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemLabelComponent, decorators: [{
10
10
  type: Component,
11
11
  args: [{ selector: 'opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
12
12
  }], propDecorators: { hostClass: [{
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/custom-account-information-item-label.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/custom-account-information-item-label.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]',\n templateUrl: './custom-account-information-item-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemLabelComponent {\n @HostBinding('class') hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-font-weight-bold govuk-!-margin-0';\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,0CAA0C,CAAA;IAC/B,SAAS,GAAG,2EAA2E;uGADlG,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0CAA0C,iNCPvD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDMa,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,SAAS;+BACE,kGAAkG,EAAA,eAAA,EAE3F,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,WAAW;uBAAC,OAAO;;;AERtB;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/custom-account-information-item-label.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/custom-account-information-item-label.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]',\n templateUrl: './custom-account-information-item-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemLabelComponent {\n @HostBinding('class') hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-font-weight-bold govuk-!-margin-0';\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,0CAA0C,CAAA;IAC/B,SAAS,GAAG,2EAA2E;wGADlG,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0CAA0C,iNCPvD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDMa,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,SAAS;+BACE,kGAAkG,EAAA,eAAA,EAE3F,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,WAAW;uBAAC,OAAO;;;AERtB;;AAEG;;;;"}
@@ -3,10 +3,10 @@ import { HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  class CustomAccountInformationItemValueComponent {
5
5
  hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-margin-0';
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomAccountInformationItemValueComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomAccountInformationItemValueComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
8
  }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemValueComponent, decorators: [{
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemValueComponent, decorators: [{
10
10
  type: Component,
11
11
  args: [{ selector: 'opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
12
12
  }], propDecorators: { hostClass: [{
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/custom-account-information-item-value.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/custom-account-information-item-value.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]',\n templateUrl: './custom-account-information-item-value.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemValueComponent {\n @HostBinding('class') hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-margin-0';\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,0CAA0C,CAAA;IAC/B,SAAS,GAAG,kDAAkD;uGADzE,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0CAA0C,iNCPvD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDMa,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,SAAS;+BACE,kGAAkG,EAAA,eAAA,EAE3F,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,WAAW;uBAAC,OAAO;;;AERtB;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/custom-account-information-item-value.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/custom-account-information-item-value.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]',\n templateUrl: './custom-account-information-item-value.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemValueComponent {\n @HostBinding('class') hostClass = 'govuk-body govuk-!-font-size-16 govuk-!-margin-0';\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,0CAA0C,CAAA;IAC/B,SAAS,GAAG,kDAAkD;wGADzE,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0CAA0C,iNCPvD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDMa,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,SAAS;+BACE,kGAAkG,EAAA,eAAA,EAE3F,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,WAAW;uBAAC,OAAO;;;AERtB;;AAEG;;;;"}
@@ -6,10 +6,10 @@ class CustomAccountInformationItemComponent {
6
6
  get hostClass() {
7
7
  return this.itemClasses;
8
8
  }
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomAccountInformationItemComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item", inputs: { itemClasses: "itemClasses" }, host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomAccountInformationItemComponent, isStandalone: true, selector: "opal-lib-custom-account-information-item", inputs: { itemClasses: "itemClasses" }, host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationItemComponent, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationItemComponent, decorators: [{
13
13
  type: Component,
14
14
  args: [{ selector: 'opal-lib-custom-account-information-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
15
15
  }], propDecorators: { itemClasses: [{
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item',\n templateUrl: './custom-account-information-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemComponent {\n @Input({ required: false }) itemClasses: string = 'govuk-grid-column-one-third';\n\n @HostBinding('class')\n get hostClass(): string {\n return this.itemClasses;\n }\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,qCAAqC,CAAA;IACpB,WAAW,GAAW,6BAA6B;AAE/E,IAAA,IACI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,WAAW;IACzB;uGANW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qCAAqC,iMCPlD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDMa,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBALjD,SAAS;+BACE,0CAA0C,EAAA,eAAA,EAEnC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,WAAW;uBAAC,OAAO;;;AEVtB;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information-item/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, HostBinding, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information-item',\n templateUrl: './custom-account-information-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationItemComponent {\n @Input({ required: false }) itemClasses: string = 'govuk-grid-column-one-third';\n\n @HostBinding('class')\n get hostClass(): string {\n return this.itemClasses;\n }\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,qCAAqC,CAAA;IACpB,WAAW,GAAW,6BAA6B;AAE/E,IAAA,IACI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,WAAW;IACzB;wGANW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qCAAqC,iMCPlD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDMa,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBALjD,SAAS;+BACE,0CAA0C,EAAA,eAAA,EAEnC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA;;sBAG9C,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,WAAW;uBAAC,OAAO;;;AEVtB;;AAEG;;;;"}
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  class CustomAccountInformationComponent {
5
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomAccountInformationComponent, isStandalone: true, selector: "opal-lib-custom-account-information, [opal-lib-custom-account-information]", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomAccountInformationComponent, isStandalone: true, selector: "opal-lib-custom-account-information, [opal-lib-custom-account-information]", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
7
7
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomAccountInformationComponent, decorators: [{
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomAccountInformationComponent, decorators: [{
9
9
  type: Component,
10
10
  args: [{ selector: 'opal-lib-custom-account-information, [opal-lib-custom-account-information]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n" }]
11
11
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/hmcts-opal-frontend-common-components-custom-custom-account-information.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information, [opal-lib-custom-account-information]',\n templateUrl: './custom-account-information.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationComponent {}\n","<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,iCAAiC,CAAA;uGAAjC,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,sICP9C,uEAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDIa,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAL7C,SAAS;+BACE,4EAA4E,EAAA,eAAA,EAErE,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uEAAA,EAAA;;;AELjD;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-account-information.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information.component.ts","../../../projects/opal-frontend-common/components/custom/custom-account-information/custom-account-information.component.html","../../../projects/opal-frontend-common/components/custom/custom-account-information/hmcts-opal-frontend-common-components-custom-custom-account-information.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-account-information, [opal-lib-custom-account-information]',\n templateUrl: './custom-account-information.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomAccountInformationComponent {}\n","<div class=\"govuk-grid-row\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,iCAAiC,CAAA;wGAAjC,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,SAAA,EAAA,IAAA,EAAA,iCAAiC,sICP9C,uEAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDIa,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAL7C,SAAS;+BACE,4EAA4E,EAAA,eAAA,EAErE,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uEAAA,EAAA;;;AELjD;;AAEG;;;;"}
@@ -10,10 +10,10 @@ class CustomActionLinksComponent {
10
10
  get hostClass() {
11
11
  return this.classSize;
12
12
  }
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomActionLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomActionLinksComponent, isStandalone: true, selector: "opal-lib-custom-action-links", inputs: { id: "id", classSize: "classSize" }, host: { properties: { "attr.id": "this.hostId", "class": "this.hostClass" } }, ngImport: i0, template: "<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n" });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomActionLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomActionLinksComponent, isStandalone: true, selector: "opal-lib-custom-action-links", inputs: { id: "id", classSize: "classSize" }, host: { properties: { "attr.id": "this.hostId", "class": "this.hostClass" } }, ngImport: i0, template: "<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n" });
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomActionLinksComponent, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomActionLinksComponent, decorators: [{
17
17
  type: Component,
18
18
  args: [{ selector: 'opal-lib-custom-action-links', template: "<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n" }]
19
19
  }], propDecorators: { id: [{
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-action-links.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-action-links/custom-action-links.component.ts","../../../projects/opal-frontend-common/components/custom/custom-action-links/custom-action-links.component.html","../../../projects/opal-frontend-common/components/custom/custom-action-links/hmcts-opal-frontend-common-components-custom-custom-action-links.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-action-links',\n templateUrl: './custom-action-links.component.html',\n})\nexport class CustomActionLinksComponent {\n @Input({ required: true }) id!: string;\n @Input({ required: false }) classSize: string = 'govuk-grid-column-one-third';\n\n @HostBinding('attr.id') get hostId(): string {\n return this.id;\n }\n @HostBinding('class') get hostClass(): string {\n return this.classSize;\n }\n}\n","<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,0BAA0B,CAAA;AACV,IAAA,EAAE;IACD,SAAS,GAAW,6BAA6B;AAE7E,IAAA,IAA4B,MAAM,GAAA;QAChC,OAAO,IAAI,CAAC,EAAE;IAChB;AACA,IAAA,IAA0B,SAAS,GAAA;QACjC,OAAO,IAAI,CAAC,SAAS;IACvB;uGATW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,qNCNvC,oNAGA,EAAA,CAAA;;2FDGa,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,SAAS;+BACE,8BAA8B,EAAA,QAAA,EAAA,oNAAA,EAAA;;sBAIvC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,WAAW;uBAAC,SAAS;;sBAGrB,WAAW;uBAAC,OAAO;;;AEbtB;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-action-links.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-action-links/custom-action-links.component.ts","../../../projects/opal-frontend-common/components/custom/custom-action-links/custom-action-links.component.html","../../../projects/opal-frontend-common/components/custom/custom-action-links/hmcts-opal-frontend-common-components-custom-custom-action-links.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-action-links',\n templateUrl: './custom-action-links.component.html',\n})\nexport class CustomActionLinksComponent {\n @Input({ required: true }) id!: string;\n @Input({ required: false }) classSize: string = 'govuk-grid-column-one-third';\n\n @HostBinding('attr.id') get hostId(): string {\n return this.id;\n }\n @HostBinding('class') get hostClass(): string {\n return this.classSize;\n }\n}\n","<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible custom-section-break--2px\" />\n<ng-content select=\"[heading]\"></ng-content>\n<ng-content select=\"[links]\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,0BAA0B,CAAA;AACV,IAAA,EAAE;IACD,SAAS,GAAW,6BAA6B;AAE7E,IAAA,IAA4B,MAAM,GAAA;QAChC,OAAO,IAAI,CAAC,EAAE;IAChB;AACA,IAAA,IAA0B,SAAS,GAAA;QACjC,OAAO,IAAI,CAAC,SAAS;IACvB;wGATW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0BAA0B,qNCNvC,oNAGA,EAAA,CAAA;;4FDGa,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,SAAS;+BACE,8BAA8B,EAAA,QAAA,EAAA,oNAAA,EAAA;;sBAIvC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;sBAEzB,WAAW;uBAAC,SAAS;;sBAGrB,WAAW;uBAAC,OAAO;;;AEbtB;;AAEG;;;;"}
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
2
2
  import { Component } from '@angular/core';
3
3
 
4
4
  class CustomHorizontalScrollPaneComponent {
5
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomHorizontalScrollPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomHorizontalScrollPaneComponent, isStandalone: true, selector: "opal-lib-custom-horizontal-scroll-pane", ngImport: i0, template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] });
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomHorizontalScrollPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomHorizontalScrollPaneComponent, isStandalone: true, selector: "opal-lib-custom-horizontal-scroll-pane", ngImport: i0, template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] });
7
7
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomHorizontalScrollPaneComponent, decorators: [{
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomHorizontalScrollPaneComponent, decorators: [{
9
9
  type: Component,
10
10
  args: [{ selector: 'opal-lib-custom-horizontal-scroll-pane', template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] }]
11
11
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-horizontal-scroll-pane',\n templateUrl: './custom-horizontal-scroll-pane.component.html',\n styleUrl: './custom-horizontal-scroll-pane.component.scss',\n})\nexport class CustomHorizontalScrollPaneComponent {}\n","<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,mCAAmC,CAAA;uGAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,kGCPhD,sFAGA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA,CAAA;;2FDIa,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAL/C,SAAS;+BACE,wCAAwC,EAAA,QAAA,EAAA,sFAAA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA;;;AEHpD;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-horizontal-scroll-pane',\n templateUrl: './custom-horizontal-scroll-pane.component.html',\n styleUrl: './custom-horizontal-scroll-pane.component.scss',\n})\nexport class CustomHorizontalScrollPaneComponent {}\n","<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,mCAAmC,CAAA;wGAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mCAAmC,kGCPhD,sFAGA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA,CAAA;;4FDIa,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAL/C,SAAS;+BACE,wCAAwC,EAAA,QAAA,EAAA,sFAAA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA;;;AEHpD;;AAEG;;;;"}
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  class CustomPageHeaderComponent {
5
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CustomPageHeaderComponent, isStandalone: true, selector: "opal-lib-custom-page-header", ngImport: i0, template: "<div class=\"govuk-grid-row custom-grid-class\">\n <div class=\"govuk-grid-column-one-half\">\n <ng-content select=\"[pageHeaderHeading]\"></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-half custom-column-class\">\n <div class=\"moj-button-group moj-button-group--inline custom-button-group-class\">\n <ng-content select=\"[pageHeaderButtons]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".custom-grid-class{display:flex}.custom-column-class{display:flex;flex-direction:column;justify-content:end}.custom-button-group-class{justify-content:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: CustomPageHeaderComponent, isStandalone: true, selector: "opal-lib-custom-page-header", ngImport: i0, template: "<div class=\"govuk-grid-row custom-grid-class\">\n <div class=\"govuk-grid-column-one-half\">\n <ng-content select=\"[pageHeaderHeading]\"></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-half custom-column-class\">\n <div class=\"moj-button-group moj-button-group--inline custom-button-group-class\">\n <ng-content select=\"[pageHeaderButtons]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".custom-grid-class{display:flex}.custom-column-class{display:flex;flex-direction:column;justify-content:end}.custom-button-group-class{justify-content:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7
7
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomPageHeaderComponent, decorators: [{
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: CustomPageHeaderComponent, decorators: [{
9
9
  type: Component,
10
10
  args: [{ selector: 'opal-lib-custom-page-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row custom-grid-class\">\n <div class=\"govuk-grid-column-one-half\">\n <ng-content select=\"[pageHeaderHeading]\"></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-half custom-column-class\">\n <div class=\"moj-button-group moj-button-group--inline custom-button-group-class\">\n <ng-content select=\"[pageHeaderButtons]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".custom-grid-class{display:flex}.custom-column-class{display:flex;flex-direction:column;justify-content:end}.custom-button-group-class{justify-content:right}\n"] }]
11
11
  }] });