@hmcts/opal-frontend-common 0.0.20 → 0.0.22

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 (178) hide show
  1. package/components/abstract/abstract-sortable-table/index.d.ts +33 -2
  2. package/components/abstract/abstract-sortable-table-pagination/index.d.ts +16 -1
  3. package/components/abstract/abstract-table-filter/README.md +76 -0
  4. package/components/abstract/abstract-table-filter/index.d.ts +116 -0
  5. package/components/abstract/abstract-table-filter/interfaces/index.d.ts +17 -0
  6. package/components/abstract/abstract-table-filter/types/index.d.ts +3 -0
  7. package/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-label/index.d.ts +9 -0
  8. package/components/custom/custom-account-information/custom-account-information-item/custom-account-information-item-value/index.d.ts +9 -0
  9. package/components/custom/custom-account-information/custom-account-information-item/index.d.ts +10 -0
  10. package/components/custom/custom-account-information/index.d.ts +8 -0
  11. package/components/custom/custom-action-links/index.d.ts +12 -0
  12. package/components/custom/custom-page-header/index.d.ts +8 -0
  13. package/components/custom/custom-summary-metric-bar/custom-summary-metric-bar-item/custom-summary-metric-bar-item-label/index.d.ts +10 -0
  14. package/components/custom/custom-summary-metric-bar/custom-summary-metric-bar-item/custom-summary-metric-bar-item-value/index.d.ts +10 -0
  15. package/components/custom/custom-summary-metric-bar/custom-summary-metric-bar-item/index.d.ts +20 -0
  16. package/components/custom/custom-summary-metric-bar/index.d.ts +8 -0
  17. package/components/govuk/govuk-list/govuk-list-link/index.d.ts +12 -0
  18. package/components/govuk/govuk-list/index.d.ts +8 -0
  19. package/components/hod/hod-loading-spinner/index.d.ts +11 -0
  20. package/components/moj/moj-button-menu/index.d.ts +16 -10
  21. package/components/moj/moj-button-menu/moj-button-menu-item/index.d.ts +12 -0
  22. package/components/moj/moj-filter/index.d.ts +16 -0
  23. package/components/moj/moj-filter/moj-filter-panel/index.d.ts +8 -0
  24. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-header/README.md +43 -0
  25. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-header/index.d.ts +9 -0
  26. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/README.md +81 -0
  27. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/index.d.ts +18 -0
  28. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-item/README.md +53 -0
  29. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-item/index.d.ts +30 -0
  30. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-keyword/README.md +59 -0
  31. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-option/moj-filter-panel-option-form-group-keyword/index.d.ts +22 -0
  32. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/README.md +55 -0
  33. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/index.d.ts +21 -0
  34. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/moj-filter-panel-selected-tag/README.md +52 -0
  35. package/components/moj/moj-filter/moj-filter-panel/moj-filter-panel-selected/moj-filter-panel-selected-tag/index.d.ts +24 -0
  36. package/directives/govuk-button/index.d.ts +21 -0
  37. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs.map +1 -1
  38. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +1 -1
  39. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs.map +1 -1
  40. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs.map +1 -1
  41. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs.map +1 -1
  42. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-parent-base.mjs.map +1 -1
  43. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +23 -7
  44. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs.map +1 -1
  45. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +69 -9
  46. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs.map +1 -1
  47. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map +1 -1
  48. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-interfaces.mjs +4 -0
  49. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-interfaces.mjs.map +1 -0
  50. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-types.mjs +4 -0
  51. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-types.mjs.map +1 -0
  52. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +184 -0
  53. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs.map +1 -0
  54. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs.map +1 -1
  55. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +22 -0
  56. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs.map +1 -0
  57. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +22 -0
  58. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs.map +1 -0
  59. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +28 -0
  60. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs.map +1 -0
  61. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +18 -0
  62. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs.map +1 -0
  63. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +38 -0
  64. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs.map +1 -0
  65. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +18 -0
  66. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs.map +1 -0
  67. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +28 -0
  68. 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 -0
  69. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +28 -0
  70. 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 -0
  71. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +43 -0
  72. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs.map +1 -0
  73. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +18 -0
  74. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs.map +1 -0
  75. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs.map +1 -1
  76. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs.map +1 -1
  77. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs.map +1 -1
  78. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs.map +1 -1
  79. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs.map +1 -1
  80. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs.map +1 -1
  81. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs.map +1 -1
  82. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs.map +1 -1
  83. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +31 -0
  84. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs.map +1 -0
  85. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +18 -0
  86. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs.map +1 -0
  87. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs.map +1 -1
  88. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs.map +1 -1
  89. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs.map +1 -1
  90. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs.map +1 -1
  91. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs.map +1 -1
  92. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs.map +1 -1
  93. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs.map +1 -1
  94. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs.map +1 -1
  95. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +1 -1
  96. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs.map +1 -1
  97. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs.map +1 -1
  98. package/fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs.map +1 -1
  99. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +30 -0
  100. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs.map +1 -0
  101. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs.map +1 -1
  102. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +29 -0
  103. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs.map +1 -0
  104. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +40 -22
  105. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs.map +1 -1
  106. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +1 -1
  107. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +22 -0
  108. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs.map +1 -0
  109. 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 +44 -0
  110. 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 -0
  111. 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 +48 -0
  112. 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 -0
  113. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +34 -0
  114. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs.map +1 -0
  115. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +41 -0
  116. 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 -0
  117. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +43 -0
  118. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs.map +1 -0
  119. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +18 -0
  120. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs.map +1 -0
  121. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +31 -0
  122. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs.map +1 -0
  123. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs.map +1 -1
  124. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs.map +1 -1
  125. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs.map +1 -1
  126. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs.map +1 -1
  127. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs.map +1 -1
  128. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +1 -1
  129. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +61 -0
  130. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs.map +1 -0
  131. package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs.map +1 -1
  132. package/fesm2022/hmcts-opal-frontend-common-guards-has-flow-state.mjs.map +1 -1
  133. package/fesm2022/hmcts-opal-frontend-common-guards-helpers.mjs.map +1 -1
  134. package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs.map +1 -1
  135. package/fesm2022/hmcts-opal-frontend-common-guards-signed-in.mjs.map +1 -1
  136. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs.map +1 -1
  137. package/fesm2022/hmcts-opal-frontend-common-pages-access-denied.component-hjYG8Hhi.mjs.map +1 -1
  138. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in-stub.component-CMgQc0uF.mjs.map +1 -1
  139. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-UHSDf5ya.mjs.map +1 -1
  140. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs.map +1 -1
  141. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs.map +1 -1
  142. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs.map +1 -1
  143. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs.map +1 -1
  144. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs.map +1 -1
  145. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs.map +1 -1
  146. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +1 -1
  147. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs.map +1 -1
  148. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs.map +1 -1
  149. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +1 -1
  150. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs.map +1 -1
  151. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs.map +1 -1
  152. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +1 -1
  153. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs.map +1 -1
  154. package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs.map +1 -1
  155. package/fesm2022/hmcts-opal-frontend-common-validators-alphabetical-text.mjs.map +1 -1
  156. package/fesm2022/hmcts-opal-frontend-common-validators-amount.mjs.map +1 -1
  157. package/fesm2022/hmcts-opal-frontend-common-validators-date-after-year.mjs.map +1 -1
  158. package/fesm2022/hmcts-opal-frontend-common-validators-date-before.mjs.map +1 -1
  159. package/fesm2022/hmcts-opal-frontend-common-validators-date-of-birth.mjs.map +1 -1
  160. package/fesm2022/hmcts-opal-frontend-common-validators-driving-licence-number.mjs.map +1 -1
  161. package/fesm2022/hmcts-opal-frontend-common-validators-future-date.mjs.map +1 -1
  162. package/fesm2022/hmcts-opal-frontend-common-validators-invalid-value.mjs.map +1 -1
  163. package/fesm2022/hmcts-opal-frontend-common-validators-national-insurance-number.mjs.map +1 -1
  164. package/fesm2022/hmcts-opal-frontend-common-validators-numerical-only.mjs.map +1 -1
  165. package/fesm2022/hmcts-opal-frontend-common-validators-optional-max-length.mjs.map +1 -1
  166. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-date.mjs.map +1 -1
  167. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-email-address.mjs.map +1 -1
  168. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-telephone.mjs.map +1 -1
  169. package/fesm2022/hmcts-opal-frontend-common-validators-over-eighteen.mjs.map +1 -1
  170. package/fesm2022/hmcts-opal-frontend-common-validators-past-date.mjs.map +1 -1
  171. package/fesm2022/hmcts-opal-frontend-common-validators-pattern-validator.mjs.map +1 -1
  172. package/fesm2022/hmcts-opal-frontend-common-validators-special-characters.mjs.map +1 -1
  173. package/fesm2022/hmcts-opal-frontend-common-validators-time-format.mjs.map +1 -1
  174. package/fesm2022/hmcts-opal-frontend-common-validators-two-decimal-places.mjs.map +1 -1
  175. package/fesm2022/hmcts-opal-frontend-common-validators-valid-value.mjs.map +1 -1
  176. package/package.json +134 -1
  177. package/styles/custom/_custom-section_break.scss +6 -0
  178. package/styles/styles.scss +102 -0
@@ -2,10 +2,13 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, EventEmitter } from '@angular/core';
3
3
  import { IAbstractTableData, IAbstractSortState } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/interfaces';
4
4
  import { SortableValuesType, SortDirectionType } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';
5
+ import { AbstractTableFilterComponent } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter';
5
6
 
6
- declare abstract class AbstractSortableTableComponent implements OnInit {
7
+ declare abstract class AbstractSortableTableComponent extends AbstractTableFilterComponent implements OnInit {
7
8
  private readonly sortService;
8
- abstractTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
9
+ displayTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
10
+ filteredTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
11
+ sortedTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
9
12
  abstractExistingSortState: IAbstractSortState | null;
10
13
  sortStateSignal: _angular_core.WritableSignal<IAbstractSortState>;
11
14
  sortedColumnTitleSignal: _angular_core.WritableSignal<string>;
@@ -71,10 +74,38 @@ declare abstract class AbstractSortableTableComponent implements OnInit {
71
74
  key: string;
72
75
  sortType: 'ascending' | 'descending';
73
76
  }): void;
77
+ /**
78
+ * Synchronizes the sorted table data with the current filter and sort state.
79
+ *
80
+ * This effect observes changes to the filtered table data and the sort state signals.
81
+ * If no active sort key is found (i.e., no sorting is applied), it sets the sorted table data
82
+ * to a shallow copy of the filtered data. Otherwise, sorting logic should be applied elsewhere.
83
+ *
84
+ * @protected
85
+ */
86
+ protected syncSortedDataEffect: _angular_core.EffectRef;
74
87
  /**
75
88
  * Lifecycle hook to initialise the sort state.
76
89
  */
77
90
  ngOnInit(): void;
91
+ /**
92
+ * Applies the current filters to the table data and updates the sorted data accordingly.
93
+ *
94
+ * This method overrides the parent implementation to additionally handle sorting.
95
+ * If there is an active sort key, it applies the corresponding sort to the filtered data.
96
+ * If no sort key is active, it simply updates the sorted data to match the filtered data.
97
+ *
98
+ * @override
99
+ */
100
+ onApplyFilters(): void;
101
+ /**
102
+ * Clears all filters applied to the table and restores the data to its unfiltered state.
103
+ * If a sort is currently active, re-applies the sort after clearing filters.
104
+ * Otherwise, resets the sorted table data to match the filtered data.
105
+ *
106
+ * @override
107
+ */
108
+ clearAllFilters(): void;
78
109
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AbstractSortableTableComponent, never>;
79
110
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AbstractSortableTableComponent, "ng-component", never, {}, { "abstractSortState": "abstractSortState"; }, never, never, true, never>;
80
111
  }
@@ -7,6 +7,12 @@ declare abstract class AbstractSortableTablePaginationComponent extends Abstract
7
7
  currentPageSignal: _angular_core.WritableSignal<number>;
8
8
  itemsPerPageSignal: _angular_core.WritableSignal<number>;
9
9
  startIndexComputed: _angular_core.Signal<number>;
10
+ /**
11
+ * Computes the end index for the current page of the sorted table data.
12
+ * Ensures the end index does not exceed the total number of items.
13
+ *
14
+ * @returns The zero-based index of the last item to display on the current page.
15
+ */
10
16
  endIndexComputed: _angular_core.Signal<number>;
11
17
  paginatedTableDataComputed: _angular_core.Signal<_hmcts_opal_frontend_common_components_abstract_abstract_sortable_table_interfaces.IAbstractTableData<_hmcts_opal_frontend_common_components_abstract_abstract_sortable_table_types.SortableValuesType>[]>;
12
18
  /**
@@ -16,12 +22,21 @@ declare abstract class AbstractSortableTablePaginationComponent extends Abstract
16
22
  * - `key`: The column key to sort by.
17
23
  * - `sortType`: The sorting order, either 'ascending' or 'descending'.
18
24
  *
19
- * Resets `currentPageSignal` to 1 and triggers re-sorting of `abstractTableDataSignal`.
25
+ * Resets `currentPageSignal` to 1 and triggers re-sorting of `displayTableDataSignal`.
20
26
  */
21
27
  onSortChange(event: {
22
28
  key: string;
23
29
  sortType: 'ascending' | 'descending';
24
30
  }): void;
31
+ /**
32
+ * Applies the current filters to the table data.
33
+ *
34
+ * Overrides the base implementation to additionally reset the pagination to the first page
35
+ * after filters are applied.
36
+ *
37
+ * @override
38
+ */
39
+ onApplyFilters(): void;
25
40
  /**
26
41
  * Handles the event when the page is changed.
27
42
  *
@@ -0,0 +1,76 @@
1
+ # AbstractTableFilterComponent
2
+
3
+ The `AbstractTableFilterComponent` is an abstract base class designed for building reactive, filterable table components in Angular. It provides a fully signal-based filtering model using Angular 19's reactivity system, and supports filtering via keyword input and grouped filter tags.
4
+
5
+ ## Features
6
+
7
+ - Reactive filtering of table data using Angular signals
8
+ - Supports both keyword and tag-based filtering
9
+ - Exposes computed filtered data for consumption
10
+ - Clean override points for matching logic
11
+ - Stateless, testable, and reusable foundation for filterable tables
12
+
13
+ ## Usage
14
+
15
+ Extend this class in your table wrapper component:
16
+
17
+ ```ts
18
+ @Component({ ... })
19
+ export class MyFilterableTableComponent extends AbstractTableFilterComponent {
20
+ override matchItemWithFilterOption(item: any, categoryName: string, option: IAbstractTableFilterOption): boolean {
21
+ // Optional: customise matching logic per field
22
+ return item?.[categoryName] === option.value;
23
+ }
24
+
25
+ override matchItemWithKeyword(item: any, keyword: string): boolean {
26
+ return Object.values(item).some(value =>
27
+ value?.toString().toLowerCase().includes(keyword.toLowerCase())
28
+ );
29
+ }
30
+ }
31
+ ```
32
+
33
+ Set filter and table data like so:
34
+
35
+ ```ts
36
+ this.setTableData(tableData);
37
+ this.filterTags.set(filterCategories);
38
+ ```
39
+
40
+ ## Signals
41
+
42
+ | Signal | Type | Description |
43
+ | ------------------------- | -------------------------------------- | --------------------------------------------------------- |
44
+ | `displayTableDataSignal` | Signal<IAbstractTableData[]> | The full, unfiltered dataset |
45
+ | `filterTags` | Signal<IAbstractTableFilterCategory[]> | Grouped tag filters with selection state |
46
+ | `keyword` | Signal<string> | Keyword used for text-based filtering |
47
+ | `abstractSelectedTags` | Signal<IAbstractTableFilterCategory[]> | Computed from `filterTags`; not used in applied filtering |
48
+ | `filteredTableDataSignal` | Signal<IAbstractTableData[]> | Computed signal of filtered results |
49
+
50
+ ## Public Methods
51
+
52
+ | Method | Description |
53
+ | ----------------------------------------------------- | ----------------------------------------------- |
54
+ | `onKeywordChange(keyword)` | Updates the keyword for filtering |
55
+ | `onCategoryCheckboxChange(category, value, selected)` | Toggles a specific tag option |
56
+ | `removeTag(category, value)` | Deselects a tag based on category and value |
57
+ | `clearAllFilters()` | Clears all tag selections and the keyword input |
58
+ | `setTableData(data)` | Sets the full table data to be filtered |
59
+ | `resetFiltersTo(tags, keyword?)` | Resets filter tags and optionally the keyword |
60
+
61
+ ## Protected Methods (Override Points)
62
+
63
+ | Method | Description |
64
+ | ---------------------------------- | --------------------------------------------------------------------- |
65
+ | `matchItemWithFilterOption()` | Allows overriding how tag filters match table data |
66
+ | `matchItemWithKeyword()` | Allows overriding how keyword filters apply |
67
+ | `getSelectedOptionsFromTags(tags)` | Utility method to extract selected tag options from a tag group array |
68
+
69
+ ## Testing
70
+
71
+ Unit tests should verify:
72
+
73
+ - Data passed to `displayTableDataSignal` is filtered as expected
74
+ - `filterTags` updates trigger recomputation of `filteredTableDataSignal`
75
+ - Override methods correctly influence filtering behaviour
76
+ - Events like `onKeywordChange()` and `clearAllFilters()` produce expected state
@@ -0,0 +1,116 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { IAbstractTableData, IAbstractTableFilterCategory, IAbstractTableFilterOption } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/interfaces';
4
+ import { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/types';
5
+
6
+ declare abstract class AbstractTableFilterComponent {
7
+ displayTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
8
+ filteredTableDataSignal: _angular_core.WritableSignal<IAbstractTableData<SortableValuesType>[]>;
9
+ filterTags: _angular_core.WritableSignal<IAbstractTableFilterCategory[]>;
10
+ keyword: _angular_core.WritableSignal<string>;
11
+ appliedFilterTags: _angular_core.WritableSignal<IAbstractTableFilterCategory[]>;
12
+ appliedKeyword: _angular_core.WritableSignal<string>;
13
+ /**
14
+ * Determines whether a given item matches a specific filter option within a category.
15
+ * @param item The data item to test.
16
+ * @param categoryName The category name to check within the item.
17
+ * @param option The filter option to match against.
18
+ * @returns True if the item's value for the category matches the option's value; otherwise false.
19
+ */
20
+ protected matchItemWithFilterOption(item: IAbstractTableData<SortableValuesType>, categoryName: string, option: IAbstractTableFilterOption): boolean;
21
+ /**
22
+ * Determines whether a given item matches the keyword filter.
23
+ * Checks if any value in the item contains the keyword (case-insensitive).
24
+ * @param item The data item to test.
25
+ * @param keyword The keyword to match against.
26
+ * @returns True if any value in the item contains the keyword; otherwise false.
27
+ */
28
+ protected matchItemWithKeyword(item: IAbstractTableData<SortableValuesType>, keyword: string): boolean;
29
+ /**
30
+ * Extracts and returns categories from the provided tags that have at least one selected option.
31
+ *
32
+ * For each category in the input array, this method filters its options to include only those marked as selected.
33
+ * Only categories with at least one selected option are included in the returned array.
34
+ *
35
+ * @param tags - An array of category objects, each containing a list of options.
36
+ * @returns An array of category objects, each with only the selected options, and only categories with at least one selected option.
37
+ */
38
+ protected getSelectedOptionsFromTags(tags: IAbstractTableFilterCategory[]): IAbstractTableFilterCategory[];
39
+ /**
40
+ * A computed signal that returns the currently selected filter tags.
41
+ * It filters the filterTags signal to include only those options that are selected,
42
+ * grouped by their category name.
43
+ *
44
+ * @returns An array of filter categories each containing only the selected options.
45
+ */
46
+ abstractSelectedTags: Signal<IAbstractTableFilterCategory[]>;
47
+ /**
48
+ * Updates the keyword used to filter the table data.
49
+ * @param newKeyword The new keyword string to filter by.
50
+ */
51
+ onKeywordChange(newKeyword: string): void;
52
+ /**
53
+ * Updates the selection state of a filter option within a category.
54
+ * @param categoryName The name of the filter category.
55
+ * @param optionValue The value of the filter option to update.
56
+ * @param selected Whether the option is selected (true) or deselected (false).
57
+ */
58
+ onCategoryCheckboxChange(categoryName: string, optionValue: string | number, selected: boolean): void;
59
+ /**
60
+ * Removes a selected filter tag by deselecting the corresponding filter option.
61
+ * @param categoryName The name of the filter category.
62
+ * @param optionValue The value of the filter option to remove.
63
+ */
64
+ removeTag(categoryName: string, optionValue: string | number): void;
65
+ /**
66
+ * Clears all applied filters and resets the filter state.
67
+ *
68
+ * This method performs the following actions:
69
+ * - Resets the keyword and applied keyword to empty strings.
70
+ * - Iterates through all filter tag groups and sets each option's `selected` property to `false`.
71
+ * - Updates both the current and applied filter tags with the cleared state.
72
+ * - Applies the updated filter state.
73
+ */
74
+ clearAllFilters(): void;
75
+ /**
76
+ * Initializes and updates the filtered table data based on the currently applied keyword and filter tags.
77
+ *
78
+ * This method performs the following steps:
79
+ * 1. Retrieves the current table data, applied keyword, and filter tags.
80
+ * 2. If filter tags are present, filters the data to include only items that match all selected filter options.
81
+ * 3. If a keyword is present, further filters the data to include only items that match the keyword.
82
+ * 4. Updates the filtered table data signal with the resulting filtered data.
83
+ *
84
+ * @remarks
85
+ * - Filtering by tags requires each item to match every group of filter tags.
86
+ * - Filtering by keyword is case-insensitive and trims whitespace.
87
+ */
88
+ applyFilterState(): void;
89
+ /**
90
+ * Applies the current filter tags and keyword to the table data.
91
+ *
92
+ * This method updates the `appliedFilterTags` and `appliedKeyword` properties
93
+ * with the current filter values, then re-initialises the filtered data set
94
+ * by invoking `applyFilterState()`.
95
+ *
96
+ * Typically called when the user confirms or applies filter changes in the UI.
97
+ */
98
+ onApplyFilters(): void;
99
+ /**
100
+ * Sets the data to be displayed in the table.
101
+ *
102
+ * @param data - An array of table data objects conforming to the `IAbstractTableData<SortableValuesType>` interface.
103
+ */
104
+ setTableData(data: IAbstractTableData<SortableValuesType>[]): void;
105
+ /**
106
+ * Resets the filter and keyword state to the provided values and reapplies them.
107
+ *
108
+ * @param tags - The filter tag state to apply (including selected values).
109
+ * @param keyword - The keyword string to apply (optional, defaults to empty).
110
+ */
111
+ resetFiltersTo(tags: IAbstractTableFilterCategory[], keyword?: string): void;
112
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AbstractTableFilterComponent, never>;
113
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AbstractTableFilterComponent, "ng-component", never, {}, {}, never, never, true, never>;
114
+ }
115
+
116
+ export { AbstractTableFilterComponent };
@@ -0,0 +1,17 @@
1
+ import { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-table-filter/types';
2
+
3
+ interface IAbstractTableFilterOption {
4
+ label: string;
5
+ value: string | number;
6
+ count?: number;
7
+ selected: boolean;
8
+ }
9
+ interface IAbstractTableFilterCategory {
10
+ categoryName: string;
11
+ options: IAbstractTableFilterOption[];
12
+ }
13
+ interface IAbstractTableData<T extends SortableValuesType> {
14
+ [key: string]: T | T[];
15
+ }
16
+
17
+ export type { IAbstractTableData, IAbstractTableFilterCategory, IAbstractTableFilterOption };
@@ -0,0 +1,3 @@
1
+ type SortableValuesType = string | number | boolean | Date | null | undefined;
2
+
3
+ export type { SortableValuesType };
@@ -0,0 +1,9 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomAccountInformationItemLabelComponent {
4
+ hostClass: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomAccountInformationItemLabelComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomAccountInformationItemLabelComponent, "opal-lib-custom-account-information-item-label, [opal-lib-custom-account-information-item-label]", never, {}, {}, never, ["*"], true, never>;
7
+ }
8
+
9
+ export { CustomAccountInformationItemLabelComponent };
@@ -0,0 +1,9 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomAccountInformationItemValueComponent {
4
+ hostClass: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomAccountInformationItemValueComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomAccountInformationItemValueComponent, "opal-lib-custom-account-information-item-value, [opal-lib-custom-account-information-item-value]", never, {}, {}, never, ["*"], true, never>;
7
+ }
8
+
9
+ export { CustomAccountInformationItemValueComponent };
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomAccountInformationItemComponent {
4
+ itemClasses: string;
5
+ get hostClass(): string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomAccountInformationItemComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomAccountInformationItemComponent, "opal-lib-custom-account-information-item", never, { "itemClasses": { "alias": "itemClasses"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
9
+
10
+ export { CustomAccountInformationItemComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomAccountInformationComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomAccountInformationComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomAccountInformationComponent, "opal-lib-custom-account-information, [opal-lib-custom-account-information]", never, {}, {}, never, ["*"], true, never>;
6
+ }
7
+
8
+ export { CustomAccountInformationComponent };
@@ -0,0 +1,12 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomActionLinksComponent {
4
+ id: string;
5
+ classSize: string;
6
+ get hostId(): string;
7
+ get hostClass(): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomActionLinksComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomActionLinksComponent, "opal-lib-custom-action-links", never, { "id": { "alias": "id"; "required": true; }; "classSize": { "alias": "classSize"; "required": false; }; }, {}, never, ["[heading]", "[links]"], true, never>;
10
+ }
11
+
12
+ export { CustomActionLinksComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomPageHeaderComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomPageHeaderComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomPageHeaderComponent, "opal-lib-custom-page-header", never, {}, {}, never, ["[pageHeaderHeading]", "[pageHeaderButtons]"], true, never>;
6
+ }
7
+
8
+ export { CustomPageHeaderComponent };
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomSummaryMetricBarItemLabelComponent {
4
+ textColour: string;
5
+ get hostClasses(): string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSummaryMetricBarItemLabelComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSummaryMetricBarItemLabelComponent, "opal-lib-custom-summary-metric-bar-item-label, [opal-lib-custom-summary-metric-bar-item-label]", never, { "textColour": { "alias": "textColour"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
9
+
10
+ export { CustomSummaryMetricBarItemLabelComponent };
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomSummaryMetricBarItemValueComponent {
4
+ textColour: string;
5
+ get hostClasses(): string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSummaryMetricBarItemValueComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSummaryMetricBarItemValueComponent, "opal-lib-custom-summary-metric-bar-item-value, [opal-lib-custom-summary-metric-bar-item-value]", never, { "textColour": { "alias": "textColour"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
9
+
10
+ export { CustomSummaryMetricBarItemValueComponent };
@@ -0,0 +1,20 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomSummaryMetricBarItemComponent {
4
+ backgroundColour: string;
5
+ itemClasses: string;
6
+ get hostClasses(): string;
7
+ /**
8
+ * Returns the CSS class names for the summary metric bar item.
9
+ *
10
+ * This method generates a string containing the default class "custom-summary-metric-bar-item-frame"
11
+ * combined with additional classes determined by the component's background and text color properties.
12
+ *
13
+ * @returns {string} A space-separated list of CSS classes to apply to the component.
14
+ */
15
+ getSummaryMetricBarItemClasses(): string;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSummaryMetricBarItemComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSummaryMetricBarItemComponent, "opal-lib-custom-summary-metric-bar-item", never, { "backgroundColour": { "alias": "backgroundColour"; "required": false; }; "itemClasses": { "alias": "itemClasses"; "required": false; }; }, {}, never, ["*"], true, never>;
18
+ }
19
+
20
+ export { CustomSummaryMetricBarItemComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomSummaryMetricBarComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSummaryMetricBarComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSummaryMetricBarComponent, "opal-lib-custom-summary-metric-bar", never, {}, {}, never, ["*"], true, never>;
6
+ }
7
+
8
+ export { CustomSummaryMetricBarComponent };
@@ -0,0 +1,12 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter } from '@angular/core';
3
+
4
+ declare class GovukListLinkComponent {
5
+ linkText: string;
6
+ linkClickEvent: EventEmitter<void>;
7
+ handleClick(event: Event): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<GovukListLinkComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<GovukListLinkComponent, "opal-lib-govuk-list-link", never, { "linkText": { "alias": "linkText"; "required": true; }; }, { "linkClickEvent": "linkClickEvent"; }, never, never, true, never>;
10
+ }
11
+
12
+ export { GovukListLinkComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class GovukListComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<GovukListComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<GovukListComponent, "opal-lib-govuk-list", never, {}, {}, never, ["*"], true, never>;
6
+ }
7
+
8
+ export { GovukListComponent };
@@ -0,0 +1,11 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class HodLoadingSpinnerComponent {
4
+ spinnerId: string;
5
+ hostClasses: string;
6
+ role: string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<HodLoadingSpinnerComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<HodLoadingSpinnerComponent, "opal-lib-hod-loading-spinner, [opal-lib-hod-loading-spinner]", never, { "spinnerId": { "alias": "spinnerId"; "required": true; }; }, {}, never, ["*"], true, never>;
9
+ }
10
+
11
+ export { HodLoadingSpinnerComponent };
@@ -1,21 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter } from '@angular/core';
3
-
4
- declare class MojButtonMenuItemComponent {
5
- actionClick: EventEmitter<boolean>;
6
- handleClick(event: Event): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<MojButtonMenuItemComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<MojButtonMenuItemComponent, "opal-lib-moj-button-menu-item", never, {}, { "actionClick": "actionClick"; }, never, ["[linkText]"], true, never>;
9
- }
2
+ import { ElementRef } from '@angular/core';
10
3
 
11
4
  declare class MojButtonMenuComponent {
12
5
  menuButtonTitle: string;
6
+ menuButton: ElementRef<HTMLElement>;
7
+ hostClasses: string;
8
+ dataModule: string;
9
+ get dataButtonText(): string;
10
+ dataButtonClasses: string;
11
+ dataMojButtonMenuInit: string;
12
+ isExpanded: boolean;
13
13
  /**
14
- * Toggles the button menu by changing the `aria-expanded` attribute of the toggle button.
14
+ * Toggles the expanded state of the button menu.
15
+ *
16
+ * This method retrieves the current "aria-expanded" state from the menu button,
17
+ * inverts the state, and then updates both the "aria-expanded" attribute and the
18
+ * internal component property "isExpanded" accordingly.
19
+ *
20
+ * @returns void
15
21
  */
16
22
  toggleButtonMenu(): void;
17
23
  static ɵfac: i0.ɵɵFactoryDeclaration<MojButtonMenuComponent, never>;
18
24
  static ɵcmp: i0.ɵɵComponentDeclaration<MojButtonMenuComponent, "opal-lib-moj-button-menu", never, { "menuButtonTitle": { "alias": "menuButtonTitle"; "required": true; }; }, {}, never, ["*"], true, never>;
19
25
  }
20
26
 
21
- export { MojButtonMenuComponent, MojButtonMenuItemComponent };
27
+ export { MojButtonMenuComponent };
@@ -0,0 +1,12 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter } from '@angular/core';
3
+
4
+ declare class MojButtonMenuItemComponent {
5
+ itemText: string;
6
+ actionClick: EventEmitter<void>;
7
+ handleClick(event: Event): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<MojButtonMenuItemComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<MojButtonMenuItemComponent, "opal-lib-moj-button-menu-item", never, { "itemText": { "alias": "itemText"; "required": true; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
10
+ }
11
+
12
+ export { MojButtonMenuItemComponent };
@@ -0,0 +1,16 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class MojFilterComponent {
4
+ showFilter: boolean;
5
+ /**
6
+ * Toggles the visibility of the filter panel.
7
+ *
8
+ * This method inverts the current value of `showFilter`, effectively
9
+ * showing the filter panel if it is hidden, or hiding it if it is visible.
10
+ */
11
+ toggleFilter(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<MojFilterComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<MojFilterComponent, "opal-lib-moj-filter", never, { "showFilter": { "alias": "showFilter"; "required": false; }; }, {}, never, ["[mojFilterPanel]", "[mojFilterContent]"], true, never>;
14
+ }
15
+
16
+ export { MojFilterComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class MojFilterPanelComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<MojFilterPanelComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<MojFilterPanelComponent, "opal-lib-moj-filter-panel", never, {}, {}, never, ["[mojFilterPanelHeader]", "[mojFilterPanelSelected]", "[mojFilterPanelOption]"], true, never>;
6
+ }
7
+
8
+ export { MojFilterPanelComponent };
@@ -0,0 +1,43 @@
1
+ # MojFilterPanelHeaderComponent
2
+
3
+ The `MojFilterPanelHeaderComponent` is a structural header component used within the `MojFilterComponent`. It is designed to render a heading using the [MOJ Design System](https://design-patterns.service.justice.gov.uk/components/filter/) conventions.
4
+
5
+ This component is intended to be used inside the `[mojFilterPanelHeader]` slot of the `MojFilterComponent`.
6
+
7
+ ## Features
8
+
9
+ - Renders a section header using MoJ-styled classes.
10
+ - Accepts a `title` input with a default value of `"Filter"`.
11
+ - Compatible with content projection (if needed).
12
+
13
+ ## Usage
14
+
15
+ ### Import
16
+
17
+ ```ts
18
+ import { MojFilterPanelHeaderComponent } from '@hmcts/opal-frontend-common/components/moj/moj-filter';
19
+ ```
20
+
21
+ ### In Template
22
+
23
+ ```html
24
+ <opal-lib-moj-filter-panel-header [title]="'Filter offences'"></opal-lib-moj-filter-panel-header>
25
+ ```
26
+
27
+ ## Inputs
28
+
29
+ | Input | Type | Default | Description |
30
+ | ----- | ------ | -------- | ---------------------------------- |
31
+ | title | string | 'Filter' | The title to display in the header |
32
+
33
+ ## Accessibility
34
+
35
+ - Uses an `<h2>` element with the `govuk-heading-m` class for screen-reader-friendly headings.
36
+ - You can override the title text using the `title` input to ensure headings remain meaningful and contextual.
37
+
38
+ ## Testing
39
+
40
+ Unit tests should verify:
41
+
42
+ - The default title renders as `"Filter"`.
43
+ - The custom title input renders correctly.
@@ -0,0 +1,9 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class MojFilterPanelHeaderComponent {
4
+ title: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<MojFilterPanelHeaderComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<MojFilterPanelHeaderComponent, "opal-lib-moj-filter-panel-header", never, { "title": { "alias": "title"; "required": false; }; }, {}, never, never, true, never>;
7
+ }
8
+
9
+ export { MojFilterPanelHeaderComponent };