@o3r/routing 13.0.0-next.6 → 13.0.0-prerelease.1

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.
Files changed (35) hide show
  1. package/fesm2022/o3r-routing.mjs +24 -26
  2. package/fesm2022/o3r-routing.mjs.map +1 -1
  3. package/index.d.ts +263 -4
  4. package/index.d.ts.map +1 -0
  5. package/package.json +16 -16
  6. package/schematics/ng-add/schema.json +2 -1
  7. package/o3r-routing.d.ts.map +0 -1
  8. package/public_api.d.ts +0 -3
  9. package/public_api.d.ts.map +0 -1
  10. package/schematics/ng-add/index.js.map +0 -1
  11. package/schematics/ng-add/schema.js.map +0 -1
  12. package/stores/index.d.ts +0 -2
  13. package/stores/index.d.ts.map +0 -1
  14. package/stores/routing-guard/extra-effects/index.d.ts +0 -2
  15. package/stores/routing-guard/extra-effects/index.d.ts.map +0 -1
  16. package/stores/routing-guard/extra-effects/ngrx-store-router.effect.d.ts +0 -20
  17. package/stores/routing-guard/extra-effects/ngrx-store-router.effect.d.ts.map +0 -1
  18. package/stores/routing-guard/index.d.ts +0 -7
  19. package/stores/routing-guard/index.d.ts.map +0 -1
  20. package/stores/routing-guard/routing-guard.actions.d.ts +0 -40
  21. package/stores/routing-guard/routing-guard.actions.d.ts.map +0 -1
  22. package/stores/routing-guard/routing-guard.module.d.ts +0 -16
  23. package/stores/routing-guard/routing-guard.module.d.ts.map +0 -1
  24. package/stores/routing-guard/routing-guard.reducer.d.ts +0 -20
  25. package/stores/routing-guard/routing-guard.reducer.d.ts.map +0 -1
  26. package/stores/routing-guard/routing-guard.selectors.d.ts +0 -44
  27. package/stores/routing-guard/routing-guard.selectors.d.ts.map +0 -1
  28. package/stores/routing-guard/routing-guard.state.d.ts +0 -47
  29. package/stores/routing-guard/routing-guard.state.d.ts.map +0 -1
  30. package/tools/app-server-routing.module.d.ts +0 -49
  31. package/tools/app-server-routing.module.d.ts.map +0 -1
  32. package/tools/index.d.ts +0 -3
  33. package/tools/index.d.ts.map +0 -1
  34. package/tools/on-navigation-strategy.preloader.d.ts +0 -34
  35. package/tools/on-navigation-strategy.preloader.d.ts.map +0 -1
@@ -1,16 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken, NgModule, makeEnvironmentProviders } from '@angular/core';
3
- import * as i1 from '@ngrx/effects';
4
- import { createEffect, ofType } from '@ngrx/effects';
2
+ import { inject, Injectable, InjectionToken, NgModule, makeEnvironmentProviders } from '@angular/core';
3
+ import { Actions, createEffect, ofType } from '@ngrx/effects';
5
4
  import { ROUTER_REQUEST, ROUTER_NAVIGATED } from '@ngrx/router-store';
6
5
  import { filter, map, switchMap } from 'rxjs/operators';
7
- import * as i1$1 from '@ngrx/store';
6
+ import * as i1 from '@ngrx/store';
8
7
  import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector } from '@ngrx/store';
9
8
  import { createEntityAdapter } from '@ngrx/entity';
10
9
  import { APP_BASE_HREF } from '@angular/common';
11
10
  import { DEFAULT_BUILD_PROPERTIES } from '@o3r/core';
12
- import * as i1$2 from '@angular/router';
13
- import { NavigationEnd } from '@angular/router';
11
+ import { Router, NavigationEnd } from '@angular/router';
14
12
  import { of } from 'rxjs';
15
13
 
16
14
  /** Entity Actions */
@@ -54,8 +52,8 @@ const setRoutingGuardEntityFailureWithReason = createAction(ACTION_SET_ENTITY_AS
54
52
  * Effect to react on Ngrx router store actions
55
53
  */
56
54
  class NgrxStoreRouterEffect {
57
- constructor(actions$) {
58
- this.actions$ = actions$;
55
+ constructor() {
56
+ this.actions$ = inject(Actions);
59
57
  /**
60
58
  * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)
61
59
  */
@@ -65,12 +63,12 @@ class NgrxStoreRouterEffect {
65
63
  */
66
64
  this.resetRouterRegistrationOnNavigated$ = createEffect(() => this.actions$.pipe(ofType(ROUTER_NAVIGATED), map(() => clearRoutingGuardEntities())));
67
65
  }
68
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NgrxStoreRouterEffect, deps: [{ token: i1.Actions }], target: i0.ɵɵFactoryTarget.Injectable }); }
69
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NgrxStoreRouterEffect }); }
66
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NgrxStoreRouterEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NgrxStoreRouterEffect }); }
70
68
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NgrxStoreRouterEffect, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NgrxStoreRouterEffect, decorators: [{
72
70
  type: Injectable
73
- }], ctorParameters: () => [{ type: i1.Actions }] });
71
+ }] });
74
72
 
75
73
  /** Identifies the status of a registered block */
76
74
  var RegisteredItemStatus;
@@ -139,13 +137,13 @@ class RoutingGuardStoreModule {
139
137
  ]
140
138
  };
141
139
  }
142
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: RoutingGuardStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
143
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: RoutingGuardStoreModule, imports: [i1$1.StoreFeatureModule] }); }
144
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: RoutingGuardStoreModule, providers: [
140
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutingGuardStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
141
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: RoutingGuardStoreModule, imports: [i1.StoreFeatureModule] }); }
142
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutingGuardStoreModule, providers: [
145
143
  { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: getDefaultRoutingGuardReducer }
146
144
  ], imports: [StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)] }); }
147
145
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: RoutingGuardStoreModule, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutingGuardStoreModule, decorators: [{
149
147
  type: NgModule,
150
148
  args: [{
151
149
  imports: [
@@ -255,11 +253,11 @@ class AppServerRoutingModule {
255
253
  ]
256
254
  };
257
255
  }
258
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AppServerRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
259
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: AppServerRoutingModule }); }
260
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AppServerRoutingModule }); }
256
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AppServerRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
257
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AppServerRoutingModule }); }
258
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AppServerRoutingModule }); }
261
259
  }
262
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AppServerRoutingModule, decorators: [{
260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AppServerRoutingModule, decorators: [{
263
261
  type: NgModule
264
262
  }] });
265
263
  /**
@@ -312,8 +310,8 @@ function hasPreloadingOnDemand(data) {
312
310
  * @inheritDoc
313
311
  */
314
312
  class O3rOnNavigationPreloadingStrategy {
315
- constructor(router) {
316
- this.router = router;
313
+ constructor() {
314
+ this.router = inject(Router);
317
315
  }
318
316
  /**
319
317
  * Check if the module should be preloaded based on the data preload array of routes or regex value
@@ -337,12 +335,12 @@ class O3rOnNavigationPreloadingStrategy {
337
335
  }
338
336
  return of(null);
339
337
  }
340
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
341
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: O3rOnNavigationPreloadingStrategy }); }
338
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
339
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: O3rOnNavigationPreloadingStrategy }); }
342
340
  }
343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, decorators: [{
341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, decorators: [{
344
342
  type: Injectable
345
- }], ctorParameters: () => [{ type: i1$2.Router }] });
343
+ }] });
346
344
 
347
345
  /**
348
346
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-routing.mjs","sources":["../../src/stores/routing-guard/routing-guard.actions.ts","../../src/stores/routing-guard/extra-effects/ngrx-store-router.effect.ts","../../src/stores/routing-guard/routing-guard.state.ts","../../src/stores/routing-guard/routing-guard.reducer.ts","../../src/stores/routing-guard/routing-guard.module.ts","../../src/stores/routing-guard/routing-guard.selectors.ts","../../src/tools/app-server-routing.module.ts","../../src/tools/on-navigation-strategy.preloader.ts","../../src/o3r-routing.ts"],"sourcesContent":["import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n RegisteredItemFailureReason,\n} from './routing-guard.state';\n\n/** Entity Actions */\nconst ACTION_REGISTER_ENTITY = '[RoutingGuard] register an entity';\nconst ACTION_SET_ENTITY_AS_FAILURE = '[RoutingGuard] set an entity state as FAILURE';\nconst ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON = '[RoutingGuard] set an entity state as SUCCESS and clear reason';\nconst ACTION_SET_ENTITY_AS_PENDING = '[RoutingGuard] set an entity state as PENDING';\nconst ACTION_CLEAR_ENTITIES = '[RoutingGuard] clear entities';\nconst ACTION_CLEAR_FAILURE_REASON = '[RoutingGuard] clear failure reason for an entity';\nconst ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON = '[RoutingGuard] set an entity state as FAILURE with a reason';\n\nexport interface RoutingGuardActionPayload {\n /** Id of the block instance */\n id: string;\n}\n\nexport interface RoutingGuardFailureReasonPayload {\n /** Id of the block instance */\n id: string;\n /** Reason for failure */\n reason: RegisteredItemFailureReason;\n}\n\n/**\n * Register a new entity in routing guard store\n */\nexport const registerRoutingGuardEntity = createAction(ACTION_REGISTER_ENTITY, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in FAILURE status\n */\nexport const setRoutingGuardEntityAsFailure = createAction(ACTION_SET_ENTITY_AS_FAILURE, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in SUCCESS status and clear the reason\n */\nexport const setRoutingGuardEntityAsSuccessAndClearReason = createAction(ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in PENDING status\n */\nexport const setRoutingGuardEntityAsPending = createAction(ACTION_SET_ENTITY_AS_PENDING, props<RoutingGuardActionPayload>());\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearRoutingGuardEntities = createAction(ACTION_CLEAR_ENTITIES);\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearRoutingGuardEntitiesFailureReason = createAction(ACTION_CLEAR_FAILURE_REASON, props<RoutingGuardActionPayload>());\n\n/**\n * Set entity in FAILURE status with a reason\n */\nexport const setRoutingGuardEntityFailureWithReason = createAction(ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON, props<RoutingGuardFailureReasonPayload>());\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n BaseRouterStoreState,\n ROUTER_NAVIGATED,\n ROUTER_REQUEST,\n RouterRequestAction,\n} from '@ngrx/router-store';\nimport {\n filter,\n map,\n} from 'rxjs/operators';\nimport {\n clearRoutingGuardEntities,\n} from '../routing-guard.actions';\n\n/**\n * Effect to react on Ngrx router store actions\n */\n@Injectable()\nexport class NgrxStoreRouterEffect {\n /**\n * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)\n */\n public resetRouterRegistrationOnRequest$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_REQUEST),\n filter((action: RouterRequestAction<BaseRouterStoreState>) => action.payload.event.navigationTrigger === 'popstate'),\n map(() => clearRoutingGuardEntities())\n )\n );\n\n /**\n * Clear Router registrations when navigation happened\n */\n public resetRouterRegistrationOnNavigated$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n map(() => clearRoutingGuardEntities())\n )\n );\n\n constructor(protected actions$: Actions) {}\n}\n","import {\n EntityState,\n} from '@ngrx/entity';\n\n/** Identifies the status of a registered block */\nexport enum RegisteredItemStatus {\n /** block is ready (async call has not been triggered) */\n READY = 'READY',\n /** block is waiting for async call to resolve */\n PENDING = 'PENDING',\n /** block received the async call result and it's a failure */\n FAILURE = 'FAILURE',\n /** block received the async call result and it's a success */\n SUCCESS = 'SUCCESS'\n}\n\n/** Identifies the failure reason for the registered block */\nexport enum RegisteredItemFailureReason {\n /** Routing Failed because the async call result is failure */\n ASYNC_CALL_FAILURE = 'ASYNC_CALL_FAILURE',\n /** Routing failed because the changes to the form has not been saved */\n FORM_UNSAVED = 'FORM_UNSAVED'\n}\n\n/**\n * RoutingGuard model\n */\nexport interface RoutingGuardModel {\n /** Id of the block instance */\n id: string;\n /** Routing status of the block */\n status: RegisteredItemStatus;\n /** Routing Guard blocking reason */\n blockingReason?: RegisteredItemFailureReason;\n}\n\n/**\n * RoutingGuard store state\n */\nexport interface RoutingGuardState extends EntityState<RoutingGuardModel> {}\n\n/**\n * Name of the RoutingGuard Store\n */\nexport const ROUTING_GUARD_STORE_NAME = 'routingGuard';\n\n/**\n * RoutingGuard Store Interface\n */\nexport interface RoutingGuardStore {\n /** RoutingGuard state */\n [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;\n}\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\nimport {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './routing-guard.actions';\nimport {\n RegisteredItemStatus,\n RoutingGuardModel,\n RoutingGuardState,\n} from './routing-guard.state';\n\n/**\n * RoutingGuard Store adapter\n */\nexport const routingGuardAdapter: EntityAdapter<RoutingGuardModel> = createEntityAdapter<RoutingGuardModel>({\n selectId: (model) => model.id\n});\n\n/**\n * RoutingGuard Store initial value\n */\nexport const routingGuardInitialState: RoutingGuardState = routingGuardAdapter.getInitialState({});\n\n/**\n * List of basic actions for RoutingGuard Store\n */\nexport const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[] = [\n on(actions.registerRoutingGuardEntity, (state, payload) =>\n routingGuardAdapter.addOne({ id: payload.id, status: RegisteredItemStatus.READY }, state)),\n\n on(actions.setRoutingGuardEntityAsPending, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.PENDING } }, state)),\n\n on(actions.setRoutingGuardEntityAsFailure, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE } }, state)),\n\n on(actions.setRoutingGuardEntityAsSuccessAndClearReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.SUCCESS, blockingReason: undefined } }, state)),\n\n on(actions.clearRoutingGuardEntities, (state) => routingGuardAdapter.removeAll(state)),\n\n on(actions.clearRoutingGuardEntitiesFailureReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.READY, blockingReason: undefined } }, state)),\n\n on(actions.setRoutingGuardEntityFailureWithReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE, blockingReason: payload.reason } }, state))\n];\n\n/**\n * RoutingGuard Store reducer\n */\nexport const routingGuardReducer = createReducer(\n routingGuardInitialState,\n ...routingGuardReducerFeatures\n);\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n routingGuardReducer,\n} from './routing-guard.reducer';\nimport {\n ROUTING_GUARD_STORE_NAME,\n RoutingGuardState,\n} from './routing-guard.state';\n\n/** Token of the RoutingGuard reducer */\nexport const ROUTING_GUARD_REDUCER_TOKEN = new InjectionToken<ActionReducer<RoutingGuardState, Action>>('Feature RoutingGuard Reducer');\n\n/** Provide default reducer for RoutingGuard store */\nexport function getDefaultRoutingGuardReducer() {\n return routingGuardReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)\n ],\n providers: [\n { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: getDefaultRoutingGuardReducer }\n ]\n})\nexport class RoutingGuardStoreModule {\n public static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule> {\n return {\n ngModule: RoutingGuardStoreModule,\n providers: [\n { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n routingGuardAdapter,\n} from './routing-guard.reducer';\nimport {\n RegisteredItemFailureReason,\n RegisteredItemStatus,\n ROUTING_GUARD_STORE_NAME,\n RoutingGuardState,\n} from './routing-guard.state';\n\nconst { selectIds, selectEntities, selectAll, selectTotal } = routingGuardAdapter.getSelectors();\n\n/** Select RoutingGuard State */\nexport const selectRoutingGuardState = createFeatureSelector<RoutingGuardState>(ROUTING_GUARD_STORE_NAME);\n\n/** Select the array of RoutingGuard ids */\nexport const selectRoutingGuardIds = createSelector(selectRoutingGuardState, selectIds);\n\n/** Select the array of RoutingGuard */\nexport const selectAllRoutingGuard = createSelector(selectRoutingGuardState, selectAll);\n\n/** Select the dictionary of RoutingGuard entities */\nexport const selectRoutingGuardEntities = createSelector(selectRoutingGuardState, selectEntities);\n\n/** Select the total RoutingGuard count */\nexport const selectRoutingGuardTotal = createSelector(selectRoutingGuardState, selectTotal);\n\n/**\n * Selector used to retrieve the list of entities' status\n */\nexport const selectRoutingGuardEntitiesStatusList = createSelector(\n selectRoutingGuardState,\n (state: RoutingGuardState) => {\n return Object.keys(state.entities)\n .filter((key) => !!state.entities[key])\n .map((key) => state.entities[key]!.status);\n }\n);\n\n/**\n * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.\n */\nexport const selectRoutingGuardEntitiesBlockingReasons = createSelector(\n selectRoutingGuardState,\n (state: RoutingGuardState) => {\n return Object.values(state.entities)\n .filter((entity) => !!entity && !!entity.blockingReason)\n .map((entity) => entity!.blockingReason!);\n }\n);\n\n/**\n * Selector used to check that no item is in PENDING state.\n * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard\n */\nexport const hasNoEntitiesInPendingState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: string[]) => {\n return !statusList.includes(RegisteredItemStatus.PENDING);\n }\n);\n\n/**\n * Selector used to check that no item is in FAILURE state.\n * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard\n */\nexport const hasNoEntitiesInFailureState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: string[]) => {\n return !statusList.includes(RegisteredItemStatus.FAILURE);\n }\n);\n\n/**\n * Selector used to check that no item is in READY or FAILURE state.\n * For example, we will rely on this selector to trigger the router navigation and display a loader\n */\nexport const hasNoEntityInReadyOrFailureState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: RegisteredItemStatus[]) => {\n return !statusList.some((status) => status === RegisteredItemStatus.READY || status === RegisteredItemStatus.FAILURE);\n }\n);\n\n/**\n * Selector used to check that no item is in FAILURE state with a blocking reason provided.\n * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.\n */\nexport const hasNoEntityFailureStateWithReasons = createSelector(\n selectRoutingGuardEntitiesBlockingReasons,\n (reasons: RegisteredItemFailureReason[], properties: { blockingReason: RegisteredItemFailureReason }) => {\n return !reasons.includes(properties.blockingReason);\n }\n);\n","import {\n APP_BASE_HREF,\n} from '@angular/common';\nimport {\n InjectionToken,\n makeEnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n type Provider,\n} from '@angular/core';\nimport {\n type BuildTimeProperties,\n DEFAULT_BUILD_PROPERTIES,\n} from '@o3r/core';\n\n/**\n * AppBaseHref factory function\n * The APP_BASE_HREF will assume one of the following values (ordered by priority):\n * 1- undefined (or disabled) if it's not a PROD environment\n * 2- the content of the data tag data-appbasehref in the body if it exists\n * 3- the content of config.APP_BASE_HREF if defined\n * 4- otherwise, undefined\n * @param config The application environment configuration\n */\nexport function appBaseHrefFactory(config: BuildTimeProperties) {\n if (config.ENVIRONMENT !== 'prod') {\n return;\n }\n const dynamicBaseHref: string | undefined = document.body.dataset.appbasehref;\n if (typeof dynamicBaseHref !== 'undefined') {\n return dynamicBaseHref;\n }\n return typeof config.APP_BASE_HREF === 'string' ? config.APP_BASE_HREF : undefined;\n}\n\nexport const ENVIRONMENT_CONFIG_TOKEN = new InjectionToken<BuildTimeProperties>('Environment config');\n\n/**\n * @deprecated Will be removed in v14.\n */\n@NgModule()\nexport class AppServerRoutingModule {\n /**\n * Injects the APP_BASE_HREF with a custom factory\n * @param config The application environment configuration\n * @deprecated Please use {@link provideEnvironment} instead. Will be removed in v14.\n */\n public static forRoot(config: Partial<BuildTimeProperties>): ModuleWithProviders<AppServerRoutingModule> {\n return {\n ngModule: AppServerRoutingModule,\n providers: [\n { provide: ENVIRONMENT_CONFIG_TOKEN, useValue: { ...DEFAULT_BUILD_PROPERTIES, ...config } },\n {\n provide: APP_BASE_HREF,\n useFactory: appBaseHrefFactory,\n deps: [ENVIRONMENT_CONFIG_TOKEN]\n }\n ]\n };\n }\n}\n\ntype EnvironmentFeatureKind = 'base-href';\n\ninterface EnvironmentFeature<FeatureKind extends EnvironmentFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\ntype BaseHrefFeature = EnvironmentFeature<'base-href'>;\n\ntype EnvironmentFeatures = BaseHrefFeature;\n\n/**\n * Specify a custom base href\n * @param baseHref\n */\nexport function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures {\n return {\n ɵkind: 'base-href',\n ɵproviders: [\n {\n provide: APP_BASE_HREF,\n ...(\n typeof baseHref === 'function'\n ? { useFactory: baseHref, deps: [ENVIRONMENT_CONFIG_TOKEN] }\n : { useValue: baseHref }\n )\n }\n ]\n };\n}\n\n/**\n * Provide environment configuration\n * @note it will also provide APP_BASE_HREF based on the environment configuration\n * @param config\n * @param features\n */\nexport function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]) {\n const additionalProviders = [];\n const baseHrefFeature = features.find((f) => f.ɵkind === 'base-href') ?? withBaseHref(appBaseHrefFactory);\n additionalProviders.push(baseHrefFeature.ɵproviders);\n\n return makeEnvironmentProviders([\n { provide: ENVIRONMENT_CONFIG_TOKEN, useValue: { ...DEFAULT_BUILD_PROPERTIES, ...config } },\n additionalProviders\n ]);\n}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n NavigationEnd,\n PreloadingStrategy,\n Route,\n Router,\n} from '@angular/router';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n filter,\n switchMap,\n} from 'rxjs/operators';\n\n/**\n * Data to inject to the route parameter to specify preloading strategy\n */\nexport interface O3rOnDemandPreloadingData {\n /** List of page reached that trigger preloading */\n preloadOn: string[] | '*' | RegExp;\n}\n\n/**\n * Check if the route has preload instructions\n * @param data Route data\n */\nexport function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData {\n if (!data) {\n return false;\n }\n\n return (Array.isArray(data.preloadOn) && data.preloadOn.length > 0)\n || data.preloadOn === '*'\n || data.preloadOn instanceof RegExp;\n}\n\n/**\n * Otter Preloading strategy base on previous route\n * @inheritDoc\n */\n@Injectable()\nexport class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {\n constructor(private readonly router: Router) {}\n\n /**\n * Check if the module should be preloaded based on the data preload array of routes or regex value\n * @param data Route data\n * @param url URL of current page\n */\n private isUrlMatchingPreloadConfig(data: any, url: string): boolean {\n return (Array.isArray(data.preloadOn) && data.preloadOn.includes(url))\n || (data.preloadOn instanceof RegExp && data.preloadOn.test(url));\n }\n\n /** @inheritDoc */\n public preload(route: Route, preload: () => Observable<any>): Observable<any> {\n if ((route.path || route.matcher) && hasPreloadingOnDemand(route.data)) {\n // On application landing page, check the route to preload.\n if (route.data.preloadOn === '*' || this.isUrlMatchingPreloadConfig(route.data, this.router.routerState.snapshot.url)) {\n return preload();\n }\n\n // On route navigation end, load the routes to preload for the current route.\n return this.router.events\n .pipe(\n filter((r) => r instanceof NavigationEnd && this.isUrlMatchingPreloadConfig(route.data, r.url)),\n switchMap(() => preload())\n );\n }\n return of(null);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.registerRoutingGuardEntity","actions.setRoutingGuardEntityAsPending","actions.setRoutingGuardEntityAsFailure","actions.setRoutingGuardEntityAsSuccessAndClearReason","actions.clearRoutingGuardEntities","actions.clearRoutingGuardEntitiesFailureReason","actions.setRoutingGuardEntityFailureWithReason","i1"],"mappings":";;;;;;;;;;;;;;;AAQA;AACA,MAAM,sBAAsB,GAAG,mCAAmC;AAClE,MAAM,4BAA4B,GAAG,+CAA+C;AACpF,MAAM,6CAA6C,GAAG,gEAAgE;AACtH,MAAM,4BAA4B,GAAG,+CAA+C;AACpF,MAAM,qBAAqB,GAAG,+BAA+B;AAC7D,MAAM,2BAA2B,GAAG,mDAAmD;AACvF,MAAM,wCAAwC,GAAG,6DAA6D;AAc9G;;AAEG;AACU,MAAA,0BAA0B,GAAG,YAAY,CAAC,sBAAsB,EAAE,KAAK,EAA6B;AAEjH;;AAEG;AACU,MAAA,8BAA8B,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAA6B;AA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EAAA,KAAA,EAAAA,IAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;sIAAjC,iCAAiC,EAAA,CAAA,CAAA;;4FAAjC,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C;;;AC5CD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-routing.mjs","sources":["../../src/stores/routing-guard/routing-guard.actions.ts","../../src/stores/routing-guard/extra-effects/ngrx-store-router.effect.ts","../../src/stores/routing-guard/routing-guard.state.ts","../../src/stores/routing-guard/routing-guard.reducer.ts","../../src/stores/routing-guard/routing-guard.module.ts","../../src/stores/routing-guard/routing-guard.selectors.ts","../../src/tools/app-server-routing.module.ts","../../src/tools/on-navigation-strategy.preloader.ts","../../src/o3r-routing.ts"],"sourcesContent":["import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n RegisteredItemFailureReason,\n} from './routing-guard.state';\n\n/** Entity Actions */\nconst ACTION_REGISTER_ENTITY = '[RoutingGuard] register an entity';\nconst ACTION_SET_ENTITY_AS_FAILURE = '[RoutingGuard] set an entity state as FAILURE';\nconst ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON = '[RoutingGuard] set an entity state as SUCCESS and clear reason';\nconst ACTION_SET_ENTITY_AS_PENDING = '[RoutingGuard] set an entity state as PENDING';\nconst ACTION_CLEAR_ENTITIES = '[RoutingGuard] clear entities';\nconst ACTION_CLEAR_FAILURE_REASON = '[RoutingGuard] clear failure reason for an entity';\nconst ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON = '[RoutingGuard] set an entity state as FAILURE with a reason';\n\nexport interface RoutingGuardActionPayload {\n /** Id of the block instance */\n id: string;\n}\n\nexport interface RoutingGuardFailureReasonPayload {\n /** Id of the block instance */\n id: string;\n /** Reason for failure */\n reason: RegisteredItemFailureReason;\n}\n\n/**\n * Register a new entity in routing guard store\n */\nexport const registerRoutingGuardEntity = createAction(ACTION_REGISTER_ENTITY, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in FAILURE status\n */\nexport const setRoutingGuardEntityAsFailure = createAction(ACTION_SET_ENTITY_AS_FAILURE, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in SUCCESS status and clear the reason\n */\nexport const setRoutingGuardEntityAsSuccessAndClearReason = createAction(ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON, props<RoutingGuardActionPayload>());\n\n/**\n * Set an entity in PENDING status\n */\nexport const setRoutingGuardEntityAsPending = createAction(ACTION_SET_ENTITY_AS_PENDING, props<RoutingGuardActionPayload>());\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearRoutingGuardEntities = createAction(ACTION_CLEAR_ENTITIES);\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearRoutingGuardEntitiesFailureReason = createAction(ACTION_CLEAR_FAILURE_REASON, props<RoutingGuardActionPayload>());\n\n/**\n * Set entity in FAILURE status with a reason\n */\nexport const setRoutingGuardEntityFailureWithReason = createAction(ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON, props<RoutingGuardFailureReasonPayload>());\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n BaseRouterStoreState,\n ROUTER_NAVIGATED,\n ROUTER_REQUEST,\n RouterRequestAction,\n} from '@ngrx/router-store';\nimport {\n filter,\n map,\n} from 'rxjs/operators';\nimport {\n clearRoutingGuardEntities,\n} from '../routing-guard.actions';\n\n/**\n * Effect to react on Ngrx router store actions\n */\n@Injectable()\nexport class NgrxStoreRouterEffect {\n protected actions$ = inject(Actions);\n\n /**\n * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)\n */\n public resetRouterRegistrationOnRequest$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_REQUEST),\n filter((action: RouterRequestAction<BaseRouterStoreState>) => action.payload.event.navigationTrigger === 'popstate'),\n map(() => clearRoutingGuardEntities())\n )\n );\n\n /**\n * Clear Router registrations when navigation happened\n */\n public resetRouterRegistrationOnNavigated$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n map(() => clearRoutingGuardEntities())\n )\n );\n}\n","import {\n EntityState,\n} from '@ngrx/entity';\n\n/** Identifies the status of a registered block */\nexport enum RegisteredItemStatus {\n /** block is ready (async call has not been triggered) */\n READY = 'READY',\n /** block is waiting for async call to resolve */\n PENDING = 'PENDING',\n /** block received the async call result and it's a failure */\n FAILURE = 'FAILURE',\n /** block received the async call result and it's a success */\n SUCCESS = 'SUCCESS'\n}\n\n/** Identifies the failure reason for the registered block */\nexport enum RegisteredItemFailureReason {\n /** Routing Failed because the async call result is failure */\n ASYNC_CALL_FAILURE = 'ASYNC_CALL_FAILURE',\n /** Routing failed because the changes to the form has not been saved */\n FORM_UNSAVED = 'FORM_UNSAVED'\n}\n\n/**\n * RoutingGuard model\n */\nexport interface RoutingGuardModel {\n /** Id of the block instance */\n id: string;\n /** Routing status of the block */\n status: RegisteredItemStatus;\n /** Routing Guard blocking reason */\n blockingReason?: RegisteredItemFailureReason;\n}\n\n/**\n * RoutingGuard store state\n */\nexport interface RoutingGuardState extends EntityState<RoutingGuardModel> {}\n\n/**\n * Name of the RoutingGuard Store\n */\nexport const ROUTING_GUARD_STORE_NAME = 'routingGuard';\n\n/**\n * RoutingGuard Store Interface\n */\nexport interface RoutingGuardStore {\n /** RoutingGuard state */\n [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;\n}\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\nimport {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './routing-guard.actions';\nimport {\n RegisteredItemStatus,\n RoutingGuardModel,\n RoutingGuardState,\n} from './routing-guard.state';\n\n/**\n * RoutingGuard Store adapter\n */\nexport const routingGuardAdapter: EntityAdapter<RoutingGuardModel> = createEntityAdapter<RoutingGuardModel>({\n selectId: (model) => model.id\n});\n\n/**\n * RoutingGuard Store initial value\n */\nexport const routingGuardInitialState = routingGuardAdapter.getInitialState<RoutingGuardState>({});\n\n/**\n * List of basic actions for RoutingGuard Store\n */\nexport const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[] = [\n on(actions.registerRoutingGuardEntity, (state, payload) =>\n routingGuardAdapter.addOne({ id: payload.id, status: RegisteredItemStatus.READY }, state)),\n\n on(actions.setRoutingGuardEntityAsPending, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.PENDING } }, state)),\n\n on(actions.setRoutingGuardEntityAsFailure, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE } }, state)),\n\n on(actions.setRoutingGuardEntityAsSuccessAndClearReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.SUCCESS, blockingReason: undefined } }, state)),\n\n on(actions.clearRoutingGuardEntities, (state) => routingGuardAdapter.removeAll(state)),\n\n on(actions.clearRoutingGuardEntitiesFailureReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.READY, blockingReason: undefined } }, state)),\n\n on(actions.setRoutingGuardEntityFailureWithReason, (state, payload) =>\n routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE, blockingReason: payload.reason } }, state))\n];\n\n/**\n * RoutingGuard Store reducer\n */\nexport const routingGuardReducer = createReducer(\n routingGuardInitialState,\n ...routingGuardReducerFeatures\n);\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n routingGuardReducer,\n} from './routing-guard.reducer';\nimport {\n ROUTING_GUARD_STORE_NAME,\n RoutingGuardState,\n} from './routing-guard.state';\n\n/** Token of the RoutingGuard reducer */\nexport const ROUTING_GUARD_REDUCER_TOKEN = new InjectionToken<ActionReducer<RoutingGuardState, Action>>('Feature RoutingGuard Reducer');\n\n/** Provide default reducer for RoutingGuard store */\nexport function getDefaultRoutingGuardReducer() {\n return routingGuardReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)\n ],\n providers: [\n { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: getDefaultRoutingGuardReducer }\n ]\n})\nexport class RoutingGuardStoreModule {\n public static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule> {\n return {\n ngModule: RoutingGuardStoreModule,\n providers: [\n { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n routingGuardAdapter,\n} from './routing-guard.reducer';\nimport {\n RegisteredItemFailureReason,\n RegisteredItemStatus,\n ROUTING_GUARD_STORE_NAME,\n RoutingGuardState,\n} from './routing-guard.state';\n\nconst { selectIds, selectEntities, selectAll, selectTotal } = routingGuardAdapter.getSelectors();\n\n/** Select RoutingGuard State */\nexport const selectRoutingGuardState = createFeatureSelector<RoutingGuardState>(ROUTING_GUARD_STORE_NAME);\n\n/** Select the array of RoutingGuard ids */\nexport const selectRoutingGuardIds = createSelector(selectRoutingGuardState, selectIds);\n\n/** Select the array of RoutingGuard */\nexport const selectAllRoutingGuard = createSelector(selectRoutingGuardState, selectAll);\n\n/** Select the dictionary of RoutingGuard entities */\nexport const selectRoutingGuardEntities = createSelector(selectRoutingGuardState, selectEntities);\n\n/** Select the total RoutingGuard count */\nexport const selectRoutingGuardTotal = createSelector(selectRoutingGuardState, selectTotal);\n\n/**\n * Selector used to retrieve the list of entities' status\n */\nexport const selectRoutingGuardEntitiesStatusList = createSelector(\n selectRoutingGuardState,\n (state: RoutingGuardState) => {\n return Object.keys(state.entities)\n .filter((key) => !!state.entities[key])\n .map((key) => state.entities[key]!.status);\n }\n);\n\n/**\n * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.\n */\nexport const selectRoutingGuardEntitiesBlockingReasons = createSelector(\n selectRoutingGuardState,\n (state: RoutingGuardState) => {\n return Object.values(state.entities)\n .filter((entity) => !!entity && !!entity.blockingReason)\n .map((entity) => entity!.blockingReason!);\n }\n);\n\n/**\n * Selector used to check that no item is in PENDING state.\n * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard\n */\nexport const hasNoEntitiesInPendingState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: string[]) => {\n return !statusList.includes(RegisteredItemStatus.PENDING);\n }\n);\n\n/**\n * Selector used to check that no item is in FAILURE state.\n * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard\n */\nexport const hasNoEntitiesInFailureState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: string[]) => {\n return !statusList.includes(RegisteredItemStatus.FAILURE);\n }\n);\n\n/**\n * Selector used to check that no item is in READY or FAILURE state.\n * For example, we will rely on this selector to trigger the router navigation and display a loader\n */\nexport const hasNoEntityInReadyOrFailureState = createSelector(\n selectRoutingGuardEntitiesStatusList,\n (statusList: RegisteredItemStatus[]) => {\n return !statusList.some((status) => status === RegisteredItemStatus.READY || status === RegisteredItemStatus.FAILURE);\n }\n);\n\n/**\n * Selector used to check that no item is in FAILURE state with a blocking reason provided.\n * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.\n */\nexport const hasNoEntityFailureStateWithReasons = createSelector(\n selectRoutingGuardEntitiesBlockingReasons,\n (reasons: RegisteredItemFailureReason[], properties: { blockingReason: RegisteredItemFailureReason }) => {\n return !reasons.includes(properties.blockingReason);\n }\n);\n","import {\n APP_BASE_HREF,\n} from '@angular/common';\nimport {\n InjectionToken,\n makeEnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n type Provider,\n} from '@angular/core';\nimport {\n type BuildTimeProperties,\n DEFAULT_BUILD_PROPERTIES,\n} from '@o3r/core';\n\n/**\n * AppBaseHref factory function\n * The APP_BASE_HREF will assume one of the following values (ordered by priority):\n * 1- undefined (or disabled) if it's not a PROD environment\n * 2- the content of the data tag data-appbasehref in the body if it exists\n * 3- the content of config.APP_BASE_HREF if defined\n * 4- otherwise, undefined\n * @param config The application environment configuration\n */\nexport function appBaseHrefFactory(config: BuildTimeProperties) {\n if (config.ENVIRONMENT !== 'prod') {\n return;\n }\n const dynamicBaseHref: string | undefined = document.body.dataset.appbasehref;\n if (typeof dynamicBaseHref !== 'undefined') {\n return dynamicBaseHref;\n }\n return typeof config.APP_BASE_HREF === 'string' ? config.APP_BASE_HREF : undefined;\n}\n\nexport const ENVIRONMENT_CONFIG_TOKEN = new InjectionToken<BuildTimeProperties>('Environment config');\n\n/**\n * @deprecated Will be removed in v14.\n */\n@NgModule()\nexport class AppServerRoutingModule {\n /**\n * Injects the APP_BASE_HREF with a custom factory\n * @param config The application environment configuration\n * @deprecated Please use {@link provideEnvironment} instead. Will be removed in v14.\n */\n public static forRoot(config: Partial<BuildTimeProperties>): ModuleWithProviders<AppServerRoutingModule> {\n return {\n ngModule: AppServerRoutingModule,\n providers: [\n { provide: ENVIRONMENT_CONFIG_TOKEN, useValue: { ...DEFAULT_BUILD_PROPERTIES, ...config } },\n {\n provide: APP_BASE_HREF,\n useFactory: appBaseHrefFactory,\n deps: [ENVIRONMENT_CONFIG_TOKEN]\n }\n ]\n };\n }\n}\n\ntype EnvironmentFeatureKind = 'base-href';\n\ninterface EnvironmentFeature<FeatureKind extends EnvironmentFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\ntype BaseHrefFeature = EnvironmentFeature<'base-href'>;\n\ntype EnvironmentFeatures = BaseHrefFeature;\n\n/**\n * Specify a custom base href\n * @param baseHref\n */\nexport function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures {\n return {\n ɵkind: 'base-href',\n ɵproviders: [\n {\n provide: APP_BASE_HREF,\n ...(\n typeof baseHref === 'function'\n ? { useFactory: baseHref, deps: [ENVIRONMENT_CONFIG_TOKEN] }\n : { useValue: baseHref }\n )\n }\n ]\n };\n}\n\n/**\n * Provide environment configuration\n * @note it will also provide APP_BASE_HREF based on the environment configuration\n * @param config\n * @param features\n */\nexport function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]) {\n const additionalProviders = [];\n const baseHrefFeature = features.find((f) => f.ɵkind === 'base-href') ?? withBaseHref(appBaseHrefFactory);\n additionalProviders.push(baseHrefFeature.ɵproviders);\n\n return makeEnvironmentProviders([\n { provide: ENVIRONMENT_CONFIG_TOKEN, useValue: { ...DEFAULT_BUILD_PROPERTIES, ...config } },\n additionalProviders\n ]);\n}\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n NavigationEnd,\n PreloadingStrategy,\n Route,\n Router,\n} from '@angular/router';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n filter,\n switchMap,\n} from 'rxjs/operators';\n\n/**\n * Data to inject to the route parameter to specify preloading strategy\n */\nexport interface O3rOnDemandPreloadingData {\n /** List of page reached that trigger preloading */\n preloadOn: string[] | '*' | RegExp;\n}\n\n/**\n * Check if the route has preload instructions\n * @param data Route data\n */\nexport function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData {\n if (!data) {\n return false;\n }\n\n return (Array.isArray(data.preloadOn) && data.preloadOn.length > 0)\n || data.preloadOn === '*'\n || data.preloadOn instanceof RegExp;\n}\n\n/**\n * Otter Preloading strategy base on previous route\n * @inheritDoc\n */\n@Injectable()\nexport class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {\n private readonly router = inject(Router);\n\n /**\n * Check if the module should be preloaded based on the data preload array of routes or regex value\n * @param data Route data\n * @param url URL of current page\n */\n private isUrlMatchingPreloadConfig(data: any, url: string): boolean {\n return (Array.isArray(data.preloadOn) && data.preloadOn.includes(url))\n || (data.preloadOn instanceof RegExp && data.preloadOn.test(url));\n }\n\n /** @inheritDoc */\n public preload(route: Route, preload: () => Observable<any>): Observable<any> {\n if ((route.path || route.matcher) && hasPreloadingOnDemand(route.data)) {\n // On application landing page, check the route to preload.\n if (route.data.preloadOn === '*' || this.isUrlMatchingPreloadConfig(route.data, this.router.routerState.snapshot.url)) {\n return preload();\n }\n\n // On route navigation end, load the routes to preload for the current route.\n return this.router.events\n .pipe(\n filter((r) => r instanceof NavigationEnd && this.isUrlMatchingPreloadConfig(route.data, r.url)),\n switchMap(() => preload())\n );\n }\n return of(null);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.registerRoutingGuardEntity","actions.setRoutingGuardEntityAsPending","actions.setRoutingGuardEntityAsFailure","actions.setRoutingGuardEntityAsSuccessAndClearReason","actions.clearRoutingGuardEntities","actions.clearRoutingGuardEntitiesFailureReason","actions.setRoutingGuardEntityFailureWithReason"],"mappings":";;;;;;;;;;;;;AAQA;AACA,MAAM,sBAAsB,GAAG,mCAAmC;AAClE,MAAM,4BAA4B,GAAG,+CAA+C;AACpF,MAAM,6CAA6C,GAAG,gEAAgE;AACtH,MAAM,4BAA4B,GAAG,+CAA+C;AACpF,MAAM,qBAAqB,GAAG,+BAA+B;AAC7D,MAAM,2BAA2B,GAAG,mDAAmD;AACvF,MAAM,wCAAwC,GAAG,6DAA6D;AAc9G;;AAEG;AACI,MAAM,0BAA0B,GAAG,YAAY,CAAC,sBAAsB,EAAE,KAAK,EAA6B;AAEjH;;AAEG;AACI,MAAM,8BAA8B,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAA6B;AAE3H;;AAEG;AACI,MAAM,4CAA4C,GAAG,YAAY,CAAC,6CAA6C,EAAE,KAAK,EAA6B;AAE1J;;AAEG;AACI,MAAM,8BAA8B,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAA6B;AAE3H;;AAEG;MACU,yBAAyB,G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AEG;;;;"}
package/index.d.ts CHANGED
@@ -1,6 +1,265 @@
1
+ import * as _ngrx_effects from '@ngrx/effects';
2
+ import { Actions } from '@ngrx/effects';
3
+ import * as rxjs from 'rxjs';
4
+ import { Observable } from 'rxjs';
5
+ import * as _ngrx_store from '@ngrx/store';
6
+ import { ActionReducer, Action, ReducerTypes, ActionCreator } from '@ngrx/store';
7
+ import * as i0 from '@angular/core';
8
+ import { InjectionToken, ModuleWithProviders, Provider } from '@angular/core';
9
+ import * as _ngrx_entity from '@ngrx/entity';
10
+ import { EntityState, EntityAdapter } from '@ngrx/entity';
11
+ import * as _o3r_routing from '@o3r/routing';
12
+ import { BuildTimeProperties } from '@o3r/core';
13
+ import { PreloadingStrategy, Route } from '@angular/router';
14
+
1
15
  /**
2
- * Generated bundle index. Do not edit.
16
+ * Effect to react on Ngrx router store actions
3
17
  */
4
- /// <amd-module name="@o3r/routing" />
5
- export * from './public_api';
6
- //# sourceMappingURL=o3r-routing.d.ts.map
18
+ declare class NgrxStoreRouterEffect {
19
+ protected actions$: Actions<any>;
20
+ /**
21
+ * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)
22
+ */
23
+ resetRouterRegistrationOnRequest$: rxjs.Observable<_ngrx_store.Action<"[RoutingGuard] clear entities">> & _ngrx_effects.CreateEffectMetadata;
24
+ /**
25
+ * Clear Router registrations when navigation happened
26
+ */
27
+ resetRouterRegistrationOnNavigated$: rxjs.Observable<_ngrx_store.Action<"[RoutingGuard] clear entities">> & _ngrx_effects.CreateEffectMetadata;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgrxStoreRouterEffect, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgrxStoreRouterEffect>;
30
+ }
31
+
32
+ /** Identifies the status of a registered block */
33
+ declare enum RegisteredItemStatus {
34
+ /** block is ready (async call has not been triggered) */
35
+ READY = "READY",
36
+ /** block is waiting for async call to resolve */
37
+ PENDING = "PENDING",
38
+ /** block received the async call result and it's a failure */
39
+ FAILURE = "FAILURE",
40
+ /** block received the async call result and it's a success */
41
+ SUCCESS = "SUCCESS"
42
+ }
43
+ /** Identifies the failure reason for the registered block */
44
+ declare enum RegisteredItemFailureReason {
45
+ /** Routing Failed because the async call result is failure */
46
+ ASYNC_CALL_FAILURE = "ASYNC_CALL_FAILURE",
47
+ /** Routing failed because the changes to the form has not been saved */
48
+ FORM_UNSAVED = "FORM_UNSAVED"
49
+ }
50
+ /**
51
+ * RoutingGuard model
52
+ */
53
+ interface RoutingGuardModel {
54
+ /** Id of the block instance */
55
+ id: string;
56
+ /** Routing status of the block */
57
+ status: RegisteredItemStatus;
58
+ /** Routing Guard blocking reason */
59
+ blockingReason?: RegisteredItemFailureReason;
60
+ }
61
+ /**
62
+ * RoutingGuard store state
63
+ */
64
+ interface RoutingGuardState extends EntityState<RoutingGuardModel> {
65
+ }
66
+ /**
67
+ * Name of the RoutingGuard Store
68
+ */
69
+ declare const ROUTING_GUARD_STORE_NAME = "routingGuard";
70
+ /**
71
+ * RoutingGuard Store Interface
72
+ */
73
+ interface RoutingGuardStore {
74
+ /** RoutingGuard state */
75
+ [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;
76
+ }
77
+
78
+ interface RoutingGuardActionPayload {
79
+ /** Id of the block instance */
80
+ id: string;
81
+ }
82
+ interface RoutingGuardFailureReasonPayload {
83
+ /** Id of the block instance */
84
+ id: string;
85
+ /** Reason for failure */
86
+ reason: RegisteredItemFailureReason;
87
+ }
88
+ /**
89
+ * Register a new entity in routing guard store
90
+ */
91
+ declare const registerRoutingGuardEntity: _ngrx_store.ActionCreator<"[RoutingGuard] register an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] register an entity">>;
92
+ /**
93
+ * Set an entity in FAILURE status
94
+ */
95
+ declare const setRoutingGuardEntityAsFailure: _ngrx_store.ActionCreator<"[RoutingGuard] set an entity state as FAILURE", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] set an entity state as FAILURE">>;
96
+ /**
97
+ * Set an entity in SUCCESS status and clear the reason
98
+ */
99
+ declare const setRoutingGuardEntityAsSuccessAndClearReason: _ngrx_store.ActionCreator<"[RoutingGuard] set an entity state as SUCCESS and clear reason", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] set an entity state as SUCCESS and clear reason">>;
100
+ /**
101
+ * Set an entity in PENDING status
102
+ */
103
+ declare const setRoutingGuardEntityAsPending: _ngrx_store.ActionCreator<"[RoutingGuard] set an entity state as PENDING", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] set an entity state as PENDING">>;
104
+ /**
105
+ * Clear only the entities, keeps the other attributes in the state
106
+ */
107
+ declare const clearRoutingGuardEntities: _ngrx_store.ActionCreator<"[RoutingGuard] clear entities", () => _ngrx_store.Action<"[RoutingGuard] clear entities">>;
108
+ /**
109
+ * Clear only the entities, keeps the other attributes in the state
110
+ */
111
+ declare const clearRoutingGuardEntitiesFailureReason: _ngrx_store.ActionCreator<"[RoutingGuard] clear failure reason for an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] clear failure reason for an entity">>;
112
+ /**
113
+ * Set entity in FAILURE status with a reason
114
+ */
115
+ declare const setRoutingGuardEntityFailureWithReason: _ngrx_store.ActionCreator<"[RoutingGuard] set an entity state as FAILURE with a reason", (props: RoutingGuardFailureReasonPayload) => RoutingGuardFailureReasonPayload & _ngrx_store.Action<"[RoutingGuard] set an entity state as FAILURE with a reason">>;
116
+
117
+ /** Token of the RoutingGuard reducer */
118
+ declare const ROUTING_GUARD_REDUCER_TOKEN: InjectionToken<ActionReducer<RoutingGuardState, Action<string>>>;
119
+ /** Provide default reducer for RoutingGuard store */
120
+ declare function getDefaultRoutingGuardReducer(): ActionReducer<RoutingGuardState, Action<string>>;
121
+ declare class RoutingGuardStoreModule {
122
+ static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule>;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutingGuardStoreModule, never>;
124
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RoutingGuardStoreModule, never, [typeof _ngrx_store.StoreFeatureModule], never>;
125
+ static ɵinj: i0.ɵɵInjectorDeclaration<RoutingGuardStoreModule>;
126
+ }
127
+
128
+ /**
129
+ * RoutingGuard Store adapter
130
+ */
131
+ declare const routingGuardAdapter: EntityAdapter<RoutingGuardModel>;
132
+ /**
133
+ * RoutingGuard Store initial value
134
+ */
135
+ declare const routingGuardInitialState: RoutingGuardState;
136
+ /**
137
+ * List of basic actions for RoutingGuard Store
138
+ */
139
+ declare const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[];
140
+ /**
141
+ * RoutingGuard Store reducer
142
+ */
143
+ declare const routingGuardReducer: _ngrx_store.ActionReducer<RoutingGuardState, _ngrx_store.Action<string>>;
144
+
145
+ /** Select RoutingGuard State */
146
+ declare const selectRoutingGuardState: _ngrx_store.MemoizedSelector<object, RoutingGuardState, _ngrx_store.DefaultProjectorFn<RoutingGuardState>>;
147
+ /** Select the array of RoutingGuard ids */
148
+ declare const selectRoutingGuardIds: _ngrx_store.MemoizedSelector<object, string[] | number[], (s1: RoutingGuardState) => string[] | number[]>;
149
+ /** Select the array of RoutingGuard */
150
+ declare const selectAllRoutingGuard: _ngrx_store.MemoizedSelector<object, _o3r_routing.RoutingGuardModel[], (s1: RoutingGuardState) => _o3r_routing.RoutingGuardModel[]>;
151
+ /** Select the dictionary of RoutingGuard entities */
152
+ declare const selectRoutingGuardEntities: _ngrx_store.MemoizedSelector<object, _ngrx_entity.Dictionary<_o3r_routing.RoutingGuardModel>, (s1: RoutingGuardState) => _ngrx_entity.Dictionary<_o3r_routing.RoutingGuardModel>>;
153
+ /** Select the total RoutingGuard count */
154
+ declare const selectRoutingGuardTotal: _ngrx_store.MemoizedSelector<object, number, (s1: RoutingGuardState) => number>;
155
+ /**
156
+ * Selector used to retrieve the list of entities' status
157
+ */
158
+ declare const selectRoutingGuardEntitiesStatusList: _ngrx_store.MemoizedSelector<object, RegisteredItemStatus[], (s1: RoutingGuardState) => RegisteredItemStatus[]>;
159
+ /**
160
+ * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.
161
+ */
162
+ declare const selectRoutingGuardEntitiesBlockingReasons: _ngrx_store.MemoizedSelector<object, RegisteredItemFailureReason[], (s1: RoutingGuardState) => RegisteredItemFailureReason[]>;
163
+ /**
164
+ * Selector used to check that no item is in PENDING state.
165
+ * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard
166
+ */
167
+ declare const hasNoEntitiesInPendingState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
168
+ /**
169
+ * Selector used to check that no item is in FAILURE state.
170
+ * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard
171
+ */
172
+ declare const hasNoEntitiesInFailureState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
173
+ /**
174
+ * Selector used to check that no item is in READY or FAILURE state.
175
+ * For example, we will rely on this selector to trigger the router navigation and display a loader
176
+ */
177
+ declare const hasNoEntityInReadyOrFailureState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
178
+ /**
179
+ * Selector used to check that no item is in FAILURE state with a blocking reason provided.
180
+ * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.
181
+ */
182
+ declare const hasNoEntityFailureStateWithReasons: _ngrx_store.MemoizedSelectorWithProps<object, {
183
+ blockingReason: RegisteredItemFailureReason;
184
+ }, boolean, (s1: RegisteredItemFailureReason[], props: {
185
+ blockingReason: RegisteredItemFailureReason;
186
+ }) => boolean>;
187
+
188
+ /**
189
+ * AppBaseHref factory function
190
+ * The APP_BASE_HREF will assume one of the following values (ordered by priority):
191
+ * 1- undefined (or disabled) if it's not a PROD environment
192
+ * 2- the content of the data tag data-appbasehref in the body if it exists
193
+ * 3- the content of config.APP_BASE_HREF if defined
194
+ * 4- otherwise, undefined
195
+ * @param config The application environment configuration
196
+ */
197
+ declare function appBaseHrefFactory(config: BuildTimeProperties): string | undefined;
198
+ declare const ENVIRONMENT_CONFIG_TOKEN: InjectionToken<BuildTimeProperties>;
199
+ /**
200
+ * @deprecated Will be removed in v14.
201
+ */
202
+ declare class AppServerRoutingModule {
203
+ /**
204
+ * Injects the APP_BASE_HREF with a custom factory
205
+ * @param config The application environment configuration
206
+ * @deprecated Please use {@link provideEnvironment} instead. Will be removed in v14.
207
+ */
208
+ static forRoot(config: Partial<BuildTimeProperties>): ModuleWithProviders<AppServerRoutingModule>;
209
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppServerRoutingModule, never>;
210
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AppServerRoutingModule, never, never, never>;
211
+ static ɵinj: i0.ɵɵInjectorDeclaration<AppServerRoutingModule>;
212
+ }
213
+ type EnvironmentFeatureKind = 'base-href';
214
+ interface EnvironmentFeature<FeatureKind extends EnvironmentFeatureKind> {
215
+ ɵkind: FeatureKind;
216
+ ɵproviders: Provider[];
217
+ }
218
+ type BaseHrefFeature = EnvironmentFeature<'base-href'>;
219
+ type EnvironmentFeatures = BaseHrefFeature;
220
+ /**
221
+ * Specify a custom base href
222
+ * @param baseHref
223
+ */
224
+ declare function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures;
225
+ /**
226
+ * Provide environment configuration
227
+ * @note it will also provide APP_BASE_HREF based on the environment configuration
228
+ * @param config
229
+ * @param features
230
+ */
231
+ declare function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]): i0.EnvironmentProviders;
232
+
233
+ /**
234
+ * Data to inject to the route parameter to specify preloading strategy
235
+ */
236
+ interface O3rOnDemandPreloadingData {
237
+ /** List of page reached that trigger preloading */
238
+ preloadOn: string[] | '*' | RegExp;
239
+ }
240
+ /**
241
+ * Check if the route has preload instructions
242
+ * @param data Route data
243
+ */
244
+ declare function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData;
245
+ /**
246
+ * Otter Preloading strategy base on previous route
247
+ * @inheritDoc
248
+ */
249
+ declare class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {
250
+ private readonly router;
251
+ /**
252
+ * Check if the module should be preloaded based on the data preload array of routes or regex value
253
+ * @param data Route data
254
+ * @param url URL of current page
255
+ */
256
+ private isUrlMatchingPreloadConfig;
257
+ /** @inheritDoc */
258
+ preload(route: Route, preload: () => Observable<any>): Observable<any>;
259
+ static ɵfac: i0.ɵɵFactoryDeclaration<O3rOnNavigationPreloadingStrategy, never>;
260
+ static ɵprov: i0.ɵɵInjectableDeclaration<O3rOnNavigationPreloadingStrategy>;
261
+ }
262
+
263
+ export { AppServerRoutingModule, ENVIRONMENT_CONFIG_TOKEN, NgrxStoreRouterEffect, O3rOnNavigationPreloadingStrategy, ROUTING_GUARD_REDUCER_TOKEN, ROUTING_GUARD_STORE_NAME, RegisteredItemFailureReason, RegisteredItemStatus, RoutingGuardStoreModule, appBaseHrefFactory, clearRoutingGuardEntities, clearRoutingGuardEntitiesFailureReason, getDefaultRoutingGuardReducer, hasNoEntitiesInFailureState, hasNoEntitiesInPendingState, hasNoEntityFailureStateWithReasons, hasNoEntityInReadyOrFailureState, hasPreloadingOnDemand, provideEnvironment, registerRoutingGuardEntity, routingGuardAdapter, routingGuardInitialState, routingGuardReducer, routingGuardReducerFeatures, selectAllRoutingGuard, selectRoutingGuardEntities, selectRoutingGuardEntitiesBlockingReasons, selectRoutingGuardEntitiesStatusList, selectRoutingGuardIds, selectRoutingGuardState, selectRoutingGuardTotal, setRoutingGuardEntityAsFailure, setRoutingGuardEntityAsPending, setRoutingGuardEntityAsSuccessAndClearReason, setRoutingGuardEntityFailureWithReason, withBaseHref };
264
+ export type { O3rOnDemandPreloadingData, RoutingGuardActionPayload, RoutingGuardFailureReasonPayload, RoutingGuardModel, RoutingGuardState, RoutingGuardStore };
265
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../src/stores/routing-guard/extra-effects/ngrx-store-router.effect.ts","../src/stores/routing-guard/routing-guard.state.ts","../src/stores/routing-guard/routing-guard.actions.ts","../src/stores/routing-guard/routing-guard.module.ts","../src/stores/routing-guard/routing-guard.reducer.ts","../src/stores/routing-guard/routing-guard.selectors.ts","../src/tools/app-server-routing.module.ts","../src/tools/on-navigation-strategy.preloader.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAuBA;;AAEG;AACH;;AAIE;;AAEG;AACI;AAQP;;AAEG;AACI;;;AAMR;;AC9CD;AACA;;AAEE;;AAEA;;AAEA;;AAEA;AACD;AAED;AACA;;AAEE;;AAEA;AACD;AAED;;AAEG;;;;;;;;AAQF;AAED;;AAEG;;AACyE;AAE5E;;AAEG;AACH;AAEA;;AAEG;;;AAGD;AACD;;;;;AChCA;;;;;;AAOA;AAED;;AAEG;AACH;AAEA;;AAEG;AACH;AAEA;;AAEG;AACH;AAEA;;AAEG;AACH;AAEA;;AAEG;AACH;AAEA;;AAEG;AACH;AAEA;;AAEG;AACH;;AC5CA;AACA;AAEA;AACA;AAIA;AASgB;;;;AAQf;;AC1BD;;AAEG;AACH;AAIA;;AAEG;AACH;AAEA;;AAEG;AACH;AAsBA;;AAEG;AACH;;ACzCA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;;AAEG;AACH;AASA;;AAEG;AACH;AASA;;;AAGG;AACH;AAOA;;;AAGG;AACH;AAOA;;;AAGG;AACH;AAOA;;;AAGG;AACH;;;;;;AC7EA;;;;;;;;AAQG;AACH;AAWA;AAEA;;AAEG;AACH;AAEE;;;;AAIG;;;;;AAcJ;AAED;AAEA;;;AAGC;AAED;AAEA;AAEA;;;AAGG;AACH;AAgBA;;;;;AAKG;AACH;;AChFA;;AAEG;;;AAGD;AACD;AAED;;;AAGG;AACH;AAUA;;;AAGG;AACH;AAEE;AAEA;;;;AAIG;AACH;;AAMO;;;AAgBR;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/routing",
3
- "version": "13.0.0-next.6",
3
+ "version": "13.0.0-prerelease.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,19 +11,19 @@
11
11
  "otter-module"
12
12
  ],
13
13
  "peerDependencies": {
14
- "@angular-devkit/schematics": "^19.0.0",
15
- "@angular/common": "^19.0.0",
16
- "@angular/core": "^19.0.0",
17
- "@angular/platform-browser-dynamic": "^19.0.0",
18
- "@angular/router": "^19.0.0",
19
- "@ngrx/effects": "^19.0.0",
20
- "@ngrx/entity": "^19.0.0",
21
- "@ngrx/router-store": "^19.0.0",
22
- "@ngrx/store": "^19.0.0",
23
- "@o3r/core": "^13.0.0-next.6",
24
- "@o3r/routing": "^13.0.0-next.6",
25
- "@o3r/schematics": "^13.0.0-next.6",
26
- "@schematics/angular": "^19.0.0",
14
+ "@angular-devkit/schematics": "^20.0.0",
15
+ "@angular/common": "^20.0.0",
16
+ "@angular/core": "^20.0.0",
17
+ "@angular/platform-browser-dynamic": "^20.0.0",
18
+ "@angular/router": "^20.0.0",
19
+ "@ngrx/effects": "^20.0.0",
20
+ "@ngrx/entity": "^20.0.0",
21
+ "@ngrx/router-store": "^20.0.0",
22
+ "@ngrx/store": "^20.0.0",
23
+ "@o3r/core": "^13.0.0-prerelease.1",
24
+ "@o3r/routing": "^13.0.0-prerelease.1",
25
+ "@o3r/schematics": "^13.0.0-prerelease.1",
26
+ "@schematics/angular": "^20.0.0",
27
27
  "jasmine": "^5.0.0",
28
28
  "rxjs": "^7.8.1",
29
29
  "ts-node": "~10.9.2",
@@ -47,11 +47,11 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@o3r/schematics": "^13.0.0-next.6",
50
+ "@o3r/schematics": "^13.0.0-prerelease.1",
51
51
  "tslib": "^2.6.2"
52
52
  },
53
53
  "engines": {
54
- "node": "^20.11.1 || >=22.0.0"
54
+ "node": "^20.19.0 || ^22.17.0 || ^24.0.0"
55
55
  },
56
56
  "schematics": "./collection.json",
57
57
  "module": "fesm2022/o3r-routing.mjs",
@@ -9,7 +9,8 @@
9
9
  "description": "Project name",
10
10
  "$default": {
11
11
  "$source": "projectName"
12
- }
12
+ },
13
+ "alias": "project"
13
14
  },
14
15
  "exactO3rVersion": {
15
16
  "type": "boolean",
@@ -1 +0,0 @@
1
- {"version":3,"file":"o3r-routing.d.ts","sourceRoot":"","sources":["../src/o3r-routing.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
package/public_api.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './stores/index';
2
- export * from './tools/index';
3
- //# sourceMappingURL=public_api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,gDAMyB;AAQzB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,mCAAmC;IACnC,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,oBAAoB;IACpB,aAAa;IACb,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAa,EAC1C,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAkB,EAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnH,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,IAAI,IAAI,GAAG,CAAC;QACvD,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAgB,CAAC;QAC3G,MAAM,wBAAwB,GAAG,IAAA,wCAA2B,EAAC;YAC3D,wBAAwB;YACxB,qBAAqB;YACrB,kBAAkB,EAAE,eAAe;YACnC,kBAAkB;YAClB,WAAW,EAAE,gBAAgB,EAAE,WAAW;SAC3C,EACD,OAAO,CAAC,MAAM,CACb,CAAC;QACF,OAAO,IAAA,8BAAiB,EAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY,EAAE;gBACZ,GAAG,IAAA,oCAAuB,EAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;gBACxG,GAAG,wBAAwB;aAC5B;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,IAAA,iCAAoB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AAAnF,QAAA,KAAK,SAA8E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
package/stores/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './routing-guard/index';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './ngrx-store-router.effect';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stores/routing-guard/extra-effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1,20 +0,0 @@
1
- import { Actions } from '@ngrx/effects';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Effect to react on Ngrx router store actions
5
- */
6
- export declare class NgrxStoreRouterEffect {
7
- protected actions$: Actions;
8
- /**
9
- * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)
10
- */
11
- resetRouterRegistrationOnRequest$: import("rxjs").Observable<import("@ngrx/store").Action<"[RoutingGuard] clear entities">> & import("@ngrx/effects").CreateEffectMetadata;
12
- /**
13
- * Clear Router registrations when navigation happened
14
- */
15
- resetRouterRegistrationOnNavigated$: import("rxjs").Observable<import("@ngrx/store").Action<"[RoutingGuard] clear entities">> & import("@ngrx/effects").CreateEffectMetadata;
16
- constructor(actions$: Actions);
17
- static ɵfac: i0.ɵɵFactoryDeclaration<NgrxStoreRouterEffect, never>;
18
- static ɵprov: i0.ɵɵInjectableDeclaration<NgrxStoreRouterEffect>;
19
- }
20
- //# sourceMappingURL=ngrx-store-router.effect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngrx-store-router.effect.d.ts","sourceRoot":"","sources":["../../../../src/stores/routing-guard/extra-effects/ngrx-store-router.effect.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAGR,MAAM,eAAe,CAAC;;AAevB;;GAEG;AACH,qBACa,qBAAqB;IAsBpB,SAAS,CAAC,QAAQ,EAAE,OAAO;IArBvC;;OAEG;IACI,iCAAiC,0IAMtC;IAEF;;OAEG;IACI,mCAAmC,0IAKxC;gBAEoB,QAAQ,EAAE,OAAO;yCAtB5B,qBAAqB;6CAArB,qBAAqB;CAuBjC"}
@@ -1,7 +0,0 @@
1
- export * from './extra-effects/index';
2
- export * from './routing-guard.actions';
3
- export * from './routing-guard.module';
4
- export * from './routing-guard.reducer';
5
- export * from './routing-guard.selectors';
6
- export * from './routing-guard.state';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
@@ -1,40 +0,0 @@
1
- import { RegisteredItemFailureReason } from './routing-guard.state';
2
- export interface RoutingGuardActionPayload {
3
- /** Id of the block instance */
4
- id: string;
5
- }
6
- export interface RoutingGuardFailureReasonPayload {
7
- /** Id of the block instance */
8
- id: string;
9
- /** Reason for failure */
10
- reason: RegisteredItemFailureReason;
11
- }
12
- /**
13
- * Register a new entity in routing guard store
14
- */
15
- export declare const registerRoutingGuardEntity: import("@ngrx/store").ActionCreator<"[RoutingGuard] register an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] register an entity">>;
16
- /**
17
- * Set an entity in FAILURE status
18
- */
19
- export declare const setRoutingGuardEntityAsFailure: import("@ngrx/store").ActionCreator<"[RoutingGuard] set an entity state as FAILURE", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] set an entity state as FAILURE">>;
20
- /**
21
- * Set an entity in SUCCESS status and clear the reason
22
- */
23
- export declare const setRoutingGuardEntityAsSuccessAndClearReason: import("@ngrx/store").ActionCreator<"[RoutingGuard] set an entity state as SUCCESS and clear reason", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] set an entity state as SUCCESS and clear reason">>;
24
- /**
25
- * Set an entity in PENDING status
26
- */
27
- export declare const setRoutingGuardEntityAsPending: import("@ngrx/store").ActionCreator<"[RoutingGuard] set an entity state as PENDING", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] set an entity state as PENDING">>;
28
- /**
29
- * Clear only the entities, keeps the other attributes in the state
30
- */
31
- export declare const clearRoutingGuardEntities: import("@ngrx/store").ActionCreator<"[RoutingGuard] clear entities", () => import("@ngrx/store").Action<"[RoutingGuard] clear entities">>;
32
- /**
33
- * Clear only the entities, keeps the other attributes in the state
34
- */
35
- export declare const clearRoutingGuardEntitiesFailureReason: import("@ngrx/store").ActionCreator<"[RoutingGuard] clear failure reason for an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] clear failure reason for an entity">>;
36
- /**
37
- * Set entity in FAILURE status with a reason
38
- */
39
- export declare const setRoutingGuardEntityFailureWithReason: import("@ngrx/store").ActionCreator<"[RoutingGuard] set an entity state as FAILURE with a reason", (props: RoutingGuardFailureReasonPayload) => RoutingGuardFailureReasonPayload & import("@ngrx/store").Action<"[RoutingGuard] set an entity state as FAILURE with a reason">>;
40
- //# sourceMappingURL=routing-guard.actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing-guard.actions.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/routing-guard.actions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAW/B,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gCAAgC;IAC/C,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,MAAM,EAAE,2BAA2B,CAAC;CACrC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,+MAA2E,CAAC;AAEnH;;GAEG;AACH,eAAO,MAAM,8BAA8B,uOAAiF,CAAC;AAE7H;;GAEG;AACH,eAAO,MAAM,4CAA4C,yQAAkG,CAAC;AAE5J;;GAEG;AACH,eAAO,MAAM,8BAA8B,uOAAiF,CAAC;AAE7H;;GAEG;AACH,eAAO,MAAM,yBAAyB,2IAAsC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,sCAAsC,+OAAgF,CAAC;AAEpI;;GAEG;AACH,eAAO,MAAM,sCAAsC,iRAAoG,CAAC"}
@@ -1,16 +0,0 @@
1
- import { InjectionToken, ModuleWithProviders } from '@angular/core';
2
- import { Action, ActionReducer } from '@ngrx/store';
3
- import { RoutingGuardState } from './routing-guard.state';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@ngrx/store";
6
- /** Token of the RoutingGuard reducer */
7
- export declare const ROUTING_GUARD_REDUCER_TOKEN: InjectionToken<ActionReducer<RoutingGuardState, Action<string>>>;
8
- /** Provide default reducer for RoutingGuard store */
9
- export declare function getDefaultRoutingGuardReducer(): ActionReducer<RoutingGuardState, Action<string>>;
10
- export declare class RoutingGuardStoreModule {
11
- static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule>;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<RoutingGuardStoreModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<RoutingGuardStoreModule, never, [typeof i1.StoreFeatureModule], never>;
14
- static ɵinj: i0.ɵɵInjectorDeclaration<RoutingGuardStoreModule>;
15
- }
16
- //# sourceMappingURL=routing-guard.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing-guard.module.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/routing-guard.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,MAAM,EACN,aAAa,EAEd,MAAM,aAAa,CAAC;AAIrB,OAAO,EAEL,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;;;AAE/B,wCAAwC;AACxC,eAAO,MAAM,2BAA2B,kEAA+F,CAAC;AAExI,qDAAqD;AACrD,wBAAgB,6BAA6B,qDAE5C;AAED,qBAQa,uBAAuB;WACpB,OAAO,CAAC,CAAC,SAAS,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,mBAAmB,CAAC,uBAAuB,CAAC;yCADrI,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CASnC"}
@@ -1,20 +0,0 @@
1
- import { EntityAdapter } from '@ngrx/entity';
2
- import { ActionCreator, ReducerTypes } from '@ngrx/store';
3
- import { RoutingGuardModel, RoutingGuardState } from './routing-guard.state';
4
- /**
5
- * RoutingGuard Store adapter
6
- */
7
- export declare const routingGuardAdapter: EntityAdapter<RoutingGuardModel>;
8
- /**
9
- * RoutingGuard Store initial value
10
- */
11
- export declare const routingGuardInitialState: RoutingGuardState;
12
- /**
13
- * List of basic actions for RoutingGuard Store
14
- */
15
- export declare const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[];
16
- /**
17
- * RoutingGuard Store reducer
18
- */
19
- export declare const routingGuardReducer: import("@ngrx/store").ActionReducer<RoutingGuardState, import("@ngrx/store").Action<string>>;
20
- //# sourceMappingURL=routing-guard.reducer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing-guard.reducer.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/routing-guard.reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,EAGb,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,iBAAiB,CAE/D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAA2D,CAAC;AAEnG;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,YAAY,CAAC,iBAAiB,EAAE,aAAa,EAAE,CAAC,EAoBzF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,8FAG/B,CAAC"}
@@ -1,44 +0,0 @@
1
- import { RegisteredItemFailureReason, RegisteredItemStatus, RoutingGuardState } from './routing-guard.state';
2
- /** Select RoutingGuard State */
3
- export declare const selectRoutingGuardState: import("@ngrx/store").MemoizedSelector<object, RoutingGuardState, import("@ngrx/store").DefaultProjectorFn<RoutingGuardState>>;
4
- /** Select the array of RoutingGuard ids */
5
- export declare const selectRoutingGuardIds: import("@ngrx/store").MemoizedSelector<object, string[] | number[], (s1: RoutingGuardState) => string[] | number[]>;
6
- /** Select the array of RoutingGuard */
7
- export declare const selectAllRoutingGuard: import("@ngrx/store").MemoizedSelector<object, import("./routing-guard.state").RoutingGuardModel[], (s1: RoutingGuardState) => import("./routing-guard.state").RoutingGuardModel[]>;
8
- /** Select the dictionary of RoutingGuard entities */
9
- export declare const selectRoutingGuardEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("./routing-guard.state").RoutingGuardModel>, (s1: RoutingGuardState) => import("@ngrx/entity").Dictionary<import("./routing-guard.state").RoutingGuardModel>>;
10
- /** Select the total RoutingGuard count */
11
- export declare const selectRoutingGuardTotal: import("@ngrx/store").MemoizedSelector<object, number, (s1: RoutingGuardState) => number>;
12
- /**
13
- * Selector used to retrieve the list of entities' status
14
- */
15
- export declare const selectRoutingGuardEntitiesStatusList: import("@ngrx/store").MemoizedSelector<object, RegisteredItemStatus[], (s1: RoutingGuardState) => RegisteredItemStatus[]>;
16
- /**
17
- * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.
18
- */
19
- export declare const selectRoutingGuardEntitiesBlockingReasons: import("@ngrx/store").MemoizedSelector<object, RegisteredItemFailureReason[], (s1: RoutingGuardState) => RegisteredItemFailureReason[]>;
20
- /**
21
- * Selector used to check that no item is in PENDING state.
22
- * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard
23
- */
24
- export declare const hasNoEntitiesInPendingState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
25
- /**
26
- * Selector used to check that no item is in FAILURE state.
27
- * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard
28
- */
29
- export declare const hasNoEntitiesInFailureState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
30
- /**
31
- * Selector used to check that no item is in READY or FAILURE state.
32
- * For example, we will rely on this selector to trigger the router navigation and display a loader
33
- */
34
- export declare const hasNoEntityInReadyOrFailureState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
35
- /**
36
- * Selector used to check that no item is in FAILURE state with a blocking reason provided.
37
- * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.
38
- */
39
- export declare const hasNoEntityFailureStateWithReasons: import("@ngrx/store").MemoizedSelectorWithProps<object, {
40
- blockingReason: RegisteredItemFailureReason;
41
- }, boolean, (s1: RegisteredItemFailureReason[], props: {
42
- blockingReason: RegisteredItemFailureReason;
43
- }) => boolean>;
44
- //# sourceMappingURL=routing-guard.selectors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing-guard.selectors.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/routing-guard.selectors.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EAEpB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAI/B,gCAAgC;AAChC,eAAO,MAAM,uBAAuB,gIAAqE,CAAC;AAE1G,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,qHAAqD,CAAC;AAExF,uCAAuC;AACvC,eAAO,MAAM,qBAAqB,qLAAqD,CAAC;AAExF,qDAAqD;AACrD,eAAO,MAAM,0BAA0B,uPAA0D,CAAC;AAElG,0CAA0C;AAC1C,eAAO,MAAM,uBAAuB,2FAAuD,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,oCAAoC,2HAOhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yCAAyC,yIAOrD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,kGAKvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,kGAKvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,kGAK5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC;oBAE0B,2BAA2B;;oBAA3B,2BAA2B;cAGnG,CAAC"}
@@ -1,47 +0,0 @@
1
- import { EntityState } from '@ngrx/entity';
2
- /** Identifies the status of a registered block */
3
- export declare enum RegisteredItemStatus {
4
- /** block is ready (async call has not been triggered) */
5
- READY = "READY",
6
- /** block is waiting for async call to resolve */
7
- PENDING = "PENDING",
8
- /** block received the async call result and it's a failure */
9
- FAILURE = "FAILURE",
10
- /** block received the async call result and it's a success */
11
- SUCCESS = "SUCCESS"
12
- }
13
- /** Identifies the failure reason for the registered block */
14
- export declare enum RegisteredItemFailureReason {
15
- /** Routing Failed because the async call result is failure */
16
- ASYNC_CALL_FAILURE = "ASYNC_CALL_FAILURE",
17
- /** Routing failed because the changes to the form has not been saved */
18
- FORM_UNSAVED = "FORM_UNSAVED"
19
- }
20
- /**
21
- * RoutingGuard model
22
- */
23
- export interface RoutingGuardModel {
24
- /** Id of the block instance */
25
- id: string;
26
- /** Routing status of the block */
27
- status: RegisteredItemStatus;
28
- /** Routing Guard blocking reason */
29
- blockingReason?: RegisteredItemFailureReason;
30
- }
31
- /**
32
- * RoutingGuard store state
33
- */
34
- export interface RoutingGuardState extends EntityState<RoutingGuardModel> {
35
- }
36
- /**
37
- * Name of the RoutingGuard Store
38
- */
39
- export declare const ROUTING_GUARD_STORE_NAME = "routingGuard";
40
- /**
41
- * RoutingGuard Store Interface
42
- */
43
- export interface RoutingGuardStore {
44
- /** RoutingGuard state */
45
- [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;
46
- }
47
- //# sourceMappingURL=routing-guard.state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing-guard.state.d.ts","sourceRoot":"","sources":["../../../src/stores/routing-guard/routing-guard.state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,kDAAkD;AAClD,oBAAY,oBAAoB;IAC9B,yDAAyD;IACzD,KAAK,UAAU;IACf,iDAAiD;IACjD,OAAO,YAAY;IACnB,8DAA8D;IAC9D,OAAO,YAAY;IACnB,8DAA8D;IAC9D,OAAO,YAAY;CACpB;AAED,6DAA6D;AAC7D,oBAAY,2BAA2B;IACrC,8DAA8D;IAC9D,kBAAkB,uBAAuB;IACzC,wEAAwE;IACxE,YAAY,iBAAiB;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,oCAAoC;IACpC,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW,CAAC,iBAAiB,CAAC;CAAG;AAE5E;;GAEG;AACH,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,CAAC,wBAAwB,CAAC,EAAE,iBAAiB,CAAC;CAC/C"}
@@ -1,49 +0,0 @@
1
- import { InjectionToken, ModuleWithProviders, type Provider } from '@angular/core';
2
- import { type BuildTimeProperties } from '@o3r/core';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * AppBaseHref factory function
6
- * The APP_BASE_HREF will assume one of the following values (ordered by priority):
7
- * 1- undefined (or disabled) if it's not a PROD environment
8
- * 2- the content of the data tag data-appbasehref in the body if it exists
9
- * 3- the content of config.APP_BASE_HREF if defined
10
- * 4- otherwise, undefined
11
- * @param config The application environment configuration
12
- */
13
- export declare function appBaseHrefFactory(config: BuildTimeProperties): string | undefined;
14
- export declare const ENVIRONMENT_CONFIG_TOKEN: InjectionToken<BuildTimeProperties>;
15
- /**
16
- * @deprecated Will be removed in v14.
17
- */
18
- export declare class AppServerRoutingModule {
19
- /**
20
- * Injects the APP_BASE_HREF with a custom factory
21
- * @param config The application environment configuration
22
- * @deprecated Please use {@link provideEnvironment} instead. Will be removed in v14.
23
- */
24
- static forRoot(config: Partial<BuildTimeProperties>): ModuleWithProviders<AppServerRoutingModule>;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<AppServerRoutingModule, never>;
26
- static ɵmod: i0.ɵɵNgModuleDeclaration<AppServerRoutingModule, never, never, never>;
27
- static ɵinj: i0.ɵɵInjectorDeclaration<AppServerRoutingModule>;
28
- }
29
- type EnvironmentFeatureKind = 'base-href';
30
- interface EnvironmentFeature<FeatureKind extends EnvironmentFeatureKind> {
31
- ɵkind: FeatureKind;
32
- ɵproviders: Provider[];
33
- }
34
- type BaseHrefFeature = EnvironmentFeature<'base-href'>;
35
- type EnvironmentFeatures = BaseHrefFeature;
36
- /**
37
- * Specify a custom base href
38
- * @param baseHref
39
- */
40
- export declare function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures;
41
- /**
42
- * Provide environment configuration
43
- * @note it will also provide APP_BASE_HREF based on the environment configuration
44
- * @param config
45
- * @param features
46
- */
47
- export declare function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]): import("@angular/core").EnvironmentProviders;
48
- export {};
49
- //# sourceMappingURL=app-server-routing.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-server-routing.module.d.ts","sourceRoot":"","sources":["../../src/tools/app-server-routing.module.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EAEd,mBAAmB,EAEnB,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,WAAW,CAAC;;AAEnB;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,sBAS7D;AAED,eAAO,MAAM,wBAAwB,qCAAgE,CAAC;AAEtG;;GAEG;AACH,qBACa,sBAAsB;IACjC;;;;OAIG;WACW,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC,sBAAsB,CAAC;yCAN7F,sBAAsB;0CAAtB,sBAAsB;0CAAtB,sBAAsB;CAmBlC;AAED,KAAK,sBAAsB,GAAG,WAAW,CAAC;AAE1C,UAAU,kBAAkB,CAAC,WAAW,SAAS,sBAAsB;IACrE,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,KAAK,eAAe,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAEvD,KAAK,mBAAmB,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,mBAAmB,KAAK,CAAC,CAAC,GAAG,mBAAmB,CAc7I;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,GAAG,QAAQ,EAAE,mBAAmB,EAAE,gDAS1G"}
package/tools/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './app-server-routing.module';
2
- export * from './on-navigation-strategy.preloader';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC"}
@@ -1,34 +0,0 @@
1
- import { PreloadingStrategy, Route, Router } from '@angular/router';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Data to inject to the route parameter to specify preloading strategy
6
- */
7
- export interface O3rOnDemandPreloadingData {
8
- /** List of page reached that trigger preloading */
9
- preloadOn: string[] | '*' | RegExp;
10
- }
11
- /**
12
- * Check if the route has preload instructions
13
- * @param data Route data
14
- */
15
- export declare function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData;
16
- /**
17
- * Otter Preloading strategy base on previous route
18
- * @inheritDoc
19
- */
20
- export declare class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {
21
- private readonly router;
22
- constructor(router: Router);
23
- /**
24
- * Check if the module should be preloaded based on the data preload array of routes or regex value
25
- * @param data Route data
26
- * @param url URL of current page
27
- */
28
- private isUrlMatchingPreloadConfig;
29
- /** @inheritDoc */
30
- preload(route: Route, preload: () => Observable<any>): Observable<any>;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<O3rOnNavigationPreloadingStrategy, never>;
32
- static ɵprov: i0.ɵɵInjectableDeclaration<O3rOnNavigationPreloadingStrategy>;
33
- }
34
- //# sourceMappingURL=on-navigation-strategy.preloader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"on-navigation-strategy.preloader.d.ts","sourceRoot":"","sources":["../../src/tools/on-navigation-strategy.preloader.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,kBAAkB,EAClB,KAAK,EACL,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,UAAU,EAEX,MAAM,MAAM,CAAC;;AAMd;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,mDAAmD;IACnD,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,yBAAyB,CAQlF;AAED;;;GAGG;AACH,qBACa,iCAAkC,YAAW,kBAAkB;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAKlC,kBAAkB;IACX,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC;yCAdlE,iCAAiC;6CAAjC,iCAAiC;CA8B7C"}