@ngxs/router-plugin 22.0.0-dev.master-d79b246 → 22.0.0-dev.master-5cdbcaf

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.
@@ -5,7 +5,7 @@ import { StateToken, Store, createSelector, Action, State, NgxsModule, provideSt
5
5
  import { ɵNGXS_ROUTER_PLUGIN_OPTIONS as _NGXS_ROUTER_PLUGIN_OPTIONS, NavigationActionTiming, ɵUSER_OPTIONS as _USER_OPTIONS, ɵcreateRouterPluginOptions as _createRouterPluginOptions } from '@ngxs/router-plugin/internals';
6
6
  export { NavigationActionTiming } from '@ngxs/router-plugin/internals';
7
7
  import { __decorate } from 'tslib';
8
- import { Router, NavigationStart, RoutesRecognized, ResolveEnd, NavigationCancel, NavigationError, NavigationEnd } from '@angular/router';
8
+ import { Router, NavigationStart, RoutesRecognized, ResolveEnd, NavigationCancel, NavigationError, NavigationEnd, PRIMARY_OUTLET } from '@angular/router';
9
9
 
10
10
  /**
11
11
  * Public event api of the router
@@ -410,6 +410,86 @@ function withNgxsRouterPlugin(options) {
410
410
  ]);
411
411
  }
412
412
 
413
+ /**
414
+ * These are exported as standalone tree-shakable selectors, rather than as
415
+ * static members on `RouterState`, because unused static class properties
416
+ * always ship in the bundle — bundlers can't remove individual members off
417
+ * a class that's itself always referenced (as `RouterState` is, via
418
+ * `withNgxsRouterPlugin()`). Plain top-level exports can be shaken.
419
+ */
420
+ /**
421
+ * The query params of the current navigation. Unlike `routerParams`/`routerData`/
422
+ * `routerTitle` below, query params are global to the whole navigation, not tied
423
+ * to a specific activated route, so this is always accurate regardless of outlets.
424
+ *
425
+ * Assumes the default `RouterStateSerializer` output shape
426
+ * (`SerializedRouterStateSnapshot`). If you've provided a custom serializer,
427
+ * build your own selector from `RouterState.state()` instead.
428
+ */
429
+ const routerQueryParams = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => state?.state?.root.queryParams);
430
+ const routerQueryParamMap = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => state?.state?.root.queryParamMap);
431
+ const routerFragment = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => state?.state?.root.fragment);
432
+ /**
433
+ * The path params of the deepest activated route on the primary outlet —
434
+ * mirrors what `ActivatedRoute.snapshot.params` exposes for the component
435
+ * currently being rendered.
436
+ *
437
+ * Only follows the primary outlet chain, so in an app with simultaneously
438
+ * active named outlets this reflects the primary outlet's branch only.
439
+ * Use `routerParamsForOutlet(outlet)` to read params from a named outlet's branch.
440
+ */
441
+ const routerParams = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state)?.params);
442
+ const routerParamMap = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state)?.paramMap);
443
+ /** The `data` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */
444
+ const routerData = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state)?.data);
445
+ /** The resolved `title` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */
446
+ const routerTitle = /* @__PURE__ */ createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state)?.title);
447
+ /**
448
+ * The path params of the deepest activated route within the given named
449
+ * outlet's branch, e.g. `routerParamsForOutlet('aux')`.
450
+ */
451
+ function routerParamsForOutlet(outlet) {
452
+ return createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state, outlet)?.params);
453
+ }
454
+ function routerParamMapForOutlet(outlet) {
455
+ return createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state, outlet)?.paramMap);
456
+ }
457
+ /** The `data` of the deepest activated route within the given named outlet's branch. */
458
+ function routerDataForOutlet(outlet) {
459
+ return createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state, outlet)?.data);
460
+ }
461
+ /** The resolved `title` of the deepest activated route within the given named outlet's branch. */
462
+ function routerTitleForOutlet(outlet) {
463
+ return createSelector([ROUTER_STATE_TOKEN], state => getActivatedLeafRoute(state, outlet)?.title);
464
+ }
465
+ /**
466
+ * Walks down to the deepest activated route within the given outlet's branch.
467
+ * For the primary outlet (the default), this simply follows `firstChild`
468
+ * from the root. For a named outlet, it first locates that outlet's
469
+ * activated route anywhere in the tree, then follows `firstChild` from there.
470
+ */
471
+ function getActivatedLeafRoute(state, outlet = PRIMARY_OUTLET) {
472
+ const root = state?.state?.root;
473
+ let route = outlet === PRIMARY_OUTLET ? root : root && findRouteForOutlet(root, outlet);
474
+ while (route?.firstChild) {
475
+ route = route.firstChild;
476
+ }
477
+ return route;
478
+ }
479
+ /** Depth-first search for the activated route belonging to the given outlet. */
480
+ function findRouteForOutlet(route, outlet) {
481
+ for (const child of route.children) {
482
+ if (child.outlet === outlet) {
483
+ return child;
484
+ }
485
+ const found = findRouteForOutlet(child, outlet);
486
+ if (found) {
487
+ return found;
488
+ }
489
+ }
490
+ return undefined;
491
+ }
492
+
413
493
  /**
414
494
  * The public api for consumers of @ngxs/router-plugin
415
495
  */
@@ -418,5 +498,5 @@ function withNgxsRouterPlugin(options) {
418
498
  * Generated bundle index. Do not edit.
419
499
  */
420
500
 
421
- export { DefaultRouterStateSerializer, Navigate, NgxsRouterPluginModule, ROUTER_STATE_TOKEN, RouterCancel, RouterDataResolved, RouterError, RouterNavigated, RouterNavigation, RouterRequest, RouterState, RouterStateSerializer, withNgxsRouterPlugin };
501
+ export { DefaultRouterStateSerializer, Navigate, NgxsRouterPluginModule, ROUTER_STATE_TOKEN, RouterCancel, RouterDataResolved, RouterError, RouterNavigated, RouterNavigation, RouterRequest, RouterState, RouterStateSerializer, routerData, routerDataForOutlet, routerFragment, routerParamMap, routerParamMapForOutlet, routerParams, routerParamsForOutlet, routerQueryParamMap, routerQueryParams, routerTitle, routerTitleForOutlet, withNgxsRouterPlugin };
422
502
  //# sourceMappingURL=ngxs-router-plugin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngxs-router-plugin.mjs","sources":["../../../packages/router-plugin/src/router.actions.ts","../../../packages/router-plugin/src/serializer.ts","../../../packages/router-plugin/src/router.state.ts","../../../packages/router-plugin/src/router.module.ts","../../../packages/router-plugin/index.ts","../../../packages/router-plugin/ngxs-router-plugin.ts"],"sourcesContent":["import {\n NavigationCancel,\n NavigationError,\n NavigationExtras,\n Params,\n RouterStateSnapshot,\n RoutesRecognized,\n ResolveEnd,\n NavigationStart,\n NavigationEnd\n} from '@angular/router';\n\nimport { RouterTrigger } from './router.state';\n\n/**\n * Public event api of the router\n */\nexport class Navigate {\n static readonly type = '[Router] Navigate';\n\n constructor(\n public path: any[],\n public queryParams?: Params,\n public extras?: NavigationExtras\n ) {}\n}\n\n/**\n *\n * Angular Routers internal state events\n *\n */\n\n/**\n * An action dispatched when the router starts the navigation.\n */\nexport class RouterRequest<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterRequest';\n\n constructor(\n public routerState: T,\n public event: NavigationStart,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router navigates.\n */\nexport class RouterNavigation<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterNavigation';\n\n constructor(\n public routerState: T,\n public event: RoutesRecognized,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router cancel navigation.\n */\nexport class RouterCancel<T, V = RouterStateSnapshot> {\n static readonly type = '[Router] RouterCancel';\n\n constructor(\n public routerState: V,\n public storeState: T,\n public event: NavigationCancel,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router errors.\n */\nexport class RouterError<T, V = RouterStateSnapshot> {\n static readonly type = '[Router] RouterError';\n\n constructor(\n public routerState: V,\n public storeState: T,\n public event: NavigationError,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the `ResolveEnd` event is triggered.\n */\nexport class RouterDataResolved<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterDataResolved';\n\n constructor(\n public routerState: T,\n public event: ResolveEnd,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router navigation has been finished successfully.\n */\nexport class RouterNavigated<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterNavigated';\n\n constructor(\n public routerState: T,\n public event: NavigationEnd,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An union type of router actions.\n */\nexport type RouterAction<T, V = RouterStateSnapshot> =\n | RouterRequest<V>\n | RouterNavigation<V>\n | RouterCancel<T, V>\n | RouterError<T, V>\n | RouterDataResolved<V>\n | RouterNavigated<V>;\n","import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\n\nexport abstract class RouterStateSerializer<T> {\n abstract serialize(routerState: RouterStateSnapshot): T;\n}\n\nexport interface SerializedRouterStateSnapshot {\n root: ActivatedRouteSnapshot;\n url: string;\n}\n\nexport class DefaultRouterStateSerializer\n implements RouterStateSerializer<SerializedRouterStateSnapshot>\n{\n serialize(routerState: RouterStateSnapshot): SerializedRouterStateSnapshot {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url\n };\n }\n\n private serializeRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot {\n const children = route.children.map(c => this.serializeRoute(c));\n return {\n url: route.url,\n title: route.title,\n params: route.params,\n queryParams: route.queryParams,\n fragment: route.fragment!,\n data: route.data,\n outlet: route.outlet,\n component: null,\n routeConfig: null,\n root: null as any,\n parent: null,\n firstChild: children[0],\n children: children,\n pathFromRoot: null as any,\n paramMap: route.paramMap,\n queryParamMap: route.queryParamMap,\n toString: route.toString\n };\n }\n}\n","import { NgZone, Injectable, inject, DestroyRef } from '@angular/core';\nimport {\n NavigationCancel,\n NavigationError,\n Router,\n RouterStateSnapshot,\n RoutesRecognized,\n ResolveEnd,\n NavigationStart,\n NavigationEnd,\n Event\n} from '@angular/router';\nimport { Action, createSelector, State, StateContext, StateToken, Store } from '@ngxs/store';\nimport {\n NavigationActionTiming,\n ɵNGXS_ROUTER_PLUGIN_OPTIONS\n} from '@ngxs/router-plugin/internals';\nimport type { Subscription } from 'rxjs';\n\nimport {\n Navigate,\n RouterAction,\n RouterCancel,\n RouterError,\n RouterNavigation,\n RouterDataResolved,\n RouterRequest,\n RouterNavigated\n} from './router.actions';\nimport { RouterStateSerializer } from './serializer';\n\nexport interface RouterStateModel<T = RouterStateSnapshot> {\n state?: T;\n navigationId?: number;\n trigger: RouterTrigger;\n}\n\nexport type RouterTrigger =\n | 'none'\n | 'router'\n | 'store'\n // The `devtools` trigger means that the state change has been triggered by Redux DevTools (e.g. when the time-traveling is used).\n | 'devtools';\n\n// NGXS doesn't permit untyped selectors, such as `select(RouterState)`,\n// as the `RouterState` class itself lacks type information. Therefore,\n// the following state token must replace `RouterState`.\nexport const ROUTER_STATE_TOKEN = new StateToken<RouterStateModel>('router');\n\n@State<RouterStateModel>({\n name: ROUTER_STATE_TOKEN,\n defaults: {\n state: undefined,\n navigationId: undefined,\n trigger: 'none'\n }\n})\n@Injectable()\nexport class RouterState {\n private _store = inject(Store);\n private _router = inject(Router);\n private _serializer: RouterStateSerializer<RouterStateSnapshot> =\n inject(RouterStateSerializer);\n private _ngZone = inject(NgZone);\n\n /**\n * Determines how navigation was performed by the `RouterState` itself\n * or outside via `new Navigate(...)`\n */\n private _trigger: RouterTrigger = 'none';\n\n /**\n * That's the serialized state from the `Router` class\n */\n private _routerState: RouterStateSnapshot | null = null;\n\n /**\n * That's the value of the `RouterState` state\n */\n private _storeState: RouterStateModel | null = null;\n\n private _lastEvent: Event | null = null;\n\n private _options = inject(ɵNGXS_ROUTER_PLUGIN_OPTIONS);\n\n private _subscription!: Subscription;\n\n static state<T = RouterStateSnapshot>() {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n (state: RouterStateModel<RouterStateSnapshot>) => {\n // The `state` is optional if the selector is invoked before the router\n // state is registered in NGXS.\n return state?.state as T | undefined;\n }\n );\n }\n\n static url = createSelector([ROUTER_STATE_TOKEN], state => state?.state?.url);\n\n constructor() {\n this._setUpStoreListener();\n this._setUpRouterEventsListener();\n\n inject(DestroyRef).onDestroy(() => this._subscription.unsubscribe());\n }\n\n @Action(Navigate)\n navigate(_: StateContext<RouterStateModel>, action: Navigate) {\n return this._ngZone.run(() =>\n this._router.navigate(action.path, {\n queryParams: action.queryParams,\n ...action.extras\n })\n );\n }\n\n /**\n * Handles all Angular Router actions (request, navigation, cancel, error, data resolved, navigated).\n *\n * Each time one of these actions is dispatched, the router state in the NGXS store\n * is updated to reflect the latest router snapshot and navigation metadata.\n *\n * Specifically:\n * - `trigger`: source of the navigation\n * - `state`: current `RouterStateSnapshot` of the Angular Router\n * - `navigationId`: unique ID of the router event\n *\n * This ensures the NGXS store always mirrors the latest Angular Router state.\n */\n @Action([\n RouterRequest<RouterStateSnapshot>,\n RouterNavigation<RouterStateSnapshot>,\n RouterError<RouterStateModel, RouterStateSnapshot>,\n RouterCancel<RouterStateModel, RouterStateSnapshot>,\n RouterDataResolved<RouterStateSnapshot>,\n RouterNavigated<RouterStateSnapshot>\n ])\n angularRouterAction(\n ctx: StateContext<RouterStateModel>,\n action: RouterAction<RouterStateModel, RouterStateSnapshot>\n ): void {\n const state = ctx.getState();\n const newState = {\n trigger: action.trigger,\n state: action.routerState,\n navigationId: action.event.id\n };\n\n // Skip updating NGXS state if nothing has changed.\n // This avoids updating the internal NGXS state signal, which would otherwise\n // trigger recomputation of `selectSignal` selectors and schedule unnecessary\n // Angular change detection cycles.\n if (state.trigger === newState.trigger && state.navigationId === newState.navigationId) {\n let equal = false;\n try {\n equal = JSON.stringify(state.state) === JSON.stringify(newState.state);\n } catch {\n // If serialization or stringify fails, assume not equal.\n equal = false;\n }\n\n if (equal) {\n return;\n }\n }\n\n ctx.setState(newState);\n }\n\n private _setUpStoreListener(): void {\n const routerState$ = this._store.select(ROUTER_STATE_TOKEN);\n\n routerState$.subscribe((state: RouterStateModel | undefined) => {\n this._navigateIfNeeded(state);\n });\n }\n\n private _navigateIfNeeded(routerState: RouterStateModel | undefined): void {\n if (routerState?.trigger === 'devtools') {\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n }\n\n const canSkipNavigation =\n !this._storeState ||\n !this._storeState.state ||\n !routerState ||\n routerState.trigger === 'router' ||\n this._router.url === this._storeState.state.url ||\n this._lastEvent instanceof NavigationStart;\n\n if (canSkipNavigation) {\n return;\n }\n\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n this._trigger = 'store';\n this._ngZone.run(() => this._router.navigateByUrl(this._storeState!.state!.url));\n }\n\n private _setUpRouterEventsListener(): void {\n const dispatchRouterNavigationLate =\n this._options != null &&\n this._options.navigationActionTiming === NavigationActionTiming.PostActivation;\n\n let lastRoutesRecognized: RoutesRecognized;\n\n this._subscription = this._router.events.subscribe(event => {\n this._lastEvent = event;\n\n if (event instanceof NavigationStart) {\n this._navigationStart(event);\n } else if (event instanceof RoutesRecognized) {\n lastRoutesRecognized = event;\n if (!dispatchRouterNavigationLate && this._trigger !== 'store') {\n this._dispatchRouterNavigation(lastRoutesRecognized);\n }\n } else if (event instanceof ResolveEnd) {\n this._dispatchRouterDataResolved(event);\n } else if (event instanceof NavigationCancel) {\n this._dispatchRouterCancel(event);\n this._reset();\n } else if (event instanceof NavigationError) {\n this._dispatchRouterError(event);\n this._reset();\n } else if (event instanceof NavigationEnd) {\n if (this._trigger !== 'store') {\n if (dispatchRouterNavigationLate) {\n this._dispatchRouterNavigation(lastRoutesRecognized);\n }\n this._dispatchRouterNavigated(event);\n }\n this._reset();\n }\n });\n }\n\n /** Reacts to `NavigationStart`. */\n private _navigationStart(event: NavigationStart): void {\n this._routerState = this._serializer.serialize(this._router.routerState.snapshot);\n\n if (this._trigger !== 'none') {\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n this._dispatchRouterAction(new RouterRequest(this._routerState, event, this._trigger));\n }\n }\n\n /** Reacts to `ResolveEnd`. */\n private _dispatchRouterDataResolved(event: ResolveEnd): void {\n const routerState = this._serializer.serialize(event.state);\n this._dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));\n }\n\n /** Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`. */\n private _dispatchRouterNavigation(lastRoutesRecognized: RoutesRecognized): void {\n const nextRouterState = this._serializer.serialize(lastRoutesRecognized.state);\n\n this._dispatchRouterAction(\n new RouterNavigation(\n nextRouterState,\n new RoutesRecognized(\n lastRoutesRecognized.id,\n lastRoutesRecognized.url,\n lastRoutesRecognized.urlAfterRedirects,\n nextRouterState\n ),\n this._trigger\n )\n );\n }\n\n /** Reacts to `NavigationCancel`. */\n private _dispatchRouterCancel(event: NavigationCancel): void {\n this._dispatchRouterAction(\n new RouterCancel(this._routerState!, this._storeState, event, this._trigger)\n );\n }\n\n /** Reacts to `NavigationEnd`. */\n private _dispatchRouterError(event: NavigationError): void {\n this._dispatchRouterAction(\n new RouterError(\n this._routerState!,\n this._storeState,\n new NavigationError(event.id, event.url, `${event}`),\n this._trigger\n )\n );\n }\n\n /** Reacts to `NavigationEnd`. */\n private _dispatchRouterNavigated(event: NavigationEnd): void {\n const routerState = this._serializer.serialize(this._router.routerState.snapshot);\n this._dispatchRouterAction(new RouterNavigated(routerState, event, this._trigger));\n }\n\n private _dispatchRouterAction<T>(action: RouterAction<T>): void {\n this._trigger = 'router';\n\n try {\n this._store.dispatch(action);\n } finally {\n this._trigger = 'none';\n }\n }\n\n private _reset(): void {\n this._trigger = 'none';\n this._storeState = null;\n this._routerState = null;\n }\n}\n","import {\n EnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n makeEnvironmentProviders\n} from '@angular/core';\nimport { NgxsModule, provideStates } from '@ngxs/store';\nimport {\n NgxsRouterPluginOptions,\n ɵcreateRouterPluginOptions,\n ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n ɵUSER_OPTIONS\n} from '@ngxs/router-plugin/internals';\n\nimport { RouterState } from './router.state';\nimport { DefaultRouterStateSerializer, RouterStateSerializer } from './serializer';\n\n/**\n * @deprecated Use `withNgxsRouterPlugin()` instead.\n */\n@NgModule({\n imports: [NgxsModule.forFeature([RouterState])]\n})\nexport class NgxsRouterPluginModule {\n /**\n * @deprecated Use `withNgxsRouterPlugin()` instead.\n */\n static forRoot(\n options?: NgxsRouterPluginOptions\n ): ModuleWithProviders<NgxsRouterPluginModule> {\n return {\n ngModule: NgxsRouterPluginModule,\n providers: [\n { provide: ɵUSER_OPTIONS, useValue: options },\n {\n provide: ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n useFactory: ɵcreateRouterPluginOptions,\n deps: [ɵUSER_OPTIONS]\n },\n { provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }\n ]\n };\n }\n}\n\nexport function withNgxsRouterPlugin(options?: NgxsRouterPluginOptions): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideStates([RouterState]),\n { provide: ɵUSER_OPTIONS, useValue: options },\n {\n provide: ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n useFactory: ɵcreateRouterPluginOptions,\n deps: [ɵUSER_OPTIONS]\n },\n { provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }\n ]);\n}\n","/**\n * The public api for consumers of @ngxs/router-plugin\n */\nexport * from './src/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵNGXS_ROUTER_PLUGIN_OPTIONS","ɵUSER_OPTIONS","ɵcreateRouterPluginOptions"],"mappings":";;;;;;;;;AAcA;;AAEG;MACU,QAAQ,CAAA;AAIV,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AALT,IAAA,OAAgB,IAAI,GAAG,mBAAmB;AAE1C,IAAA,WAAA,CACS,IAAW,EACX,WAAoB,EACpB,MAAyB,EAAA;QAFzB,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,MAAM,GAAN,MAAM;IACZ;;AAGL;;;;AAIG;AAEH;;A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BAAoB,CAAC,OAAiC,EAAA;AACpE,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC;AAC5B,QAAA,EAAE,OAAO,EAAEA,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC7C,QAAA;AACE,YAAA,OAAO,EAAED,2BAA2B;AACpC,YAAA,UAAU,EAAEE,0BAA0B;YACtC,IAAI,EAAE,CAACD,aAAa;AACrB,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,4BAA4B;AACzE,KAAA,CAAC;AACJ;;ACxDA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngxs-router-plugin.mjs","sources":["../../../packages/router-plugin/src/router.actions.ts","../../../packages/router-plugin/src/serializer.ts","../../../packages/router-plugin/src/router.state.ts","../../../packages/router-plugin/src/router.module.ts","../../../packages/router-plugin/src/router-selectors.ts","../../../packages/router-plugin/index.ts","../../../packages/router-plugin/ngxs-router-plugin.ts"],"sourcesContent":["import {\n NavigationCancel,\n NavigationError,\n NavigationExtras,\n Params,\n RouterStateSnapshot,\n RoutesRecognized,\n ResolveEnd,\n NavigationStart,\n NavigationEnd\n} from '@angular/router';\n\nimport { RouterTrigger } from './router.state';\n\n/**\n * Public event api of the router\n */\nexport class Navigate {\n static readonly type = '[Router] Navigate';\n\n constructor(\n public path: any[],\n public queryParams?: Params,\n public extras?: NavigationExtras\n ) {}\n}\n\n/**\n *\n * Angular Routers internal state events\n *\n */\n\n/**\n * An action dispatched when the router starts the navigation.\n */\nexport class RouterRequest<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterRequest';\n\n constructor(\n public routerState: T,\n public event: NavigationStart,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router navigates.\n */\nexport class RouterNavigation<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterNavigation';\n\n constructor(\n public routerState: T,\n public event: RoutesRecognized,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router cancel navigation.\n */\nexport class RouterCancel<T, V = RouterStateSnapshot> {\n static readonly type = '[Router] RouterCancel';\n\n constructor(\n public routerState: V,\n public storeState: T,\n public event: NavigationCancel,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router errors.\n */\nexport class RouterError<T, V = RouterStateSnapshot> {\n static readonly type = '[Router] RouterError';\n\n constructor(\n public routerState: V,\n public storeState: T,\n public event: NavigationError,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the `ResolveEnd` event is triggered.\n */\nexport class RouterDataResolved<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterDataResolved';\n\n constructor(\n public routerState: T,\n public event: ResolveEnd,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An action dispatched when the router navigation has been finished successfully.\n */\nexport class RouterNavigated<T = RouterStateSnapshot> {\n static readonly type = '[Router] RouterNavigated';\n\n constructor(\n public routerState: T,\n public event: NavigationEnd,\n public trigger: RouterTrigger = 'none'\n ) {}\n}\n\n/**\n * An union type of router actions.\n */\nexport type RouterAction<T, V = RouterStateSnapshot> =\n | RouterRequest<V>\n | RouterNavigation<V>\n | RouterCancel<T, V>\n | RouterError<T, V>\n | RouterDataResolved<V>\n | RouterNavigated<V>;\n","import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\n\nexport abstract class RouterStateSerializer<T> {\n abstract serialize(routerState: RouterStateSnapshot): T;\n}\n\nexport interface SerializedRouterStateSnapshot {\n root: ActivatedRouteSnapshot;\n url: string;\n}\n\nexport class DefaultRouterStateSerializer\n implements RouterStateSerializer<SerializedRouterStateSnapshot>\n{\n serialize(routerState: RouterStateSnapshot): SerializedRouterStateSnapshot {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url\n };\n }\n\n private serializeRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot {\n const children = route.children.map(c => this.serializeRoute(c));\n return {\n url: route.url,\n title: route.title,\n params: route.params,\n queryParams: route.queryParams,\n fragment: route.fragment!,\n data: route.data,\n outlet: route.outlet,\n component: null,\n routeConfig: null,\n root: null as any,\n parent: null,\n firstChild: children[0],\n children: children,\n pathFromRoot: null as any,\n paramMap: route.paramMap,\n queryParamMap: route.queryParamMap,\n toString: route.toString\n };\n }\n}\n","import { NgZone, Injectable, inject, DestroyRef } from '@angular/core';\nimport {\n NavigationCancel,\n NavigationError,\n Router,\n RouterStateSnapshot,\n RoutesRecognized,\n ResolveEnd,\n NavigationStart,\n NavigationEnd,\n Event\n} from '@angular/router';\nimport { Action, createSelector, State, StateContext, StateToken, Store } from '@ngxs/store';\nimport {\n NavigationActionTiming,\n ɵNGXS_ROUTER_PLUGIN_OPTIONS\n} from '@ngxs/router-plugin/internals';\nimport type { Subscription } from 'rxjs';\n\nimport {\n Navigate,\n RouterAction,\n RouterCancel,\n RouterError,\n RouterNavigation,\n RouterDataResolved,\n RouterRequest,\n RouterNavigated\n} from './router.actions';\nimport { RouterStateSerializer } from './serializer';\n\nexport interface RouterStateModel<T = RouterStateSnapshot> {\n state?: T;\n navigationId?: number;\n trigger: RouterTrigger;\n}\n\nexport type RouterTrigger =\n | 'none'\n | 'router'\n | 'store'\n // The `devtools` trigger means that the state change has been triggered by Redux DevTools (e.g. when the time-traveling is used).\n | 'devtools';\n\n// NGXS doesn't permit untyped selectors, such as `select(RouterState)`,\n// as the `RouterState` class itself lacks type information. Therefore,\n// the following state token must replace `RouterState`.\nexport const ROUTER_STATE_TOKEN = new StateToken<RouterStateModel>('router');\n\n@State<RouterStateModel>({\n name: ROUTER_STATE_TOKEN,\n defaults: {\n state: undefined,\n navigationId: undefined,\n trigger: 'none'\n }\n})\n@Injectable()\nexport class RouterState {\n private _store = inject(Store);\n private _router = inject(Router);\n private _serializer: RouterStateSerializer<RouterStateSnapshot> =\n inject(RouterStateSerializer);\n private _ngZone = inject(NgZone);\n\n /**\n * Determines how navigation was performed by the `RouterState` itself\n * or outside via `new Navigate(...)`\n */\n private _trigger: RouterTrigger = 'none';\n\n /**\n * That's the serialized state from the `Router` class\n */\n private _routerState: RouterStateSnapshot | null = null;\n\n /**\n * That's the value of the `RouterState` state\n */\n private _storeState: RouterStateModel | null = null;\n\n private _lastEvent: Event | null = null;\n\n private _options = inject(ɵNGXS_ROUTER_PLUGIN_OPTIONS);\n\n private _subscription!: Subscription;\n\n static state<T = RouterStateSnapshot>() {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n (state: RouterStateModel<RouterStateSnapshot>) => {\n // The `state` is optional if the selector is invoked before the router\n // state is registered in NGXS.\n return state?.state as T | undefined;\n }\n );\n }\n\n static url = createSelector([ROUTER_STATE_TOKEN], state => state?.state?.url);\n\n constructor() {\n this._setUpStoreListener();\n this._setUpRouterEventsListener();\n\n inject(DestroyRef).onDestroy(() => this._subscription.unsubscribe());\n }\n\n @Action(Navigate)\n navigate(_: StateContext<RouterStateModel>, action: Navigate) {\n return this._ngZone.run(() =>\n this._router.navigate(action.path, {\n queryParams: action.queryParams,\n ...action.extras\n })\n );\n }\n\n /**\n * Handles all Angular Router actions (request, navigation, cancel, error, data resolved, navigated).\n *\n * Each time one of these actions is dispatched, the router state in the NGXS store\n * is updated to reflect the latest router snapshot and navigation metadata.\n *\n * Specifically:\n * - `trigger`: source of the navigation\n * - `state`: current `RouterStateSnapshot` of the Angular Router\n * - `navigationId`: unique ID of the router event\n *\n * This ensures the NGXS store always mirrors the latest Angular Router state.\n */\n @Action([\n RouterRequest<RouterStateSnapshot>,\n RouterNavigation<RouterStateSnapshot>,\n RouterError<RouterStateModel, RouterStateSnapshot>,\n RouterCancel<RouterStateModel, RouterStateSnapshot>,\n RouterDataResolved<RouterStateSnapshot>,\n RouterNavigated<RouterStateSnapshot>\n ])\n angularRouterAction(\n ctx: StateContext<RouterStateModel>,\n action: RouterAction<RouterStateModel, RouterStateSnapshot>\n ): void {\n const state = ctx.getState();\n const newState = {\n trigger: action.trigger,\n state: action.routerState,\n navigationId: action.event.id\n };\n\n // Skip updating NGXS state if nothing has changed.\n // This avoids updating the internal NGXS state signal, which would otherwise\n // trigger recomputation of `selectSignal` selectors and schedule unnecessary\n // Angular change detection cycles.\n if (state.trigger === newState.trigger && state.navigationId === newState.navigationId) {\n let equal = false;\n try {\n equal = JSON.stringify(state.state) === JSON.stringify(newState.state);\n } catch {\n // If serialization or stringify fails, assume not equal.\n equal = false;\n }\n\n if (equal) {\n return;\n }\n }\n\n ctx.setState(newState);\n }\n\n private _setUpStoreListener(): void {\n const routerState$ = this._store.select(ROUTER_STATE_TOKEN);\n\n routerState$.subscribe((state: RouterStateModel | undefined) => {\n this._navigateIfNeeded(state);\n });\n }\n\n private _navigateIfNeeded(routerState: RouterStateModel | undefined): void {\n if (routerState?.trigger === 'devtools') {\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n }\n\n const canSkipNavigation =\n !this._storeState ||\n !this._storeState.state ||\n !routerState ||\n routerState.trigger === 'router' ||\n this._router.url === this._storeState.state.url ||\n this._lastEvent instanceof NavigationStart;\n\n if (canSkipNavigation) {\n return;\n }\n\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n this._trigger = 'store';\n this._ngZone.run(() => this._router.navigateByUrl(this._storeState!.state!.url));\n }\n\n private _setUpRouterEventsListener(): void {\n const dispatchRouterNavigationLate =\n this._options != null &&\n this._options.navigationActionTiming === NavigationActionTiming.PostActivation;\n\n let lastRoutesRecognized: RoutesRecognized;\n\n this._subscription = this._router.events.subscribe(event => {\n this._lastEvent = event;\n\n if (event instanceof NavigationStart) {\n this._navigationStart(event);\n } else if (event instanceof RoutesRecognized) {\n lastRoutesRecognized = event;\n if (!dispatchRouterNavigationLate && this._trigger !== 'store') {\n this._dispatchRouterNavigation(lastRoutesRecognized);\n }\n } else if (event instanceof ResolveEnd) {\n this._dispatchRouterDataResolved(event);\n } else if (event instanceof NavigationCancel) {\n this._dispatchRouterCancel(event);\n this._reset();\n } else if (event instanceof NavigationError) {\n this._dispatchRouterError(event);\n this._reset();\n } else if (event instanceof NavigationEnd) {\n if (this._trigger !== 'store') {\n if (dispatchRouterNavigationLate) {\n this._dispatchRouterNavigation(lastRoutesRecognized);\n }\n this._dispatchRouterNavigated(event);\n }\n this._reset();\n }\n });\n }\n\n /** Reacts to `NavigationStart`. */\n private _navigationStart(event: NavigationStart): void {\n this._routerState = this._serializer.serialize(this._router.routerState.snapshot);\n\n if (this._trigger !== 'none') {\n this._storeState = this._store.selectSnapshot(ROUTER_STATE_TOKEN);\n this._dispatchRouterAction(new RouterRequest(this._routerState, event, this._trigger));\n }\n }\n\n /** Reacts to `ResolveEnd`. */\n private _dispatchRouterDataResolved(event: ResolveEnd): void {\n const routerState = this._serializer.serialize(event.state);\n this._dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));\n }\n\n /** Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`. */\n private _dispatchRouterNavigation(lastRoutesRecognized: RoutesRecognized): void {\n const nextRouterState = this._serializer.serialize(lastRoutesRecognized.state);\n\n this._dispatchRouterAction(\n new RouterNavigation(\n nextRouterState,\n new RoutesRecognized(\n lastRoutesRecognized.id,\n lastRoutesRecognized.url,\n lastRoutesRecognized.urlAfterRedirects,\n nextRouterState\n ),\n this._trigger\n )\n );\n }\n\n /** Reacts to `NavigationCancel`. */\n private _dispatchRouterCancel(event: NavigationCancel): void {\n this._dispatchRouterAction(\n new RouterCancel(this._routerState!, this._storeState, event, this._trigger)\n );\n }\n\n /** Reacts to `NavigationEnd`. */\n private _dispatchRouterError(event: NavigationError): void {\n this._dispatchRouterAction(\n new RouterError(\n this._routerState!,\n this._storeState,\n new NavigationError(event.id, event.url, `${event}`),\n this._trigger\n )\n );\n }\n\n /** Reacts to `NavigationEnd`. */\n private _dispatchRouterNavigated(event: NavigationEnd): void {\n const routerState = this._serializer.serialize(this._router.routerState.snapshot);\n this._dispatchRouterAction(new RouterNavigated(routerState, event, this._trigger));\n }\n\n private _dispatchRouterAction<T>(action: RouterAction<T>): void {\n this._trigger = 'router';\n\n try {\n this._store.dispatch(action);\n } finally {\n this._trigger = 'none';\n }\n }\n\n private _reset(): void {\n this._trigger = 'none';\n this._storeState = null;\n this._routerState = null;\n }\n}\n","import {\n EnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n makeEnvironmentProviders\n} from '@angular/core';\nimport { NgxsModule, provideStates } from '@ngxs/store';\nimport {\n NgxsRouterPluginOptions,\n ɵcreateRouterPluginOptions,\n ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n ɵUSER_OPTIONS\n} from '@ngxs/router-plugin/internals';\n\nimport { RouterState } from './router.state';\nimport { DefaultRouterStateSerializer, RouterStateSerializer } from './serializer';\n\n/**\n * @deprecated Use `withNgxsRouterPlugin()` instead.\n */\n@NgModule({\n imports: [NgxsModule.forFeature([RouterState])]\n})\nexport class NgxsRouterPluginModule {\n /**\n * @deprecated Use `withNgxsRouterPlugin()` instead.\n */\n static forRoot(\n options?: NgxsRouterPluginOptions\n ): ModuleWithProviders<NgxsRouterPluginModule> {\n return {\n ngModule: NgxsRouterPluginModule,\n providers: [\n { provide: ɵUSER_OPTIONS, useValue: options },\n {\n provide: ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n useFactory: ɵcreateRouterPluginOptions,\n deps: [ɵUSER_OPTIONS]\n },\n { provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }\n ]\n };\n }\n}\n\nexport function withNgxsRouterPlugin(options?: NgxsRouterPluginOptions): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideStates([RouterState]),\n { provide: ɵUSER_OPTIONS, useValue: options },\n {\n provide: ɵNGXS_ROUTER_PLUGIN_OPTIONS,\n useFactory: ɵcreateRouterPluginOptions,\n deps: [ɵUSER_OPTIONS]\n },\n { provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }\n ]);\n}\n","import { ActivatedRouteSnapshot, PRIMARY_OUTLET, RouterStateSnapshot } from '@angular/router';\nimport { createSelector } from '@ngxs/store';\n\nimport { ROUTER_STATE_TOKEN, RouterStateModel } from './router.state';\n\n/**\n * These are exported as standalone tree-shakable selectors, rather than as\n * static members on `RouterState`, because unused static class properties\n * always ship in the bundle — bundlers can't remove individual members off\n * a class that's itself always referenced (as `RouterState` is, via\n * `withNgxsRouterPlugin()`). Plain top-level exports can be shaken.\n */\n\n/**\n * The query params of the current navigation. Unlike `routerParams`/`routerData`/\n * `routerTitle` below, query params are global to the whole navigation, not tied\n * to a specific activated route, so this is always accurate regardless of outlets.\n *\n * Assumes the default `RouterStateSerializer` output shape\n * (`SerializedRouterStateSnapshot`). If you've provided a custom serializer,\n * build your own selector from `RouterState.state()` instead.\n */\nexport const routerQueryParams = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => state?.state?.root.queryParams\n);\n\nexport const routerQueryParamMap = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => state?.state?.root.queryParamMap\n);\n\nexport const routerFragment = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => state?.state?.root.fragment\n);\n\n/**\n * The path params of the deepest activated route on the primary outlet —\n * mirrors what `ActivatedRoute.snapshot.params` exposes for the component\n * currently being rendered.\n *\n * Only follows the primary outlet chain, so in an app with simultaneously\n * active named outlets this reflects the primary outlet's branch only.\n * Use `routerParamsForOutlet(outlet)` to read params from a named outlet's branch.\n */\nexport const routerParams = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state)?.params\n);\n\nexport const routerParamMap = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state)?.paramMap\n);\n\n/** The `data` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */\nexport const routerData = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state)?.data\n);\n\n/** The resolved `title` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */\nexport const routerTitle = /* @__PURE__ */ createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state)?.title\n);\n\n/**\n * The path params of the deepest activated route within the given named\n * outlet's branch, e.g. `routerParamsForOutlet('aux')`.\n */\nexport function routerParamsForOutlet(outlet: string) {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state, outlet)?.params\n );\n}\n\nexport function routerParamMapForOutlet(outlet: string) {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state, outlet)?.paramMap\n );\n}\n\n/** The `data` of the deepest activated route within the given named outlet's branch. */\nexport function routerDataForOutlet(outlet: string) {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state, outlet)?.data\n );\n}\n\n/** The resolved `title` of the deepest activated route within the given named outlet's branch. */\nexport function routerTitleForOutlet(outlet: string) {\n return createSelector(\n [ROUTER_STATE_TOKEN],\n state => getActivatedLeafRoute(state, outlet)?.title\n );\n}\n\n/**\n * Walks down to the deepest activated route within the given outlet's branch.\n * For the primary outlet (the default), this simply follows `firstChild`\n * from the root. For a named outlet, it first locates that outlet's\n * activated route anywhere in the tree, then follows `firstChild` from there.\n */\nfunction getActivatedLeafRoute(\n state: RouterStateModel<RouterStateSnapshot> | undefined,\n outlet: string = PRIMARY_OUTLET\n): ActivatedRouteSnapshot | undefined {\n const root = state?.state?.root;\n let route = outlet === PRIMARY_OUTLET ? root : root && findRouteForOutlet(root, outlet);\n while (route?.firstChild) {\n route = route.firstChild;\n }\n return route;\n}\n\n/** Depth-first search for the activated route belonging to the given outlet. */\nfunction findRouteForOutlet(\n route: ActivatedRouteSnapshot,\n outlet: string\n): ActivatedRouteSnapshot | undefined {\n for (const child of route.children) {\n if (child.outlet === outlet) {\n return child;\n }\n const found = findRouteForOutlet(child, outlet);\n if (found) {\n return found;\n }\n }\n return undefined;\n}\n","/**\n * The public api for consumers of @ngxs/router-plugin\n */\nexport * from './src/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵNGXS_ROUTER_PLUGIN_OPTIONS","ɵUSER_OPTIONS","ɵcreateRouterPluginOptions"],"mappings":";;;;;;;;;AAcA;;AAEG;MACU,QAAQ,CAAA;AAIV,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AALT,IAAA,OAAgB,IAAI,GAAG,mBAAmB;AAE1C,IAAA,WAAA,CACS,IAAW,EACX,WAAoB,EACpB,MAAyB,EAAA;QAFzB,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,MAAM,GAAN,MAAM;IACZ;;AAGL;;;;AAIG;AAEH;;AAEG;MACU,aAAa,CAAA;AAIf,IAAA,WAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AALT,IAAA,OAAgB,IAAI,GAAG,wBAAwB;AAE/C,IAAA,WAAA,CACS,WAAc,EACd,KAAsB,EACtB,UAAyB,MAAM,EAAA;QAF/B,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,OAAO,GAAP,OAAO;IACb;;AAGL;;AAEG;MACU,gBAAgB,CAAA;AAIlB,IAAA,WAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AALT,IAAA,OAAgB,IAAI,GAAG,2BAA2B;AAElD,IAAA,WAAA,CACS,WAAc,EACd,KAAuB,EACvB,UAAyB,MAAM,EAAA;QAF/B,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,OAAO,GAAP,OAAO;IACb;;AAGL;;AAEG;MACU,YAAY,CAAA;AAId,IAAA,WAAA;AACA,IAAA,UAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AANT,IAAA,OAAgB,IAAI,GAAG,uBAAuB;AAE9C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AAEA;;;;;AAKG;AACH,SAAS,qBAAqB,CAC5B,KAAwD,EACxD,SAAiB,cAAc,EAAA;AAE/B,IAAA,MAAM,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE,IAAI;IAC/B,IAAI,KAAK,GAAG,MAAM,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC;AACvF,IAAA,OAAO,KAAK,EAAE,UAAU,EAAE;AACxB,QAAA,KAAK,GAAG,KAAK,CAAC,UAAU;IAC1B;AACA,IAAA,OAAO,KAAK;AACd;AAEA;AACA,SAAS,kBAAkB,CACzB,KAA6B,EAC7B,MAAc,EAAA;AAEd,IAAA,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClC,QAAA,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;AAC3B,YAAA,OAAO,KAAK;QACd;QACA,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC;QAC/C,IAAI,KAAK,EAAE;AACT,YAAA,OAAO,KAAK;QACd;IACF;AACA,IAAA,OAAO,SAAS;AAClB;;ACvIA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { NgxsRouterPluginOptions } from '@ngxs/router-plugin/internals';
4
4
  export { NavigationActionTiming, NgxsRouterPluginOptions } from '@ngxs/router-plugin/internals';
5
5
  import * as i1 from '@ngxs/store';
6
6
  import { StateToken, StateContext } from '@ngxs/store';
7
+ import * as _angular_router from '@angular/router';
7
8
  import { Params, NavigationExtras, RouterStateSnapshot, NavigationStart, RoutesRecognized, NavigationCancel, NavigationError, ResolveEnd, NavigationEnd, ActivatedRouteSnapshot } from '@angular/router';
8
9
 
9
10
  /**
@@ -169,6 +170,51 @@ declare class RouterState {
169
170
  static ɵprov: i0.ɵɵInjectableDeclaration<RouterState>;
170
171
  }
171
172
 
173
+ /**
174
+ * These are exported as standalone tree-shakable selectors, rather than as
175
+ * static members on `RouterState`, because unused static class properties
176
+ * always ship in the bundle — bundlers can't remove individual members off
177
+ * a class that's itself always referenced (as `RouterState` is, via
178
+ * `withNgxsRouterPlugin()`). Plain top-level exports can be shaken.
179
+ */
180
+ /**
181
+ * The query params of the current navigation. Unlike `routerParams`/`routerData`/
182
+ * `routerTitle` below, query params are global to the whole navigation, not tied
183
+ * to a specific activated route, so this is always accurate regardless of outlets.
184
+ *
185
+ * Assumes the default `RouterStateSerializer` output shape
186
+ * (`SerializedRouterStateSnapshot`). If you've provided a custom serializer,
187
+ * build your own selector from `RouterState.state()` instead.
188
+ */
189
+ declare const routerQueryParams: (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.Params | undefined;
190
+ declare const routerQueryParamMap: (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.ParamMap | undefined;
191
+ declare const routerFragment: (state: RouterStateModel<RouterStateSnapshot>) => string | null | undefined;
192
+ /**
193
+ * The path params of the deepest activated route on the primary outlet —
194
+ * mirrors what `ActivatedRoute.snapshot.params` exposes for the component
195
+ * currently being rendered.
196
+ *
197
+ * Only follows the primary outlet chain, so in an app with simultaneously
198
+ * active named outlets this reflects the primary outlet's branch only.
199
+ * Use `routerParamsForOutlet(outlet)` to read params from a named outlet's branch.
200
+ */
201
+ declare const routerParams: (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.Params | undefined;
202
+ declare const routerParamMap: (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.ParamMap | undefined;
203
+ /** The `data` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */
204
+ declare const routerData: (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.Data | undefined;
205
+ /** The resolved `title` of the deepest activated route on the primary outlet. Same named-outlet caveat as `routerParams`. */
206
+ declare const routerTitle: (state: RouterStateModel<RouterStateSnapshot>) => string | undefined;
207
+ /**
208
+ * The path params of the deepest activated route within the given named
209
+ * outlet's branch, e.g. `routerParamsForOutlet('aux')`.
210
+ */
211
+ declare function routerParamsForOutlet(outlet: string): (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.Params | undefined;
212
+ declare function routerParamMapForOutlet(outlet: string): (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.ParamMap | undefined;
213
+ /** The `data` of the deepest activated route within the given named outlet's branch. */
214
+ declare function routerDataForOutlet(outlet: string): (state: RouterStateModel<RouterStateSnapshot>) => _angular_router.Data | undefined;
215
+ /** The resolved `title` of the deepest activated route within the given named outlet's branch. */
216
+ declare function routerTitleForOutlet(outlet: string): (state: RouterStateModel<RouterStateSnapshot>) => string | undefined;
217
+
172
218
  declare abstract class RouterStateSerializer<T> {
173
219
  abstract serialize(routerState: RouterStateSnapshot): T;
174
220
  }
@@ -181,5 +227,5 @@ declare class DefaultRouterStateSerializer implements RouterStateSerializer<Seri
181
227
  private serializeRoute;
182
228
  }
183
229
 
184
- export { DefaultRouterStateSerializer, Navigate, NgxsRouterPluginModule, ROUTER_STATE_TOKEN, RouterCancel, RouterDataResolved, RouterError, RouterNavigated, RouterNavigation, RouterRequest, RouterState, RouterStateSerializer, withNgxsRouterPlugin };
230
+ export { DefaultRouterStateSerializer, Navigate, NgxsRouterPluginModule, ROUTER_STATE_TOKEN, RouterCancel, RouterDataResolved, RouterError, RouterNavigated, RouterNavigation, RouterRequest, RouterState, RouterStateSerializer, routerData, routerDataForOutlet, routerFragment, routerParamMap, routerParamMapForOutlet, routerParams, routerParamsForOutlet, routerQueryParamMap, routerQueryParams, routerTitle, routerTitleForOutlet, withNgxsRouterPlugin };
185
231
  export type { RouterAction, RouterStateModel, SerializedRouterStateSnapshot };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngxs/router-plugin",
3
3
  "description": "router plugin for @ngxs/store",
4
- "version": "22.0.0-dev.master-d79b246",
4
+ "version": "22.0.0-dev.master-5cdbcaf",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "@ngxs/store": "^22.0.0 || ^22.0.0-dev",