@o3r/routing 15.3.0-prerelease.9 → 15.4.0-prerelease.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,333 +1,278 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Injectable, InjectionToken, NgModule, makeEnvironmentProviders } from '@angular/core';
3
- import { Actions, createEffect, ofType } from '@ngrx/effects';
4
- import { ROUTER_REQUEST, ROUTER_NAVIGATED } from '@ngrx/router-store';
5
- import { filter, map, switchMap } from 'rxjs/operators';
6
- import * as i1 from '@ngrx/store';
7
- import { createAction, props, on, createReducer, StoreModule, provideState, createFeatureSelector, createSelector } from '@ngrx/store';
8
- import { createEntityAdapter } from '@ngrx/entity';
9
- import { APP_BASE_HREF } from '@angular/common';
10
- import { DEFAULT_BUILD_PROPERTIES } from '@o3r/core';
11
- import { Router, NavigationEnd } from '@angular/router';
12
- import { of } from 'rxjs';
13
-
14
- /** Entity Actions */
15
- const ACTION_REGISTER_ENTITY = '[RoutingGuard] register an entity';
16
- const ACTION_SET_ENTITY_AS_FAILURE = '[RoutingGuard] set an entity state as FAILURE';
17
- const ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON = '[RoutingGuard] set an entity state as SUCCESS and clear reason';
18
- const ACTION_SET_ENTITY_AS_PENDING = '[RoutingGuard] set an entity state as PENDING';
19
- const ACTION_CLEAR_ENTITIES = '[RoutingGuard] clear entities';
20
- const ACTION_CLEAR_FAILURE_REASON = '[RoutingGuard] clear failure reason for an entity';
21
- const ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON = '[RoutingGuard] set an entity state as FAILURE with a reason';
22
- /**
23
- * Register a new entity in routing guard store
24
- */
1
+ import * as i0 from "@angular/core";
2
+ import { Injectable, InjectionToken, NgModule, inject, makeEnvironmentProviders } from "@angular/core";
3
+ import { Actions, createEffect, ofType } from "@ngrx/effects";
4
+ import { ROUTER_NAVIGATED, ROUTER_REQUEST } from "@ngrx/router-store";
5
+ import { filter, map, switchMap } from "rxjs/operators";
6
+ import * as i1 from "@ngrx/store";
7
+ import { StoreModule, createAction, createFeatureSelector, createReducer, createSelector, on, props, provideState } from "@ngrx/store";
8
+ import { createEntityAdapter } from "@ngrx/entity";
9
+ import { APP_BASE_HREF } from "@angular/common";
10
+ import { DEFAULT_BUILD_PROPERTIES } from "@o3r/core";
11
+ import { NavigationEnd, Router } from "@angular/router";
12
+ import { of } from "rxjs";
13
+ const ACTION_REGISTER_ENTITY = "[RoutingGuard] register an entity";
14
+ const ACTION_SET_ENTITY_AS_FAILURE = "[RoutingGuard] set an entity state as FAILURE";
15
+ const ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON = "[RoutingGuard] set an entity state as SUCCESS and clear reason";
16
+ const ACTION_SET_ENTITY_AS_PENDING = "[RoutingGuard] set an entity state as PENDING";
17
+ const ACTION_CLEAR_ENTITIES = "[RoutingGuard] clear entities";
18
+ const ACTION_CLEAR_FAILURE_REASON = "[RoutingGuard] clear failure reason for an entity";
19
+ const ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON = "[RoutingGuard] set an entity state as FAILURE with a reason";
25
20
  const registerRoutingGuardEntity = createAction(ACTION_REGISTER_ENTITY, props());
26
- /**
27
- * Set an entity in FAILURE status
28
- */
29
21
  const setRoutingGuardEntityAsFailure = createAction(ACTION_SET_ENTITY_AS_FAILURE, props());
30
- /**
31
- * Set an entity in SUCCESS status and clear the reason
32
- */
33
22
  const setRoutingGuardEntityAsSuccessAndClearReason = createAction(ACTION_SET_ENTITY_AS_SUCCESS_AND_CLEAR_REASON, props());
34
- /**
35
- * Set an entity in PENDING status
36
- */
37
23
  const setRoutingGuardEntityAsPending = createAction(ACTION_SET_ENTITY_AS_PENDING, props());
38
- /**
39
- * Clear only the entities, keeps the other attributes in the state
40
- */
41
24
  const clearRoutingGuardEntities = createAction(ACTION_CLEAR_ENTITIES);
42
- /**
43
- * Clear only the entities, keeps the other attributes in the state
44
- */
45
25
  const clearRoutingGuardEntitiesFailureReason = createAction(ACTION_CLEAR_FAILURE_REASON, props());
46
- /**
47
- * Set entity in FAILURE status with a reason
48
- */
49
26
  const setRoutingGuardEntityFailureWithReason = createAction(ACTION_SET_ENTITY_AS_FAILURE_WITH_REASON, props());
50
-
51
- /**
52
- * Effect to react on Ngrx router store actions
53
- */
54
- class NgrxStoreRouterEffect {
55
- constructor() {
56
- this.actions$ = inject(Actions);
57
- /**
58
- * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)
59
- */
60
- this.resetRouterRegistrationOnRequest$ = createEffect(() => this.actions$.pipe(ofType(ROUTER_REQUEST), filter((action) => action.payload.event.navigationTrigger === 'popstate'), map(() => clearRoutingGuardEntities())));
61
- /**
62
- * Clear Router registrations when navigation happened
63
- */
64
- this.resetRouterRegistrationOnNavigated$ = createEffect(() => this.actions$.pipe(ofType(ROUTER_NAVIGATED), map(() => clearRoutingGuardEntities())));
65
- }
66
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: NgrxStoreRouterEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: NgrxStoreRouterEffect }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: NgrxStoreRouterEffect, decorators: [{
70
- type: Injectable
71
- }] });
72
-
73
- /** Identifies the status of a registered block */
27
+ var NgrxStoreRouterEffect = class NgrxStoreRouterEffect {
28
+ constructor() {
29
+ this.actions$ = inject(Actions);
30
+ this.resetRouterRegistrationOnRequest$ = createEffect(() => this.actions$.pipe(ofType(ROUTER_REQUEST), filter((action) => action.payload.event.navigationTrigger === "popstate"), map(() => clearRoutingGuardEntities())));
31
+ this.resetRouterRegistrationOnNavigated$ = createEffect(() => this.actions$.pipe(ofType(ROUTER_NAVIGATED), map(() => clearRoutingGuardEntities())));
32
+ }
33
+ static {
34
+ this.ɵfac = i0.ɵɵngDeclareFactory({
35
+ minVersion: "12.0.0",
36
+ version: "22.2.3",
37
+ ngImport: i0,
38
+ type: NgrxStoreRouterEffect,
39
+ deps: [],
40
+ target: i0.ɵɵFactoryTarget.Injectable
41
+ });
42
+ }
43
+ static {
44
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
45
+ minVersion: "12.0.0",
46
+ version: "22.2.3",
47
+ ngImport: i0,
48
+ type: NgrxStoreRouterEffect
49
+ });
50
+ }
51
+ };
52
+ i0.ɵɵngDeclareClassMetadata({
53
+ minVersion: "12.0.0",
54
+ version: "22.2.3",
55
+ ngImport: i0,
56
+ type: NgrxStoreRouterEffect,
57
+ decorators: [{ type: Injectable }]
58
+ });
74
59
  var RegisteredItemStatus;
75
- (function (RegisteredItemStatus) {
76
- /** block is ready (async call has not been triggered) */
77
- RegisteredItemStatus["READY"] = "READY";
78
- /** block is waiting for async call to resolve */
79
- RegisteredItemStatus["PENDING"] = "PENDING";
80
- /** block received the async call result and it's a failure */
81
- RegisteredItemStatus["FAILURE"] = "FAILURE";
82
- /** block received the async call result and it's a success */
83
- RegisteredItemStatus["SUCCESS"] = "SUCCESS";
60
+ (function(RegisteredItemStatus) {
61
+ RegisteredItemStatus["READY"] = "READY";
62
+ RegisteredItemStatus["PENDING"] = "PENDING";
63
+ RegisteredItemStatus["FAILURE"] = "FAILURE";
64
+ RegisteredItemStatus["SUCCESS"] = "SUCCESS";
84
65
  })(RegisteredItemStatus || (RegisteredItemStatus = {}));
85
- /** Identifies the failure reason for the registered block */
86
66
  var RegisteredItemFailureReason;
87
- (function (RegisteredItemFailureReason) {
88
- /** Routing Failed because the async call result is failure */
89
- RegisteredItemFailureReason["ASYNC_CALL_FAILURE"] = "ASYNC_CALL_FAILURE";
90
- /** Routing failed because the changes to the form has not been saved */
91
- RegisteredItemFailureReason["FORM_UNSAVED"] = "FORM_UNSAVED";
67
+ (function(RegisteredItemFailureReason) {
68
+ RegisteredItemFailureReason["ASYNC_CALL_FAILURE"] = "ASYNC_CALL_FAILURE";
69
+ RegisteredItemFailureReason["FORM_UNSAVED"] = "FORM_UNSAVED";
92
70
  })(RegisteredItemFailureReason || (RegisteredItemFailureReason = {}));
93
- /**
94
- * Name of the RoutingGuard Store
95
- */
96
- const ROUTING_GUARD_STORE_NAME = 'routingGuard';
97
-
98
- /**
99
- * RoutingGuard Store adapter
100
- */
101
- const routingGuardAdapter = createEntityAdapter({
102
- selectId: (model) => model.id
103
- });
104
- /**
105
- * RoutingGuard Store initial value
106
- */
71
+ const ROUTING_GUARD_STORE_NAME = "routingGuard";
72
+ const routingGuardAdapter = createEntityAdapter({ selectId: (model) => model.id });
107
73
  const routingGuardInitialState = routingGuardAdapter.getInitialState({});
108
- /**
109
- * List of basic actions for RoutingGuard Store
110
- */
111
74
  const routingGuardReducerFeatures = [
112
- on(registerRoutingGuardEntity, (state, payload) => routingGuardAdapter.addOne({ id: payload.id, status: RegisteredItemStatus.READY }, state)),
113
- on(setRoutingGuardEntityAsPending, (state, payload) => routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.PENDING } }, state)),
114
- on(setRoutingGuardEntityAsFailure, (state, payload) => routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE } }, state)),
115
- on(setRoutingGuardEntityAsSuccessAndClearReason, (state, payload) => routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.SUCCESS, blockingReason: undefined } }, state)),
116
- on(clearRoutingGuardEntities, (state) => routingGuardAdapter.removeAll(state)),
117
- on(clearRoutingGuardEntitiesFailureReason, (state, payload) => routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.READY, blockingReason: undefined } }, state)),
118
- on(setRoutingGuardEntityFailureWithReason, (state, payload) => routingGuardAdapter.updateOne({ id: payload.id, changes: { status: RegisteredItemStatus.FAILURE, blockingReason: payload.reason } }, state))
75
+ on(registerRoutingGuardEntity, (state, payload) => routingGuardAdapter.addOne({
76
+ id: payload.id,
77
+ status: RegisteredItemStatus.READY
78
+ }, state)),
79
+ on(setRoutingGuardEntityAsPending, (state, payload) => routingGuardAdapter.updateOne({
80
+ id: payload.id,
81
+ changes: { status: RegisteredItemStatus.PENDING }
82
+ }, state)),
83
+ on(setRoutingGuardEntityAsFailure, (state, payload) => routingGuardAdapter.updateOne({
84
+ id: payload.id,
85
+ changes: { status: RegisteredItemStatus.FAILURE }
86
+ }, state)),
87
+ on(setRoutingGuardEntityAsSuccessAndClearReason, (state, payload) => routingGuardAdapter.updateOne({
88
+ id: payload.id,
89
+ changes: {
90
+ status: RegisteredItemStatus.SUCCESS,
91
+ blockingReason: void 0
92
+ }
93
+ }, state)),
94
+ on(clearRoutingGuardEntities, (state) => routingGuardAdapter.removeAll(state)),
95
+ on(clearRoutingGuardEntitiesFailureReason, (state, payload) => routingGuardAdapter.updateOne({
96
+ id: payload.id,
97
+ changes: {
98
+ status: RegisteredItemStatus.READY,
99
+ blockingReason: void 0
100
+ }
101
+ }, state)),
102
+ on(setRoutingGuardEntityFailureWithReason, (state, payload) => routingGuardAdapter.updateOne({
103
+ id: payload.id,
104
+ changes: {
105
+ status: RegisteredItemStatus.FAILURE,
106
+ blockingReason: payload.reason
107
+ }
108
+ }, state))
119
109
  ];
120
- /**
121
- * RoutingGuard Store reducer
122
- */
123
110
  const routingGuardReducer = createReducer(routingGuardInitialState, ...routingGuardReducerFeatures);
124
-
125
- /** Token of the RoutingGuard reducer */
126
- const ROUTING_GUARD_REDUCER_TOKEN = new InjectionToken('Feature RoutingGuard Reducer');
127
- /** Provide default reducer for RoutingGuard store */
111
+ const ROUTING_GUARD_REDUCER_TOKEN = new InjectionToken("Feature RoutingGuard Reducer");
128
112
  function getDefaultRoutingGuardReducer() {
129
- return routingGuardReducer;
130
- }
131
- /**
132
- * @deprecated Will be removed in v16. Use {@link provideRoutingGuardStore} instead.
133
- */
134
- class RoutingGuardStoreModule {
135
- static forRoot(reducerFactory) {
136
- return {
137
- ngModule: RoutingGuardStoreModule,
138
- providers: [
139
- { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: reducerFactory }
140
- ]
141
- };
142
- }
143
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: RoutingGuardStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
144
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.0", ngImport: i0, type: RoutingGuardStoreModule, imports: [i1.StoreFeatureModule] }); }
145
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: RoutingGuardStoreModule, providers: [
146
- { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: getDefaultRoutingGuardReducer }
147
- ], imports: [StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)] }); }
113
+ return routingGuardReducer;
148
114
  }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: RoutingGuardStoreModule, decorators: [{
150
- type: NgModule,
151
- args: [{
152
- imports: [
153
- StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)
154
- ],
155
- providers: [
156
- { provide: ROUTING_GUARD_REDUCER_TOKEN, useFactory: getDefaultRoutingGuardReducer }
157
- ]
158
- }]
159
- }] });
160
- /**
161
- * Provide RoutingGuard feature store.
162
- * @param reducerFactory Optional factory to override the default reducer.
163
- */
115
+ var RoutingGuardStoreModule = class RoutingGuardStoreModule {
116
+ static forRoot(reducerFactory) {
117
+ return {
118
+ ngModule: RoutingGuardStoreModule,
119
+ providers: [{
120
+ provide: ROUTING_GUARD_REDUCER_TOKEN,
121
+ useFactory: reducerFactory
122
+ }]
123
+ };
124
+ }
125
+ static {
126
+ this.ɵfac = i0.ɵɵngDeclareFactory({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.3",
129
+ ngImport: i0,
130
+ type: RoutingGuardStoreModule,
131
+ deps: [],
132
+ target: i0.ɵɵFactoryTarget.NgModule
133
+ });
134
+ }
135
+ static {
136
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
137
+ minVersion: "14.0.0",
138
+ version: "22.2.3",
139
+ ngImport: i0,
140
+ type: RoutingGuardStoreModule,
141
+ imports: [i1.StoreFeatureModule]
142
+ });
143
+ }
144
+ static {
145
+ this.ɵinj = i0.ɵɵngDeclareInjector({
146
+ minVersion: "12.0.0",
147
+ version: "22.2.3",
148
+ ngImport: i0,
149
+ type: RoutingGuardStoreModule,
150
+ providers: [{
151
+ provide: ROUTING_GUARD_REDUCER_TOKEN,
152
+ useFactory: getDefaultRoutingGuardReducer
153
+ }],
154
+ imports: [StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)]
155
+ });
156
+ }
157
+ };
158
+ i0.ɵɵngDeclareClassMetadata({
159
+ minVersion: "12.0.0",
160
+ version: "22.2.3",
161
+ ngImport: i0,
162
+ type: RoutingGuardStoreModule,
163
+ decorators: [{
164
+ type: NgModule,
165
+ args: [{
166
+ imports: [StoreModule.forFeature(ROUTING_GUARD_STORE_NAME, ROUTING_GUARD_REDUCER_TOKEN)],
167
+ providers: [{
168
+ provide: ROUTING_GUARD_REDUCER_TOKEN,
169
+ useFactory: getDefaultRoutingGuardReducer
170
+ }]
171
+ }]
172
+ }]
173
+ });
164
174
  function provideRoutingGuardStore(reducerFactory) {
165
- return makeEnvironmentProviders([
166
- provideState(ROUTING_GUARD_STORE_NAME, reducerFactory ? reducerFactory() : routingGuardReducer)
167
- ]);
175
+ return makeEnvironmentProviders([provideState(ROUTING_GUARD_STORE_NAME, reducerFactory ? reducerFactory() : routingGuardReducer)]);
168
176
  }
169
-
170
177
  const { selectIds, selectEntities, selectAll, selectTotal } = routingGuardAdapter.getSelectors();
171
- /** Select RoutingGuard State */
172
178
  const selectRoutingGuardState = createFeatureSelector(ROUTING_GUARD_STORE_NAME);
173
- /** Select the array of RoutingGuard ids */
174
179
  const selectRoutingGuardIds = createSelector(selectRoutingGuardState, selectIds);
175
- /** Select the array of RoutingGuard */
176
180
  const selectAllRoutingGuard = createSelector(selectRoutingGuardState, selectAll);
177
- /** Select the dictionary of RoutingGuard entities */
178
181
  const selectRoutingGuardEntities = createSelector(selectRoutingGuardState, selectEntities);
179
- /** Select the total RoutingGuard count */
180
182
  const selectRoutingGuardTotal = createSelector(selectRoutingGuardState, selectTotal);
181
- /**
182
- * Selector used to retrieve the list of entities' status
183
- */
184
183
  const selectRoutingGuardEntitiesStatusList = createSelector(selectRoutingGuardState, (state) => {
185
- return Object.keys(state.entities)
186
- .filter((key) => !!state.entities[key])
187
- .map((key) => state.entities[key].status);
184
+ return Object.keys(state.entities).filter((key) => !!state.entities[key]).map((key) => state.entities[key].status);
188
185
  });
189
- /**
190
- * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.
191
- */
192
186
  const selectRoutingGuardEntitiesBlockingReasons = createSelector(selectRoutingGuardState, (state) => {
193
- return Object.values(state.entities)
194
- .filter((entity) => !!entity && !!entity.blockingReason)
195
- .map((entity) => entity.blockingReason);
187
+ return Object.values(state.entities).filter((entity) => !!entity && !!entity.blockingReason).map((entity) => entity.blockingReason);
196
188
  });
197
- /**
198
- * Selector used to check that no item is in PENDING state.
199
- * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard
200
- */
201
189
  const hasNoEntitiesInPendingState = createSelector(selectRoutingGuardEntitiesStatusList, (statusList) => {
202
- return !statusList.includes(RegisteredItemStatus.PENDING);
190
+ return !statusList.includes(RegisteredItemStatus.PENDING);
203
191
  });
204
- /**
205
- * Selector used to check that no item is in FAILURE state.
206
- * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard
207
- */
208
192
  const hasNoEntitiesInFailureState = createSelector(selectRoutingGuardEntitiesStatusList, (statusList) => {
209
- return !statusList.includes(RegisteredItemStatus.FAILURE);
193
+ return !statusList.includes(RegisteredItemStatus.FAILURE);
210
194
  });
211
- /**
212
- * Selector used to check that no item is in READY or FAILURE state.
213
- * For example, we will rely on this selector to trigger the router navigation and display a loader
214
- */
215
195
  const hasNoEntityInReadyOrFailureState = createSelector(selectRoutingGuardEntitiesStatusList, (statusList) => {
216
- return !statusList.some((status) => status === RegisteredItemStatus.READY || status === RegisteredItemStatus.FAILURE);
196
+ return !statusList.some((status) => status === RegisteredItemStatus.READY || status === RegisteredItemStatus.FAILURE);
217
197
  });
218
- /**
219
- * Selector used to check that no item is in FAILURE state with a blocking reason provided.
220
- * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.
221
- */
222
198
  const hasNoEntityFailureStateWithReasons = createSelector(selectRoutingGuardEntitiesBlockingReasons, (reasons, properties) => {
223
- return !reasons.includes(properties.blockingReason);
199
+ return !reasons.includes(properties.blockingReason);
224
200
  });
225
-
226
- /**
227
- * AppBaseHref factory function
228
- * The APP_BASE_HREF will assume one of the following values (ordered by priority):
229
- * 1- undefined (or disabled) if it's not a PROD environment
230
- * 2- the content of the data tag data-appbasehref in the body if it exists
231
- * 3- the content of config.APP_BASE_HREF if defined
232
- * 4- otherwise, undefined
233
- * @param config The application environment configuration
234
- */
235
201
  function appBaseHrefFactory(config) {
236
- if (config.ENVIRONMENT !== 'prod') {
237
- return;
238
- }
239
- const dynamicBaseHref = document.body.dataset.appbasehref;
240
- if (typeof dynamicBaseHref !== 'undefined') {
241
- return dynamicBaseHref;
242
- }
243
- return typeof config.APP_BASE_HREF === 'string' ? config.APP_BASE_HREF : undefined;
202
+ if (config.ENVIRONMENT !== "prod") return;
203
+ const dynamicBaseHref = document.body.dataset.appbasehref;
204
+ if (typeof dynamicBaseHref !== "undefined") return dynamicBaseHref;
205
+ return typeof config.APP_BASE_HREF === "string" ? config.APP_BASE_HREF : void 0;
244
206
  }
245
- const ENVIRONMENT_CONFIG_TOKEN = new InjectionToken('Environment config');
246
- /**
247
- * Specify a custom base href
248
- * @param baseHref
249
- */
207
+ const ENVIRONMENT_CONFIG_TOKEN = new InjectionToken("Environment config");
250
208
  function withBaseHref(baseHref) {
251
- return {
252
- ɵkind: 'base-href',
253
- ɵproviders: [
254
- {
255
- provide: APP_BASE_HREF,
256
- ...(typeof baseHref === 'function'
257
- ? { useFactory: baseHref, deps: [ENVIRONMENT_CONFIG_TOKEN] }
258
- : { useValue: baseHref })
259
- }
260
- ]
261
- };
209
+ return {
210
+ ɵkind: "base-href",
211
+ ɵproviders: [{
212
+ provide: APP_BASE_HREF,
213
+ ...typeof baseHref === "function" ? {
214
+ useFactory: baseHref,
215
+ deps: [ENVIRONMENT_CONFIG_TOKEN]
216
+ } : { useValue: baseHref }
217
+ }]
218
+ };
262
219
  }
263
- /**
264
- * Provide environment configuration
265
- * @note it will also provide APP_BASE_HREF based on the environment configuration
266
- * @param config
267
- * @param features
268
- */
269
220
  function provideEnvironment(config, ...features) {
270
- const additionalProviders = [];
271
- const baseHrefFeature = features.find((f) => f.ɵkind === 'base-href') ?? withBaseHref(appBaseHrefFactory);
272
- additionalProviders.push(baseHrefFeature.ɵproviders);
273
- return makeEnvironmentProviders([
274
- { provide: ENVIRONMENT_CONFIG_TOKEN, useValue: { ...DEFAULT_BUILD_PROPERTIES, ...config } },
275
- additionalProviders
276
- ]);
221
+ const additionalProviders = [];
222
+ const baseHrefFeature = features.find((f) => f.ɵkind === "base-href") ?? withBaseHref(appBaseHrefFactory);
223
+ additionalProviders.push(baseHrefFeature.ɵproviders);
224
+ return makeEnvironmentProviders([{
225
+ provide: ENVIRONMENT_CONFIG_TOKEN,
226
+ useValue: {
227
+ ...DEFAULT_BUILD_PROPERTIES,
228
+ ...config
229
+ }
230
+ }, additionalProviders]);
277
231
  }
278
-
279
- /**
280
- * Check if the route has preload instructions
281
- * @param data Route data
282
- */
283
232
  function hasPreloadingOnDemand(data) {
284
- if (!data) {
285
- return false;
286
- }
287
- return (Array.isArray(data.preloadOn) && data.preloadOn.length > 0)
288
- || data.preloadOn === '*'
289
- || data.preloadOn instanceof RegExp;
290
- }
291
- /**
292
- * Otter Preloading strategy base on previous route
293
- * @inheritDoc
294
- */
295
- class O3rOnNavigationPreloadingStrategy {
296
- constructor() {
297
- this.router = inject(Router);
298
- }
299
- /**
300
- * Check if the module should be preloaded based on the data preload array of routes or regex value
301
- * @param data Route data
302
- * @param url URL of current page
303
- */
304
- isUrlMatchingPreloadConfig(data, url) {
305
- return (Array.isArray(data.preloadOn) && data.preloadOn.includes(url))
306
- || (data.preloadOn instanceof RegExp && data.preloadOn.test(url));
307
- }
308
- /** @inheritDoc */
309
- preload(route, preload) {
310
- if ((route.path || route.matcher) && hasPreloadingOnDemand(route.data)) {
311
- // On application landing page, check the route to preload.
312
- if (route.data.preloadOn === '*' || this.isUrlMatchingPreloadConfig(route.data, this.router.routerState.snapshot.url)) {
313
- return preload();
314
- }
315
- // On route navigation end, load the routes to preload for the current route.
316
- return this.router.events
317
- .pipe(filter((r) => r instanceof NavigationEnd && this.isUrlMatchingPreloadConfig(route.data, r.url)), switchMap(() => preload()));
318
- }
319
- return of(null);
320
- }
321
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
322
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: O3rOnNavigationPreloadingStrategy }); }
233
+ if (!data) return false;
234
+ return Array.isArray(data.preloadOn) && data.preloadOn.length > 0 || data.preloadOn === "*" || data.preloadOn instanceof RegExp;
323
235
  }
324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: O3rOnNavigationPreloadingStrategy, decorators: [{
325
- type: Injectable
326
- }] });
327
-
328
- /**
329
- * Generated bundle index. Do not edit.
330
- */
331
-
236
+ var O3rOnNavigationPreloadingStrategy = class O3rOnNavigationPreloadingStrategy {
237
+ constructor() {
238
+ this.router = inject(Router);
239
+ }
240
+ isUrlMatchingPreloadConfig(data, url) {
241
+ return Array.isArray(data.preloadOn) && data.preloadOn.includes(url) || data.preloadOn instanceof RegExp && data.preloadOn.test(url);
242
+ }
243
+ preload(route, preload) {
244
+ if ((route.path || route.matcher) && hasPreloadingOnDemand(route.data)) {
245
+ if (route.data.preloadOn === "*" || this.isUrlMatchingPreloadConfig(route.data, this.router.routerState.snapshot.url)) return preload();
246
+ return this.router.events.pipe(filter((r) => r instanceof NavigationEnd && this.isUrlMatchingPreloadConfig(route.data, r.url)), switchMap(() => preload()));
247
+ }
248
+ return of(null);
249
+ }
250
+ static {
251
+ this.ɵfac = i0.ɵɵngDeclareFactory({
252
+ minVersion: "12.0.0",
253
+ version: "22.2.3",
254
+ ngImport: i0,
255
+ type: O3rOnNavigationPreloadingStrategy,
256
+ deps: [],
257
+ target: i0.ɵɵFactoryTarget.Injectable
258
+ });
259
+ }
260
+ static {
261
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
262
+ minVersion: "12.0.0",
263
+ version: "22.2.3",
264
+ ngImport: i0,
265
+ type: O3rOnNavigationPreloadingStrategy
266
+ });
267
+ }
268
+ };
269
+ i0.ɵɵngDeclareClassMetadata({
270
+ minVersion: "12.0.0",
271
+ version: "22.2.3",
272
+ ngImport: i0,
273
+ type: O3rOnNavigationPreloadingStrategy,
274
+ decorators: [{ type: Injectable }]
275
+ });
332
276
  export { 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, provideRoutingGuardStore, registerRoutingGuardEntity, routingGuardAdapter, routingGuardInitialState, routingGuardReducer, routingGuardReducerFeatures, selectAllRoutingGuard, selectRoutingGuardEntities, selectRoutingGuardEntitiesBlockingReasons, selectRoutingGuardEntitiesStatusList, selectRoutingGuardIds, selectRoutingGuardState, selectRoutingGuardTotal, setRoutingGuardEntityAsFailure, setRoutingGuardEntityAsPending, setRoutingGuardEntityAsSuccessAndClearReason, setRoutingGuardEntityFailureWithReason, withBaseHref };
333
- //# sourceMappingURL=o3r-routing.mjs.map
277
+
278
+ //# sourceMappingURL=o3r-routing.mjs.map
@@ -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 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 EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n provideState,\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/**\n * @deprecated Will be removed in v16. Use {@link provideRoutingGuardStore} instead.\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\n/**\n * Provide RoutingGuard feature store.\n * @param reducerFactory Optional factory to override the default reducer.\n */\nexport function provideRoutingGuardStore(reducerFactory?: () => ActionReducer<RoutingGuardState, Action>): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideState(ROUTING_GUARD_STORE_NAME, reducerFactory ? reducerFactory() : routingGuardReducer)\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 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\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,4CAA4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AS,YAAY,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrE;;IAGO,OAAO,CAAC,KAAY,EAAE,OAA8B,EAAA;AACzD,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,KAAK,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;;YAEtE,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACrH,OAAO,OAAO,EAAE;YAClB;;AAGA,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC;AAChB,iBAAA,IAAI,CACH,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,aAAa,IAAI,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAC/F,SAAS,CAAC,MAAM,OAAO,EAAE,CAAC,CAC3B;QACL;AACA,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC;IACjB;iIA7BW,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAAjC,iCAAiC,EAAA,CAAA,CAAA;;2FAAjC,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C;;;AC7CD;;AAEG;;"}
1
+ {"version":3,"file":"o3r-routing.mjs","names":["actions.registerRoutingGuardEntity","actions.setRoutingGuardEntityAsPending","actions.setRoutingGuardEntityAsFailure","actions.setRoutingGuardEntityAsSuccessAndClearReason","actions.clearRoutingGuardEntities","actions.clearRoutingGuardEntitiesFailureReason","actions.setRoutingGuardEntityFailureWithReason"],"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"],"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 EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n provideState,\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/**\n * @deprecated Will be removed in v16. Use {@link provideRoutingGuardStore} instead.\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\n/**\n * Provide RoutingGuard feature store.\n * @param reducerFactory Optional factory to override the default reducer.\n */\nexport function provideRoutingGuardStore(reducerFactory?: () => ActionReducer<RoutingGuardState, Action>): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideState(ROUTING_GUARD_STORE_NAME, reducerFactory ? reducerFactory() : routingGuardReducer)\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 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\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"],"mappings":";;;;;;;;;;;;AASA,MAAM,yBAAyB;AAC/B,MAAM,+BAA+B;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gBAAgB,QAAO,CAAE,CAAC;EAEhC;EACA,OAAO,GAAG,IAAI;CAChB;CA7BW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiC,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAjC;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;EAAiC,CAAA;CAAA;;AAAjC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiC,YAAA,CAAA,EAD7C,MAAA,W"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/routing",
3
- "version": "15.3.0-prerelease.9",
3
+ "version": "15.4.0-prerelease.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,9 +20,9 @@
20
20
  "@ngrx/entity": "^22.0.0",
21
21
  "@ngrx/router-store": "^22.0.0",
22
22
  "@ngrx/store": "^22.0.0",
23
- "@o3r/core": "~15.3.0-prerelease.9",
24
- "@o3r/routing": "~15.3.0-prerelease.9",
25
- "@o3r/schematics": "~15.3.0-prerelease.9",
23
+ "@o3r/core": "~15.4.0-prerelease.0",
24
+ "@o3r/routing": "~15.4.0-prerelease.0",
25
+ "@o3r/schematics": "~15.4.0-prerelease.0",
26
26
  "@schematics/angular": "^22.0.0",
27
27
  "jasmine": "^5.0.0",
28
28
  "rxjs": "^7.8.1",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@o3r/schematics": "~15.3.0-prerelease.9",
49
+ "@o3r/schematics": "~15.4.0-prerelease.0",
50
50
  "tslib": "^2.6.2"
51
51
  },
52
52
  "engines": {
@@ -7,9 +7,6 @@
7
7
  "projectName": {
8
8
  "type": "string",
9
9
  "description": "Project name",
10
- "$default": {
11
- "$source": "projectName"
12
- },
13
10
  "alias": "project"
14
11
  },
15
12
  "exactO3rVersion": {
@@ -1,198 +1,186 @@
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, EnvironmentProviders, 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
+ import { Actions } from "@ngrx/effects";
2
+ import * as i0 from "@angular/core";
3
+ import { EnvironmentProviders, InjectionToken, ModuleWithProviders, Provider } from "@angular/core";
4
+ import { EntityAdapter, EntityState } from "@ngrx/entity";
5
+ import * as i1 from "@ngrx/store";
6
+ import { Action, ActionCreator, ActionReducer, ReducerTypes } from "@ngrx/store";
7
+ import { BuildTimeProperties } from "@o3r/core";
8
+ import { PreloadingStrategy, Route } from "@angular/router";
9
+ import { Observable } from "rxjs";
15
10
  /**
16
11
  * Effect to react on Ngrx router store actions
17
12
  */
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<any>;
13
+ export declare class NgrxStoreRouterEffect {
14
+ protected actions$: Actions<any>;
15
+ /**
16
+ * Clear Router registrations when the active history entry changes (ex : click on back/next button Action)
17
+ */
18
+ resetRouterRegistrationOnRequest$: import("rxjs").Observable<import("@ngrx/store").Action<"[RoutingGuard] clear entities">> & import("@ngrx/effects").CreateEffectMetadata;
19
+ /**
20
+ * Clear Router registrations when navigation happened
21
+ */
22
+ resetRouterRegistrationOnNavigated$: import("rxjs").Observable<import("@ngrx/store").Action<"[RoutingGuard] clear entities">> & import("@ngrx/effects").CreateEffectMetadata;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgrxStoreRouterEffect, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
30
25
  }
31
-
32
26
  /** 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"
27
+ export declare enum RegisteredItemStatus {
28
+ /** block is ready (async call has not been triggered) */
29
+ READY = "READY",
30
+ /** block is waiting for async call to resolve */
31
+ PENDING = "PENDING",
32
+ /** block received the async call result and it's a failure */
33
+ FAILURE = "FAILURE",
34
+ /** block received the async call result and it's a success */
35
+ SUCCESS = "SUCCESS"
42
36
  }
43
37
  /** 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"
38
+ export declare enum RegisteredItemFailureReason {
39
+ /** Routing Failed because the async call result is failure */
40
+ ASYNC_CALL_FAILURE = "ASYNC_CALL_FAILURE",
41
+ /** Routing failed because the changes to the form has not been saved */
42
+ FORM_UNSAVED = "FORM_UNSAVED"
49
43
  }
50
44
  /**
51
45
  * RoutingGuard model
52
46
  */
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;
47
+ export interface RoutingGuardModel {
48
+ /** Id of the block instance */
49
+ id: string;
50
+ /** Routing status of the block */
51
+ status: RegisteredItemStatus;
52
+ /** Routing Guard blocking reason */
53
+ blockingReason?: RegisteredItemFailureReason;
60
54
  }
61
55
  /**
62
56
  * RoutingGuard store state
63
57
  */
64
- interface RoutingGuardState extends EntityState<RoutingGuardModel> {
65
- }
58
+ export interface RoutingGuardState extends EntityState<RoutingGuardModel> {}
66
59
  /**
67
60
  * Name of the RoutingGuard Store
68
61
  */
69
- declare const ROUTING_GUARD_STORE_NAME = "routingGuard";
62
+ export declare const ROUTING_GUARD_STORE_NAME = "routingGuard";
70
63
  /**
71
64
  * RoutingGuard Store Interface
72
65
  */
73
- interface RoutingGuardStore {
74
- /** RoutingGuard state */
75
- [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;
66
+ export interface RoutingGuardStore {
67
+ /** RoutingGuard state */
68
+ [ROUTING_GUARD_STORE_NAME]: RoutingGuardState;
76
69
  }
77
-
78
- interface RoutingGuardActionPayload {
79
- /** Id of the block instance */
80
- id: string;
70
+ export interface RoutingGuardActionPayload {
71
+ /** Id of the block instance */
72
+ id: string;
81
73
  }
82
- interface RoutingGuardFailureReasonPayload {
83
- /** Id of the block instance */
84
- id: string;
85
- /** Reason for failure */
86
- reason: RegisteredItemFailureReason;
74
+ export interface RoutingGuardFailureReasonPayload {
75
+ /** Id of the block instance */
76
+ id: string;
77
+ /** Reason for failure */
78
+ reason: RegisteredItemFailureReason;
87
79
  }
88
80
  /**
89
81
  * Register a new entity in routing guard store
90
82
  */
91
- declare const registerRoutingGuardEntity: _ngrx_store.ActionCreator<"[RoutingGuard] register an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & _ngrx_store.Action<"[RoutingGuard] register an entity">>;
83
+ export declare const registerRoutingGuardEntity: import("@ngrx/store").ActionCreator<"[RoutingGuard] register an entity", (props: RoutingGuardActionPayload) => RoutingGuardActionPayload & import("@ngrx/store").Action<"[RoutingGuard] register an entity">>;
92
84
  /**
93
85
  * Set an entity in FAILURE status
94
86
  */
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">>;
87
+ 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">>;
96
88
  /**
97
89
  * Set an entity in SUCCESS status and clear the reason
98
90
  */
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">>;
91
+ 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">>;
100
92
  /**
101
93
  * Set an entity in PENDING status
102
94
  */
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">>;
95
+ 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">>;
104
96
  /**
105
97
  * Clear only the entities, keeps the other attributes in the state
106
98
  */
107
- declare const clearRoutingGuardEntities: _ngrx_store.ActionCreator<"[RoutingGuard] clear entities", () => _ngrx_store.Action<"[RoutingGuard] clear entities">>;
99
+ export declare const clearRoutingGuardEntities: import("@ngrx/store").ActionCreator<"[RoutingGuard] clear entities", () => import("@ngrx/store").Action<"[RoutingGuard] clear entities">>;
108
100
  /**
109
101
  * Clear only the entities, keeps the other attributes in the state
110
102
  */
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">>;
103
+ 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">>;
112
104
  /**
113
105
  * Set entity in FAILURE status with a reason
114
106
  */
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
-
107
+ 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">>;
117
108
  /** Token of the RoutingGuard reducer */
118
- declare const ROUTING_GUARD_REDUCER_TOKEN: InjectionToken<ActionReducer<RoutingGuardState, Action<string>>>;
109
+ export declare const ROUTING_GUARD_REDUCER_TOKEN: InjectionToken<ActionReducer<RoutingGuardState, Action<string>>>;
119
110
  /** Provide default reducer for RoutingGuard store */
120
- declare function getDefaultRoutingGuardReducer(): ActionReducer<RoutingGuardState, Action<string>>;
111
+ export declare function getDefaultRoutingGuardReducer(): ActionReducer<RoutingGuardState, Action<string>>;
121
112
  /**
122
113
  * @deprecated Will be removed in v16. Use {@link provideRoutingGuardStore} instead.
123
114
  */
124
- declare class RoutingGuardStoreModule {
125
- static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule>;
126
- static ɵfac: i0.ɵɵFactoryDeclaration<RoutingGuardStoreModule, never>;
127
- static ɵmod: i0.ɵɵNgModuleDeclaration<RoutingGuardStoreModule, never, [typeof _ngrx_store.StoreFeatureModule], never>;
128
- static ɵinj: i0.ɵɵInjectorDeclaration<RoutingGuardStoreModule>;
115
+ export declare class RoutingGuardStoreModule {
116
+ static forRoot<T extends RoutingGuardState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RoutingGuardStoreModule>;
117
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutingGuardStoreModule, never>;
118
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RoutingGuardStoreModule, never, [typeof i1.StoreFeatureModule], never>;
119
+ static ɵinj: i0.ɵɵInjectorDeclaration<RoutingGuardStoreModule>;
129
120
  }
130
121
  /**
131
122
  * Provide RoutingGuard feature store.
132
123
  * @param reducerFactory Optional factory to override the default reducer.
133
124
  */
134
- declare function provideRoutingGuardStore(reducerFactory?: () => ActionReducer<RoutingGuardState, Action>): EnvironmentProviders;
135
-
125
+ export declare function provideRoutingGuardStore(reducerFactory?: () => ActionReducer<RoutingGuardState, Action>): EnvironmentProviders;
136
126
  /**
137
127
  * RoutingGuard Store adapter
138
128
  */
139
- declare const routingGuardAdapter: EntityAdapter<RoutingGuardModel>;
129
+ export declare const routingGuardAdapter: EntityAdapter<RoutingGuardModel>;
140
130
  /**
141
131
  * RoutingGuard Store initial value
142
132
  */
143
- declare const routingGuardInitialState: RoutingGuardState;
133
+ export declare const routingGuardInitialState: RoutingGuardState;
144
134
  /**
145
135
  * List of basic actions for RoutingGuard Store
146
136
  */
147
- declare const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[];
137
+ export declare const routingGuardReducerFeatures: ReducerTypes<RoutingGuardState, ActionCreator[]>[];
148
138
  /**
149
139
  * RoutingGuard Store reducer
150
140
  */
151
- declare const routingGuardReducer: _ngrx_store.ActionReducer<RoutingGuardState, _ngrx_store.Action<string>>;
152
-
141
+ export declare const routingGuardReducer: import("@ngrx/store").ActionReducer<RoutingGuardState, import("@ngrx/store").Action<string>>;
153
142
  /** Select RoutingGuard State */
154
- declare const selectRoutingGuardState: _ngrx_store.MemoizedSelector<object, RoutingGuardState, _ngrx_store.DefaultProjectorFn<RoutingGuardState>>;
143
+ export declare const selectRoutingGuardState: import("@ngrx/store").MemoizedSelector<object, RoutingGuardState, import("@ngrx/store").DefaultProjectorFn<RoutingGuardState>>;
155
144
  /** Select the array of RoutingGuard ids */
156
- declare const selectRoutingGuardIds: _ngrx_store.MemoizedSelector<object, string[] | number[], (s1: RoutingGuardState) => string[] | number[]>;
145
+ export declare const selectRoutingGuardIds: import("@ngrx/store").MemoizedSelector<object, string[] | number[], (s1: RoutingGuardState) => string[] | number[]>;
157
146
  /** Select the array of RoutingGuard */
158
- declare const selectAllRoutingGuard: _ngrx_store.MemoizedSelector<object, _o3r_routing.RoutingGuardModel[], (s1: RoutingGuardState) => _o3r_routing.RoutingGuardModel[]>;
147
+ export declare const selectAllRoutingGuard: import("@ngrx/store").MemoizedSelector<object, import("@o3r/routing").RoutingGuardModel[], (s1: RoutingGuardState) => import("@o3r/routing").RoutingGuardModel[]>;
159
148
  /** Select the dictionary of RoutingGuard entities */
160
- declare const selectRoutingGuardEntities: _ngrx_store.MemoizedSelector<object, _ngrx_entity.Dictionary<_o3r_routing.RoutingGuardModel>, (s1: RoutingGuardState) => _ngrx_entity.Dictionary<_o3r_routing.RoutingGuardModel>>;
149
+ export declare const selectRoutingGuardEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("@o3r/routing").RoutingGuardModel>, (s1: RoutingGuardState) => import("@ngrx/entity").Dictionary<import("@o3r/routing").RoutingGuardModel>>;
161
150
  /** Select the total RoutingGuard count */
162
- declare const selectRoutingGuardTotal: _ngrx_store.MemoizedSelector<object, number, (s1: RoutingGuardState) => number>;
151
+ export declare const selectRoutingGuardTotal: import("@ngrx/store").MemoizedSelector<object, number, (s1: RoutingGuardState) => number>;
163
152
  /**
164
153
  * Selector used to retrieve the list of entities' status
165
154
  */
166
- declare const selectRoutingGuardEntitiesStatusList: _ngrx_store.MemoizedSelector<object, RegisteredItemStatus[], (s1: RoutingGuardState) => RegisteredItemStatus[]>;
155
+ export declare const selectRoutingGuardEntitiesStatusList: import("@ngrx/store").MemoizedSelector<object, RegisteredItemStatus[], (s1: RoutingGuardState) => RegisteredItemStatus[]>;
167
156
  /**
168
157
  * Selector used to retrieve the list of entities' blocking reasons for FAILURE status.
169
158
  */
170
- declare const selectRoutingGuardEntitiesBlockingReasons: _ngrx_store.MemoizedSelector<object, RegisteredItemFailureReason[], (s1: RoutingGuardState) => RegisteredItemFailureReason[]>;
159
+ export declare const selectRoutingGuardEntitiesBlockingReasons: import("@ngrx/store").MemoizedSelector<object, RegisteredItemFailureReason[], (s1: RoutingGuardState) => RegisteredItemFailureReason[]>;
171
160
  /**
172
161
  * Selector used to check that no item is in PENDING state.
173
162
  * For example, we will rely on this selector to trigger the canDeactivate logic in the RoutingGuard
174
163
  */
175
- declare const hasNoEntitiesInPendingState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
164
+ export declare const hasNoEntitiesInPendingState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
176
165
  /**
177
166
  * Selector used to check that no item is in FAILURE state.
178
167
  * For example, we will rely on this selector to authorize or not the navigation in the RoutingGuard
179
168
  */
180
- declare const hasNoEntitiesInFailureState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
169
+ export declare const hasNoEntitiesInFailureState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
181
170
  /**
182
171
  * Selector used to check that no item is in READY or FAILURE state.
183
172
  * For example, we will rely on this selector to trigger the router navigation and display a loader
184
173
  */
185
- declare const hasNoEntityInReadyOrFailureState: _ngrx_store.MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
174
+ export declare const hasNoEntityInReadyOrFailureState: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RegisteredItemStatus[]) => boolean>;
186
175
  /**
187
176
  * Selector used to check that no item is in FAILURE state with a blocking reason provided.
188
177
  * Takes `blockingReason: RegisteredItemFailureReason` as aproperty parameter.
189
178
  */
190
- declare const hasNoEntityFailureStateWithReasons: _ngrx_store.MemoizedSelectorWithProps<object, {
191
- blockingReason: RegisteredItemFailureReason;
179
+ export declare const hasNoEntityFailureStateWithReasons: import("@ngrx/store").MemoizedSelectorWithProps<object, {
180
+ blockingReason: RegisteredItemFailureReason;
192
181
  }, boolean, (s1: RegisteredItemFailureReason[], props: {
193
- blockingReason: RegisteredItemFailureReason;
182
+ blockingReason: RegisteredItemFailureReason;
194
183
  }) => boolean>;
195
-
196
184
  /**
197
185
  * AppBaseHref factory function
198
186
  * The APP_BASE_HREF will assume one of the following values (ordered by priority):
@@ -202,12 +190,12 @@ declare const hasNoEntityFailureStateWithReasons: _ngrx_store.MemoizedSelectorWi
202
190
  * 4- otherwise, undefined
203
191
  * @param config The application environment configuration
204
192
  */
205
- declare function appBaseHrefFactory(config: BuildTimeProperties): string | undefined;
206
- declare const ENVIRONMENT_CONFIG_TOKEN: InjectionToken<BuildTimeProperties>;
193
+ export declare function appBaseHrefFactory(config: BuildTimeProperties): string | undefined;
194
+ export declare const ENVIRONMENT_CONFIG_TOKEN: InjectionToken<BuildTimeProperties>;
207
195
  type EnvironmentFeatureKind = 'base-href';
208
196
  interface EnvironmentFeature<FeatureKind extends EnvironmentFeatureKind> {
209
- ɵkind: FeatureKind;
210
- ɵproviders: Provider[];
197
+ ɵkind: FeatureKind;
198
+ ɵproviders: Provider[];
211
199
  }
212
200
  type BaseHrefFeature = EnvironmentFeature<'base-href'>;
213
201
  type EnvironmentFeatures = BaseHrefFeature;
@@ -215,45 +203,42 @@ type EnvironmentFeatures = BaseHrefFeature;
215
203
  * Specify a custom base href
216
204
  * @param baseHref
217
205
  */
218
- declare function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures;
206
+ export declare function withBaseHref<T extends string | undefined>(baseHref: T | ((environmentConfig: BuildTimeProperties) => T)): EnvironmentFeatures;
219
207
  /**
220
208
  * Provide environment configuration
221
209
  * @note it will also provide APP_BASE_HREF based on the environment configuration
222
210
  * @param config
223
211
  * @param features
224
212
  */
225
- declare function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]): i0.EnvironmentProviders;
226
-
213
+ export declare function provideEnvironment(config: Partial<BuildTimeProperties>, ...features: EnvironmentFeatures[]): import("@angular/core").EnvironmentProviders;
227
214
  /**
228
215
  * Data to inject to the route parameter to specify preloading strategy
229
216
  */
230
- interface O3rOnDemandPreloadingData {
231
- /** List of page reached that trigger preloading */
232
- preloadOn: string[] | '*' | RegExp;
217
+ export interface O3rOnDemandPreloadingData {
218
+ /** List of page reached that trigger preloading */
219
+ preloadOn: string[] | '*' | RegExp;
233
220
  }
234
221
  /**
235
222
  * Check if the route has preload instructions
236
223
  * @param data Route data
237
224
  */
238
- declare function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData;
225
+ export declare function hasPreloadingOnDemand(data: any): data is O3rOnDemandPreloadingData;
239
226
  /**
240
227
  * Otter Preloading strategy base on previous route
241
228
  * @inheritDoc
242
229
  */
243
- declare class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {
244
- private readonly router;
245
- /**
246
- * Check if the module should be preloaded based on the data preload array of routes or regex value
247
- * @param data Route data
248
- * @param url URL of current page
249
- */
250
- private isUrlMatchingPreloadConfig;
251
- /** @inheritDoc */
252
- preload(route: Route, preload: () => Observable<any>): Observable<any>;
253
- static ɵfac: i0.ɵɵFactoryDeclaration<O3rOnNavigationPreloadingStrategy, never>;
254
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
230
+ export declare class O3rOnNavigationPreloadingStrategy implements PreloadingStrategy {
231
+ private readonly router;
232
+ /**
233
+ * Check if the module should be preloaded based on the data preload array of routes or regex value
234
+ * @param data Route data
235
+ * @param url URL of current page
236
+ */
237
+ private isUrlMatchingPreloadConfig;
238
+ /** @inheritDoc */
239
+ preload(route: Route, preload: () => Observable<any>): Observable<any>;
240
+ static ɵfac: i0.ɵɵFactoryDeclaration<O3rOnNavigationPreloadingStrategy, never>;
241
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
255
242
  }
256
-
257
- export { 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, provideRoutingGuardStore, registerRoutingGuardEntity, routingGuardAdapter, routingGuardInitialState, routingGuardReducer, routingGuardReducerFeatures, selectAllRoutingGuard, selectRoutingGuardEntities, selectRoutingGuardEntitiesBlockingReasons, selectRoutingGuardEntitiesStatusList, selectRoutingGuardIds, selectRoutingGuardState, selectRoutingGuardTotal, setRoutingGuardEntityAsFailure, setRoutingGuardEntityAsPending, setRoutingGuardEntityAsSuccessAndClearReason, setRoutingGuardEntityFailureWithReason, withBaseHref };
258
- export type { O3rOnDemandPreloadingData, RoutingGuardActionPayload, RoutingGuardFailureReasonPayload, RoutingGuardModel, RoutingGuardState, RoutingGuardStore };
259
- //# sourceMappingURL=o3r-routing.d.ts.map
243
+ export {};
244
+ //# sourceMappingURL=o3r-routing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-routing.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"],"mappings":";;;;;;;;;;;;;;AAuBA;;AAEG;AACH,cACa,qBAAqB;wBACd,OAAA;AAElB;;AAEG;AACI,uCAAiC,IAAA,CAAA,UAAA,CAAA,WAAA,CAAA,MAAA,qCAAA,aAAA,CAAA,oBAAA;AAQxC;;AAEG;AACI,yCAAmC,IAAA,CAAA,UAAA,CAAA,WAAA,CAAA,MAAA,qCAAA,aAAA,CAAA,oBAAA;yCAjB/B,qBAAqB;;AAuBjC;;AC9CD;AACA,aAAY,oBAAoB;;AAE9B;;AAEA;;AAEA;;AAEA;AACD;AAED;AACA,aAAY,2BAA2B;;AAErC;;AAEA;AACD;AAED;;AAEG;UACc,iBAAiB;;;;YAIxB,oBAAoB;;qBAEX,2BAA2B;AAC7C;AAED;;AAEG;UACc,iBAAkB,SAAQ,WAAW,CAAC,iBAAiB;AAAI;AAE5E;;AAEG;AACH,cAAa,wBAAwB;AAErC;;AAEG;UACc,iBAAiB;;AAEhC,KAAC,wBAAwB,GAAG,iBAAiB;AAC9C;;UCnCgB,yBAAyB;;;AAGzC;UAEgB,gCAAgC;;;;YAIvC,2BAA2B;AACpC;AAED;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B;;;ACjFpG;;;;;;;;AAQG;AACH,iBAAgB,kBAAkB,SAAS,mBAAmB;AAW9D,cAAa,wBAAwB,EAAA,cAAA,CAAA,mBAAA;AAErC,KAAK,sBAAsB;AAE3B,UAAU,kBAAkB,qBAAqB,sBAAsB;;gBAEzD,QAAQ;AACrB;AAED,KAAK,eAAe,GAAG,kBAAkB;AAEzC,KAAK,mBAAmB,GAAG,eAAe;AAE1C;;;AAGG;AACH,iBAAgB,YAAY,kEAAkE,mBAAmB,UAAU,mBAAmB;AAgB9I;;;;;AAKG;AACH,iBAAgB,kBAAkB,SAAS,OAAO,CAAC,mBAAmB,gBAAgB,mBAAmB,KAAEC,EAAA,CAAA,oBAAA;;ACrD3G;;AAEG;UACc,yBAAyB;;AAExC,gCAA4B,MAAM;AACnC;AAED;;;AAGG;AACH,iBAAgB,qBAAqB,qBAAqB,yBAAyB;AAUnF;;;AAGG;AACH,cACa,iCAAkC,YAAW,kBAAkB;AAC1E;AAEA;;;;AAIG;AACH;;AAMO,mBAAe,KAAK,iBAAiB,UAAU,QAAQ,UAAU;yCAd7D,iCAAiC;;AA8B7C;;","names":["i1","_angular_core"]}
1
+ {"version":3,"file":"o3r-routing.d.ts","names":[],"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"],"mappings":";;;;;;;;;;;;qBA2Ba;YACD,UAAQ;;;;EAKX,kDAAiC,iCAAA,mEAAA;;;;EAWjC,oDAAmC,iCAAA,mEAAA;SAjB/B,MAAA,GAAA,qBAAA;;;;oBCtBD;;EAEV;;EAEA;;EAEA;;EAEA;;;oBAIU;;EAEV;;EAEA;;;;;iBAMe;;EAEf;;EAEA,QAA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