@hmcts/opal-frontend-common 0.0.78 → 0.0.80
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.
- package/fesm2022/{hmcts-opal-frontend-common-access-denied.component-CChd8kzZ.mjs → hmcts-opal-frontend-common-access-denied.component-D10u8Yxn.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-account-created.component-DN2aTb9f.mjs → hmcts-opal-frontend-common-account-created.component-DQU0jga1.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -13
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
- package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-DhifLL93.mjs → hmcts-opal-frontend-common-concurrency-failure.component-BTFiOH79.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-moj-multi-select.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-guards-auth.mjs +10 -3
- package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component-BuniqC-e.mjs → hmcts-opal-frontend-common-internal-server-error.component-QMKEdjwU.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-CChd8kzZ.mjs → hmcts-opal-frontend-common-pages-access-denied.component-D10u8Yxn.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-account-created.component-DN2aTb9f.mjs → hmcts-opal-frontend-common-pages-account-created.component-DQU0jga1.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-DhifLL93.mjs → hmcts-opal-frontend-common-pages-concurrency-failure.component-BTFiOH79.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pages-dashboard-page.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component-BuniqC-e.mjs → hmcts-opal-frontend-common-pages-internal-server-error.component-QMKEdjwU.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-fpUG1mFg.mjs → hmcts-opal-frontend-common-pages-permission-denied.component-BmHHWIe-.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-DBsFS4i2.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-DI08HYGy.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DhoGKpA3.mjs → hmcts-opal-frontend-common-pages-sign-in.component-BtuyIR0b.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs +6 -6
- package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-fpUG1mFg.mjs → hmcts-opal-frontend-common-permission-denied.component-BmHHWIe-.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-monetary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +10 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +45 -65
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +9 -11
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-mocks.mjs +1 -0
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +16 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
- package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-DBsFS4i2.mjs → hmcts-opal-frontend-common-sign-in-stub.component-DI08HYGy.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-CT_zC3jZ.mjs → hmcts-opal-frontend-common-sign-in.component-Cs5OrpHh.mjs} +4 -4
- package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs +4 -0
- package/fesm2022/hmcts-opal-frontend-common.mjs +6 -6
- package/package.json +1 -1
- package/types/hmcts-opal-frontend-common-components-abstract-abstract-account-summary-base.d.ts +6 -3
- package/types/hmcts-opal-frontend-common-pages-dashboard-page.d.ts +6 -3
- package/types/hmcts-opal-frontend-common-services-app-initializer-service.d.ts +4 -0
- package/types/hmcts-opal-frontend-common-services-opal-user-service-interfaces.d.ts +19 -2
- package/types/hmcts-opal-frontend-common-services-opal-user-service.d.ts +10 -20
- package/types/hmcts-opal-frontend-common-services-permissions-service.d.ts +0 -2
- package/types/hmcts-opal-frontend-common-services-transfer-state-service-interfaces.d.ts +1 -0
- package/types/hmcts-opal-frontend-common-services-transfer-state-service.d.ts +4 -0
- package/types/hmcts-opal-frontend-common-stores-global.d.ts +5 -2
|
@@ -16,13 +16,13 @@ class SignInComponent {
|
|
|
16
16
|
handleStubSignInFormSubmit(formData) {
|
|
17
17
|
this.document.location.href = `${SSO_ENDPOINTS.login}?email=${formData.email}`;
|
|
18
18
|
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", 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", changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./hmcts-opal-frontend-common-pages-sign-in-stub.component-DI08HYGy.mjs').then(m => m.SignInStubComponent)]] });
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.14", ngImport: i0, type: SignInComponent, resolveDeferredDeps: () => [import('./hmcts-opal-frontend-common-pages-sign-in-stub.component-DI08HYGy.mjs').then(m => m.SignInStubComponent)], resolveMetadata: SignInStubComponent => ({ decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ selector: 'opal-lib-sign-in', imports: [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
25
|
}], ctorParameters: null, propDecorators: null }) });
|
|
26
26
|
|
|
27
27
|
export { SignInComponent };
|
|
28
|
-
//# sourceMappingURL=hmcts-opal-frontend-common-pages-sign-in.component-
|
|
28
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-pages-sign-in.component-BtuyIR0b.mjs.map
|
|
@@ -8,39 +8,39 @@ 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-
|
|
11
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-access-denied.component-D10u8Yxn.mjs').then((c) => c.AccessDeniedComponent),
|
|
12
12
|
canActivate: [authGuard, accountGuard],
|
|
13
13
|
data: { title: PAGES_ROUTING_TITLES.children.accessDenied },
|
|
14
14
|
resolve: { title: TitleResolver },
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: PAGES_ROUTING_PATHS.children.concurrencyFailure,
|
|
18
|
-
loadComponent: () => import('./hmcts-opal-frontend-common-pages-concurrency-failure.component-
|
|
18
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-concurrency-failure.component-BTFiOH79.mjs').then((c) => c.ConcurrencyFailureComponent),
|
|
19
19
|
data: { title: PAGES_ROUTING_TITLES.children.concurrencyFailure },
|
|
20
20
|
resolve: { title: TitleResolver },
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
path: PAGES_ROUTING_PATHS.children.permissionDenied,
|
|
24
|
-
loadComponent: () => import('./hmcts-opal-frontend-common-pages-permission-denied.component-
|
|
24
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-permission-denied.component-BmHHWIe-.mjs').then((c) => c.PermissionDeniedComponent),
|
|
25
25
|
data: { title: PAGES_ROUTING_TITLES.children.permissionDenied },
|
|
26
26
|
resolve: { title: TitleResolver },
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
path: PAGES_ROUTING_PATHS.children.internalServerError,
|
|
30
|
-
loadComponent: () => import('./hmcts-opal-frontend-common-pages-internal-server-error.component-
|
|
30
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-internal-server-error.component-QMKEdjwU.mjs').then((c) => c.InternalServerErrorComponent),
|
|
31
31
|
data: { title: PAGES_ROUTING_TITLES.children.internalServerError },
|
|
32
32
|
resolve: { title: TitleResolver },
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
path: PAGES_ROUTING_PATHS.children.signIn,
|
|
36
|
-
loadComponent: () => import('./hmcts-opal-frontend-common-pages-sign-in.component-
|
|
36
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-sign-in.component-BtuyIR0b.mjs').then((c) => c.SignInComponent),
|
|
37
37
|
canActivate: [signedInGuard],
|
|
38
38
|
data: { title: PAGES_ROUTING_TITLES.children.signIn },
|
|
39
39
|
resolve: { title: TitleResolver },
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
path: PAGES_ROUTING_PATHS.children.accountCreated,
|
|
43
|
-
loadComponent: () => import('./hmcts-opal-frontend-common-pages-account-created.component-
|
|
43
|
+
loadComponent: () => import('./hmcts-opal-frontend-common-pages-account-created.component-DQU0jga1.mjs').then((c) => c.AccountCreated),
|
|
44
44
|
canActivate: [authGuard],
|
|
45
45
|
data: { title: PAGES_ROUTING_TITLES.children.accountCreated },
|
|
46
46
|
resolve: { title: TitleResolver },
|
|
@@ -2,13 +2,13 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class PermissionDeniedComponent {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PermissionDeniedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: PermissionDeniedComponent, isStandalone: true, selector: "opal-lib-permission-denied", ngImport: i0, template: "<div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">You do not have permission for this</h1>\n <p class=\"govuk-body\">This may be because:</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>the account is outside your business unit and some features are restricted</li>\n <li>you are not permitted to use this feature</li>\n </ul>\n <p class=\"govuk-body\">If you think this is incorrect, contact your line manager.</p>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PermissionDeniedComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'opal-lib-permission-denied', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-l\">You do not have permission for this</h1>\n <p class=\"govuk-body\">This may be because:</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>the account is outside your business unit and some features are restricted</li>\n <li>you are not permitted to use this feature</li>\n </ul>\n <p class=\"govuk-body\">If you think this is incorrect, contact your line manager.</p>\n</div>\n" }]
|
|
11
11
|
}] });
|
|
12
12
|
|
|
13
13
|
export { PermissionDeniedComponent };
|
|
14
|
-
//# sourceMappingURL=hmcts-opal-frontend-common-permission-denied.component-
|
|
14
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-permission-denied.component-BmHHWIe-.mjs.map
|
|
@@ -10,10 +10,10 @@ class DateFormatPipe {
|
|
|
10
10
|
const formatted = this.dateService.getFromFormatToFormat(value, inputFormat, outputFormat);
|
|
11
11
|
return formatted;
|
|
12
12
|
}
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
14
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
14
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: DateFormatPipe, isStandalone: true, name: "dateFormat" });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
17
17
|
type: Pipe,
|
|
18
18
|
args: [{
|
|
19
19
|
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: "21.2.
|
|
26
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DaysAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
26
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: DaysAgoPipe, isStandalone: true, name: "daysAgo" });
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DaysAgoPipe, decorators: [{
|
|
29
29
|
type: Pipe,
|
|
30
30
|
args: [{
|
|
31
31
|
name: 'daysAgo',
|
|
@@ -15,10 +15,10 @@ class MonetaryPipe {
|
|
|
15
15
|
const monetaryValue = this.utilsService.convertToMonetaryString(value);
|
|
16
16
|
return format === 'remove-minus-symbol' ? monetaryValue.replace(/^-/, '') : monetaryValue;
|
|
17
17
|
}
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
19
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: MonetaryPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
19
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: MonetaryPipe, isStandalone: true, name: "monetary" });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: MonetaryPipe, decorators: [{
|
|
22
22
|
type: Pipe,
|
|
23
23
|
args: [{
|
|
24
24
|
name: 'monetary',
|
|
@@ -11,10 +11,10 @@ class NationalInsurancePipe {
|
|
|
11
11
|
return value;
|
|
12
12
|
return `${cleaned.slice(0, 2)} ${cleaned.slice(2, 4)} ${cleaned.slice(4, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8)}`;
|
|
13
13
|
}
|
|
14
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
15
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NationalInsurancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
15
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: NationalInsurancePipe, isStandalone: true, name: "nationalInsurance" });
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NationalInsurancePipe, decorators: [{
|
|
18
18
|
type: Pipe,
|
|
19
19
|
args: [{
|
|
20
20
|
name: 'nationalInsurance',
|
|
@@ -8,10 +8,10 @@ class TitleResolver {
|
|
|
8
8
|
const title = route.data['title'] ?? 'Frontend';
|
|
9
9
|
this.titleService.setTitle(`OPAL - ${title}`);
|
|
10
10
|
}
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
12
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TitleResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TitleResolver, providedIn: 'root' });
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TitleResolver, decorators: [{
|
|
15
15
|
type: Injectable,
|
|
16
16
|
args: [{
|
|
17
17
|
providedIn: 'root',
|
|
@@ -31,6 +31,12 @@ class AppInitializerService {
|
|
|
31
31
|
initializeUserStateCacheExpirationMilliseconds() {
|
|
32
32
|
this.transferStateService.initializeUserStateCacheExpirationMilliseconds();
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the user-state domain used for permission lookup.
|
|
36
|
+
*/
|
|
37
|
+
initializeUserStateDomain() {
|
|
38
|
+
this.transferStateService.initializeUserStateDomain();
|
|
39
|
+
}
|
|
34
40
|
/**
|
|
35
41
|
* Initializes the application.
|
|
36
42
|
* This method calls the necessary initialization functions.
|
|
@@ -40,12 +46,13 @@ class AppInitializerService {
|
|
|
40
46
|
this.initializeLaunchDarkly();
|
|
41
47
|
this.initializeAppInsights();
|
|
42
48
|
this.initializeUserStateCacheExpirationMilliseconds();
|
|
49
|
+
this.initializeUserStateDomain();
|
|
43
50
|
await this.appInsightsService.initialize();
|
|
44
51
|
}
|
|
45
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
46
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AppInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AppInitializerService, providedIn: 'root' });
|
|
47
54
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AppInitializerService, decorators: [{
|
|
49
56
|
type: Injectable,
|
|
50
57
|
args: [{
|
|
51
58
|
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: "21.2.
|
|
52
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AppInsightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
52
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AppInsightsService, providedIn: 'root' });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", 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: "21.2.
|
|
29
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AuthService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root',
|
|
@@ -216,10 +216,10 @@ class DateService {
|
|
|
216
216
|
to: this.toFormat(this.getFromIso(dateTo), format),
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
220
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
220
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DateService, providedIn: 'root' });
|
|
221
221
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DateService, decorators: [{
|
|
223
223
|
type: Injectable,
|
|
224
224
|
args: [{
|
|
225
225
|
providedIn: 'root',
|
|
@@ -82,10 +82,10 @@ class LaunchDarklyService {
|
|
|
82
82
|
ngOnDestroy() {
|
|
83
83
|
this.closeLaunchDarklyClient();
|
|
84
84
|
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
86
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LaunchDarklyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
86
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LaunchDarklyService, providedIn: 'root' });
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LaunchDarklyService, decorators: [{
|
|
89
89
|
type: Injectable,
|
|
90
90
|
args: [{
|
|
91
91
|
providedIn: 'root',
|
|
@@ -2,97 +2,77 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';
|
|
5
|
-
import {
|
|
6
|
-
import { DateService } from '@hmcts/opal-frontend-common/services/date-service';
|
|
5
|
+
import { map, tap } from 'rxjs';
|
|
7
6
|
|
|
8
|
-
const baseUrl = '/opal-user-service';
|
|
9
|
-
const users = '/users';
|
|
10
|
-
const currentUser = '/0';
|
|
11
|
-
const userState = '/state';
|
|
12
7
|
const OPAL_USER_PATHS = {
|
|
13
|
-
loggedInUserState:
|
|
8
|
+
loggedInUserState: '/api/user-state',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Maps Redis-backed user-state response statuses to the existing frontend user-state contract.
|
|
13
|
+
*
|
|
14
|
+
* Keep the input type as {@link OpalUserStateResponseStatus} and the output type as {@link OpalUserStateStatus}
|
|
15
|
+
* because the two contracts intentionally differ. In particular, the API returns `PENDING`, while the frontend
|
|
16
|
+
* account guard and consumers expect `created`.
|
|
17
|
+
*/
|
|
18
|
+
const OPAL_USER_STATE_RESPONSE_STATUS = {
|
|
19
|
+
ACTIVE: 'active',
|
|
20
|
+
PENDING: 'created',
|
|
21
|
+
SUSPENDED: 'suspended',
|
|
22
|
+
DEACTIVATED: 'deactivated',
|
|
14
23
|
};
|
|
15
24
|
|
|
16
25
|
class OpalUserService {
|
|
17
26
|
http = inject(HttpClient);
|
|
18
27
|
globalStore = inject(GlobalStore);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Checks if the cached user state has expired.
|
|
23
|
-
*
|
|
24
|
-
* @returns True if the cache has expired, false otherwise.
|
|
25
|
-
*/
|
|
26
|
-
isCacheExpired() {
|
|
27
|
-
if (!this.userStateCache?.expiryAt) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
const now = this.dateService.getDateNow();
|
|
31
|
-
const expiryTime = this.dateService.getFromIso(this.userStateCache.expiryAt);
|
|
32
|
-
return now > expiryTime;
|
|
28
|
+
toOpalUserStatus(status) {
|
|
29
|
+
return status ? OPAL_USER_STATE_RESPONSE_STATUS[status] : null;
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
getUserStateDomain() {
|
|
32
|
+
const userStateDomain = this.globalStore.userStateDomain();
|
|
33
|
+
if (typeof userStateDomain === 'string' && userStateDomain.trim()) {
|
|
34
|
+
return userStateDomain.trim();
|
|
35
|
+
}
|
|
36
|
+
throw new Error('User state domain is required before loading user permissions.');
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
|
-
*
|
|
39
|
+
* Maps the Redis-backed user state response into the existing domain-specific user state shape.
|
|
42
40
|
*/
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
toOpalUserState(userState) {
|
|
42
|
+
const userStateDomain = this.getUserStateDomain();
|
|
43
|
+
const userStateDomainState = userState.domains?.[userStateDomain];
|
|
44
|
+
if (!userStateDomainState) {
|
|
45
|
+
throw new Error(`User state response does not include required domain '${userStateDomain}'.`);
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
return {
|
|
48
|
+
user_id: userState.user_id,
|
|
49
|
+
username: userState.username,
|
|
50
|
+
name: userState.name,
|
|
51
|
+
status: this.toOpalUserStatus(userState.status),
|
|
52
|
+
version: userState.version,
|
|
53
|
+
business_unit_users: userStateDomainState.business_unit_users,
|
|
54
|
+
};
|
|
56
55
|
}
|
|
57
56
|
/**
|
|
58
57
|
* Retrieves the logged-in user's state as an observable.
|
|
59
58
|
*
|
|
60
|
-
*
|
|
61
|
-
* If so, it returns the cached user state. Otherwise, it fetches the user state
|
|
62
|
-
* from the server, updates the cache, and sets the user state in the global store.
|
|
59
|
+
* The frontend user-state endpoint is backed by Redis, so this service does not maintain its own cache.
|
|
63
60
|
*
|
|
64
61
|
* @returns {Observable<IOpalUserState>} An observable that emits the logged-in user's state.
|
|
65
62
|
*/
|
|
66
63
|
getLoggedInUserState() {
|
|
67
|
-
|
|
68
|
-
if (cachedUser) {
|
|
69
|
-
this.globalStore.setUserState(cachedUser);
|
|
70
|
-
return of(cachedUser);
|
|
71
|
-
}
|
|
72
|
-
// Calculate new expiry time
|
|
73
|
-
const expiresAt = this.dateService
|
|
74
|
-
.getDateNow()
|
|
75
|
-
.plus({ milliseconds: this.globalStore.userStateCacheExpirationMilliseconds() });
|
|
76
|
-
// Fetch fresh data
|
|
77
|
-
return this.http.get(OPAL_USER_PATHS.loggedInUserState).pipe(tap((userState) => {
|
|
78
|
-
this.userStateCache = {
|
|
79
|
-
userState: userState,
|
|
80
|
-
expiryAt: expiresAt.toISO(),
|
|
81
|
-
};
|
|
82
|
-
this.globalStore.setUserState(userState);
|
|
83
|
-
}));
|
|
64
|
+
return this.http.get(OPAL_USER_PATHS.loggedInUserState).pipe(map((userState) => this.toOpalUserState(userState)), tap((userState) => this.globalStore.setUserState(userState)));
|
|
84
65
|
}
|
|
85
66
|
/**
|
|
86
|
-
*
|
|
67
|
+
* Resets the global store user to an empty object.
|
|
87
68
|
*
|
|
88
69
|
* Useful for logout/identity switches to avoid reusing stale state.
|
|
89
70
|
*/
|
|
90
71
|
clearUserStateCache() {
|
|
91
|
-
this.clearCache();
|
|
92
72
|
this.globalStore.setUserState({});
|
|
93
73
|
}
|
|
94
74
|
/**
|
|
95
|
-
*
|
|
75
|
+
* Fetches the latest user state from the Redis-backed frontend endpoint.
|
|
96
76
|
*
|
|
97
77
|
* @returns An Observable that emits the current {@link IOpalUserState}.
|
|
98
78
|
*/
|
|
@@ -100,10 +80,10 @@ class OpalUserService {
|
|
|
100
80
|
this.clearUserStateCache();
|
|
101
81
|
return this.getLoggedInUserState();
|
|
102
82
|
}
|
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
104
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OpalUserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OpalUserService, providedIn: 'root' });
|
|
105
85
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OpalUserService, decorators: [{
|
|
107
87
|
type: Injectable,
|
|
108
88
|
args: [{ providedIn: 'root' }]
|
|
109
89
|
}] });
|
|
@@ -2,21 +2,19 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class PermissionsService {
|
|
5
|
-
storedUniquePermissionIds = [];
|
|
6
5
|
/**
|
|
7
6
|
* Retrieves the unique permission IDs associated with the user.
|
|
8
|
-
* If the unique permission IDs have not been stored yet, it calculates them based on the user's roles and permissions.
|
|
9
7
|
* @returns An array of unique permission IDs.
|
|
10
8
|
*/
|
|
11
9
|
getUniquePermissions(userState) {
|
|
12
10
|
const roles = userState ? userState['business_unit_users'] : null;
|
|
13
|
-
if (!
|
|
14
|
-
|
|
15
|
-
return role.permissions.map(({ permission_id: permissionId }) => permissionId);
|
|
16
|
-
});
|
|
17
|
-
this.storedUniquePermissionIds = [...new Set(permissionIds)];
|
|
11
|
+
if (!roles) {
|
|
12
|
+
return [];
|
|
18
13
|
}
|
|
19
|
-
|
|
14
|
+
const permissionIds = roles.flatMap((role) => {
|
|
15
|
+
return role.permissions.map(({ permission_id: permissionId }) => permissionId);
|
|
16
|
+
});
|
|
17
|
+
return [...new Set(permissionIds)];
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
20
|
* Determines whether the user has access to a specific permission based on their roles.
|
|
@@ -53,10 +51,10 @@ class PermissionsService {
|
|
|
53
51
|
// if we don't have any roles, we can't have any permissions
|
|
54
52
|
return true;
|
|
55
53
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
57
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PermissionsService, providedIn: 'root' });
|
|
58
56
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PermissionsService, decorators: [{
|
|
60
58
|
type: Injectable,
|
|
61
59
|
args: [{
|
|
62
60
|
providedIn: 'root',
|
|
@@ -25,10 +25,10 @@ class SessionService {
|
|
|
25
25
|
}), shareReplay(1));
|
|
26
26
|
return this.tokenExpiryCache$;
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
29
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SessionService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{ providedIn: 'root' }]
|
|
34
34
|
}] });
|
|
@@ -79,10 +79,10 @@ class SortService {
|
|
|
79
79
|
arraySortDesc(array) {
|
|
80
80
|
return sort(array).desc();
|
|
81
81
|
}
|
|
82
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
83
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SortService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SortService, providedIn: 'root' });
|
|
84
84
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SortService, decorators: [{
|
|
86
86
|
type: Injectable,
|
|
87
87
|
args: [{
|
|
88
88
|
providedIn: 'root',
|
|
@@ -23,6 +23,9 @@ class TransferStateService {
|
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
// server side: store server transfer state
|
|
26
|
+
if (this.serverTransferState) {
|
|
27
|
+
this.storedServerTransferState = this.serverTransferState;
|
|
28
|
+
}
|
|
26
29
|
this.transferState.set(storeKeyTransferState, this.serverTransferState);
|
|
27
30
|
}
|
|
28
31
|
}
|
|
@@ -59,10 +62,20 @@ class TransferStateService {
|
|
|
59
62
|
initializeUserStateCacheExpirationMilliseconds() {
|
|
60
63
|
this.globalStore.setUserStateCacheExpirationMilliseconds(this.storedServerTransferState?.userStateCacheExpirationMilliseconds);
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Initializes the user-state domain used to select permissions from the domain-scoped user-state response.
|
|
67
|
+
*/
|
|
68
|
+
initializeUserStateDomain() {
|
|
69
|
+
const userStateDomain = this.storedServerTransferState?.userStateDomain;
|
|
70
|
+
if (typeof userStateDomain !== 'string' || !userStateDomain.trim()) {
|
|
71
|
+
throw new Error('User state domain is required in server transfer state.');
|
|
72
|
+
}
|
|
73
|
+
this.globalStore.setUserStateDomain(userStateDomain.trim());
|
|
74
|
+
}
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransferStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
76
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransferStateService, providedIn: 'root' });
|
|
64
77
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransferStateService, decorators: [{
|
|
66
79
|
type: Injectable,
|
|
67
80
|
args: [{
|
|
68
81
|
providedIn: 'root',
|
|
@@ -89,10 +89,10 @@ class TransformationService {
|
|
|
89
89
|
}
|
|
90
90
|
return result;
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
93
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransformationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransformationService, providedIn: 'root' });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TransformationService, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{
|
|
98
98
|
providedIn: 'root',
|
|
@@ -153,10 +153,10 @@ class UtilsService {
|
|
|
153
153
|
hasSetProperty(value) {
|
|
154
154
|
return Object.values(value ?? {}).some((v) => (typeof v === 'boolean' ? v === true : v !== null && v !== ''));
|
|
155
155
|
}
|
|
156
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
157
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
157
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: UtilsService, decorators: [{
|
|
160
160
|
type: Injectable,
|
|
161
161
|
args: [{
|
|
162
162
|
providedIn: 'root',
|
|
@@ -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: "21.2.
|
|
32
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SignInStubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", 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],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),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: "21.2.
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", 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: "21.2.13", ngImpo
|
|
|
39
39
|
}] } });
|
|
40
40
|
|
|
41
41
|
export { SignInStubComponent };
|
|
42
|
-
//# sourceMappingURL=hmcts-opal-frontend-common-sign-in-stub.component-
|
|
42
|
+
//# sourceMappingURL=hmcts-opal-frontend-common-sign-in-stub.component-DI08HYGy.mjs.map
|