@hmcts/rpx-xui-common-lib 1.7.22 → 1.7.28
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/bundles/hmcts-rpx-xui-common-lib.umd.js +25 -21
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/services/role-guard/role.guard.js +22 -15
- package/esm2015/lib/services/role-guard/role.service.js +13 -13
- package/esm5/lib/services/role-guard/role.guard.js +22 -15
- package/esm5/lib/services/role-guard/role.service.js +13 -13
- package/fesm2015/hmcts-rpx-xui-common-lib.js +28 -23
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +29 -24
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/lib/services/role-guard/role.guard.d.ts +2 -1
- package/lib/services/role-guard/role.service.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActivatedRouteSnapshot, CanActivate, Router, UrlTree } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { RoleService } from './role.service';
|
|
3
4
|
export declare enum RoleMatching {
|
|
4
5
|
ALL = 0,
|
|
@@ -8,5 +9,5 @@ export declare class RoleGuard implements CanActivate {
|
|
|
8
9
|
private readonly roleService;
|
|
9
10
|
private readonly router;
|
|
10
11
|
constructor(roleService: RoleService, router: Router);
|
|
11
|
-
canActivate(route: ActivatedRouteSnapshot): boolean | UrlTree
|
|
12
|
+
canActivate(route: ActivatedRouteSnapshot): Observable<boolean | UrlTree>;
|
|
12
13
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
1
2
|
export declare type Role = string;
|
|
2
3
|
export declare type Roles = Role[];
|
|
3
4
|
export declare class RoleService {
|
|
4
|
-
|
|
5
|
+
readonly pRoles: BehaviorSubject<string[]>;
|
|
6
|
+
roles$: import("rxjs").Observable<string[]>;
|
|
5
7
|
roles: Roles;
|
|
6
8
|
}
|