@coolon/angular-ui-powerups 16.1.0-alpha.223 → 16.1.0-alpha.224
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/esm2022/lib/place/navigation/session/navigation-session.mjs +10 -1
- package/esm2022/lib/place/place-component.mjs +17 -13
- package/esm2022/lib/place/place-router.mjs +90 -15
- package/fesm2022/coolon-angular-ui-powerups.mjs +113 -25
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/place/navigation/session/navigation-session.d.ts +7 -0
- package/lib/place/place-router.d.ts +17 -0
- package/package.json +1 -1
|
@@ -22,6 +22,13 @@ export declare abstract class NavigationSession extends GarbageCollector {
|
|
|
22
22
|
private _interactionContext;
|
|
23
23
|
constructor(context: NavigationContext, startingUrl: string);
|
|
24
24
|
get isInteractionSync(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Interruptible sessions are internal housekeeping navigations (e.g. interaction-id
|
|
27
|
+
* synchronisation) that a real user- or model-driven navigation is allowed to queue behind
|
|
28
|
+
* and supersede, rather than being rejected. Real navigations (Navigating, PopState) are not
|
|
29
|
+
* interruptible.
|
|
30
|
+
*/
|
|
31
|
+
get isInterruptible(): boolean;
|
|
25
32
|
get name(): string;
|
|
26
33
|
get urlService(): UrlService;
|
|
27
34
|
get interactionServiceAdapter(): InteractionServiceRoutingAdapter;
|
|
@@ -26,6 +26,9 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
26
26
|
private readonly _activeVisit$;
|
|
27
27
|
private readonly routerInteractionAdapter;
|
|
28
28
|
private sessionFinishedJobs;
|
|
29
|
+
private pendingNavigation?;
|
|
30
|
+
private queuedNavigationDepth;
|
|
31
|
+
private static readonly MAX_QUEUED_NAVIGATION_DEPTH;
|
|
29
32
|
readonly authService: PlaceAuthService;
|
|
30
33
|
private readonly _ready$;
|
|
31
34
|
readonly ready$: ValueModel<boolean>;
|
|
@@ -48,6 +51,20 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
48
51
|
navigate(visit: Visit): any;
|
|
49
52
|
navigate(placeComponent: Constructable<PlaceComponent>, params?: Record<string, unknown>): any;
|
|
50
53
|
doNavigation(visit: Visit, runNavigationCommands: (router: Router) => unknown): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Handles a navigation triggered while another is already in flight.
|
|
56
|
+
*
|
|
57
|
+
* This used to throw `illegalState('Navigation already in progress')`, which killed the
|
|
58
|
+
* triggering action - occasionally seen in production when a user click collided with an
|
|
59
|
+
* in-flight interaction-id sync. Instead we warn with diagnostic context and decide based on the
|
|
60
|
+
* in-progress session:
|
|
61
|
+
* - interruptible session in progress (internal housekeeping, e.g. interaction-id sync) -> queue
|
|
62
|
+
* the incoming navigation and run it once the current session finishes (coalescing to latest).
|
|
63
|
+
* - real navigation in progress -> keep it and drop the incoming one (logging full context).
|
|
64
|
+
*/
|
|
65
|
+
private handleOverlappingNavigation;
|
|
66
|
+
private queueNavigation;
|
|
67
|
+
private flushPendingNavigation;
|
|
51
68
|
navigateByUrl(urlSnapshot: UrlSnapshot, navigationExtras?: NavigationExtras): Promise<boolean>;
|
|
52
69
|
get activeVisit$(): ValueModel<Visit>;
|
|
53
70
|
filterAuthorizedPlaces(places: ReadonlyArray<Constructable<PlaceComponent>>, options: DisposedWith): ListModel<Constructable<PlaceComponent>>;
|