@hmcts/opal-frontend-common 0.0.109 → 0.0.111

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 (419) hide show
  1. package/fesm2022/hmcts-opal-frontend-common-access-denied.component-DuQgLlU6.mjs +57 -0
  2. package/fesm2022/hmcts-opal-frontend-common-account-created.component-DtlFlzU9.mjs +47 -0
  3. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.mjs +73 -81
  4. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-creditor-details-base.mjs +71 -92
  5. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base-interfaces.mjs +0 -4
  6. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +133 -233
  7. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base-interfaces.mjs +0 -4
  8. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +123 -251
  9. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs +24 -43
  10. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base-interfaces.mjs +0 -4
  11. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +66 -94
  12. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base-interfaces.mjs +0 -4
  13. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +340 -616
  14. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-parent-base.mjs +25 -61
  15. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +88 -142
  16. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.mjs +48 -29
  17. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.mjs +14 -19
  18. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.mjs +0 -4
  19. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.mjs +0 -4
  20. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.mjs +144 -273
  21. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-interfaces.mjs +0 -4
  22. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +104 -129
  23. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-types.mjs +0 -4
  24. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +123 -204
  25. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs +35 -121
  26. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-interfaces.mjs +0 -4
  27. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-types.mjs +0 -4
  28. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +111 -183
  29. package/fesm2022/hmcts-opal-frontend-common-components-abstract-interfaces.mjs +0 -4
  30. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete-interfaces.mjs +0 -4
  31. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +278 -275
  32. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-accessible-monetary.mjs +66 -53
  33. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +44 -21
  34. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +44 -21
  35. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +54 -27
  36. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +38 -17
  37. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +70 -37
  38. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-deferred-live-region-announcement.mjs +109 -119
  39. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +38 -17
  40. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +40 -17
  41. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +66 -27
  42. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +44 -21
  43. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +54 -27
  44. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +54 -27
  45. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +67 -42
  46. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +40 -17
  47. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +66 -27
  48. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +42 -21
  49. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +36 -17
  50. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +125 -119
  51. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +46 -30
  52. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +72 -39
  53. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +54 -34
  54. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes-interfaces.mjs +0 -4
  55. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +303 -134
  56. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input-interfaces.mjs +0 -4
  57. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +163 -79
  58. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +45 -21
  59. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +49 -33
  60. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer-interfaces.mjs +0 -4
  61. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +42 -20
  62. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header-interfaces.mjs +0 -4
  63. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +103 -41
  64. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption-types.mjs +0 -4
  65. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +90 -39
  66. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +60 -26
  67. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +53 -30
  68. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +36 -17
  69. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +75 -44
  70. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +80 -85
  71. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +53 -25
  72. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio-interfaces.mjs +0 -4
  73. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +397 -267
  74. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select-interfaces.mjs +0 -4
  75. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +164 -80
  76. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-skip-link.mjs +61 -0
  77. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +153 -85
  78. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +246 -121
  79. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +224 -90
  80. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +99 -76
  81. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +78 -51
  82. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +79 -72
  83. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +55 -25
  84. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +112 -46
  85. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +185 -104
  86. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +165 -95
  87. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +151 -81
  88. package/fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs +5 -16
  89. package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +65 -32
  90. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +396 -243
  91. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +55 -25
  92. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +53 -28
  93. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +92 -60
  94. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +216 -165
  95. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +44 -21
  96. 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 +64 -42
  97. 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 +68 -47
  98. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +52 -33
  99. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +61 -40
  100. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +63 -42
  101. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +38 -17
  102. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +56 -34
  103. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header-interfaces.mjs +0 -4
  104. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +100 -41
  105. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-inset-text.mjs +62 -26
  106. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +46 -21
  107. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +47 -21
  108. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +119 -164
  109. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +225 -172
  110. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +355 -188
  111. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +152 -96
  112. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +61 -29
  113. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +74 -26
  114. package/fesm2022/hmcts-opal-frontend-common-concurrency-failure.component-BqsP0gj2.mjs +41 -0
  115. package/fesm2022/hmcts-opal-frontend-common-constants.mjs +7 -13
  116. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +55 -43
  117. package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +86 -60
  118. package/fesm2022/hmcts-opal-frontend-common-directives-moj-multi-select.mjs +184 -223
  119. package/fesm2022/hmcts-opal-frontend-common-directives-trim-leading-trailing-whitespace.mjs +56 -40
  120. package/fesm2022/hmcts-opal-frontend-common-guards-account.mjs +17 -37
  121. package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs +30 -41
  122. package/fesm2022/hmcts-opal-frontend-common-guards-business-unit-route-permissions.mjs +31 -90
  123. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate-interfaces.mjs +0 -4
  124. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate-types.mjs +0 -4
  125. package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate.mjs +3 -9
  126. package/fesm2022/hmcts-opal-frontend-common-guards-feature-flag.mjs +29 -64
  127. package/fesm2022/hmcts-opal-frontend-common-guards-has-flow-state.mjs +13 -20
  128. package/fesm2022/hmcts-opal-frontend-common-guards-has-url-state-match.mjs +19 -48
  129. package/fesm2022/hmcts-opal-frontend-common-guards-helpers.mjs +21 -54
  130. package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs +20 -30
  131. package/fesm2022/hmcts-opal-frontend-common-guards-signed-in.mjs +13 -24
  132. package/fesm2022/hmcts-opal-frontend-common-guards-types.mjs +0 -4
  133. package/fesm2022/hmcts-opal-frontend-common-interceptors-content-digest.mjs +59 -107
  134. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error-constants.mjs +11 -17
  135. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error-interfaces.mjs +0 -4
  136. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs +74 -148
  137. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-retry-constants.mjs +18 -13
  138. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-retry-interfaces.mjs +0 -4
  139. package/fesm2022/hmcts-opal-frontend-common-interceptors-http-retry.mjs +65 -134
  140. package/fesm2022/hmcts-opal-frontend-common-internal-server-error.component-8EP_PgKk.mjs +55 -0
  141. package/fesm2022/hmcts-opal-frontend-common-pages-access-denied.component-DuQgLlU6.mjs +57 -0
  142. package/fesm2022/hmcts-opal-frontend-common-pages-account-created.component-DtlFlzU9.mjs +47 -0
  143. package/fesm2022/hmcts-opal-frontend-common-pages-concurrency-failure.component-BqsP0gj2.mjs +41 -0
  144. package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page-interfaces.mjs +0 -4
  145. package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page.mjs +112 -62
  146. package/fesm2022/hmcts-opal-frontend-common-pages-internal-server-error.component-8EP_PgKk.mjs +55 -0
  147. package/fesm2022/hmcts-opal-frontend-common-pages-permission-denied.component-B3EkD8uw.mjs +41 -0
  148. package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs +22 -27
  149. package/fesm2022/hmcts-opal-frontend-common-pages-routing-interfaces.mjs +0 -4
  150. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in-stub.component-CT2Bh7gD.mjs +127 -0
  151. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-BxpouMug.mjs +55 -0
  152. package/fesm2022/hmcts-opal-frontend-common-pages.mjs +51 -52
  153. package/fesm2022/hmcts-opal-frontend-common-permission-denied.component-B3EkD8uw.mjs +41 -0
  154. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +41 -28
  155. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +43 -40
  156. package/fesm2022/hmcts-opal-frontend-common-pipes-monetary.mjs +43 -39
  157. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +41 -29
  158. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +37 -25
  159. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +68 -91
  160. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +74 -65
  161. package/fesm2022/hmcts-opal-frontend-common-services-auth-service-constants.mjs +6 -10
  162. package/fesm2022/hmcts-opal-frontend-common-services-auth-service-interfaces.mjs +0 -4
  163. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +49 -42
  164. package/fesm2022/hmcts-opal-frontend-common-services-date-service-interfaces.mjs +0 -4
  165. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +118 -233
  166. package/fesm2022/hmcts-opal-frontend-common-services-history-transformation-service.mjs +185 -484
  167. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service-mocks.mjs +12 -11
  168. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +77 -115
  169. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-interfaces.mjs +0 -4
  170. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-mocks.mjs +150 -159
  171. package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +119 -202
  172. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +47 -68
  173. package/fesm2022/hmcts-opal-frontend-common-services-session-service-constants.mjs +3 -9
  174. package/fesm2022/hmcts-opal-frontend-common-services-session-service-interfaces.mjs +0 -4
  175. package/fesm2022/hmcts-opal-frontend-common-services-session-service-mocks.mjs +4 -8
  176. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +50 -40
  177. package/fesm2022/hmcts-opal-frontend-common-services-sort-service-interfaces.mjs +0 -4
  178. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +56 -96
  179. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-interfaces.mjs +0 -4
  180. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-mocks.mjs +19 -26
  181. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +71 -99
  182. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs +4 -8
  183. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-interfaces.mjs +0 -4
  184. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +65 -106
  185. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +104 -193
  186. package/fesm2022/hmcts-opal-frontend-common-sign-in-stub.component-CT2Bh7gD.mjs +127 -0
  187. package/fesm2022/hmcts-opal-frontend-common-sign-in.component-Dz97ji3i.mjs +55 -0
  188. package/fesm2022/hmcts-opal-frontend-common-stores-global-constants.mjs +6 -10
  189. package/fesm2022/hmcts-opal-frontend-common-stores-global-interfaces.mjs +0 -4
  190. package/fesm2022/hmcts-opal-frontend-common-stores-global-types.mjs +0 -4
  191. package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs +52 -57
  192. package/fesm2022/hmcts-opal-frontend-common-types.mjs +0 -4
  193. package/fesm2022/hmcts-opal-frontend-common-validators-amount.mjs +7 -18
  194. package/fesm2022/hmcts-opal-frontend-common-validators-date-after-year.mjs +8 -15
  195. package/fesm2022/hmcts-opal-frontend-common-validators-date-before.mjs +9 -18
  196. package/fesm2022/hmcts-opal-frontend-common-validators-date-of-birth.mjs +13 -21
  197. package/fesm2022/hmcts-opal-frontend-common-validators-future-date.mjs +9 -18
  198. package/fesm2022/hmcts-opal-frontend-common-validators-invalid-value.mjs +6 -12
  199. package/fesm2022/hmcts-opal-frontend-common-validators-national-insurance-number.mjs +9 -17
  200. package/fesm2022/hmcts-opal-frontend-common-validators-non-negative-value.mjs +10 -26
  201. package/fesm2022/hmcts-opal-frontend-common-validators-non-zero-value.mjs +10 -26
  202. package/fesm2022/hmcts-opal-frontend-common-validators-optional-max-length.mjs +7 -14
  203. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-date.mjs +13 -26
  204. package/fesm2022/hmcts-opal-frontend-common-validators-optional-valid-telephone.mjs +12 -17
  205. package/fesm2022/hmcts-opal-frontend-common-validators-over-eighteen.mjs +19 -48
  206. package/fesm2022/hmcts-opal-frontend-common-validators-past-date.mjs +11 -19
  207. package/fesm2022/hmcts-opal-frontend-common-validators-pattern-validator.mjs +7 -26
  208. package/fesm2022/hmcts-opal-frontend-common-validators-valid-value.mjs +6 -12
  209. package/fesm2022/hmcts-opal-frontend-common.mjs +56 -76
  210. package/package.json +6 -1
  211. package/types/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.d.ts +95 -104
  212. package/types/hmcts-opal-frontend-common-components-abstract-abstract-creditor-details-base.d.ts +75 -78
  213. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base-interfaces.d.ts +4 -7
  214. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.d.ts +123 -126
  215. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base-interfaces.d.ts +4 -7
  216. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.d.ts +156 -159
  217. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.d.ts +13 -16
  218. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base-interfaces.d.ts +5 -7
  219. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.d.ts +46 -50
  220. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-base-interfaces.d.ts +27 -35
  221. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-base.d.ts +323 -328
  222. package/types/hmcts-opal-frontend-common-components-abstract-abstract-form-parent-base.d.ts +33 -36
  223. package/types/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.d.ts +75 -78
  224. package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-instances-table-base.d.ts +15 -13
  225. package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-constants.d.ts +16 -19
  226. package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-interfaces.d.ts +23 -30
  227. package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base-types.d.ts +1 -3
  228. package/types/hmcts-opal-frontend-common-components-abstract-abstract-report-summary-list-base.d.ts +179 -188
  229. package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-interfaces.d.ts +6 -9
  230. package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.d.ts +66 -66
  231. package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-types.d.ts +2 -5
  232. package/types/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.d.ts +112 -113
  233. package/types/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.d.ts +83 -86
  234. package/types/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-interfaces.d.ts +12 -15
  235. package/types/hmcts-opal-frontend-common-components-abstract-abstract-table-filter-types.d.ts +1 -3
  236. package/types/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.d.ts +113 -116
  237. package/types/hmcts-opal-frontend-common-components-abstract-interfaces.d.ts +16 -23
  238. package/types/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete-interfaces.d.ts +4 -6
  239. package/types/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.d.ts +136 -95
  240. package/types/hmcts-opal-frontend-common-components-custom-custom-accessible-monetary.d.ts +35 -29
  241. package/types/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.d.ts +6 -9
  242. package/types/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.d.ts +6 -9
  243. package/types/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.d.ts +12 -10
  244. package/types/hmcts-opal-frontend-common-components-custom-custom-account-information.d.ts +5 -8
  245. package/types/hmcts-opal-frontend-common-components-custom-custom-action-links.d.ts +18 -12
  246. package/types/hmcts-opal-frontend-common-components-custom-custom-deferred-live-region-announcement.d.ts +67 -57
  247. package/types/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.d.ts +5 -8
  248. package/types/hmcts-opal-frontend-common-components-custom-custom-page-header.d.ts +5 -8
  249. package/types/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.d.ts +16 -10
  250. package/types/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.d.ts +11 -9
  251. package/types/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.d.ts +12 -10
  252. package/types/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.d.ts +12 -10
  253. package/types/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.d.ts +26 -20
  254. package/types/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.d.ts +5 -8
  255. package/types/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.d.ts +16 -10
  256. package/types/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.d.ts +11 -9
  257. package/types/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.d.ts +5 -8
  258. package/types/hmcts-opal-frontend-common-components-govuk-govuk-accordion.d.ts +72 -64
  259. package/types/hmcts-opal-frontend-common-components-govuk-govuk-back-link.d.ts +16 -17
  260. package/types/hmcts-opal-frontend-common-components-govuk-govuk-button.d.ts +29 -17
  261. package/types/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.d.ts +22 -18
  262. package/types/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes-interfaces.d.ts +14 -16
  263. package/types/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.d.ts +96 -43
  264. package/types/hmcts-opal-frontend-common-components-govuk-govuk-date-input-interfaces.d.ts +13 -15
  265. package/types/hmcts-opal-frontend-common-components-govuk-govuk-date-input.d.ts +75 -34
  266. package/types/hmcts-opal-frontend-common-components-govuk-govuk-details.d.ts +11 -9
  267. package/types/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.d.ts +23 -19
  268. package/types/hmcts-opal-frontend-common-components-govuk-govuk-footer-interfaces.d.ts +5 -7
  269. package/types/hmcts-opal-frontend-common-components-govuk-govuk-footer.d.ts +14 -13
  270. package/types/hmcts-opal-frontend-common-components-govuk-govuk-header-interfaces.d.ts +4 -6
  271. package/types/hmcts-opal-frontend-common-components-govuk-govuk-header.d.ts +25 -23
  272. package/types/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption-types.d.ts +1 -3
  273. package/types/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.d.ts +32 -14
  274. package/types/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.d.ts +16 -10
  275. package/types/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.d.ts +16 -12
  276. package/types/hmcts-opal-frontend-common-components-govuk-govuk-list.d.ts +5 -8
  277. package/types/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.d.ts +37 -20
  278. package/types/hmcts-opal-frontend-common-components-govuk-govuk-pagination.d.ts +59 -47
  279. package/types/hmcts-opal-frontend-common-components-govuk-govuk-panel.d.ts +12 -10
  280. package/types/hmcts-opal-frontend-common-components-govuk-govuk-radio-interfaces.d.ts +17 -20
  281. package/types/hmcts-opal-frontend-common-components-govuk-govuk-radio.d.ts +162 -101
  282. package/types/hmcts-opal-frontend-common-components-govuk-govuk-select-interfaces.d.ts +4 -6
  283. package/types/hmcts-opal-frontend-common-components-govuk-govuk-select.d.ts +67 -26
  284. package/types/hmcts-opal-frontend-common-components-govuk-govuk-skip-link.d.ts +20 -0
  285. package/types/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.d.ts +67 -35
  286. package/types/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.d.ts +80 -47
  287. package/types/hmcts-opal-frontend-common-components-govuk-govuk-table.d.ts +47 -30
  288. package/types/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.d.ts +44 -34
  289. package/types/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.d.ts +19 -17
  290. package/types/hmcts-opal-frontend-common-components-govuk-govuk-tabs.d.ts +44 -36
  291. package/types/hmcts-opal-frontend-common-components-govuk-govuk-tag.d.ts +16 -10
  292. package/types/hmcts-opal-frontend-common-components-govuk-govuk-task-list.d.ts +35 -17
  293. package/types/hmcts-opal-frontend-common-components-govuk-govuk-text-area.d.ts +83 -29
  294. package/types/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.d.ts +74 -28
  295. package/types/hmcts-opal-frontend-common-components-govuk-govuk-text-input.d.ts +65 -23
  296. package/types/hmcts-opal-frontend-common-components-govuk-helpers.d.ts +1 -3
  297. package/types/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.d.ts +18 -12
  298. package/types/hmcts-opal-frontend-common-components-moj-moj-alert.d.ts +89 -69
  299. package/types/hmcts-opal-frontend-common-components-moj-moj-badge.d.ts +16 -10
  300. package/types/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.d.ts +16 -12
  301. package/types/hmcts-opal-frontend-common-components-moj-moj-button-menu.d.ts +32 -26
  302. package/types/hmcts-opal-frontend-common-components-moj-moj-date-picker.d.ts +116 -60
  303. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.d.ts +11 -9
  304. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.d.ts +33 -29
  305. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.d.ts +34 -22
  306. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.d.ts +22 -18
  307. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.d.ts +32 -24
  308. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.d.ts +29 -21
  309. package/types/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.d.ts +5 -8
  310. package/types/hmcts-opal-frontend-common-components-moj-moj-filter.d.ts +23 -17
  311. package/types/hmcts-opal-frontend-common-components-moj-moj-header-interfaces.d.ts +4 -6
  312. package/types/hmcts-opal-frontend-common-components-moj-moj-header.d.ts +25 -23
  313. package/types/hmcts-opal-frontend-common-components-moj-moj-inset-text.d.ts +16 -10
  314. package/types/hmcts-opal-frontend-common-components-moj-moj-notification-badge.d.ts +11 -9
  315. package/types/hmcts-opal-frontend-common-components-moj-moj-page-header.d.ts +11 -9
  316. package/types/hmcts-opal-frontend-common-components-moj-moj-pagination.d.ts +99 -83
  317. package/types/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.d.ts +102 -67
  318. package/types/hmcts-opal-frontend-common-components-moj-moj-sortable-table.d.ts +83 -51
  319. package/types/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.d.ts +62 -42
  320. package/types/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.d.ts +21 -11
  321. package/types/hmcts-opal-frontend-common-components-moj-moj-timeline.d.ts +8 -12
  322. package/types/hmcts-opal-frontend-common-constants.d.ts +20 -25
  323. package/types/hmcts-opal-frontend-common-directives-capitalisation.d.ts +17 -15
  324. package/types/hmcts-opal-frontend-common-directives-govuk-button.d.ts +33 -21
  325. package/types/hmcts-opal-frontend-common-directives-moj-multi-select.d.ts +92 -69
  326. package/types/hmcts-opal-frontend-common-directives-trim-leading-trailing-whitespace.d.ts +13 -11
  327. package/types/hmcts-opal-frontend-common-guards-account.d.ts +2 -5
  328. package/types/hmcts-opal-frontend-common-guards-auth.d.ts +4 -7
  329. package/types/hmcts-opal-frontend-common-guards-business-unit-route-permissions.d.ts +14 -19
  330. package/types/hmcts-opal-frontend-common-guards-can-deactivate-interfaces.d.ts +4 -7
  331. package/types/hmcts-opal-frontend-common-guards-can-deactivate-types.d.ts +3 -6
  332. package/types/hmcts-opal-frontend-common-guards-can-deactivate.d.ts +4 -8
  333. package/types/hmcts-opal-frontend-common-guards-feature-flag.d.ts +4 -7
  334. package/types/hmcts-opal-frontend-common-guards-has-flow-state.d.ts +2 -5
  335. package/types/hmcts-opal-frontend-common-guards-has-url-state-match.d.ts +2 -5
  336. package/types/hmcts-opal-frontend-common-guards-helpers.d.ts +8 -15
  337. package/types/hmcts-opal-frontend-common-guards-route-permissions.d.ts +2 -5
  338. package/types/hmcts-opal-frontend-common-guards-signed-in.d.ts +2 -5
  339. package/types/hmcts-opal-frontend-common-guards-types.d.ts +2 -5
  340. package/types/hmcts-opal-frontend-common-interceptors-content-digest.d.ts +2 -5
  341. package/types/hmcts-opal-frontend-common-interceptors-http-error-constants.d.ts +4 -9
  342. package/types/hmcts-opal-frontend-common-interceptors-http-error-interfaces.d.ts +9 -11
  343. package/types/hmcts-opal-frontend-common-interceptors-http-error.d.ts +2 -5
  344. package/types/hmcts-opal-frontend-common-interceptors-http-retry-constants.d.ts +5 -11
  345. package/types/hmcts-opal-frontend-common-interceptors-http-retry-interfaces.d.ts +7 -9
  346. package/types/hmcts-opal-frontend-common-interceptors-http-retry.d.ts +9 -15
  347. package/types/hmcts-opal-frontend-common-pages-dashboard-page-interfaces.d.ts +17 -21
  348. package/types/hmcts-opal-frontend-common-pages-dashboard-page.d.ts +89 -96
  349. package/types/hmcts-opal-frontend-common-pages-routing-constants.d.ts +3 -7
  350. package/types/hmcts-opal-frontend-common-pages-routing-interfaces.d.ts +24 -29
  351. package/types/hmcts-opal-frontend-common-pages.d.ts +2 -5
  352. package/types/hmcts-opal-frontend-common-pipes-date-format.d.ts +8 -11
  353. package/types/hmcts-opal-frontend-common-pipes-days-ago.d.ts +7 -10
  354. package/types/hmcts-opal-frontend-common-pipes-monetary.d.ts +8 -11
  355. package/types/hmcts-opal-frontend-common-pipes-national-insurance.d.ts +7 -10
  356. package/types/hmcts-opal-frontend-common-resolvers-title.d.ts +8 -11
  357. package/types/hmcts-opal-frontend-common-services-app-initializer-service.d.ts +37 -41
  358. package/types/hmcts-opal-frontend-common-services-app-insights-service.d.ts +14 -17
  359. package/types/hmcts-opal-frontend-common-services-auth-service-constants.d.ts +2 -5
  360. package/types/hmcts-opal-frontend-common-services-auth-service-interfaces.d.ts +6 -8
  361. package/types/hmcts-opal-frontend-common-services-auth-service.d.ts +8 -12
  362. package/types/hmcts-opal-frontend-common-services-date-service-interfaces.d.ts +7 -9
  363. package/types/hmcts-opal-frontend-common-services-date-service.d.ts +149 -153
  364. package/types/hmcts-opal-frontend-common-services-history-transformation-service.d.ts +104 -125
  365. package/types/hmcts-opal-frontend-common-services-launch-darkly-service-mocks.d.ts +13 -16
  366. package/types/hmcts-opal-frontend-common-services-launch-darkly-service.d.ts +46 -49
  367. package/types/hmcts-opal-frontend-common-services-opal-user-service-interfaces.d.ts +28 -36
  368. package/types/hmcts-opal-frontend-common-services-opal-user-service-mocks.d.ts +4 -9
  369. package/types/hmcts-opal-frontend-common-services-opal-user-service.d.ts +97 -104
  370. package/types/hmcts-opal-frontend-common-services-permissions-service.d.ts +33 -36
  371. package/types/hmcts-opal-frontend-common-services-session-service-constants.d.ts +2 -5
  372. package/types/hmcts-opal-frontend-common-services-session-service-interfaces.d.ts +6 -9
  373. package/types/hmcts-opal-frontend-common-services-session-service-mocks.d.ts +2 -5
  374. package/types/hmcts-opal-frontend-common-services-session-service.d.ts +17 -20
  375. package/types/hmcts-opal-frontend-common-services-sort-service-interfaces.d.ts +9 -13
  376. package/types/hmcts-opal-frontend-common-services-sort-service.d.ts +64 -67
  377. package/types/hmcts-opal-frontend-common-services-transfer-state-service-interfaces.d.ts +20 -26
  378. package/types/hmcts-opal-frontend-common-services-transfer-state-service-mocks.d.ts +11 -17
  379. package/types/hmcts-opal-frontend-common-services-transfer-state-service.d.ts +44 -47
  380. package/types/hmcts-opal-frontend-common-services-transformation-service-constants.d.ts +2 -5
  381. package/types/hmcts-opal-frontend-common-services-transformation-service-interfaces.d.ts +12 -14
  382. package/types/hmcts-opal-frontend-common-services-transformation-service.d.ts +41 -44
  383. package/types/hmcts-opal-frontend-common-services-utils-service.d.ts +119 -114
  384. package/types/hmcts-opal-frontend-common-stores-global-constants.d.ts +2 -5
  385. package/types/hmcts-opal-frontend-common-stores-global-interfaces.d.ts +6 -8
  386. package/types/hmcts-opal-frontend-common-stores-global-types.d.ts +2 -5
  387. package/types/hmcts-opal-frontend-common-stores-global.d.ts +52 -57
  388. package/types/hmcts-opal-frontend-common-types.d.ts +1 -3
  389. package/types/hmcts-opal-frontend-common-validators-amount.d.ts +2 -5
  390. package/types/hmcts-opal-frontend-common-validators-date-after-year.d.ts +2 -5
  391. package/types/hmcts-opal-frontend-common-validators-date-before.d.ts +2 -5
  392. package/types/hmcts-opal-frontend-common-validators-date-of-birth.d.ts +2 -5
  393. package/types/hmcts-opal-frontend-common-validators-future-date.d.ts +2 -5
  394. package/types/hmcts-opal-frontend-common-validators-invalid-value.d.ts +2 -5
  395. package/types/hmcts-opal-frontend-common-validators-national-insurance-number.d.ts +2 -5
  396. package/types/hmcts-opal-frontend-common-validators-non-negative-value.d.ts +2 -5
  397. package/types/hmcts-opal-frontend-common-validators-non-zero-value.d.ts +2 -5
  398. package/types/hmcts-opal-frontend-common-validators-optional-max-length.d.ts +2 -5
  399. package/types/hmcts-opal-frontend-common-validators-optional-valid-date.d.ts +2 -5
  400. package/types/hmcts-opal-frontend-common-validators-optional-valid-telephone.d.ts +2 -5
  401. package/types/hmcts-opal-frontend-common-validators-over-eighteen.d.ts +3 -6
  402. package/types/hmcts-opal-frontend-common-validators-past-date.d.ts +2 -5
  403. package/types/hmcts-opal-frontend-common-validators-pattern-validator.d.ts +2 -5
  404. package/types/hmcts-opal-frontend-common-validators-valid-value.d.ts +2 -5
  405. package/types/hmcts-opal-frontend-common.d.ts +23 -31
  406. package/fesm2022/hmcts-opal-frontend-common-access-denied.component-DeYZkvfj.mjs +0 -21
  407. package/fesm2022/hmcts-opal-frontend-common-account-created.component-DUd7qbuq.mjs +0 -15
  408. package/fesm2022/hmcts-opal-frontend-common-concurrency-failure.component-BfPeI980.mjs +0 -14
  409. package/fesm2022/hmcts-opal-frontend-common-internal-server-error.component-DzHlkMqq.mjs +0 -26
  410. package/fesm2022/hmcts-opal-frontend-common-pages-access-denied.component-DeYZkvfj.mjs +0 -21
  411. package/fesm2022/hmcts-opal-frontend-common-pages-account-created.component-DUd7qbuq.mjs +0 -15
  412. package/fesm2022/hmcts-opal-frontend-common-pages-concurrency-failure.component-BfPeI980.mjs +0 -14
  413. package/fesm2022/hmcts-opal-frontend-common-pages-internal-server-error.component-DzHlkMqq.mjs +0 -26
  414. package/fesm2022/hmcts-opal-frontend-common-pages-permission-denied.component-C28WmjEQ.mjs +0 -14
  415. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in-stub.component-BKGzFqXC.mjs +0 -42
  416. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-DgVojWf0.mjs +0 -28
  417. package/fesm2022/hmcts-opal-frontend-common-permission-denied.component-C28WmjEQ.mjs +0 -14
  418. package/fesm2022/hmcts-opal-frontend-common-sign-in-stub.component-BKGzFqXC.mjs +0 -42
  419. package/fesm2022/hmcts-opal-frontend-common-sign-in.component-BZz2kmre.mjs +0 -28
@@ -1,64 +1,31 @@
1
- import { ActivatedRouteSnapshot, UrlSegment } from '@angular/router';
2
- import { isObservable, firstValueFrom, Observable } from 'rxjs';
3
- import { TestBed } from '@angular/core/testing';
4
-
5
- /**
6
- * Returns a function that invokes the specified guard with a dummy route and state.
7
- * The dummy route and state are created using the provided `urlPath`.
8
- *
9
- * @param guard - The guard function to be invoked.
10
- * @param urlPath - The URL path to be used in the dummy route and state.
11
- * @returns A function that invokes the guard with the dummy route and state.
12
- */
1
+ import { ActivatedRouteSnapshot, UrlSegment } from "@angular/router";
2
+ import { Observable, firstValueFrom, isObservable } from "rxjs";
3
+ import { TestBed } from "@angular/core/testing";
13
4
  function getGuardWithDummyUrl(guard, urlPath) {
14
- const dummyRoute = new ActivatedRouteSnapshot();
15
- dummyRoute.url = [new UrlSegment(urlPath, {})];
16
- const dummyState = {
17
- url: urlPath,
18
- root: new ActivatedRouteSnapshot(),
19
- };
20
- return () => guard(dummyRoute, dummyState);
5
+ const dummyRoute = new ActivatedRouteSnapshot();
6
+ dummyRoute.url = [new UrlSegment(urlPath, {})];
7
+ const dummyState = {
8
+ url: urlPath,
9
+ root: new ActivatedRouteSnapshot()
10
+ };
11
+ return () => guard(dummyRoute, dummyState);
21
12
  }
22
-
23
- /**
24
- * Converts an Observable result to a Promise.
25
- * @param result The Observable result to handle.
26
- * @returns A Promise that resolves with the value of the Observable.
27
- */
28
13
  function handleObservableResult(result) {
29
- return new Promise((resolve) => {
30
- result.subscribe((value) => {
31
- resolve(value);
32
- });
33
- });
14
+ return new Promise((resolve) => {
15
+ result.subscribe((value) => {
16
+ resolve(value);
17
+ });
18
+ });
34
19
  }
35
-
36
- /**
37
- * Converts any valid Angular guard result into a promise so callers can await the final value consistently.
38
- */
39
20
  const resolveGuardResult = (result) => isObservable(result) ? firstValueFrom(result) : Promise.resolve(result);
40
-
41
- /**
42
- * Runs an authentication guard function within the injection context of TestBed.
43
- *
44
- * @param authGuard - The authentication guard function to run.
45
- * @returns A promise that resolves to a boolean or UrlTree indicating whether the user is authenticated.
46
- */
47
21
  async function runAuthGuardWithContext(authGuard) {
48
- const result = TestBed.runInInjectionContext(authGuard);
49
- const authenticated = result instanceof Observable ? await handleObservableResult(result) : result;
50
- return authenticated;
22
+ const result = TestBed.runInInjectionContext(authGuard);
23
+ return result instanceof Observable ? await handleObservableResult(result) : result;
51
24
  }
52
-
53
25
  async function runHasFlowStateGuardWithContext(hasFlowStateGuard) {
54
- const result = TestBed.runInInjectionContext(hasFlowStateGuard);
55
- const emptyFlow = result instanceof Observable ? await handleObservableResult(result) : result;
56
- return emptyFlow;
26
+ const result = TestBed.runInInjectionContext(hasFlowStateGuard);
27
+ return result instanceof Observable ? await handleObservableResult(result) : result;
57
28
  }
58
-
59
- /**
60
- * Generated bundle index. Do not edit.
61
- */
62
-
63
29
  export { getGuardWithDummyUrl, handleObservableResult, resolveGuardResult, runAuthGuardWithContext, runHasFlowStateGuardWithContext };
64
- //# sourceMappingURL=hmcts-opal-frontend-common-guards-helpers.mjs.map
30
+
31
+ //# sourceMappingURL=hmcts-opal-frontend-common-guards-helpers.mjs.map
@@ -1,33 +1,23 @@
1
- import { inject } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { map, catchError, of } from 'rxjs';
4
- import { PermissionsService } from '@hmcts/opal-frontend-common/services/permissions-service';
5
- import { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';
6
- import { OpalUserService } from '@hmcts/opal-frontend-common/services/opal-user-service';
7
-
1
+ import { inject } from "@angular/core";
2
+ import { Router } from "@angular/router";
3
+ import { catchError, map, of } from "rxjs";
4
+ import { PermissionsService } from "@hmcts/opal-frontend-common/services/permissions-service";
5
+ import { PAGES_ROUTING_PATHS } from "@hmcts/opal-frontend-common/pages/routing/constants";
6
+ import { OpalUserService } from "@hmcts/opal-frontend-common/services/opal-user-service";
8
7
  const routePermissionsGuard = (route) => {
9
- const permissionService = inject(PermissionsService);
10
- const opalUserService = inject(OpalUserService);
11
- const router = inject(Router);
12
- return opalUserService.getLoggedInUserState().pipe(map((resp) => {
13
- const routePermissionIds = route.data['routePermissionId'] ?? []; // Ensure it's an array
14
- const accessDeniedPath = route.data['accessDeniedPath'] ?? `/${PAGES_ROUTING_PATHS.children.accessDenied}`; // Default to the provided path
15
- // Get the unique permission IDs for the user
16
- const uniquePermissionIds = permissionService.getUniquePermissions(resp);
17
- // If no permissions are required for the route, or the user has at least one matching permission, allow access
18
- if (routePermissionIds.length === 0 || uniquePermissionIds.some((id) => routePermissionIds.includes(id))) {
19
- return true;
20
- }
21
- // Redirect the user to the access denied page if they lack all required permissions
22
- return router.createUrlTree([`${accessDeniedPath}`]);
23
- }), catchError(() => {
24
- return of(false);
25
- }));
8
+ const permissionService = inject(PermissionsService);
9
+ const opalUserService = inject(OpalUserService);
10
+ const router = inject(Router);
11
+ return opalUserService.getLoggedInUserState().pipe(map((resp) => {
12
+ const routePermissionIds = route.data["routePermissionId"] ?? [];
13
+ const accessDeniedPath = route.data["accessDeniedPath"] ?? `/${PAGES_ROUTING_PATHS.children.accessDenied}`;
14
+ const uniquePermissionIds = permissionService.getUniquePermissions(resp);
15
+ if (routePermissionIds.length === 0 || uniquePermissionIds.some((id) => routePermissionIds.includes(id))) return true;
16
+ return router.createUrlTree([`${accessDeniedPath}`]);
17
+ }), catchError(() => {
18
+ return of(false);
19
+ }));
26
20
  };
27
-
28
- /**
29
- * Generated bundle index. Do not edit.
30
- */
31
-
32
21
  export { routePermissionsGuard };
33
- //# sourceMappingURL=hmcts-opal-frontend-common-guards-route-permissions.mjs.map
22
+
23
+ //# sourceMappingURL=hmcts-opal-frontend-common-guards-route-permissions.mjs.map
@@ -1,27 +1,16 @@
1
- import { inject } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { map, catchError, of } from 'rxjs';
4
- import { AuthService } from '@hmcts/opal-frontend-common/services/auth-service';
5
-
6
- /**
7
- * A guard that checks if the user is signed in.
8
- * If the user is signed in, it redirects to the default route.
9
- * If the user is not signed in, it allows access to the route.
10
- * @returns An Observable<boolean> indicating whether the user is signed in or not.
11
- */
1
+ import { inject } from "@angular/core";
2
+ import { Router } from "@angular/router";
3
+ import { catchError, map, of } from "rxjs";
4
+ import { AuthService } from "@hmcts/opal-frontend-common/services/auth-service";
12
5
  const signedInGuard = () => {
13
- const authService = inject(AuthService);
14
- const router = inject(Router);
15
- return authService.checkAuthenticated().pipe(map(() => {
16
- return router.createUrlTree(['/']);
17
- }), catchError(() => {
18
- return of(true);
19
- }));
6
+ const authService = inject(AuthService);
7
+ const router = inject(Router);
8
+ return authService.checkAuthenticated().pipe(map(() => {
9
+ return router.createUrlTree(["/"]);
10
+ }), catchError(() => {
11
+ return of(true);
12
+ }));
20
13
  };
21
-
22
- /**
23
- * Generated bundle index. Do not edit.
24
- */
25
-
26
14
  export { signedInGuard };
27
- //# sourceMappingURL=hmcts-opal-frontend-common-guards-signed-in.mjs.map
15
+
16
+ //# sourceMappingURL=hmcts-opal-frontend-common-guards-signed-in.mjs.map
@@ -1,4 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- //# sourceMappingURL=hmcts-opal-frontend-common-guards-types.mjs.map
@@ -1,121 +1,73 @@
1
- import { HttpResponse } from '@angular/common/http';
2
- import { of, from } from 'rxjs';
3
- import { map, mergeMap, switchMap } from 'rxjs/operators';
4
-
1
+ import { HttpResponse } from "@angular/common/http";
2
+ import { from, of } from "rxjs";
3
+ import { map, mergeMap, switchMap } from "rxjs/operators";
5
4
  const CONTENT_DIGEST_SHA512_REGEX = /^sha-512=:([A-Z0-9+/]+={0,2}):$/i;
6
-
7
5
  async function sha512Base64(bytes) {
8
- // Use whichever Web Crypto implementation is available (browser or server-side).
9
- const cryptoApi = globalThis.crypto;
10
- if (!cryptoApi?.subtle) {
11
- throw new Error('Web Crypto API is not available.');
12
- }
13
- const data = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
14
- const hash = await cryptoApi.subtle.digest('SHA-512', data);
15
- const hashArray = new Uint8Array(hash);
16
- if (typeof btoa === 'function') {
17
- // Browser path: convert hash bytes to a base64 string.
18
- let binary = '';
19
- for (const value of hashArray) {
20
- binary += String.fromCodePoint(value);
21
- }
22
- return btoa(binary);
23
- }
24
- // Node path: fall back to Buffer for base64 encoding.
25
- const bufferCtor = globalThis
26
- .Buffer;
27
- if (bufferCtor) {
28
- return bufferCtor.from(hashArray).toString('base64');
29
- }
30
- throw new Error('Base64 encoding is not supported in this environment.');
6
+ const cryptoApi = globalThis.crypto;
7
+ if (!cryptoApi?.subtle) throw new Error("Web Crypto API is not available.");
8
+ const data = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
9
+ const hash = await cryptoApi.subtle.digest("SHA-512", data);
10
+ const hashArray = new Uint8Array(hash);
11
+ if (typeof btoa === "function") {
12
+ let binary = "";
13
+ for (const value of hashArray) binary += String.fromCodePoint(value);
14
+ return btoa(binary);
15
+ }
16
+ const bufferCtor = globalThis.Buffer;
17
+ if (bufferCtor) return bufferCtor.from(hashArray).toString("base64");
18
+ throw new Error("Base64 encoding is not supported in this environment.");
31
19
  }
32
20
  function isJsonContentType(ct) {
33
- if (!ct) {
34
- return false;
35
- }
36
- const normalized = ct.toLowerCase();
37
- return normalized.includes('application/json') || normalized.includes('+json');
21
+ if (!ct) return false;
22
+ const normalized = ct.toLowerCase();
23
+ return normalized.includes("application/json") || normalized.includes("+json");
38
24
  }
39
25
  function shouldDigestJsonRequest(req) {
40
- if (!req.body || req.method === 'GET' || req.method === 'HEAD') {
41
- return false;
42
- }
43
- const contentType = req.headers.get('Content-Type');
44
- if (isJsonContentType(contentType)) {
45
- return true;
46
- }
47
- const bodyType = typeof req.body;
48
- // No explicit header: treat plain object-like bodies as JSON payloads.
49
- const isPlainObject = bodyType === 'object' && req.body !== null && !(req.body instanceof FormData) && !(req.body instanceof Blob);
50
- return isPlainObject;
26
+ if (!req.body || req.method === "GET" || req.method === "HEAD") return false;
27
+ if (isJsonContentType(req.headers.get("Content-Type"))) return true;
28
+ return typeof req.body === "object" && req.body !== null && !(req.body instanceof FormData) && !(req.body instanceof Blob);
51
29
  }
52
30
  function validateResponseContentDigest(event) {
53
- if (!(event instanceof HttpResponse)) {
54
- return of(event);
55
- }
56
- const contentType = event.headers.get('Content-Type');
57
- if (!isJsonContentType(contentType)) {
58
- return of(event);
59
- }
60
- const digestHeader = event.headers.get('Content-Digest');
61
- if (!digestHeader) {
62
- return of(event);
63
- }
64
- const expectedDigest = extractSha512Digest(digestHeader);
65
- const normalizedBody = event.body ?? null;
66
- const bodyString = typeof normalizedBody === 'string' ? normalizedBody : JSON.stringify(normalizedBody);
67
- if (typeof bodyString !== 'string') {
68
- throw new TypeError('Unable to serialize JSON response body for digest verification.');
69
- }
70
- const bytes = new TextEncoder().encode(bodyString);
71
- return from(sha512Base64(bytes)).pipe(map((actualDigest) => {
72
- if (actualDigest !== expectedDigest) {
73
- throw new Error('Response content digest mismatch detected.');
74
- }
75
- return event;
76
- }));
31
+ if (!(event instanceof HttpResponse)) return of(event);
32
+ if (!isJsonContentType(event.headers.get("Content-Type"))) return of(event);
33
+ const digestHeader = event.headers.get("Content-Digest");
34
+ if (!digestHeader) return of(event);
35
+ const expectedDigest = extractSha512Digest(digestHeader);
36
+ const normalizedBody = event.body ?? null;
37
+ const bodyString = typeof normalizedBody === "string" ? normalizedBody : JSON.stringify(normalizedBody);
38
+ if (typeof bodyString !== "string") throw new TypeError("Unable to serialize JSON response body for digest verification.");
39
+ const bytes = new TextEncoder().encode(bodyString);
40
+ return from(sha512Base64(bytes)).pipe(map((actualDigest) => {
41
+ if (actualDigest !== expectedDigest) throw new Error("Response content digest mismatch detected.");
42
+ return event;
43
+ }));
77
44
  }
78
45
  function extractSha512Digest(headerValue) {
79
- const candidates = headerValue
80
- .split(',')
81
- .map((value) => value.trim())
82
- .filter(Boolean);
83
- for (const candidate of candidates) {
84
- const match = CONTENT_DIGEST_SHA512_REGEX.exec(candidate);
85
- if (match) {
86
- return match[1];
87
- }
88
- }
89
- throw new Error('Malformed Content-Digest header: missing sha-512 entry.');
46
+ const candidates = headerValue.split(",").map((value) => value.trim()).filter(Boolean);
47
+ for (const candidate of candidates) {
48
+ const match = CONTENT_DIGEST_SHA512_REGEX.exec(candidate);
49
+ if (match) return match[1];
50
+ }
51
+ throw new Error("Malformed Content-Digest header: missing sha-512 entry.");
90
52
  }
91
53
  const contentDigestInterceptor = (req, next) => {
92
- const wantDigestHeader = { 'Want-Content-Digest': 'sha-512' };
93
- const responseValidator = mergeMap((event) => validateResponseContentDigest(event));
94
- if (!shouldDigestJsonRequest(req)) {
95
- // Always request digests from the server even when we skip hashing.
96
- return next(req.clone({ setHeaders: wantDigestHeader })).pipe(responseValidator);
97
- }
98
- const bodyString = typeof req.body === 'string' ? req.body : JSON.stringify(req.body);
99
- const bytes = new TextEncoder().encode(bodyString);
100
- return from(sha512Base64(bytes)).pipe(switchMap((digest) => {
101
- const setHeaders = {
102
- 'Content-Digest': `sha-512=:${digest}:`,
103
- 'Want-Content-Digest': 'sha-512',
104
- };
105
- if (!req.headers.has('Content-Type')) {
106
- setHeaders['Content-Type'] = 'application/json';
107
- }
108
- // Send the serialized body together with the computed digest headers.
109
- return next(req.clone({
110
- setHeaders,
111
- body: bodyString,
112
- })).pipe(responseValidator);
113
- }));
54
+ const wantDigestHeader = { "Want-Content-Digest": "sha-512" };
55
+ const responseValidator = mergeMap((event) => validateResponseContentDigest(event));
56
+ if (!shouldDigestJsonRequest(req)) return next(req.clone({ setHeaders: wantDigestHeader })).pipe(responseValidator);
57
+ const bodyString = typeof req.body === "string" ? req.body : JSON.stringify(req.body);
58
+ const bytes = new TextEncoder().encode(bodyString);
59
+ return from(sha512Base64(bytes)).pipe(switchMap((digest) => {
60
+ const setHeaders = {
61
+ "Content-Digest": `sha-512=:${digest}:`,
62
+ "Want-Content-Digest": "sha-512"
63
+ };
64
+ if (!req.headers.has("Content-Type")) setHeaders["Content-Type"] = "application/json";
65
+ return next(req.clone({
66
+ setHeaders,
67
+ body: bodyString
68
+ })).pipe(responseValidator);
69
+ }));
114
70
  };
115
-
116
- /**
117
- * Generated bundle index. Do not edit.
118
- */
119
-
120
71
  export { contentDigestInterceptor };
121
- //# sourceMappingURL=hmcts-opal-frontend-common-interceptors-content-digest.mjs.map
72
+
73
+ //# sourceMappingURL=hmcts-opal-frontend-common-interceptors-content-digest.mjs.map
@@ -1,20 +1,14 @@
1
1
  const ERROR_RESPONSE = {
2
- type: null,
3
- title: null,
4
- status: null,
5
- detail: null,
6
- instance: null,
7
- operation_id: null,
8
- retriable: null,
2
+ type: null,
3
+ title: null,
4
+ status: null,
5
+ detail: null,
6
+ instance: null,
7
+ operation_id: null,
8
+ retriable: null
9
9
  };
10
-
11
- const GENERIC_HTTP_ERROR_MESSAGE = 'You can try again. If the problem persists, contact the service desk.';
12
-
13
- const GENERIC_HTTP_ERROR_TITLE = 'There was a problem';
14
-
15
- /**
16
- * Generated bundle index. Do not edit.
17
- */
18
-
10
+ const GENERIC_HTTP_ERROR_MESSAGE = "You can try again. If the problem persists, contact the service desk.";
11
+ const GENERIC_HTTP_ERROR_TITLE = "There was a problem";
19
12
  export { ERROR_RESPONSE, GENERIC_HTTP_ERROR_MESSAGE, GENERIC_HTTP_ERROR_TITLE };
20
- //# sourceMappingURL=hmcts-opal-frontend-common-interceptors-http-error-constants.mjs.map
13
+
14
+ //# sourceMappingURL=hmcts-opal-frontend-common-interceptors-http-error-constants.mjs.map
@@ -1,4 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- //# sourceMappingURL=hmcts-opal-frontend-common-interceptors-http-error-interfaces.mjs.map