@hmcts/opal-frontend-common 0.0.6 → 0.0.8

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 (93) hide show
  1. package/README.md +152 -11
  2. package/components/govuk/helpers/add-gds-body-class.d.ts +4 -0
  3. package/components/govuk/helpers/index.d.ts +5 -0
  4. package/components/govuk/helpers/public-api.d.ts +1 -0
  5. package/directives/capitalisation/capitalisation.directive.d.ts +14 -0
  6. package/directives/capitalisation/index.d.ts +5 -0
  7. package/directives/capitalisation/public-api.d.ts +1 -0
  8. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
  9. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +4 -4
  10. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +1 -1
  11. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs +2 -2
  12. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-parent-base.mjs.map +1 -1
  13. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
  14. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +3 -3
  15. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
  16. package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
  17. package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
  18. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
  19. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
  20. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
  21. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
  22. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
  23. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
  24. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
  25. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
  26. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
  27. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
  28. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
  29. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
  30. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
  31. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
  32. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
  33. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
  34. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
  35. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
  36. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
  37. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
  38. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +9 -9
  39. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
  40. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
  41. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
  42. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
  43. package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
  44. package/fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs +19 -0
  45. package/fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs.map +1 -0
  46. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
  47. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-banner.mjs +3 -3
  48. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +6 -6
  49. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +5 -3
  50. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +1 -1
  51. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
  52. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
  53. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
  54. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +12 -12
  55. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
  56. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +15 -15
  57. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
  58. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
  59. package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
  60. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +40 -0
  61. package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +1 -0
  62. package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs +18 -7
  63. package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs.map +1 -1
  64. package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs +2 -1
  65. package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs.map +1 -1
  66. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-npDHlv8C.mjs → hmcts-opal-frontend-common-pages-access-denied.component-lAGLpY0c.mjs} +4 -4
  67. package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-npDHlv8C.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-lAGLpY0c.mjs.map} +1 -1
  68. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-EPZmMG9z.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs} +4 -4
  69. package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-EPZmMG9z.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs.map} +1 -1
  70. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-CtniiG6-.mjs +28 -0
  71. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-CtniiG6-.mjs.map +1 -0
  72. package/fesm2022/hmcts-opal-frontend-common-pages.mjs +2 -2
  73. package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
  74. package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
  75. package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
  76. package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
  77. package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
  78. package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
  79. package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
  80. package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
  81. package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +3 -3
  82. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +9 -11
  83. package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +1 -1
  84. package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
  85. package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
  86. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
  87. package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
  88. package/guards/auth/auth.guard.d.ts +2 -4
  89. package/package.json +12 -1
  90. package/pages/sign-in/sign-in.component.d.ts +1 -8
  91. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-Dp6-CUf9.mjs +0 -60
  92. package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-Dp6-CUf9.mjs.map +0 -1
  93. package/pages/sign-in/sign-in-sso/sign-in-sso.component.d.ts +0 -11
@@ -1,20 +1,31 @@
1
1
  import { Router } from '@angular/router';
2
- import { inject } from '@angular/core';
2
+ import { InjectionToken, inject } from '@angular/core';
3
3
  import { map, catchError, of } from 'rxjs';
4
4
  import { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';
5
5
  import { AuthService } from '@hmcts/opal-frontend-common/services/auth-service';
6
+ import { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';
7
+ import { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';
6
8
 
7
- /**
8
- * A guard that checks if the user is authenticated before allowing access to a route.
9
- * @returns An Observable that emits a boolean value indicating whether the user is authenticated.
10
- */
9
+ const REDIRECT_TO_SSO = new InjectionToken('redirectToSsoLogin', {
10
+ providedIn: 'root',
11
+ factory: () => () => {
12
+ window.location.href = SSO_ENDPOINTS.login;
13
+ },
14
+ });
11
15
  const authGuard = () => {
12
16
  const authService = inject(AuthService);
17
+ const globalStore = inject(GlobalStore);
13
18
  const router = inject(Router);
19
+ const redirectToSsoLogin = inject(REDIRECT_TO_SSO);
14
20
  return authService.checkAuthenticated().pipe(map((resp) => {
15
21
  return resp;
16
22
  }), catchError(() => {
17
- router.navigate([PAGES_ROUTING_PATHS.children.signIn]);
23
+ if (globalStore.ssoEnabled()) {
24
+ redirectToSsoLogin();
25
+ }
26
+ else {
27
+ router.navigate([PAGES_ROUTING_PATHS.children.signIn]);
28
+ }
18
29
  return of(false);
19
30
  }));
20
31
  };
@@ -23,5 +34,5 @@ const authGuard = () => {
23
34
  * Generated bundle index. Do not edit.
24
35
  */
25
36
 
26
- export { authGuard };
37
+ export { REDIRECT_TO_SSO, authGuard };
27
38
  //# sourceMappingURL=hmcts-opal-frontend-common-guards-auth.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-guards-auth.mjs","sources":["../../../projects/opal-frontend-common/guards/auth/auth.guard.ts","../../../projects/opal-frontend-common/guards/auth/hmcts-opal-frontend-common-guards-auth.ts"],"sourcesContent":["import { CanActivateFn, Router } from '@angular/router';\nimport { inject } from '@angular/core';\nimport { map, catchError, of } from 'rxjs';\nimport { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';\nimport { AuthService } from '@hmcts/opal-frontend-common/services/auth-service';\n\n/**\n * A guard that checks if the user is authenticated before allowing access to a route.\n * @returns An Observable that emits a boolean value indicating whether the user is authenticated.\n */\nexport const authGuard: CanActivateFn = () => {\n const authService: AuthService = inject(AuthService);\n const router = inject(Router);\n\n return authService.checkAuthenticated().pipe(\n map((resp) => {\n return resp;\n }),\n catchError(() => {\n router.navigate([PAGES_ROUTING_PATHS.children.signIn]);\n return of(false);\n }),\n );\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAMA;;;AAGG;AACI,MAAM,SAAS,GAAkB,MAAK;AAC3C,IAAA,MAAM,WAAW,GAAgB,MAAM,CAAC,WAAW,CAAC;AACpD,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE7B,IAAA,OAAO,WAAW,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAC1C,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,QAAA,OAAO,IAAI;AACb,KAAC,CAAC,EACF,UAAU,CAAC,MAAK;QACd,MAAM,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACtD,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC,CACH;AACH;;ACvBA;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-guards-auth.mjs","sources":["../../../projects/opal-frontend-common/guards/auth/auth.guard.ts","../../../projects/opal-frontend-common/guards/auth/hmcts-opal-frontend-common-guards-auth.ts"],"sourcesContent":["import { CanActivateFn, Router } from '@angular/router';\nimport { inject, InjectionToken } from '@angular/core';\nimport { map, catchError, of } from 'rxjs';\nimport { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';\nimport { AuthService } from '@hmcts/opal-frontend-common/services/auth-service';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { GlobalStoreType } from '@hmcts/opal-frontend-common/stores/global/types';\nimport { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';\n\nexport const REDIRECT_TO_SSO = new InjectionToken<() => void>('redirectToSsoLogin', {\n providedIn: 'root',\n factory: () => () => {\n window.location.href = SSO_ENDPOINTS.login;\n },\n});\n\nexport const authGuard: CanActivateFn = () => {\n const authService: AuthService = inject(AuthService);\n const globalStore: GlobalStoreType = inject(GlobalStore);\n const router = inject(Router);\n const redirectToSsoLogin = inject(REDIRECT_TO_SSO);\n\n return authService.checkAuthenticated().pipe(\n map((resp) => {\n return resp;\n }),\n catchError(() => {\n if (globalStore.ssoEnabled()) {\n redirectToSsoLogin();\n } else {\n router.navigate([PAGES_ROUTING_PATHS.children.signIn]);\n }\n return of(false);\n }),\n );\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MASa,eAAe,GAAG,IAAI,cAAc,CAAa,oBAAoB,EAAE;AAClF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,MAAK;QAClB,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK;KAC3C;AACF,CAAA;AAEM,MAAM,SAAS,GAAkB,MAAK;AAC3C,IAAA,MAAM,WAAW,GAAgB,MAAM,CAAC,WAAW,CAAC;AACpD,IAAA,MAAM,WAAW,GAAoB,MAAM,CAAC,WAAW,CAAC;AACxD,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7B,IAAA,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC;AAElD,IAAA,OAAO,WAAW,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAC1C,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,QAAA,OAAO,IAAI;AACb,KAAC,CAAC,EACF,UAAU,CAAC,MAAK;AACd,QAAA,IAAI,WAAW,CAAC,UAAU,EAAE,EAAE;AAC5B,YAAA,kBAAkB,EAAE;;aACf;YACL,MAAM,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;;AAExD,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC,CACH;AACH;;ACnCA;;AAEG;;;;"}
@@ -11,6 +11,7 @@ const routePermissionsGuard = (route) => {
11
11
  const router = inject(Router);
12
12
  return sessionService.getUserState().pipe(map((resp) => {
13
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
14
15
  // Get the unique permission IDs for the user
15
16
  const uniquePermissionIds = permissionService.getUniquePermissions(resp);
16
17
  // If no permissions are required for the route, or the user has at least one matching permission, allow access
@@ -18,7 +19,7 @@ const routePermissionsGuard = (route) => {
18
19
  return true;
19
20
  }
20
21
  // Redirect the user to the access denied page if they lack all required permissions
21
- return router.createUrlTree([`/${PAGES_ROUTING_PATHS.children.accessDenied}`]);
22
+ return router.createUrlTree([`${accessDeniedPath}`]);
22
23
  }), catchError(() => {
23
24
  return of(false);
24
25
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-guards-route-permissions.mjs","sources":["../../../projects/opal-frontend-common/guards/route-permissions/route-permissions.guard.ts","../../../projects/opal-frontend-common/guards/route-permissions/hmcts-opal-frontend-common-guards-route-permissions.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';\nimport { catchError, map, of } from 'rxjs';\nimport { PermissionsService } from '@hmcts/opal-frontend-common/services/permissions-service';\nimport { SessionService } from '@hmcts/opal-frontend-common/services/session-service';\nimport { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';\n\nexport const routePermissionsGuard: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n const permissionService = inject(PermissionsService);\n const sessionService = inject(SessionService);\n const router = inject(Router);\n\n return sessionService.getUserState().pipe(\n map((resp) => {\n const routePermissionIds: number[] = route.data['routePermissionId'] ?? []; // Ensure it's an array\n\n // Get the unique permission IDs for the user\n const uniquePermissionIds = permissionService.getUniquePermissions(resp);\n\n // If no permissions are required for the route, or the user has at least one matching permission, allow access\n if (routePermissionIds.length === 0 || uniquePermissionIds.some((id) => routePermissionIds.includes(id))) {\n return true;\n }\n\n // Redirect the user to the access denied page if they lack all required permissions\n return router.createUrlTree([`/${PAGES_ROUTING_PATHS.children.accessDenied}`]);\n }),\n catchError(() => {\n return of(false);\n }),\n );\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAOa,MAAA,qBAAqB,GAAkB,CAAC,KAA6B,KAAI;AACpF,IAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACpD,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE7B,IAAA,OAAO,cAAc,CAAC,YAAY,EAAE,CAAC,IAAI,CACvC,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,QAAA,MAAM,kBAAkB,GAAa,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;;QAG3E,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC;;QAGxE,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE;AACxG,YAAA,OAAO,IAAI;;;AAIb,QAAA,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAAI,CAAA,EAAA,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAE,CAAA,CAAC,CAAC;AAChF,KAAC,CAAC,EACF,UAAU,CAAC,MAAK;AACd,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC,CACH;AACH;;AC/BA;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-guards-route-permissions.mjs","sources":["../../../projects/opal-frontend-common/guards/route-permissions/route-permissions.guard.ts","../../../projects/opal-frontend-common/guards/route-permissions/hmcts-opal-frontend-common-guards-route-permissions.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';\nimport { catchError, map, of } from 'rxjs';\nimport { PermissionsService } from '@hmcts/opal-frontend-common/services/permissions-service';\nimport { SessionService } from '@hmcts/opal-frontend-common/services/session-service';\nimport { PAGES_ROUTING_PATHS } from '@hmcts/opal-frontend-common/pages/routing/constants';\n\nexport const routePermissionsGuard: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n const permissionService = inject(PermissionsService);\n const sessionService = inject(SessionService);\n const router = inject(Router);\n\n return sessionService.getUserState().pipe(\n map((resp) => {\n const routePermissionIds: number[] = route.data['routePermissionId'] ?? []; // Ensure it's an array\n const accessDeniedPath = route.data['accessDeniedPath'] ?? `/${PAGES_ROUTING_PATHS.children.accessDenied}`; // Default to the provided path\n\n // Get the unique permission IDs for the user\n const uniquePermissionIds = permissionService.getUniquePermissions(resp);\n\n // If no permissions are required for the route, or the user has at least one matching permission, allow access\n if (routePermissionIds.length === 0 || uniquePermissionIds.some((id) => routePermissionIds.includes(id))) {\n return true;\n }\n\n // Redirect the user to the access denied page if they lack all required permissions\n return router.createUrlTree([`${accessDeniedPath}`]);\n }),\n catchError(() => {\n return of(false);\n }),\n );\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAOa,MAAA,qBAAqB,GAAkB,CAAC,KAA6B,KAAI;AACpF,IAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACpD,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE7B,IAAA,OAAO,cAAc,CAAC,YAAY,EAAE,CAAC,IAAI,CACvC,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,QAAA,MAAM,kBAAkB,GAAa,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;AAC3E,QAAA,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAI,CAAA,EAAA,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAE,CAAA,CAAC;;QAG3G,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC;;QAGxE,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE;AACxG,YAAA,OAAO,IAAI;;;QAIb,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,gBAAgB,CAAA,CAAE,CAAC,CAAC;AACtD,KAAC,CAAC,EACF,UAAU,CAAC,MAAK;AACd,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC,CACH;AACH;;AChCA;;AAEG;;;;"}
@@ -9,13 +9,13 @@ class AccessDeniedComponent {
9
9
  // For now, test page will act as our 'Dashboard' page
10
10
  this.router.navigate(['/']);
11
11
  }
12
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AccessDeniedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: AccessDeniedComponent, isStandalone: true, selector: "opal-lib-access-denied", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: GovukButtonComponent, selector: "opal-lib-govuk-button", inputs: ["buttonId", "type", "buttonClasses"], outputs: ["buttonClickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AccessDeniedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: AccessDeniedComponent, isStandalone: true, selector: "opal-lib-access-denied", ngImport: i0, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: GovukButtonComponent, selector: "opal-lib-govuk-button", inputs: ["buttonId", "type", "buttonClasses"], outputs: ["buttonClickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14
14
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AccessDeniedComponent, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AccessDeniedComponent, decorators: [{
16
16
  type: Component,
17
17
  args: [{ selector: 'opal-lib-access-denied', imports: [GovukButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n" }]
18
18
  }] });
19
19
 
20
20
  export { AccessDeniedComponent };
21
- //# sourceMappingURL=hmcts-opal-frontend-common-pages-access-denied.component-npDHlv8C.mjs.map
21
+ //# sourceMappingURL=hmcts-opal-frontend-common-pages-access-denied.component-lAGLpY0c.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-pages-access-denied.component-npDHlv8C.mjs","sources":["../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.ts","../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { GovukButtonComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-button';\n\n@Component({\n selector: 'opal-lib-access-denied',\n imports: [GovukButtonComponent],\n templateUrl: './access-denied.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccessDeniedComponent {\n private readonly router = inject(Router);\n\n public handleGoBackButtonClick(): void {\n // For now, test page will act as our 'Dashboard' page\n this.router.navigate(['/']);\n }\n}\n","<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;MAUa,qBAAqB,CAAA;AACf,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjC,uBAAuB,GAAA;;QAE5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;;uGALlB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVlC,ihBAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDTY,oBAAoB,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAInB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,WACzB,CAAC,oBAAoB,CAAC,EAEd,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ihBAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-pages-access-denied.component-lAGLpY0c.mjs","sources":["../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.ts","../../../projects/opal-frontend-common/pages/access-denied/access-denied.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { GovukButtonComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-button';\n\n@Component({\n selector: 'opal-lib-access-denied',\n imports: [GovukButtonComponent],\n templateUrl: './access-denied.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccessDeniedComponent {\n private readonly router = inject(Router);\n\n public handleGoBackButtonClick(): void {\n // For now, test page will act as our 'Dashboard' page\n this.router.navigate(['/']);\n }\n}\n","<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">Access Denied</h1>\n <p class=\"govuk-body\">You do not have the appropriate permissions to access this page.</p>\n <p class=\"govuk-body\">\n <opal-lib-govuk-button\n buttonClasses=\"govuk-button--secondary\"\n buttonId=\"go-back\"\n (buttonClickEvent)=\"handleGoBackButtonClick()\"\n >\n Back to dashboard</opal-lib-govuk-button\n >\n </p>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;MAUa,qBAAqB,CAAA;AACf,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjC,uBAAuB,GAAA;;QAE5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;;uGALlB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVlC,ihBAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDTY,oBAAoB,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAInB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,WACzB,CAAC,oBAAoB,CAAC,EAEd,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ihBAAA,EAAA;;;;;"}
@@ -28,10 +28,10 @@ class SignInStubComponent {
28
28
  ngOnInit() {
29
29
  this.setupSignInForm();
30
30
  }
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SignInStubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SignInStubComponent, isStandalone: true, selector: "opal-lib-sign-in-stub", outputs: { signInFormSubmit: "signInFormSubmit" }, ngImport: i0, template: "<form (submit)=\"handleFormSubmit()\">\n <div class=\"govuk-grid-column-two-thirds\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 class=\"govuk-fieldset__heading\">Sign in</h1>\n </legend>\n\n <div [formGroup]=\"signInForm\">\n <opal-lib-govuk-text-input\n labelText=\"Email\"\n inputId=\"email\"\n inputName=\"email\"\n inputClasses=\"govuk-!-width-one-half\"\n [control]=\"signInForm.controls['email']\"\n ></opal-lib-govuk-text-input>\n </div>\n </fieldset>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-third\">\n <opal-lib-govuk-button buttonId=\"submitForm\" type=\"submit\"> Sign in</opal-lib-govuk-button>\n </div>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: GovukTextInputComponent, selector: "opal-lib-govuk-text-input", inputs: ["labelText", "labelClasses", "inputId", "inputName", "inputClasses", "hintText", "hintHtml", "errors", "control"] }, { kind: "component", type: GovukButtonComponent, selector: "opal-lib-govuk-button", inputs: ["buttonId", "type", "buttonClasses"], outputs: ["buttonClickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SignInStubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: SignInStubComponent, isStandalone: true, selector: "opal-lib-sign-in-stub", outputs: { signInFormSubmit: "signInFormSubmit" }, ngImport: i0, template: "<form (submit)=\"handleFormSubmit()\">\n <div class=\"govuk-grid-column-two-thirds\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 class=\"govuk-fieldset__heading\">Sign in</h1>\n </legend>\n\n <div [formGroup]=\"signInForm\">\n <opal-lib-govuk-text-input\n labelText=\"Email\"\n inputId=\"email\"\n inputName=\"email\"\n inputClasses=\"govuk-!-width-one-half\"\n [control]=\"signInForm.controls['email']\"\n ></opal-lib-govuk-text-input>\n </div>\n </fieldset>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-third\">\n <opal-lib-govuk-button buttonId=\"submitForm\" type=\"submit\"> Sign in</opal-lib-govuk-button>\n </div>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: GovukTextInputComponent, selector: "opal-lib-govuk-text-input", inputs: ["labelText", "labelClasses", "inputId", "inputName", "inputClasses", "hintText", "hintHtml", "errors", "control"] }, { kind: "component", type: GovukButtonComponent, selector: "opal-lib-govuk-button", inputs: ["buttonId", "type", "buttonClasses"], outputs: ["buttonClickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
33
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SignInStubComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SignInStubComponent, decorators: [{
35
35
  type: Component,
36
36
  args: [{ selector: 'opal-lib-sign-in-stub', imports: [FormsModule, ReactiveFormsModule, GovukTextInputComponent, GovukButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form (submit)=\"handleFormSubmit()\">\n <div class=\"govuk-grid-column-two-thirds\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 class=\"govuk-fieldset__heading\">Sign in</h1>\n </legend>\n\n <div [formGroup]=\"signInForm\">\n <opal-lib-govuk-text-input\n labelText=\"Email\"\n inputId=\"email\"\n inputName=\"email\"\n inputClasses=\"govuk-!-width-one-half\"\n [control]=\"signInForm.controls['email']\"\n ></opal-lib-govuk-text-input>\n </div>\n </fieldset>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-third\">\n <opal-lib-govuk-button buttonId=\"submitForm\" type=\"submit\"> Sign in</opal-lib-govuk-button>\n </div>\n </div>\n </div>\n</form>\n" }]
37
37
  }], propDecorators: { signInFormSubmit: [{
@@ -39,4 +39,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
39
39
  }] } });
40
40
 
41
41
  export { SignInStubComponent };
42
- //# sourceMappingURL=hmcts-opal-frontend-common-pages-sign-in-stub.component-EPZmMG9z.mjs.map
42
+ //# sourceMappingURL=hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-pages-sign-in-stub.component-EPZmMG9z.mjs","sources":["../../../projects/opal-frontend-common/pages/sign-in/sign-in-stub/sign-in-stub.component.ts","../../../projects/opal-frontend-common/pages/sign-in/sign-in-stub/sign-in-stub.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { ISignInStubForm } from '../interfaces';\nimport { GovukTextInputComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-text-input';\nimport { GovukButtonComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-button';\n\n@Component({\n selector: 'opal-lib-sign-in-stub',\n imports: [FormsModule, ReactiveFormsModule, GovukTextInputComponent, GovukButtonComponent],\n templateUrl: './sign-in-stub.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SignInStubComponent implements OnInit {\n public signInForm!: FormGroup;\n @Output() private readonly signInFormSubmit = new EventEmitter<ISignInStubForm>();\n\n /**\n * Sets up the sign-in form.\n */\n private setupSignInForm(): void {\n this.signInForm = new FormGroup({\n email: new FormControl(null, [Validators.required]),\n });\n }\n\n /**\n * Handles the form submission.\n * If the signInForm is valid, emits the signInForm value using the signInFormSubmit event.\n */\n public handleFormSubmit(): void {\n if (this.signInForm.valid) {\n this.signInFormSubmit.emit(this.signInForm.value);\n }\n }\n\n public ngOnInit(): void {\n this.setupSignInForm();\n }\n}\n","<form (submit)=\"handleFormSubmit()\">\n <div class=\"govuk-grid-column-two-thirds\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 class=\"govuk-fieldset__heading\">Sign in</h1>\n </legend>\n\n <div [formGroup]=\"signInForm\">\n <opal-lib-govuk-text-input\n labelText=\"Email\"\n inputId=\"email\"\n inputName=\"email\"\n inputClasses=\"govuk-!-width-one-half\"\n [control]=\"signInForm.controls['email']\"\n ></opal-lib-govuk-text-input>\n </div>\n </fieldset>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-third\">\n <opal-lib-govuk-button buttonId=\"submitForm\" type=\"submit\"> Sign in</opal-lib-govuk-button>\n </div>\n </div>\n </div>\n</form>\n"],"names":[],"mappings":";;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,UAAU;AACU,IAAA,gBAAgB,GAAG,IAAI,YAAY,EAAmB;AAEjF;;AAEG;IACK,eAAe,GAAA;AACrB,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,SAAS,CAAC;YAC9B,KAAK,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACpD,SAAA,CAAC;;AAGJ;;;AAGG;IACI,gBAAgB,GAAA;AACrB,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;YACzB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;;IAI9C,QAAQ,GAAA;QACb,IAAI,CAAC,eAAe,EAAE;;uGAxBb,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZhC,g2BAwBA,EDhBY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,WAAW,udAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,uBAAuB,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,cAAA,EAAA,SAAA,EAAA,WAAA,EAAA,cAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAI9E,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EACxB,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,oBAAoB,CAAC,EAEzE,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g2BAAA,EAAA;8BAIpB,gBAAgB,EAAA,CAAA;sBAA1C;;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs","sources":["../../../projects/opal-frontend-common/pages/sign-in/sign-in-stub/sign-in-stub.component.ts","../../../projects/opal-frontend-common/pages/sign-in/sign-in-stub/sign-in-stub.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { ISignInStubForm } from '../interfaces';\nimport { GovukTextInputComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-text-input';\nimport { GovukButtonComponent } from '@hmcts/opal-frontend-common/components/govuk/govuk-button';\n\n@Component({\n selector: 'opal-lib-sign-in-stub',\n imports: [FormsModule, ReactiveFormsModule, GovukTextInputComponent, GovukButtonComponent],\n templateUrl: './sign-in-stub.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SignInStubComponent implements OnInit {\n public signInForm!: FormGroup;\n @Output() private readonly signInFormSubmit = new EventEmitter<ISignInStubForm>();\n\n /**\n * Sets up the sign-in form.\n */\n private setupSignInForm(): void {\n this.signInForm = new FormGroup({\n email: new FormControl(null, [Validators.required]),\n });\n }\n\n /**\n * Handles the form submission.\n * If the signInForm is valid, emits the signInForm value using the signInFormSubmit event.\n */\n public handleFormSubmit(): void {\n if (this.signInForm.valid) {\n this.signInFormSubmit.emit(this.signInForm.value);\n }\n }\n\n public ngOnInit(): void {\n this.setupSignInForm();\n }\n}\n","<form (submit)=\"handleFormSubmit()\">\n <div class=\"govuk-grid-column-two-thirds\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 class=\"govuk-fieldset__heading\">Sign in</h1>\n </legend>\n\n <div [formGroup]=\"signInForm\">\n <opal-lib-govuk-text-input\n labelText=\"Email\"\n inputId=\"email\"\n inputName=\"email\"\n inputClasses=\"govuk-!-width-one-half\"\n [control]=\"signInForm.controls['email']\"\n ></opal-lib-govuk-text-input>\n </div>\n </fieldset>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-third\">\n <opal-lib-govuk-button buttonId=\"submitForm\" type=\"submit\"> Sign in</opal-lib-govuk-button>\n </div>\n </div>\n </div>\n</form>\n"],"names":[],"mappings":";;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,UAAU;AACU,IAAA,gBAAgB,GAAG,IAAI,YAAY,EAAmB;AAEjF;;AAEG;IACK,eAAe,GAAA;AACrB,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,SAAS,CAAC;YAC9B,KAAK,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACpD,SAAA,CAAC;;AAGJ;;;AAGG;IACI,gBAAgB,GAAA;AACrB,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;YACzB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;;IAI9C,QAAQ,GAAA;QACb,IAAI,CAAC,eAAe,EAAE;;uGAxBb,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZhC,g2BAwBA,EDhBY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,WAAW,udAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,uBAAuB,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,cAAA,EAAA,SAAA,EAAA,WAAA,EAAA,cAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAI9E,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EACxB,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,oBAAoB,CAAC,EAEzE,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g2BAAA,EAAA;8BAIpB,gBAAgB,EAAA,CAAA;sBAA1C;;;;;"}
@@ -0,0 +1,28 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { DOCUMENT, CommonModule } from '@angular/common';
4
+ import { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';
5
+ import { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';
6
+
7
+ class SignInComponent {
8
+ globalStore = inject(GlobalStore);
9
+ ssoEnabled = true;
10
+ document = inject(DOCUMENT);
11
+ /**
12
+ * Handles the submission of the stub sign-in form.
13
+ * Redirects the user to the SSO login page with the provided email.
14
+ * @param formData - The form data containing the email.
15
+ */
16
+ handleStubSignInFormSubmit(formData) {
17
+ this.document.location.href = `${SSO_ENDPOINTS.login}?email=${formData.email}`;
18
+ }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: SignInComponent, isStandalone: true, selector: "opal-lib-sign-in", ngImport: i0, template: "@defer (when !globalStore.ssoEnabled()) {\n <opal-lib-sign-in-stub (signInFormSubmit)=\"handleStubSignInFormSubmit($event)\"></opal-lib-sign-in-stub>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs').then(m => m.SignInStubComponent)]] });
21
+ }
22
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.7", ngImport: i0, type: SignInComponent, resolveDeferredDeps: () => [import('./hmcts-opal-frontend-common-pages-sign-in-stub.component-N-tkNkj6.mjs').then(m => m.SignInStubComponent)], resolveMetadata: SignInStubComponent => ({ decorators: [{
23
+ type: Component,
24
+ args: [{ selector: 'opal-lib-sign-in', imports: [CommonModule, SignInStubComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@defer (when !globalStore.ssoEnabled()) {\n <opal-lib-sign-in-stub (signInFormSubmit)=\"handleStubSignInFormSubmit($event)\"></opal-lib-sign-in-stub>\n}\n" }]
25
+ }], ctorParameters: null, propDecorators: null }) });
26
+
27
+ export { SignInComponent };
28
+ //# sourceMappingURL=hmcts-opal-frontend-common-pages-sign-in.component-CtniiG6-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-pages-sign-in.component-CtniiG6-.mjs","sources":["../../../projects/opal-frontend-common/pages/sign-in/sign-in.component.ts","../../../projects/opal-frontend-common/pages/sign-in/sign-in.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { CommonModule, DOCUMENT } from '@angular/common';\nimport { SignInStubComponent } from './sign-in-stub/sign-in-stub.component';\nimport { ISignInStubForm } from './interfaces';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';\n\n@Component({\n selector: 'opal-lib-sign-in',\n imports: [CommonModule, SignInStubComponent],\n templateUrl: './sign-in.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SignInComponent {\n public readonly globalStore = inject(GlobalStore);\n public ssoEnabled: boolean | null = true;\n private readonly document = inject(DOCUMENT);\n\n /**\n * Handles the submission of the stub sign-in form.\n * Redirects the user to the SSO login page with the provided email.\n * @param formData - The form data containing the email.\n */\n public handleStubSignInFormSubmit(formData: ISignInStubForm): void {\n this.document.location.href = `${SSO_ENDPOINTS.login}?email=${formData.email}`;\n }\n}\n","@defer (when !globalStore.ssoEnabled()) {\n <opal-lib-sign-in-stub (signInFormSubmit)=\"handleStubSignInFormSubmit($event)\"></opal-lib-sign-in-stub>\n}\n"],"names":[],"mappings":";;;;;;MAaa,eAAe,CAAA;AACV,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC1C,UAAU,GAAmB,IAAI;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAE5C;;;;AAIG;AACI,IAAA,0BAA0B,CAAC,QAAyB,EAAA;AACzD,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAA,EAAG,aAAa,CAAC,KAAK,CAAU,OAAA,EAAA,QAAQ,CAAC,KAAK,EAAE;;uGAXrE,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECb5B,6JAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDMY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CAAA,OAAA,wEAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;gGAIX,eAAe,EAAA,mBAAA,EAAA,MAAA,CAAA,OAAA,wEAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,EAAA,eAAA,EAAA,mBAAA,KAAA,EAAA,UAAA,EAAA,CAAA;sBAN3B,SAAS;mCACE,kBAAkB,EAAA,OAAA,EACnB,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAE3B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6JAAA,EAAA;;;;;"}
@@ -8,14 +8,14 @@ const routing = [
8
8
  { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
9
9
  {
10
10
  path: PAGES_ROUTING_PATHS.children.accessDenied,
11
- loadComponent: () => import('./hmcts-opal-frontend-common-pages-access-denied.component-npDHlv8C.mjs').then((c) => c.AccessDeniedComponent),
11
+ loadComponent: () => import('./hmcts-opal-frontend-common-pages-access-denied.component-lAGLpY0c.mjs').then((c) => c.AccessDeniedComponent),
12
12
  canActivate: [authGuard],
13
13
  data: { title: PAGES_ROUTING_TITLES.children.accessDenied },
14
14
  resolve: { userState: userStateResolver, title: TitleResolver },
15
15
  },
16
16
  {
17
17
  path: PAGES_ROUTING_PATHS.children.signIn,
18
- loadComponent: () => import('./hmcts-opal-frontend-common-pages-sign-in.component-Dp6-CUf9.mjs').then((c) => c.SignInComponent),
18
+ loadComponent: () => import('./hmcts-opal-frontend-common-pages-sign-in.component-CtniiG6-.mjs').then((c) => c.SignInComponent),
19
19
  canActivate: [signedInGuard],
20
20
  data: { title: PAGES_ROUTING_TITLES.children.signIn },
21
21
  resolve: { title: TitleResolver },
@@ -13,10 +13,10 @@ class DateFormatPipe {
13
13
  const formatted = this.dateService.getFromFormatToFormat(value, inputFormat, outputFormat);
14
14
  return formatted;
15
15
  }
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateFormatPipe, deps: [{ token: i1.DateService }], target: i0.ɵɵFactoryTarget.Pipe });
17
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: DateFormatPipe, isStandalone: true, name: "dateFormat" });
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DateFormatPipe, deps: [{ token: i1.DateService }], target: i0.ɵɵFactoryTarget.Pipe });
17
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.7", ngImport: i0, type: DateFormatPipe, isStandalone: true, name: "dateFormat" });
18
18
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateFormatPipe, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DateFormatPipe, decorators: [{
20
20
  type: Pipe,
21
21
  args: [{
22
22
  name: 'dateFormat',
@@ -22,10 +22,10 @@ class DaysAgoPipe {
22
22
  return 'Invalid date';
23
23
  }
24
24
  }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DaysAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
26
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: DaysAgoPipe, isStandalone: true, name: "daysAgo" });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DaysAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
26
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.7", ngImport: i0, type: DaysAgoPipe, isStandalone: true, name: "daysAgo" });
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DaysAgoPipe, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DaysAgoPipe, decorators: [{
29
29
  type: Pipe,
30
30
  args: [{
31
31
  name: 'daysAgo',
@@ -11,10 +11,10 @@ class TitleResolver {
11
11
  const title = route.data['title'] ?? 'Frontend';
12
12
  this.titleService.setTitle(`OPAL - ${title}`);
13
13
  }
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TitleResolver, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
15
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TitleResolver, providedIn: 'root' });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TitleResolver, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
15
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TitleResolver, providedIn: 'root' });
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TitleResolver, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TitleResolver, decorators: [{
18
18
  type: Injectable,
19
19
  args: [{
20
20
  providedIn: 'root',
@@ -35,10 +35,10 @@ class AppInitializerService {
35
35
  this.initializeAppInsights();
36
36
  await this.appInsightsService.initialize();
37
37
  }
38
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
39
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInitializerService, providedIn: 'root' });
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
39
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInitializerService, providedIn: 'root' });
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInitializerService, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInitializerService, decorators: [{
42
42
  type: Injectable,
43
43
  args: [{
44
44
  providedIn: 'root',
@@ -48,10 +48,10 @@ class AppInsightsService {
48
48
  async initialize() {
49
49
  await this.initializeAppInsights();
50
50
  }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInsightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
52
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInsightsService, providedIn: 'root' });
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInsightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
52
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInsightsService, providedIn: 'root' });
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppInsightsService, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AppInsightsService, decorators: [{
55
55
  type: Injectable,
56
56
  args: [{
57
57
  providedIn: 'root',
@@ -25,10 +25,10 @@ class AuthService {
25
25
  return throwError(() => error);
26
26
  }));
27
27
  }
28
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, providedIn: 'root' });
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, decorators: [{
32
32
  type: Injectable,
33
33
  args: [{
34
34
  providedIn: 'root',
@@ -183,10 +183,10 @@ class DateService {
183
183
  const now = this.getDateNow().startOf('day');
184
184
  return Math.round(now.diff(inputDate, 'days').days);
185
185
  }
186
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
187
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, providedIn: 'root' });
186
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
187
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DateService, providedIn: 'root' });
188
188
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: DateService, decorators: [{
190
190
  type: Injectable,
191
191
  args: [{
192
192
  providedIn: 'root',
@@ -80,10 +80,10 @@ class LaunchDarklyService {
80
80
  ngOnDestroy() {
81
81
  this.closeLaunchDarklyClient();
82
82
  }
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LaunchDarklyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
84
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LaunchDarklyService, providedIn: 'root' });
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LaunchDarklyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
84
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LaunchDarklyService, providedIn: 'root' });
85
85
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LaunchDarklyService, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LaunchDarklyService, decorators: [{
87
87
  type: Injectable,
88
88
  args: [{
89
89
  providedIn: 'root',
@@ -29,10 +29,10 @@ class PermissionsService {
29
29
  // if we don't have any roles, we can't have any permissions
30
30
  return true;
31
31
  }
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
33
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PermissionsService, providedIn: 'root' });
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
33
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: PermissionsService, providedIn: 'root' });
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PermissionsService, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: PermissionsService, decorators: [{
36
36
  type: Injectable,
37
37
  args: [{
38
38
  providedIn: 'root',
@@ -43,20 +43,18 @@ class SessionService {
43
43
  * @returns {Observable<ISessionTokenExpiry>} An observable that emits the token expiry information.
44
44
  */
45
45
  getTokenExpiry() {
46
- if (!this.tokenExpiryCache$) {
47
- this.tokenExpiryCache$ = this.http.get(SESSION_ENDPOINTS.expiry).pipe(retry({
48
- count: this.MAX_RETRIES,
49
- delay: () => timer(this.RETRY_DELAY_MS),
50
- }), tap((expiry) => {
51
- this.globalStore.setTokenExpiry(expiry);
52
- }), shareReplay(1));
53
- }
46
+ this.tokenExpiryCache$ ??= this.http.get(SESSION_ENDPOINTS.expiry).pipe(retry({
47
+ count: this.MAX_RETRIES,
48
+ delay: () => timer(this.RETRY_DELAY_MS),
49
+ }), tap((expiry) => {
50
+ this.globalStore.setTokenExpiry(expiry);
51
+ }), shareReplay(1));
54
52
  return this.tokenExpiryCache$;
55
53
  }
56
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SessionService, providedIn: 'root' });
54
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
55
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SessionService, providedIn: 'root' });
58
56
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SessionService, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SessionService, decorators: [{
60
58
  type: Injectable,
61
59
  args: [{
62
60
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-services-session-service.mjs","sources":["../../../projects/opal-frontend-common/services/session-service/session.service.ts","../../../projects/opal-frontend-common/services/session-service/hmcts-opal-frontend-common-services-session-service.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, retry, shareReplay, tap, timer } from 'rxjs';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { SESSION_ENDPOINTS } from '@hmcts/opal-frontend-common/services/session-service/constants';\nimport {\n ISessionUserState,\n ISessionTokenExpiry,\n} from '@hmcts/opal-frontend-common/services/session-service/interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SessionService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n private userStateCache$!: Observable<ISessionUserState>;\n private tokenExpiryCache$!: Observable<ISessionTokenExpiry> | null;\n\n private readonly MAX_RETRIES = 5;\n private readonly RETRY_DELAY_MS = 1000;\n\n /**\n * Retrieves the user state from the backend.\n * If the user state is not available or needs to be refreshed, it makes an HTTP request to fetch the user state.\n * The user state is then stored in the state service for future use.\n * The user state is cached using the `shareReplay` operator to avoid unnecessary HTTP requests.\n * @returns An observable that emits the user state.\n */\n public getUserState(): Observable<ISessionUserState> {\n // The backend can return an empty object so...\n // If we don't have a user state, then we need to refresh it...\n // And override the shareReplay cache...\n const refresh = !this.globalStore.userState()?.user_id;\n\n if (!this.userStateCache$ || refresh) {\n this.userStateCache$ = this.http\n .get<ISessionUserState>(SESSION_ENDPOINTS.userState)\n .pipe(shareReplay(1))\n .pipe(\n tap((userState) => {\n this.globalStore.setUserState(userState);\n }),\n );\n }\n\n return this.userStateCache$;\n }\n\n /**\n * Retrieves the token expiry information from the server.\n * If the token expiry information is already cached, it returns the cached value.\n * Otherwise, it makes an HTTP GET request to fetch the token expiry information,\n * retries the request up to a maximum number of times if it fails, and caches the result.\n *\n * @returns {Observable<ISessionTokenExpiry>} An observable that emits the token expiry information.\n */\n public getTokenExpiry(): Observable<ISessionTokenExpiry> {\n if (!this.tokenExpiryCache$) {\n this.tokenExpiryCache$ = this.http.get<ISessionTokenExpiry>(SESSION_ENDPOINTS.expiry).pipe(\n retry({\n count: this.MAX_RETRIES,\n delay: () => timer(this.RETRY_DELAY_MS),\n }),\n tap((expiry) => {\n this.globalStore.setTokenExpiry(expiry);\n }),\n shareReplay(1),\n );\n }\n return this.tokenExpiryCache$;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAaa,cAAc,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,eAAe;AACf,IAAA,iBAAiB;IAER,WAAW,GAAG,CAAC;IACf,cAAc,GAAG,IAAI;AAEtC;;;;;;AAMG;IACI,YAAY,GAAA;;;;QAIjB,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,OAAO;AAEtD,QAAA,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,OAAO,EAAE;AACpC,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;AACzB,iBAAA,GAAG,CAAoB,iBAAiB,CAAC,SAAS;AAClD,iBAAA,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACnB,iBAAA,IAAI,CACH,GAAG,CAAC,CAAC,SAAS,KAAI;AAChB,gBAAA,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC;aACzC,CAAC,CACH;;QAGL,OAAO,IAAI,CAAC,eAAe;;AAG7B;;;;;;;AAOG;IACI,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;AAC3B,YAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CACxF,KAAK,CAAC;gBACJ,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,KAAK,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;AACxC,aAAA,CAAC,EACF,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,gBAAA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC;AACzC,aAAC,CAAC,EACF,WAAW,CAAC,CAAC,CAAC,CACf;;QAEH,OAAO,IAAI,CAAC,iBAAiB;;uGAzDpB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-services-session-service.mjs","sources":["../../../projects/opal-frontend-common/services/session-service/session.service.ts","../../../projects/opal-frontend-common/services/session-service/hmcts-opal-frontend-common-services-session-service.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, retry, shareReplay, tap, timer } from 'rxjs';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { SESSION_ENDPOINTS } from '@hmcts/opal-frontend-common/services/session-service/constants';\nimport {\n ISessionUserState,\n ISessionTokenExpiry,\n} from '@hmcts/opal-frontend-common/services/session-service/interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SessionService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n private userStateCache$!: Observable<ISessionUserState>;\n private tokenExpiryCache$!: Observable<ISessionTokenExpiry>;\n\n private readonly MAX_RETRIES = 5;\n private readonly RETRY_DELAY_MS = 1000;\n\n /**\n * Retrieves the user state from the backend.\n * If the user state is not available or needs to be refreshed, it makes an HTTP request to fetch the user state.\n * The user state is then stored in the state service for future use.\n * The user state is cached using the `shareReplay` operator to avoid unnecessary HTTP requests.\n * @returns An observable that emits the user state.\n */\n public getUserState(): Observable<ISessionUserState> {\n // The backend can return an empty object so...\n // If we don't have a user state, then we need to refresh it...\n // And override the shareReplay cache...\n const refresh = !this.globalStore.userState()?.user_id;\n\n if (!this.userStateCache$ || refresh) {\n this.userStateCache$ = this.http\n .get<ISessionUserState>(SESSION_ENDPOINTS.userState)\n .pipe(shareReplay(1))\n .pipe(\n tap((userState) => {\n this.globalStore.setUserState(userState);\n }),\n );\n }\n\n return this.userStateCache$;\n }\n\n /**\n * Retrieves the token expiry information from the server.\n * If the token expiry information is already cached, it returns the cached value.\n * Otherwise, it makes an HTTP GET request to fetch the token expiry information,\n * retries the request up to a maximum number of times if it fails, and caches the result.\n *\n * @returns {Observable<ISessionTokenExpiry>} An observable that emits the token expiry information.\n */\n public getTokenExpiry(): Observable<ISessionTokenExpiry> {\n this.tokenExpiryCache$ ??= this.http.get<ISessionTokenExpiry>(SESSION_ENDPOINTS.expiry).pipe(\n retry({\n count: this.MAX_RETRIES,\n delay: () => timer(this.RETRY_DELAY_MS),\n }),\n tap((expiry) => {\n this.globalStore.setTokenExpiry(expiry);\n }),\n shareReplay(1),\n );\n return this.tokenExpiryCache$;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAaa,cAAc,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,eAAe;AACf,IAAA,iBAAiB;IAER,WAAW,GAAG,CAAC;IACf,cAAc,GAAG,IAAI;AAEtC;;;;;;AAMG;IACI,YAAY,GAAA;;;;QAIjB,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,OAAO;AAEtD,QAAA,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,OAAO,EAAE;AACpC,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;AACzB,iBAAA,GAAG,CAAoB,iBAAiB,CAAC,SAAS;AAClD,iBAAA,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACnB,iBAAA,IAAI,CACH,GAAG,CAAC,CAAC,SAAS,KAAI;AAChB,gBAAA,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC;aACzC,CAAC,CACH;;QAGL,OAAO,IAAI,CAAC,eAAe;;AAG7B;;;;;;;AAOG;IACI,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAC1F,KAAK,CAAC;YACJ,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,KAAK,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;AACxC,SAAA,CAAC,EACF,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,YAAA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC;AACzC,SAAC,CAAC,EACF,WAAW,CAAC,CAAC,CAAC,CACf;QACD,OAAO,IAAI,CAAC,iBAAiB;;uGAvDpB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -79,10 +79,10 @@ class SortService {
79
79
  sortObjectArrayDesc(array, key) {
80
80
  return this.sortObjectArray(array, { key, sortType: 'descending' });
81
81
  }
82
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SortService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
83
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SortService, providedIn: 'root' });
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SortService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
83
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SortService, providedIn: 'root' });
84
84
  }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SortService, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SortService, decorators: [{
86
86
  type: Injectable,
87
87
  args: [{
88
88
  providedIn: 'root',
@@ -47,10 +47,10 @@ class TransferStateService {
47
47
  initializeAppInsightsConfig() {
48
48
  this.globalStore.setAppInsightsConfig(this.storedServerTransferState?.appInsightsConfig);
49
49
  }
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransferStateService, deps: [{ token: PLATFORM_ID }, { token: 'serverTransferState', optional: true }, { token: i0.TransferState }], target: i0.ɵɵFactoryTarget.Injectable });
51
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransferStateService, providedIn: 'root' });
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransferStateService, deps: [{ token: PLATFORM_ID }, { token: 'serverTransferState', optional: true }, { token: i0.TransferState }], target: i0.ɵɵFactoryTarget.Injectable });
51
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransferStateService, providedIn: 'root' });
52
52
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransferStateService, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransferStateService, decorators: [{
54
54
  type: Injectable,
55
55
  args: [{
56
56
  providedIn: 'root',
@@ -58,10 +58,10 @@ class TransformationService {
58
58
  }
59
59
  return obj;
60
60
  }
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransformationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
62
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransformationService, providedIn: 'root' });
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransformationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
62
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransformationService, providedIn: 'root' });
63
63
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TransformationService, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TransformationService, decorators: [{
65
65
  type: Injectable,
66
66
  args: [{
67
67
  providedIn: 'root',
@@ -75,10 +75,10 @@ class UtilsService {
75
75
  forms, providedMessage, notProvidedMessage) {
76
76
  return forms.every((form) => this.checkFormValues(form)) ? providedMessage : notProvidedMessage;
77
77
  }
78
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: UtilsService, providedIn: 'root' });
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: UtilsService, providedIn: 'root' });
80
80
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: UtilsService, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: UtilsService, decorators: [{
82
82
  type: Injectable,
83
83
  args: [{
84
84
  providedIn: 'root',
@@ -1,6 +1,4 @@
1
1
  import { CanActivateFn } from '@angular/router';
2
- /**
3
- * A guard that checks if the user is authenticated before allowing access to a route.
4
- * @returns An Observable that emits a boolean value indicating whether the user is authenticated.
5
- */
2
+ import { InjectionToken } from '@angular/core';
3
+ export declare const REDIRECT_TO_SSO: InjectionToken<() => void>;
6
4
  export declare const authGuard: CanActivateFn;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@hmcts/opal-frontend-common",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
+ "license": "MIT",
4
5
  "peerDependencies": {
5
6
  "@angular/common": "^18.2.0 || ^19.0.0",
6
7
  "@angular/core": "^18.2.0 || ^19.0.0"
@@ -258,6 +259,11 @@
258
259
  "types": "./components/govuk/govuk-text-input-prefix-suffix/index.d.ts",
259
260
  "default": "./fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs"
260
261
  },
262
+ "./components/govuk/helpers": {
263
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs",
264
+ "types": "./components/govuk/helpers/index.d.ts",
265
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-govuk-helpers.mjs"
266
+ },
261
267
  "./components/moj/moj-badge": {
262
268
  "import": "./fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs",
263
269
  "types": "./components/moj/moj-badge/index.d.ts",
@@ -323,6 +329,11 @@
323
329
  "types": "./components/moj/moj-timeline/index.d.ts",
324
330
  "default": "./fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs"
325
331
  },
332
+ "./directives/capitalisation": {
333
+ "import": "./fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs",
334
+ "types": "./directives/capitalisation/index.d.ts",
335
+ "default": "./fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs"
336
+ },
326
337
  "./constants": {
327
338
  "import": "./fesm2022/hmcts-opal-frontend-common-constants.mjs",
328
339
  "types": "./constants/index.d.ts",
@@ -1,7 +1,6 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { ISignInStubForm } from './interfaces';
3
2
  import * as i0 from "@angular/core";
4
- export declare class SignInComponent implements OnInit {
3
+ export declare class SignInComponent {
5
4
  readonly globalStore: {
6
5
  authenticated: import("@angular/core").Signal<boolean>;
7
6
  error: import("@ngrx/signals").DeepSignal<{
@@ -37,18 +36,12 @@ export declare class SignInComponent implements OnInit {
37
36
  }>;
38
37
  ssoEnabled: boolean | null;
39
38
  private readonly document;
40
- private readonly changeDetectorRef;
41
- /**
42
- * Handles the login button click event.
43
- */
44
- handleSsoSignInButtonClick(): void;
45
39
  /**
46
40
  * Handles the submission of the stub sign-in form.
47
41
  * Redirects the user to the SSO login page with the provided email.
48
42
  * @param formData - The form data containing the email.
49
43
  */
50
44
  handleStubSignInFormSubmit(formData: ISignInStubForm): void;
51
- ngOnInit(): void;
52
45
  static ɵfac: i0.ɵɵFactoryDeclaration<SignInComponent, never>;
53
46
  static ɵcmp: i0.ɵɵComponentDeclaration<SignInComponent, "opal-lib-sign-in", never, {}, {}, never, never, true, never>;
54
47
  }