@nrwl/angular 14.4.3 → 14.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/esm2020/src/runtime/nx/data-persistence.mjs +257 -181
- package/esm2020/src/runtime/nx/nx.module.mjs +3 -1
- package/fesm2015/nrwl-angular.mjs +258 -180
- package/fesm2015/nrwl-angular.mjs.map +1 -1
- package/fesm2020/nrwl-angular.mjs +258 -180
- package/fesm2020/nrwl-angular.mjs.map +1 -1
- package/ng-package.json +2 -1
- package/package.json +10 -9
- package/src/generators/component-cypress-spec/component-cypress-spec.js +6 -5
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +1 -1
- package/src/generators/component-cypress-spec/files/{__componentFileName__.spec.ts__tmpl__ → __componentFileName__.__fileExt__} +0 -0
- package/src/generators/ng-add/utilities/e2e.migrator.d.ts +14 -2
- package/src/generators/ng-add/utilities/e2e.migrator.js +274 -43
- package/src/generators/ng-add/utilities/e2e.migrator.js.map +1 -1
- package/src/generators/ng-add/utilities/file-change-recorder.d.ts +16 -0
- package/src/generators/ng-add/utilities/file-change-recorder.js +37 -0
- package/src/generators/ng-add/utilities/file-change-recorder.js.map +1 -0
- package/src/generators/ngrx/schema.d.ts +9 -1
- package/src/generators/ngrx/schema.json +4 -2
- package/src/runtime/nx/data-persistence.d.ts +256 -192
- package/src/runtime/nx/data-persistence.js +256 -180
- package/src/runtime/nx/data-persistence.js.map +1 -1
- package/src/runtime/nx/nx.module.d.ts +2 -0
- package/src/runtime/nx/nx.module.js +2 -0
- package/src/runtime/nx/nx.module.js.map +1 -1
- package/src/utils/mf/with-module-federation.js +4 -1
- package/src/utils/mf/with-module-federation.js.map +1 -1
|
@@ -8,18 +8,211 @@ const router_store_1 = require("@ngrx/router-store");
|
|
|
8
8
|
const store_1 = require("@ngrx/store");
|
|
9
9
|
const rxjs_1 = require("rxjs");
|
|
10
10
|
const operators_1 = require("rxjs/operators");
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @whatItDoes Handles pessimistic updates (updating the server first).
|
|
14
|
+
*
|
|
15
|
+
* Updating the server, when implemented naively, suffers from race conditions and poor error handling.
|
|
16
|
+
*
|
|
17
|
+
* `pessimisticUpdate` addresses these problems. It runs all fetches in order, which removes race conditions
|
|
18
|
+
* and forces the developer to handle errors.
|
|
19
|
+
*
|
|
20
|
+
* ## Example:
|
|
21
|
+
*
|
|
22
|
+
* ```typescript
|
|
23
|
+
* @Injectable()
|
|
24
|
+
* class TodoEffects {
|
|
25
|
+
* updateTodo$ = createEffect(() =>
|
|
26
|
+
* this.actions$.pipe(
|
|
27
|
+
* ofType('UPDATE_TODO'),
|
|
28
|
+
* pessimisticUpdate({
|
|
29
|
+
* // provides an action
|
|
30
|
+
* run: (action: UpdateTodo) => {
|
|
31
|
+
* // update the backend first, and then dispatch an action that will
|
|
32
|
+
* // update the client side
|
|
33
|
+
* return this.backend.updateTodo(action.todo.id, action.todo).pipe(
|
|
34
|
+
* map((updated) => ({
|
|
35
|
+
* type: 'UPDATE_TODO_SUCCESS',
|
|
36
|
+
* todo: updated,
|
|
37
|
+
* }))
|
|
38
|
+
* );
|
|
39
|
+
* },
|
|
40
|
+
* onError: (action: UpdateTodo, error: any) => {
|
|
41
|
+
* // we don't need to undo the changes on the client side.
|
|
42
|
+
* // we can dispatch an error, or simply log the error here and return `null`
|
|
43
|
+
* return null;
|
|
44
|
+
* },
|
|
45
|
+
* })
|
|
46
|
+
* )
|
|
47
|
+
* );
|
|
48
|
+
*
|
|
49
|
+
* constructor(private actions$: Actions, private backend: Backend) {}
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
54
|
+
* of the effect to false, like this:
|
|
55
|
+
*
|
|
56
|
+
* ```typescript
|
|
57
|
+
* class TodoEffects {
|
|
58
|
+
* updateTodo$ = createEffect(() =>
|
|
59
|
+
* this.actions$.pipe(
|
|
60
|
+
* //...
|
|
61
|
+
* ), { dispatch: false }
|
|
62
|
+
* );
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @param opts
|
|
67
|
+
*/
|
|
11
68
|
function pessimisticUpdate(opts) {
|
|
12
69
|
return (source) => {
|
|
13
70
|
return source.pipe(mapActionAndState(), (0, operators_1.concatMap)(runWithErrorHandling(opts.run, opts.onError)));
|
|
14
71
|
};
|
|
15
72
|
}
|
|
16
73
|
exports.pessimisticUpdate = pessimisticUpdate;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @whatItDoes Handles optimistic updates (updating the client first).
|
|
77
|
+
*
|
|
78
|
+
* It runs all fetches in order, which removes race conditions and forces the developer to handle errors.
|
|
79
|
+
*
|
|
80
|
+
* When using `optimisticUpdate`, in case of a failure, the developer has already updated the state locally,
|
|
81
|
+
* so the developer must provide an undo action.
|
|
82
|
+
*
|
|
83
|
+
* The error handling must be done in the callback, or by means of the undo action.
|
|
84
|
+
*
|
|
85
|
+
* ## Example:
|
|
86
|
+
*
|
|
87
|
+
* ```typescript
|
|
88
|
+
* @Injectable()
|
|
89
|
+
* class TodoEffects {
|
|
90
|
+
* updateTodo$ = createEffect(() =>
|
|
91
|
+
* this.actions$.pipe(
|
|
92
|
+
* ofType('UPDATE_TODO'),
|
|
93
|
+
* optimisticUpdate({
|
|
94
|
+
* // provides an action
|
|
95
|
+
* run: (action: UpdateTodo) => {
|
|
96
|
+
* return this.backend.updateTodo(action.todo.id, action.todo).pipe(
|
|
97
|
+
* mapTo({
|
|
98
|
+
* type: 'UPDATE_TODO_SUCCESS',
|
|
99
|
+
* })
|
|
100
|
+
* );
|
|
101
|
+
* },
|
|
102
|
+
* undoAction: (action: UpdateTodo, error: any) => {
|
|
103
|
+
* // dispatch an undo action to undo the changes in the client state
|
|
104
|
+
* return {
|
|
105
|
+
* type: 'UNDO_TODO_UPDATE',
|
|
106
|
+
* todo: action.todo,
|
|
107
|
+
* };
|
|
108
|
+
* },
|
|
109
|
+
* })
|
|
110
|
+
* )
|
|
111
|
+
* );
|
|
112
|
+
*
|
|
113
|
+
* constructor(private actions$: Actions, private backend: Backend) {}
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
118
|
+
* of the effect to false, like this:
|
|
119
|
+
*
|
|
120
|
+
* ```typescript
|
|
121
|
+
* class TodoEffects {
|
|
122
|
+
* updateTodo$ = createEffect(() =>
|
|
123
|
+
* this.actions$.pipe(
|
|
124
|
+
* //...
|
|
125
|
+
* ), { dispatch: false }
|
|
126
|
+
* );
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @param opts
|
|
131
|
+
*/
|
|
17
132
|
function optimisticUpdate(opts) {
|
|
18
133
|
return (source) => {
|
|
19
134
|
return source.pipe(mapActionAndState(), (0, operators_1.concatMap)(runWithErrorHandling(opts.run, opts.undoAction)));
|
|
20
135
|
};
|
|
21
136
|
}
|
|
22
137
|
exports.optimisticUpdate = optimisticUpdate;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @whatItDoes Handles data fetching.
|
|
141
|
+
*
|
|
142
|
+
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
143
|
+
*
|
|
144
|
+
* `fetch` addresses these problems. It runs all fetches in order, which removes race conditions
|
|
145
|
+
* and forces the developer to handle errors.
|
|
146
|
+
*
|
|
147
|
+
* ## Example:
|
|
148
|
+
*
|
|
149
|
+
* ```typescript
|
|
150
|
+
* @Injectable()
|
|
151
|
+
* class TodoEffects {
|
|
152
|
+
* loadTodos$ = createEffect(() =>
|
|
153
|
+
* this.actions$.pipe(
|
|
154
|
+
* ofType('GET_TODOS'),
|
|
155
|
+
* fetch({
|
|
156
|
+
* // provides an action
|
|
157
|
+
* run: (a: GetTodos) => {
|
|
158
|
+
* return this.backend.getAll().pipe(
|
|
159
|
+
* map((response) => ({
|
|
160
|
+
* type: 'TODOS',
|
|
161
|
+
* todos: response.todos,
|
|
162
|
+
* }))
|
|
163
|
+
* );
|
|
164
|
+
* },
|
|
165
|
+
* onError: (action: GetTodos, error: any) => {
|
|
166
|
+
* // dispatch an undo action to undo the changes in the client state
|
|
167
|
+
* return null;
|
|
168
|
+
* },
|
|
169
|
+
* })
|
|
170
|
+
* )
|
|
171
|
+
* );
|
|
172
|
+
*
|
|
173
|
+
* constructor(private actions$: Actions, private backend: Backend) {}
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* This is correct, but because it set the concurrency to 1, it may not be performant.
|
|
178
|
+
*
|
|
179
|
+
* To fix that, you can provide the `id` function, like this:
|
|
180
|
+
*
|
|
181
|
+
* ```typescript
|
|
182
|
+
* @Injectable()
|
|
183
|
+
* class TodoEffects {
|
|
184
|
+
* loadTodo$ = createEffect(() =>
|
|
185
|
+
* this.actions$.pipe(
|
|
186
|
+
* ofType('GET_TODO'),
|
|
187
|
+
* fetch({
|
|
188
|
+
* id: (todo: GetTodo) => {
|
|
189
|
+
* return todo.id;
|
|
190
|
+
* },
|
|
191
|
+
* // provides an action
|
|
192
|
+
* run: (todo: GetTodo) => {
|
|
193
|
+
* return this.backend.getTodo(todo.id).map((response) => ({
|
|
194
|
+
* type: 'LOAD_TODO_SUCCESS',
|
|
195
|
+
* todo: response.todo,
|
|
196
|
+
* }));
|
|
197
|
+
* },
|
|
198
|
+
* onError: (action: GetTodo, error: any) => {
|
|
199
|
+
* // dispatch an undo action to undo the changes in the client state
|
|
200
|
+
* return null;
|
|
201
|
+
* },
|
|
202
|
+
* })
|
|
203
|
+
* )
|
|
204
|
+
* );
|
|
205
|
+
*
|
|
206
|
+
* constructor(private actions$: Actions, private backend: Backend) {}
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* With this setup, the requests for Todo 1 will run concurrently with the requests for Todo 2.
|
|
211
|
+
*
|
|
212
|
+
* In addition, if there are multiple requests for Todo 1 scheduled, it will only run the last one.
|
|
213
|
+
*
|
|
214
|
+
* @param opts
|
|
215
|
+
*/
|
|
23
216
|
function fetch(opts) {
|
|
24
217
|
return (source) => {
|
|
25
218
|
if (opts.id) {
|
|
@@ -32,6 +225,55 @@ function fetch(opts) {
|
|
|
32
225
|
};
|
|
33
226
|
}
|
|
34
227
|
exports.fetch = fetch;
|
|
228
|
+
/**
|
|
229
|
+
* @whatItDoes Handles data fetching as part of router navigation.
|
|
230
|
+
*
|
|
231
|
+
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
232
|
+
*
|
|
233
|
+
* `navigation` addresses these problems.
|
|
234
|
+
*
|
|
235
|
+
* It checks if an activated router state contains the passed in component type, and, if it does, runs the `run`
|
|
236
|
+
* callback. It provides the activated snapshot associated with the component and the current state. And it only runs
|
|
237
|
+
* the last request.
|
|
238
|
+
*
|
|
239
|
+
* ## Example:
|
|
240
|
+
*
|
|
241
|
+
* ```typescript
|
|
242
|
+
* @Injectable()
|
|
243
|
+
* class TodoEffects {
|
|
244
|
+
* loadTodo$ = createEffect(() =>
|
|
245
|
+
* this.actions$.pipe(
|
|
246
|
+
* // listens for the routerNavigation action from @ngrx/router-store
|
|
247
|
+
* navigation(TodoComponent, {
|
|
248
|
+
* run: (activatedRouteSnapshot: ActivatedRouteSnapshot) => {
|
|
249
|
+
* return this.backend
|
|
250
|
+
* .fetchTodo(activatedRouteSnapshot.params['id'])
|
|
251
|
+
* .pipe(
|
|
252
|
+
* map((todo) => ({
|
|
253
|
+
* type: 'LOAD_TODO_SUCCESS',
|
|
254
|
+
* todo: todo,
|
|
255
|
+
* }))
|
|
256
|
+
* );
|
|
257
|
+
* },
|
|
258
|
+
* onError: (
|
|
259
|
+
* activatedRouteSnapshot: ActivatedRouteSnapshot,
|
|
260
|
+
* error: any
|
|
261
|
+
* ) => {
|
|
262
|
+
* // we can log and error here and return null
|
|
263
|
+
* // we can also navigate back
|
|
264
|
+
* return null;
|
|
265
|
+
* },
|
|
266
|
+
* })
|
|
267
|
+
* )
|
|
268
|
+
* );
|
|
269
|
+
*
|
|
270
|
+
* constructor(private actions$: Actions, private backend: Backend) {}
|
|
271
|
+
* }
|
|
272
|
+
* ```
|
|
273
|
+
*
|
|
274
|
+
* @param component
|
|
275
|
+
* @param opts
|
|
276
|
+
*/
|
|
35
277
|
function navigation(component, opts) {
|
|
36
278
|
return (source) => {
|
|
37
279
|
const nav = source.pipe(mapActionAndState(), (0, operators_1.filter)(([action]) => isStateSnapshot(action)), (0, operators_1.map)(([action, ...slices]) => {
|
|
@@ -89,6 +331,8 @@ function normalizeActionAndState(args) {
|
|
|
89
331
|
}
|
|
90
332
|
/**
|
|
91
333
|
* @whatItDoes Provides convenience methods for implementing common operations of persisting data.
|
|
334
|
+
*
|
|
335
|
+
* @deprecated Use the individual operators instead. Will be removed in v15.
|
|
92
336
|
*/
|
|
93
337
|
let DataPersistence = class DataPersistence {
|
|
94
338
|
constructor(store, actions) {
|
|
@@ -96,205 +340,37 @@ let DataPersistence = class DataPersistence {
|
|
|
96
340
|
this.actions = actions;
|
|
97
341
|
}
|
|
98
342
|
/**
|
|
343
|
+
* See {@link pessimisticUpdate} operator for more information.
|
|
99
344
|
*
|
|
100
|
-
* @
|
|
101
|
-
*
|
|
102
|
-
* Update the server implemented naively suffers from race conditions and poor error handling.
|
|
103
|
-
*
|
|
104
|
-
* `pessimisticUpdate` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
105
|
-
* and forces the developer to handle errors.
|
|
106
|
-
*
|
|
107
|
-
* ## Example:
|
|
108
|
-
*
|
|
109
|
-
* ```typescript
|
|
110
|
-
* @Injectable()
|
|
111
|
-
* class TodoEffects {
|
|
112
|
-
* @Effect() updateTodo = this.s.pessimisticUpdate<UpdateTodo>('UPDATE_TODO', {
|
|
113
|
-
* // provides an action and the current state of the store
|
|
114
|
-
* run(a, state) {
|
|
115
|
-
* // update the backend first, and then dispatch an action that will
|
|
116
|
-
* // update the client side
|
|
117
|
-
* return this.backend(state.user, a.payload).map(updated => ({
|
|
118
|
-
* type: 'TODO_UPDATED',
|
|
119
|
-
* payload: updated
|
|
120
|
-
* }));
|
|
121
|
-
* },
|
|
122
|
-
*
|
|
123
|
-
* onError(a, e: any) {
|
|
124
|
-
* // we don't need to undo the changes on the client side.
|
|
125
|
-
* // we can dispatch an error, or simply log the error here and return `null`
|
|
126
|
-
* return null;
|
|
127
|
-
* }
|
|
128
|
-
* });
|
|
129
|
-
*
|
|
130
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
135
|
-
* of the effect to false, like this:
|
|
136
|
-
*
|
|
137
|
-
* ```
|
|
138
|
-
* class TodoEffects {
|
|
139
|
-
* @Effect({dispatch: false})
|
|
140
|
-
* updateTodo; //...
|
|
141
|
-
* }
|
|
142
|
-
* ```
|
|
345
|
+
* @deprecated Use the {@link pessimisticUpdate} operator instead.
|
|
346
|
+
* The {@link DataPersistence} class will be removed in v15.
|
|
143
347
|
*/
|
|
144
348
|
pessimisticUpdate(actionType, opts) {
|
|
145
349
|
return this.actions.pipe((0, effects_1.ofType)(actionType), (0, operators_1.withLatestFrom)(this.store), pessimisticUpdate(opts));
|
|
146
350
|
}
|
|
147
351
|
/**
|
|
352
|
+
* See {@link optimisticUpdate} operator for more information.
|
|
148
353
|
*
|
|
149
|
-
* @
|
|
150
|
-
*
|
|
151
|
-
* `optimisticUpdate` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
152
|
-
* and forces the developer to handle errors.
|
|
153
|
-
*
|
|
154
|
-
* `optimisticUpdate` is different from `pessimisticUpdate`. In case of a failure, when using `optimisticUpdate`,
|
|
155
|
-
* the developer already updated the state locally, so the developer must provide an undo action.
|
|
156
|
-
*
|
|
157
|
-
* The error handling must be done in the callback, or by means of the undo action.
|
|
158
|
-
*
|
|
159
|
-
* ## Example:
|
|
160
|
-
*
|
|
161
|
-
* ```typescript
|
|
162
|
-
* @Injectable()
|
|
163
|
-
* class TodoEffects {
|
|
164
|
-
* @Effect() updateTodo = this.s.optimisticUpdate<UpdateTodo>('UPDATE_TODO', {
|
|
165
|
-
* // provides an action and the current state of the store
|
|
166
|
-
* run: (a, state) => {
|
|
167
|
-
* return this.backend(state.user, a.payload);
|
|
168
|
-
* },
|
|
169
|
-
*
|
|
170
|
-
* undoAction: (a, e: any) => {
|
|
171
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
172
|
-
* return ({
|
|
173
|
-
* type: 'UNDO_UPDATE_TODO',
|
|
174
|
-
* payload: a
|
|
175
|
-
* });
|
|
176
|
-
* }
|
|
177
|
-
* });
|
|
178
|
-
*
|
|
179
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
180
|
-
* }
|
|
181
|
-
* ```
|
|
182
|
-
*
|
|
183
|
-
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
184
|
-
* of the effect to false, like this:
|
|
185
|
-
*
|
|
186
|
-
* ```
|
|
187
|
-
* class TodoEffects {
|
|
188
|
-
* @Effect({dispatch: false})
|
|
189
|
-
* updateTodo; //...
|
|
190
|
-
* }
|
|
191
|
-
* ```
|
|
354
|
+
* @deprecated Use the {@link optimisticUpdate} operator instead.
|
|
355
|
+
* The {@link DataPersistence} class will be removed in v15.
|
|
192
356
|
*/
|
|
193
357
|
optimisticUpdate(actionType, opts) {
|
|
194
358
|
return this.actions.pipe((0, effects_1.ofType)(actionType), (0, operators_1.withLatestFrom)(this.store), optimisticUpdate(opts));
|
|
195
359
|
}
|
|
196
360
|
/**
|
|
361
|
+
* See {@link fetch} operator for more information.
|
|
197
362
|
*
|
|
198
|
-
* @
|
|
199
|
-
*
|
|
200
|
-
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
201
|
-
*
|
|
202
|
-
* `fetch` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
203
|
-
* and forces the developer to handle errors.
|
|
204
|
-
*
|
|
205
|
-
* ## Example:
|
|
206
|
-
*
|
|
207
|
-
* ```typescript
|
|
208
|
-
* @Injectable()
|
|
209
|
-
* class TodoEffects {
|
|
210
|
-
* @Effect() loadTodos = this.s.fetch<GetTodos>('GET_TODOS', {
|
|
211
|
-
* // provides an action and the current state of the store
|
|
212
|
-
* run: (a, state) => {
|
|
213
|
-
* return this.backend(state.user, a.payload).map(r => ({
|
|
214
|
-
* type: 'TODOS',
|
|
215
|
-
* payload: r
|
|
216
|
-
* });
|
|
217
|
-
* },
|
|
218
|
-
*
|
|
219
|
-
* onError: (a, e: any) => {
|
|
220
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
221
|
-
* }
|
|
222
|
-
* });
|
|
223
|
-
*
|
|
224
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
225
|
-
* }
|
|
226
|
-
* ```
|
|
227
|
-
*
|
|
228
|
-
* This is correct, but because it set the concurrency to 1, it may not be performant.
|
|
229
|
-
*
|
|
230
|
-
* To fix that, you can provide the `id` function, like this:
|
|
231
|
-
*
|
|
232
|
-
* ```typescript
|
|
233
|
-
* @Injectable()
|
|
234
|
-
* class TodoEffects {
|
|
235
|
-
* @Effect() loadTodo = this.s.fetch<GetTodo>('GET_TODO', {
|
|
236
|
-
* id: (a, state) => {
|
|
237
|
-
* return a.payload.id;
|
|
238
|
-
* }
|
|
239
|
-
*
|
|
240
|
-
* // provides an action and the current state of the store
|
|
241
|
-
* run: (a, state) => {
|
|
242
|
-
* return this.backend(state.user, a.payload).map(r => ({
|
|
243
|
-
* type: 'TODO',
|
|
244
|
-
* payload: r
|
|
245
|
-
* });
|
|
246
|
-
* },
|
|
247
|
-
*
|
|
248
|
-
* onError: (a, e: any) => {
|
|
249
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
250
|
-
* return null;
|
|
251
|
-
* }
|
|
252
|
-
* });
|
|
253
|
-
*
|
|
254
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
255
|
-
* }
|
|
256
|
-
* ```
|
|
257
|
-
*
|
|
258
|
-
* With this setup, the requests for Todo 1 will run concurrently with the requests for Todo 2.
|
|
259
|
-
*
|
|
260
|
-
* In addition, if DataPersistence notices that there are multiple requests for Todo 1 scheduled,
|
|
261
|
-
* it will only run the last one.
|
|
363
|
+
* @deprecated Use the {@link fetch} operator instead.
|
|
364
|
+
* The {@link DataPersistence} class will be removed in v15.
|
|
262
365
|
*/
|
|
263
366
|
fetch(actionType, opts) {
|
|
264
367
|
return this.actions.pipe((0, effects_1.ofType)(actionType), (0, operators_1.withLatestFrom)(this.store), fetch(opts));
|
|
265
368
|
}
|
|
266
369
|
/**
|
|
267
|
-
* @
|
|
268
|
-
*
|
|
269
|
-
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
270
|
-
*
|
|
271
|
-
* `navigation` addresses these problems.
|
|
272
|
-
*
|
|
273
|
-
* It checks if an activated router state contains the passed in component type, and, if it does, runs the `run`
|
|
274
|
-
* callback. It provides the activated snapshot associated with the component and the current state. And it only runs
|
|
275
|
-
* the last request.
|
|
276
|
-
*
|
|
277
|
-
* ## Example:
|
|
370
|
+
* See {@link navigation} operator for more information.
|
|
278
371
|
*
|
|
279
|
-
*
|
|
280
|
-
* @
|
|
281
|
-
* class TodoEffects {
|
|
282
|
-
* @Effect() loadTodo = this.s.navigation(TodoComponent, {
|
|
283
|
-
* run: (a, state) => {
|
|
284
|
-
* return this.backend.fetchTodo(a.params['id']).map(todo => ({
|
|
285
|
-
* type: 'TODO_LOADED',
|
|
286
|
-
* payload: todo
|
|
287
|
-
* }));
|
|
288
|
-
* },
|
|
289
|
-
* onError: (a, e: any) => {
|
|
290
|
-
* // we can log and error here and return null
|
|
291
|
-
* // we can also navigate back
|
|
292
|
-
* return null;
|
|
293
|
-
* }
|
|
294
|
-
* });
|
|
295
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
296
|
-
* }
|
|
297
|
-
* ```
|
|
372
|
+
* @deprecated Use the {@link navigation} operator instead.
|
|
373
|
+
* The {@link DataPersistence} class will be removed in v15.
|
|
298
374
|
*/
|
|
299
375
|
navigation(component, opts) {
|
|
300
376
|
return this.actions.pipe((0, operators_1.withLatestFrom)(this.store), navigation(component, opts));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-persistence.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/runtime/nx/data-persistence.ts"],"names":[],"mappings":";;;;AAAA,wCAAiD;AAEjD,2CAAgD;AAChD,qDAA+E;AAC/E,uCAA2D;AAC3D,+BAAoD;AACpD,8CASwB;
|
|
1
|
+
{"version":3,"file":"data-persistence.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/runtime/nx/data-persistence.ts"],"names":[],"mappings":";;;;AAAA,wCAAiD;AAEjD,2CAAgD;AAChD,qDAA+E;AAC/E,uCAA2D;AAC3D,+BAAoD;AACpD,8CASwB;AAqCxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,SAAgB,iBAAiB,CAC/B,IAAiC;IAEjC,OAAO,CAAC,MAAgC,EAAsB,EAAE;QAC9D,OAAO,MAAM,CAAC,IAAI,CAChB,iBAAiB,EAAE,EACnB,IAAA,qBAAS,EAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CACxD,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AATD,8CASC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,SAAgB,gBAAgB,CAC9B,IAAgC;IAEhC,OAAO,CAAC,MAAgC,EAAsB,EAAE;QAC9D,OAAO,MAAM,CAAC,IAAI,CAChB,iBAAiB,EAAE,EACnB,IAAA,qBAAS,EAAC,oBAAoB,CAAC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+4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* @whatItDoes Provides services for enterprise Angular applications.
|
|
5
5
|
*
|
|
6
6
|
* See {@link DataPersistence} for more information.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Use the individual operators instead. Will be removed in v15.
|
|
7
9
|
*/
|
|
8
10
|
export declare class NxModule {
|
|
9
11
|
static forRoot(): ModuleWithProviders<NxModule>;
|
|
@@ -9,6 +9,8 @@ const data_persistence_1 = require("./data-persistence");
|
|
|
9
9
|
* @whatItDoes Provides services for enterprise Angular applications.
|
|
10
10
|
*
|
|
11
11
|
* See {@link DataPersistence} for more information.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated Use the individual operators instead. Will be removed in v15.
|
|
12
14
|
*/
|
|
13
15
|
let NxModule = NxModule_1 = class NxModule {
|
|
14
16
|
static forRoot() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx.module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/runtime/nx/nx.module.ts"],"names":[],"mappings":";;;;;AAAA,wCAA8D;AAC9D,yDAAqD;AAErD
|
|
1
|
+
{"version":3,"file":"nx.module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/runtime/nx/nx.module.ts"],"names":[],"mappings":";;;;;AAAA,wCAA8D;AAC9D,yDAAqD;AAErD;;;;;;GAMG;AAEH,IAAa,QAAQ,gBAArB,MAAa,QAAQ;IACnB,MAAM,CAAC,OAAO;QACZ,OAAO,EAAE,QAAQ,EAAE,UAAQ,EAAE,SAAS,EAAE,CAAC,kCAAe,CAAC,EAAE,CAAC;IAC9D,CAAC;CACF,CAAA;AAJY,QAAQ;IADpB,IAAA,eAAQ,EAAC,EAAE,CAAC;GACA,QAAQ,CAIpB;AAJY,4BAAQ"}
|
|
@@ -146,7 +146,10 @@ function applyAdditionalShared(sharedConfig, additionalShared, projectGraph) {
|
|
|
146
146
|
}
|
|
147
147
|
function applyDefaultEagerPackages(sharedConfig) {
|
|
148
148
|
var _a;
|
|
149
|
-
const DEFAULT_PACKAGES_TO_LOAD_EAGERLY = [
|
|
149
|
+
const DEFAULT_PACKAGES_TO_LOAD_EAGERLY = [
|
|
150
|
+
'@angular/localize',
|
|
151
|
+
'@angular/localize/init',
|
|
152
|
+
];
|
|
150
153
|
for (const pkg of DEFAULT_PACKAGES_TO_LOAD_EAGERLY) {
|
|
151
154
|
sharedConfig[pkg] = Object.assign(Object.assign({}, ((_a = sharedConfig[pkg]) !== null && _a !== void 0 ? _a : {})), { eager: true });
|
|
152
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/utils/mf/with-module-federation.ts"],"names":[],"mappings":";;;;AAAA,6CAKsB;AACtB,yCAIsB;AACtB,yEAGkD;AAElD,mCAA8C;AAC9C,+BAAqC;AACrC,sEAAoF;AACpF,uFAAwF;AAsBxF,SAAS,mBAAmB,CAC1B,YAA0B,EAC1B,IAAY,EACZ,eAAe;IACb,kBAAkB,EAAE,IAAI,GAAG,EAAU;IACrC,WAAW,EAAE,IAAI,GAAG,EAAU;CAC/B,EACD,OAAoB,IAAI,GAAG,EAAE;;IAK7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAClB,OAAO,YAAY,CAAC;KACrB;IACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEf,CAAC,MAAA,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QAC7D,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACxC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;SACrE;aAAM;YACL,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,C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AC,UAAU,CAAC,GAAG,MAAM,CAAC;KACnC;SAAM;QACL,MAAM,IAAI,KAAK,CACb,6BAA6B,UAAU,+EAA+E;YACpH,4HAA4H,CAC/H,CAAC;KACH;AACH,CAAC;AAED,SAAS,qBAAqB,CAC5B,YAAiD,EACjD,gBAAoD,EACpD,YAA0B;IAE1B,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO;KACR;IAED,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;QACrC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC9B,iCAAiC,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;SACvE;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAChC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;SACrC;aAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YACrC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;SACxD;KACF;AACH,CAAC;AAED,SAAS,yBAAyB,CAChC,YAAiD;;IAEjD,MAAM,gCAAgC,GAAG,
|
|
1
|
+
{"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/utils/mf/with-module-federation.ts"],"names":[],"mappings":";;;;AAAA,6CAKsB;AACtB,yCAIsB;AACtB,yEAGkD;AAElD,mCAA8C;AAC9C,+BAAqC;AACrC,sEAAoF;AACpF,uFAAwF;AAsBxF,SAAS,mBAAmB,CAC1B,YAA0B,EAC1B,IAAY,EACZ,eAAe;IACb,kBAAkB,EAAE,IAAI,GAAG,EAAU;IACrC,WAAW,EAAE,IAAI,GAAG,EAAU;CAC/B,EACD,OAAoB,IAAI,GAAG,EAAE;;IAK7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAClB,OAAO,YAAY,CAAC;KACrB;IACD,IAAI,CA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