@coolon/angular-ui-powerups 14.26.0 → 14.27.0
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/esm2020/lib/place/components/abstract-place-navigation.component.mjs +7 -5
- package/esm2020/lib/place/components/place-outlet/place-outlet.component.mjs +2 -2
- package/esm2020/lib/place/guards/place.guard.mjs +12 -4
- package/esm2020/lib/place/place-router.mjs +10 -6
- package/fesm2015/coolon-angular-ui-powerups.mjs +27 -13
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +27 -13
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/place/place-router.d.ts +16 -2
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Location } from "@angular/common";
|
|
2
2
|
import { ActivatedRoute, ActivatedRouteSnapshot, NavigationCancel, NavigationEnd, NavigationError, NavigationExtras, NavigationStart, Router, RouterStateSnapshot } from "@angular/router";
|
|
3
3
|
import { GarbageCollector, ListModel, MutableValueModel, ValueModel, ValueModelChain } from "@coolon/pectin";
|
|
4
|
+
import { Constructable } from "@coolon/typescript-utilities";
|
|
4
5
|
import { InteractionService } from "../interaction/services/interaction.service";
|
|
5
6
|
import { NavigationSession } from "./navigation/session/navigation-session";
|
|
6
7
|
import { PlaceAccessGuard } from "./place-access-guard";
|
|
8
|
+
import { PlaceComponent } from "./place-component";
|
|
7
9
|
import { PlaceDefinition } from "./place-definition";
|
|
8
10
|
import { PlaceHistory } from "./place-history";
|
|
9
11
|
import { UrlService } from "./url-service";
|
|
@@ -29,12 +31,13 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
29
31
|
* An observable model containing the authoriser function. This allows places to react to changes
|
|
30
32
|
* in permissions when any underlying auth logic changes, e.g. a role being removed from a user.
|
|
31
33
|
*/
|
|
32
|
-
private readonly _accessGuard
|
|
34
|
+
private readonly _accessGuard$;
|
|
33
35
|
private redirections;
|
|
34
36
|
constructor(angularRouter: Router, angularLocation: Location, interactionService: InteractionService, urlService: UrlService, placeHistory: PlaceHistory);
|
|
35
|
-
get accessGuard(): ValueModel<PlaceAccessGuard>;
|
|
37
|
+
get accessGuard$(): ValueModel<PlaceAccessGuard>;
|
|
36
38
|
configureAuth(accessGrant: ValueModel<PlaceAccessGuard>, redirections: PlaceRouter.Redirections): void;
|
|
37
39
|
getAuthenticationFailureRedirect(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Visit;
|
|
40
|
+
getAuthorisationFailureRedirectOptions(component: Constructable<PlaceComponent>): (Constructable<PlaceComponent> | Visit)[];
|
|
38
41
|
get navigationSession(): NavigationSession;
|
|
39
42
|
get currentSession(): NavigationSession;
|
|
40
43
|
isNavigating(): boolean;
|
|
@@ -69,7 +72,18 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
69
72
|
}
|
|
70
73
|
export declare namespace PlaceRouter {
|
|
71
74
|
interface Redirections {
|
|
75
|
+
/**
|
|
76
|
+
* NOTE: for now this only supports top level places. Support for child places will require a more fundamental
|
|
77
|
+
* change to visits to support nesting
|
|
78
|
+
* @param component
|
|
79
|
+
*/
|
|
72
80
|
onAuthenticationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
|
|
81
|
+
/**
|
|
82
|
+
* NOTE: for now this only supports top level places. Support for child places will require a more fundamental
|
|
83
|
+
* change to visits to support nesting
|
|
84
|
+
* @param component
|
|
85
|
+
*/
|
|
86
|
+
onAuthorisationFailure(component: Constructable<PlaceComponent>): (Constructable<PlaceComponent> | Visit)[];
|
|
73
87
|
}
|
|
74
88
|
class State {
|
|
75
89
|
private readonly activeVisits;
|