@ngxs/store 3.7.4 → 3.7.5
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/README.md +16 -16
- package/bundles/ngxs-store-internals-testing.umd.js +315 -315
- package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
- package/bundles/ngxs-store-internals-testing.umd.min.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.js +192 -397
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.min.js +1 -1
- package/bundles/ngxs-store-internals.umd.min.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +310 -310
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.min.js.map +1 -1
- package/bundles/ngxs-store.umd.js +4401 -4481
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +1 -1
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/index.js +13 -13
- package/esm2015/internals/angular.js +20 -20
- package/esm2015/internals/index.js +10 -11
- package/esm2015/internals/initial-state.js +34 -34
- package/esm2015/internals/internal-tokens.js +16 -16
- package/esm2015/internals/memoize.js +70 -70
- package/esm2015/internals/ngxs-bootstrapper.js +41 -41
- package/esm2015/internals/ngxs-store-internals.js +9 -9
- package/esm2015/internals/src/symbols.js +14 -14
- package/esm2015/internals/symbols.js +14 -14
- package/esm2015/internals/testing/fresh-platform.js +110 -110
- package/esm2015/internals/testing/helpers/ngxs-test.component.js +22 -22
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +24 -24
- package/esm2015/internals/testing/index.js +8 -8
- package/esm2015/internals/testing/ngxs-store-internals-testing.js +8 -8
- package/esm2015/internals/testing/ngxs.setup.js +76 -76
- package/esm2015/internals/testing/skip-console-logging.js +62 -62
- package/esm2015/internals/testing/symbol.js +29 -29
- package/esm2015/ngxs-store.js +24 -23
- package/esm2015/operators/append.js +31 -31
- package/esm2015/operators/compose.js +24 -24
- package/esm2015/operators/iif.js +56 -56
- package/esm2015/operators/index.js +18 -18
- package/esm2015/operators/insert-item.js +41 -41
- package/esm2015/operators/internals.js +5 -5
- package/esm2015/operators/ngxs-store-operators.js +8 -8
- package/esm2015/operators/patch.js +39 -39
- package/esm2015/operators/remove-item.js +34 -34
- package/esm2015/operators/update-item.js +52 -52
- package/esm2015/operators/utils.js +50 -50
- package/esm2015/src/actions/actions.js +39 -39
- package/esm2015/src/actions/symbols.js +39 -39
- package/esm2015/src/actions-stream.js +140 -140
- package/esm2015/src/configs/messages.config.js +79 -79
- package/esm2015/src/decorators/action.js +48 -48
- package/esm2015/src/decorators/select/select-factory.js +45 -49
- package/esm2015/src/decorators/select/select.js +45 -81
- package/esm2015/src/decorators/select/symbols.js +50 -94
- package/esm2015/src/decorators/selector/selector.js +59 -59
- package/esm2015/src/decorators/selector/symbols.js +5 -5
- package/esm2015/src/decorators/selector-options.js +34 -34
- package/esm2015/src/decorators/state.js +77 -83
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +103 -103
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +45 -45
- package/esm2015/src/execution/noop-ngxs-execution-strategy.js +29 -29
- package/esm2015/src/execution/symbols.js +52 -52
- package/esm2015/src/internal/dispatcher.js +219 -217
- package/esm2015/src/internal/internals.js +493 -493
- package/esm2015/src/internal/lifecycle-state-manager.js +129 -129
- package/esm2015/src/internal/state-context-factory.js +138 -138
- package/esm2015/src/internal/state-factory.js +457 -449
- package/esm2015/src/internal/state-operations.js +124 -133
- package/esm2015/src/internal/state-operators.js +33 -33
- package/esm2015/src/internal/state-stream.js +30 -30
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +28 -28
- package/esm2015/src/module.js +159 -157
- package/esm2015/src/modules/ngxs-feature.module.js +63 -63
- package/esm2015/src/modules/ngxs-root.module.js +49 -52
- package/esm2015/src/operators/leave-ngxs.js +58 -58
- package/esm2015/src/operators/of-action.js +191 -191
- package/esm2015/src/plugin-manager.js +70 -70
- package/esm2015/src/plugin_api.js +10 -10
- package/esm2015/src/public_api.js +29 -29
- package/esm2015/src/public_to_deprecate.js +64 -64
- package/esm2015/src/state-token/state-token.js +45 -45
- package/esm2015/src/state-token/symbols.js +5 -5
- package/esm2015/src/store.js +190 -190
- package/esm2015/src/symbols.js +221 -220
- package/esm2015/src/utils/compose.js +44 -44
- package/esm2015/src/utils/freeze.js +35 -35
- package/esm2015/src/utils/selector-utils.js +221 -221
- package/esm2015/src/utils/store-validators.js +60 -60
- package/esm2015/src/utils/utils.js +143 -143
- package/esm5/index.js +13 -13
- package/esm5/internals/angular.js +20 -20
- package/esm5/internals/index.js +10 -11
- package/esm5/internals/initial-state.js +45 -45
- package/esm5/internals/internal-tokens.js +16 -16
- package/esm5/internals/memoize.js +71 -71
- package/esm5/internals/ngxs-bootstrapper.js +56 -56
- package/esm5/internals/ngxs-store-internals.js +9 -9
- package/esm5/internals/src/symbols.js +14 -14
- package/esm5/internals/symbols.js +14 -14
- package/esm5/internals/testing/fresh-platform.js +121 -121
- package/esm5/internals/testing/helpers/ngxs-test.component.js +32 -32
- package/esm5/internals/testing/helpers/ngxs-test.module.js +32 -32
- package/esm5/internals/testing/index.js +8 -8
- package/esm5/internals/testing/ngxs-store-internals-testing.js +8 -8
- package/esm5/internals/testing/ngxs.setup.js +98 -98
- package/esm5/internals/testing/skip-console-logging.js +62 -62
- package/esm5/internals/testing/symbol.js +29 -29
- package/esm5/ngxs-store.js +24 -23
- package/esm5/operators/append.js +31 -31
- package/esm5/operators/compose.js +28 -28
- package/esm5/operators/iif.js +56 -56
- package/esm5/operators/index.js +18 -18
- package/esm5/operators/insert-item.js +41 -41
- package/esm5/operators/internals.js +5 -5
- package/esm5/operators/ngxs-store-operators.js +8 -8
- package/esm5/operators/patch.js +40 -40
- package/esm5/operators/remove-item.js +34 -34
- package/esm5/operators/update-item.js +52 -52
- package/esm5/operators/utils.js +50 -50
- package/esm5/src/actions/actions.js +62 -62
- package/esm5/src/actions/symbols.js +39 -39
- package/esm5/src/actions-stream.js +186 -186
- package/esm5/src/configs/messages.config.js +79 -79
- package/esm5/src/decorators/action.js +60 -60
- package/esm5/src/decorators/select/select-factory.js +46 -50
- package/esm5/src/decorators/select/select.js +50 -87
- package/esm5/src/decorators/select/symbols.js +51 -95
- package/esm5/src/decorators/selector/selector.js +59 -59
- package/esm5/src/decorators/selector/symbols.js +5 -5
- package/esm5/src/decorators/selector-options.js +34 -34
- package/esm5/src/decorators/state.js +78 -84
- package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +123 -123
- package/esm5/src/execution/internal-ngxs-execution-strategy.js +54 -54
- package/esm5/src/execution/noop-ngxs-execution-strategy.js +43 -43
- package/esm5/src/execution/symbols.js +52 -52
- package/esm5/src/internal/dispatcher.js +255 -253
- package/esm5/src/internal/internals.js +495 -495
- package/esm5/src/internal/lifecycle-state-manager.js +177 -177
- package/esm5/src/internal/state-context-factory.js +146 -146
- package/esm5/src/internal/state-factory.js +583 -575
- package/esm5/src/internal/state-operations.js +134 -143
- package/esm5/src/internal/state-operators.js +34 -34
- package/esm5/src/internal/state-stream.js +37 -37
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +28 -28
- package/esm5/src/module.js +202 -200
- package/esm5/src/modules/ngxs-feature.module.js +65 -65
- package/esm5/src/modules/ngxs-root.module.js +44 -47
- package/esm5/src/operators/leave-ngxs.js +58 -58
- package/esm5/src/operators/of-action.js +217 -217
- package/esm5/src/plugin-manager.js +82 -82
- package/esm5/src/plugin_api.js +10 -10
- package/esm5/src/public_api.js +29 -29
- package/esm5/src/public_to_deprecate.js +64 -64
- package/esm5/src/state-token/state-token.js +57 -57
- package/esm5/src/state-token/symbols.js +5 -5
- package/esm5/src/store.js +241 -241
- package/esm5/src/symbols.js +230 -229
- package/esm5/src/utils/compose.js +55 -55
- package/esm5/src/utils/freeze.js +35 -35
- package/esm5/src/utils/selector-utils.js +230 -230
- package/esm5/src/utils/store-validators.js +78 -78
- package/esm5/src/utils/utils.js +151 -151
- package/fesm2015/ngxs-store-internals-testing.js +274 -274
- package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
- package/fesm2015/ngxs-store-internals.js +175 -377
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store-operators.js +312 -312
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +3915 -3995
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store-internals-testing.js +321 -321
- package/fesm5/ngxs-store-internals-testing.js.map +1 -1
- package/fesm5/ngxs-store-internals.js +200 -402
- package/fesm5/ngxs-store-internals.js.map +1 -1
- package/fesm5/ngxs-store-operators.js +316 -316
- package/fesm5/ngxs-store-operators.js.map +1 -1
- package/fesm5/ngxs-store.js +4410 -4491
- package/fesm5/ngxs-store.js.map +1 -1
- package/index.d.ts +8 -8
- package/internals/angular.d.ts +1 -1
- package/internals/index.d.ts +6 -7
- package/internals/initial-state.d.ts +8 -8
- package/internals/internal-tokens.d.ts +9 -9
- package/internals/memoize.d.ts +9 -9
- package/internals/ngxs-bootstrapper.d.ts +13 -13
- package/internals/ngxs-store-internals.d.ts +4 -4
- package/internals/ngxs-store-internals.metadata.json +1 -1
- package/internals/src/symbols.d.ts +7 -7
- package/internals/symbols.d.ts +7 -7
- package/internals/testing/fresh-platform.d.ts +1 -1
- package/internals/testing/helpers/ngxs-test.component.d.ts +5 -5
- package/internals/testing/helpers/ngxs-test.module.d.ts +4 -4
- package/internals/testing/index.d.ts +4 -4
- package/internals/testing/ngxs-store-internals-testing.d.ts +4 -4
- package/internals/testing/ngxs.setup.d.ts +7 -7
- package/internals/testing/skip-console-logging.d.ts +1 -1
- package/internals/testing/symbol.d.ts +14 -14
- package/ngxs-store.d.ts +20 -19
- package/ngxs-store.metadata.json +1 -1
- package/operators/append.d.ts +6 -6
- package/operators/compose.d.ts +2 -2
- package/operators/iif.d.ts +11 -11
- package/operators/index.d.ts +13 -13
- package/operators/insert-item.d.ts +7 -7
- package/operators/internals.d.ts +2 -2
- package/operators/ngxs-store-operators.d.ts +4 -4
- package/operators/patch.d.ts +10 -10
- package/operators/remove-item.d.ts +7 -7
- package/operators/update-item.d.ts +10 -10
- package/operators/utils.d.ts +9 -9
- package/package.json +1 -1
- package/src/actions/actions.d.ts +15 -15
- package/src/actions/symbols.d.ts +21 -21
- package/src/actions-stream.d.ts +49 -49
- package/src/configs/messages.config.d.ts +11 -11
- package/src/decorators/action.d.ts +5 -5
- package/src/decorators/select/select-factory.d.ts +13 -13
- package/src/decorators/select/select.d.ts +4 -4
- package/src/decorators/select/symbols.d.ts +10 -14
- package/src/decorators/selector/selector.d.ts +5 -5
- package/src/decorators/selector/symbols.d.ts +4 -4
- package/src/decorators/selector-options.d.ts +5 -5
- package/src/decorators/state.d.ts +6 -6
- package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +11 -11
- package/src/execution/internal-ngxs-execution-strategy.d.ts +7 -7
- package/src/execution/noop-ngxs-execution-strategy.d.ts +5 -5
- package/src/execution/symbols.d.ts +10 -10
- package/src/internal/dispatcher.d.ts +32 -32
- package/src/internal/internals.d.ts +166 -166
- package/src/internal/lifecycle-state-manager.d.ts +20 -20
- package/src/internal/state-context-factory.d.ts +15 -15
- package/src/internal/state-factory.d.ts +57 -57
- package/src/internal/state-operations.d.ts +19 -19
- package/src/internal/state-operators.d.ts +2 -2
- package/src/internal/state-stream.d.ts +11 -11
- package/src/ivy/ivy-enabled-in-dev-mode.d.ts +6 -6
- package/src/module.d.ts +23 -23
- package/src/modules/ngxs-feature.module.d.ts +13 -13
- package/src/modules/ngxs-root.module.d.ts +13 -13
- package/src/operators/leave-ngxs.d.ts +7 -7
- package/src/operators/of-action.d.ts +43 -43
- package/src/plugin-manager.d.ts +10 -10
- package/src/plugin_api.d.ts +5 -5
- package/src/public_api.d.ts +17 -17
- package/src/public_to_deprecate.d.ts +21 -21
- package/src/state-token/state-token.d.ts +7 -7
- package/src/state-token/symbols.d.ts +5 -5
- package/src/store.d.ts +59 -59
- package/src/symbols.d.ts +139 -138
- package/src/utils/compose.d.ts +23 -23
- package/src/utils/freeze.d.ts +5 -5
- package/src/utils/selector-utils.d.ts +23 -23
- package/src/utils/store-validators.d.ts +7 -7
- package/src/utils/utils.d.ts +46 -46
- package/types/index.d.ts +2 -2
- package/esm2015/internals/decorator-injector-adapter.js +0 -204
- package/esm5/internals/decorator-injector-adapter.js +0 -204
- package/internals/decorator-injector-adapter.d.ts +0 -15
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Injectable } from '@angular/core';
|
|
7
|
-
import { Subject, Observable } from 'rxjs';
|
|
8
|
-
import { leaveNgxs } from './operators/leave-ngxs';
|
|
9
|
-
import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
|
|
10
|
-
/** @enum {string} */
|
|
11
|
-
var ActionStatus = {
|
|
12
|
-
Dispatched: 'DISPATCHED',
|
|
13
|
-
Successful: 'SUCCESSFUL',
|
|
14
|
-
Canceled: 'CANCELED',
|
|
15
|
-
Errored: 'ERRORED',
|
|
16
|
-
};
|
|
17
|
-
export { ActionStatus };
|
|
18
|
-
/**
|
|
19
|
-
* @record
|
|
20
|
-
* @template T
|
|
21
|
-
*/
|
|
22
|
-
export function ActionContext() { }
|
|
23
|
-
if (false) {
|
|
24
|
-
/** @type {?} */
|
|
25
|
-
ActionContext.prototype.status;
|
|
26
|
-
/** @type {?} */
|
|
27
|
-
ActionContext.prototype.action;
|
|
28
|
-
/** @type {?|undefined} */
|
|
29
|
-
ActionContext.prototype.error;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
33
|
-
* A standard Subject does not have this guarantee.
|
|
34
|
-
* For example, given the following code:
|
|
35
|
-
* ```typescript
|
|
36
|
-
* const subject = new Subject<string>();
|
|
37
|
-
* subject.subscribe(value => {
|
|
38
|
-
* if (value === 'start') subject.next('end');
|
|
39
|
-
* });
|
|
40
|
-
* subject.subscribe(value => { });
|
|
41
|
-
* subject.next('start');
|
|
42
|
-
* ```
|
|
43
|
-
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
44
|
-
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
45
|
-
* @template T
|
|
46
|
-
*/
|
|
47
|
-
var /**
|
|
48
|
-
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
49
|
-
* A standard Subject does not have this guarantee.
|
|
50
|
-
* For example, given the following code:
|
|
51
|
-
* ```typescript
|
|
52
|
-
* const subject = new Subject<string>();
|
|
53
|
-
* subject.subscribe(value => {
|
|
54
|
-
* if (value === 'start') subject.next('end');
|
|
55
|
-
* });
|
|
56
|
-
* subject.subscribe(value => { });
|
|
57
|
-
* subject.next('start');
|
|
58
|
-
* ```
|
|
59
|
-
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
60
|
-
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
61
|
-
* @template T
|
|
62
|
-
*/
|
|
63
|
-
OrderedSubject = /** @class */ (function (_super) {
|
|
64
|
-
tslib_1.__extends(OrderedSubject, _super);
|
|
65
|
-
function OrderedSubject() {
|
|
66
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
-
_this._itemQueue = [];
|
|
68
|
-
_this._busyPushingNext = false;
|
|
69
|
-
return _this;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @param {?=} value
|
|
73
|
-
* @return {?}
|
|
74
|
-
*/
|
|
75
|
-
OrderedSubject.prototype.next = /**
|
|
76
|
-
* @param {?=} value
|
|
77
|
-
* @return {?}
|
|
78
|
-
*/
|
|
79
|
-
function (value) {
|
|
80
|
-
if (this._busyPushingNext) {
|
|
81
|
-
this._itemQueue.unshift((/** @type {?} */ (value)));
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
this._busyPushingNext = true;
|
|
85
|
-
_super.prototype.next.call(this, value);
|
|
86
|
-
while (this._itemQueue.length > 0) {
|
|
87
|
-
/** @type {?} */
|
|
88
|
-
var nextValue = this._itemQueue.pop();
|
|
89
|
-
_super.prototype.next.call(this, nextValue);
|
|
90
|
-
}
|
|
91
|
-
this._busyPushingNext = false;
|
|
92
|
-
};
|
|
93
|
-
return OrderedSubject;
|
|
94
|
-
}(Subject));
|
|
95
|
-
/**
|
|
96
|
-
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
97
|
-
* A standard Subject does not have this guarantee.
|
|
98
|
-
* For example, given the following code:
|
|
99
|
-
* ```typescript
|
|
100
|
-
* const subject = new Subject<string>();
|
|
101
|
-
* subject.subscribe(value => {
|
|
102
|
-
* if (value === 'start') subject.next('end');
|
|
103
|
-
* });
|
|
104
|
-
* subject.subscribe(value => { });
|
|
105
|
-
* subject.next('start');
|
|
106
|
-
* ```
|
|
107
|
-
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
108
|
-
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
109
|
-
* @template T
|
|
110
|
-
*/
|
|
111
|
-
export { OrderedSubject };
|
|
112
|
-
if (false) {
|
|
113
|
-
/**
|
|
114
|
-
* @type {?}
|
|
115
|
-
* @private
|
|
116
|
-
*/
|
|
117
|
-
OrderedSubject.prototype._itemQueue;
|
|
118
|
-
/**
|
|
119
|
-
* @type {?}
|
|
120
|
-
* @private
|
|
121
|
-
*/
|
|
122
|
-
OrderedSubject.prototype._busyPushingNext;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Internal Action stream that is emitted anytime an action is dispatched.
|
|
126
|
-
*/
|
|
127
|
-
var InternalActions = /** @class */ (function (_super) {
|
|
128
|
-
tslib_1.__extends(InternalActions, _super);
|
|
129
|
-
function InternalActions() {
|
|
130
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
131
|
-
}
|
|
132
|
-
InternalActions.decorators = [
|
|
133
|
-
{ type: Injectable }
|
|
134
|
-
];
|
|
135
|
-
return InternalActions;
|
|
136
|
-
}(OrderedSubject));
|
|
137
|
-
export { InternalActions };
|
|
138
|
-
/**
|
|
139
|
-
* Action stream that is emitted anytime an action is dispatched.
|
|
140
|
-
*
|
|
141
|
-
* You can listen to this in services to react without stores.
|
|
142
|
-
*/
|
|
143
|
-
var Actions = /** @class */ (function (_super) {
|
|
144
|
-
tslib_1.__extends(Actions, _super);
|
|
145
|
-
// This has to be `Observable<ActionContext>` in the v4. Because `InternalActions`
|
|
146
|
-
// is a `Subject<ActionContext>`. Leave it as `any` to avoid breaking changes
|
|
147
|
-
function Actions(internalActions$, internalExecutionStrategy) {
|
|
148
|
-
return _super.call(this, (/**
|
|
149
|
-
* @param {?} observer
|
|
150
|
-
* @return {?}
|
|
151
|
-
*/
|
|
152
|
-
function (observer) {
|
|
153
|
-
/** @type {?} */
|
|
154
|
-
var childSubscription = internalActions$
|
|
155
|
-
.pipe(leaveNgxs(internalExecutionStrategy))
|
|
156
|
-
.subscribe({
|
|
157
|
-
next: (/**
|
|
158
|
-
* @param {?} ctx
|
|
159
|
-
* @return {?}
|
|
160
|
-
*/
|
|
161
|
-
function (ctx) { return observer.next(ctx); }),
|
|
162
|
-
error: (/**
|
|
163
|
-
* @param {?} error
|
|
164
|
-
* @return {?}
|
|
165
|
-
*/
|
|
166
|
-
function (error) { return observer.error(error); }),
|
|
167
|
-
complete: (/**
|
|
168
|
-
* @return {?}
|
|
169
|
-
*/
|
|
170
|
-
function () { return observer.complete(); })
|
|
171
|
-
});
|
|
172
|
-
observer.add(childSubscription);
|
|
173
|
-
})) || this;
|
|
174
|
-
}
|
|
175
|
-
Actions.decorators = [
|
|
176
|
-
{ type: Injectable }
|
|
177
|
-
];
|
|
178
|
-
/** @nocollapse */
|
|
179
|
-
Actions.ctorParameters = function () { return [
|
|
180
|
-
{ type: InternalActions },
|
|
181
|
-
{ type: InternalNgxsExecutionStrategy }
|
|
182
|
-
]; };
|
|
183
|
-
return Actions;
|
|
184
|
-
}(Observable));
|
|
185
|
-
export { Actions };
|
|
186
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Injectable } from '@angular/core';
|
|
7
|
+
import { Subject, Observable } from 'rxjs';
|
|
8
|
+
import { leaveNgxs } from './operators/leave-ngxs';
|
|
9
|
+
import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
|
|
10
|
+
/** @enum {string} */
|
|
11
|
+
var ActionStatus = {
|
|
12
|
+
Dispatched: 'DISPATCHED',
|
|
13
|
+
Successful: 'SUCCESSFUL',
|
|
14
|
+
Canceled: 'CANCELED',
|
|
15
|
+
Errored: 'ERRORED',
|
|
16
|
+
};
|
|
17
|
+
export { ActionStatus };
|
|
18
|
+
/**
|
|
19
|
+
* @record
|
|
20
|
+
* @template T
|
|
21
|
+
*/
|
|
22
|
+
export function ActionContext() { }
|
|
23
|
+
if (false) {
|
|
24
|
+
/** @type {?} */
|
|
25
|
+
ActionContext.prototype.status;
|
|
26
|
+
/** @type {?} */
|
|
27
|
+
ActionContext.prototype.action;
|
|
28
|
+
/** @type {?|undefined} */
|
|
29
|
+
ActionContext.prototype.error;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
33
|
+
* A standard Subject does not have this guarantee.
|
|
34
|
+
* For example, given the following code:
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const subject = new Subject<string>();
|
|
37
|
+
* subject.subscribe(value => {
|
|
38
|
+
* if (value === 'start') subject.next('end');
|
|
39
|
+
* });
|
|
40
|
+
* subject.subscribe(value => { });
|
|
41
|
+
* subject.next('start');
|
|
42
|
+
* ```
|
|
43
|
+
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
44
|
+
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
45
|
+
* @template T
|
|
46
|
+
*/
|
|
47
|
+
var /**
|
|
48
|
+
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
49
|
+
* A standard Subject does not have this guarantee.
|
|
50
|
+
* For example, given the following code:
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const subject = new Subject<string>();
|
|
53
|
+
* subject.subscribe(value => {
|
|
54
|
+
* if (value === 'start') subject.next('end');
|
|
55
|
+
* });
|
|
56
|
+
* subject.subscribe(value => { });
|
|
57
|
+
* subject.next('start');
|
|
58
|
+
* ```
|
|
59
|
+
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
60
|
+
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
61
|
+
* @template T
|
|
62
|
+
*/
|
|
63
|
+
OrderedSubject = /** @class */ (function (_super) {
|
|
64
|
+
tslib_1.__extends(OrderedSubject, _super);
|
|
65
|
+
function OrderedSubject() {
|
|
66
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
_this._itemQueue = [];
|
|
68
|
+
_this._busyPushingNext = false;
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @param {?=} value
|
|
73
|
+
* @return {?}
|
|
74
|
+
*/
|
|
75
|
+
OrderedSubject.prototype.next = /**
|
|
76
|
+
* @param {?=} value
|
|
77
|
+
* @return {?}
|
|
78
|
+
*/
|
|
79
|
+
function (value) {
|
|
80
|
+
if (this._busyPushingNext) {
|
|
81
|
+
this._itemQueue.unshift((/** @type {?} */ (value)));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this._busyPushingNext = true;
|
|
85
|
+
_super.prototype.next.call(this, value);
|
|
86
|
+
while (this._itemQueue.length > 0) {
|
|
87
|
+
/** @type {?} */
|
|
88
|
+
var nextValue = this._itemQueue.pop();
|
|
89
|
+
_super.prototype.next.call(this, nextValue);
|
|
90
|
+
}
|
|
91
|
+
this._busyPushingNext = false;
|
|
92
|
+
};
|
|
93
|
+
return OrderedSubject;
|
|
94
|
+
}(Subject));
|
|
95
|
+
/**
|
|
96
|
+
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
97
|
+
* A standard Subject does not have this guarantee.
|
|
98
|
+
* For example, given the following code:
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const subject = new Subject<string>();
|
|
101
|
+
* subject.subscribe(value => {
|
|
102
|
+
* if (value === 'start') subject.next('end');
|
|
103
|
+
* });
|
|
104
|
+
* subject.subscribe(value => { });
|
|
105
|
+
* subject.next('start');
|
|
106
|
+
* ```
|
|
107
|
+
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
108
|
+
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
109
|
+
* @template T
|
|
110
|
+
*/
|
|
111
|
+
export { OrderedSubject };
|
|
112
|
+
if (false) {
|
|
113
|
+
/**
|
|
114
|
+
* @type {?}
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
OrderedSubject.prototype._itemQueue;
|
|
118
|
+
/**
|
|
119
|
+
* @type {?}
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
OrderedSubject.prototype._busyPushingNext;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Internal Action stream that is emitted anytime an action is dispatched.
|
|
126
|
+
*/
|
|
127
|
+
var InternalActions = /** @class */ (function (_super) {
|
|
128
|
+
tslib_1.__extends(InternalActions, _super);
|
|
129
|
+
function InternalActions() {
|
|
130
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
131
|
+
}
|
|
132
|
+
InternalActions.decorators = [
|
|
133
|
+
{ type: Injectable }
|
|
134
|
+
];
|
|
135
|
+
return InternalActions;
|
|
136
|
+
}(OrderedSubject));
|
|
137
|
+
export { InternalActions };
|
|
138
|
+
/**
|
|
139
|
+
* Action stream that is emitted anytime an action is dispatched.
|
|
140
|
+
*
|
|
141
|
+
* You can listen to this in services to react without stores.
|
|
142
|
+
*/
|
|
143
|
+
var Actions = /** @class */ (function (_super) {
|
|
144
|
+
tslib_1.__extends(Actions, _super);
|
|
145
|
+
// This has to be `Observable<ActionContext>` in the v4. Because `InternalActions`
|
|
146
|
+
// is a `Subject<ActionContext>`. Leave it as `any` to avoid breaking changes
|
|
147
|
+
function Actions(internalActions$, internalExecutionStrategy) {
|
|
148
|
+
return _super.call(this, (/**
|
|
149
|
+
* @param {?} observer
|
|
150
|
+
* @return {?}
|
|
151
|
+
*/
|
|
152
|
+
function (observer) {
|
|
153
|
+
/** @type {?} */
|
|
154
|
+
var childSubscription = internalActions$
|
|
155
|
+
.pipe(leaveNgxs(internalExecutionStrategy))
|
|
156
|
+
.subscribe({
|
|
157
|
+
next: (/**
|
|
158
|
+
* @param {?} ctx
|
|
159
|
+
* @return {?}
|
|
160
|
+
*/
|
|
161
|
+
function (ctx) { return observer.next(ctx); }),
|
|
162
|
+
error: (/**
|
|
163
|
+
* @param {?} error
|
|
164
|
+
* @return {?}
|
|
165
|
+
*/
|
|
166
|
+
function (error) { return observer.error(error); }),
|
|
167
|
+
complete: (/**
|
|
168
|
+
* @return {?}
|
|
169
|
+
*/
|
|
170
|
+
function () { return observer.complete(); })
|
|
171
|
+
});
|
|
172
|
+
observer.add(childSubscription);
|
|
173
|
+
})) || this;
|
|
174
|
+
}
|
|
175
|
+
Actions.decorators = [
|
|
176
|
+
{ type: Injectable }
|
|
177
|
+
];
|
|
178
|
+
/** @nocollapse */
|
|
179
|
+
Actions.ctorParameters = function () { return [
|
|
180
|
+
{ type: InternalActions },
|
|
181
|
+
{ type: InternalNgxsExecutionStrategy }
|
|
182
|
+
]; };
|
|
183
|
+
return Actions;
|
|
184
|
+
}(Observable));
|
|
185
|
+
export { Actions };
|
|
186
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9ucy1zdHJlYW0uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4cy9zdG9yZS8iLCJzb3VyY2VzIjpbInNyYy9hY3Rpb25zLXN0cmVhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFM0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ25ELE9BQU8sRUFBRSw2QkFBNkIsRUFBRSxNQUFNLDhDQUE4QyxDQUFDOzs7SUFNM0YsWUFBYSxZQUFZO0lBQ3pCLFlBQWEsWUFBWTtJQUN6QixVQUFXLFVBQVU7SUFDckIsU0FBVSxTQUFTOzs7Ozs7O0FBR3JCLG1DQUlDOzs7SUFIQywrQkFBcUI7O0lBQ3JCLCtCQUFVOztJQUNWLDhCQUFjOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFrQmhCOzs7Ozs7Ozs7Ozs7Ozs7OztJQUF1QywwQ0FBVTtJQUFqRDtRQUFBLHFFQWlCQztRQWhCUyxnQkFBVSxHQUFRLEVBQUUsQ0FBQztRQUNyQixzQkFBZ0IsR0FBRyxLQUFLLENBQUM7O0lBZW5DLENBQUM7Ozs7O0lBYkMsNkJBQUk7Ozs7SUFBSixVQ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
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @param {?} name
|
|
7
|
-
* @return {?}
|
|
8
|
-
*/
|
|
9
|
-
export function throwStateNameError(name) {
|
|
10
|
-
throw new Error(name + " is not a valid state name. It needs to be a valid object property name.");
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @return {?}
|
|
14
|
-
*/
|
|
15
|
-
export function throwStateNamePropertyError() {
|
|
16
|
-
throw new Error("States must register a 'name' property.");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @param {?} current
|
|
20
|
-
* @param {?} newName
|
|
21
|
-
* @param {?} oldName
|
|
22
|
-
* @return {?}
|
|
23
|
-
*/
|
|
24
|
-
export function throwStateUniqueError(current, newName, oldName) {
|
|
25
|
-
throw new Error("State name '" + current + "' from " + newName + " already exists in " + oldName + ".");
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @param {?} name
|
|
29
|
-
* @return {?}
|
|
30
|
-
*/
|
|
31
|
-
export function throwStateDecoratorError(name) {
|
|
32
|
-
throw new Error("States must be decorated with @State() decorator, but \"" + name + "\" isn't.");
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @return {?}
|
|
36
|
-
*/
|
|
37
|
-
export function throwActionDecoratorError() {
|
|
38
|
-
throw new Error('@Action() decorator cannot be used with static methods.');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @return {?}
|
|
42
|
-
*/
|
|
43
|
-
export function throwSelectorDecoratorError() {
|
|
44
|
-
throw new Error('Selectors only work on methods.');
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @return {?}
|
|
48
|
-
*/
|
|
49
|
-
export function getZoneWarningMessage() {
|
|
50
|
-
return ('Your application was bootstrapped with nooped zone and your execution strategy requires an actual NgZone!\n' +
|
|
51
|
-
'Please set the value of the executionStrategy property to NoopNgxsExecutionStrategy.\n' +
|
|
52
|
-
'NgxsModule.forRoot(states, { executionStrategy: NoopNgxsExecutionStrategy })');
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @param {?} name
|
|
56
|
-
* @return {?}
|
|
57
|
-
*/
|
|
58
|
-
export function getUndecoratedStateInIvyWarningMessage(name) {
|
|
59
|
-
return "'" + name + "' class should be decorated with @Injectable() right after the @State() decorator";
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @return {?}
|
|
63
|
-
*/
|
|
64
|
-
export function throwSelectFactoryNotConnectedError() {
|
|
65
|
-
throw new Error('You have forgotten to import the NGXS module!');
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @return {?}
|
|
69
|
-
*/
|
|
70
|
-
export function throwPatchingArrayError() {
|
|
71
|
-
throw new Error('Patching arrays is not supported.');
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @return {?}
|
|
75
|
-
*/
|
|
76
|
-
export function throwPatchingPrimitiveError() {
|
|
77
|
-
throw new Error('Patching primitives is not supported.');
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @param {?} name
|
|
7
|
+
* @return {?}
|
|
8
|
+
*/
|
|
9
|
+
export function throwStateNameError(name) {
|
|
10
|
+
throw new Error(name + " is not a valid state name. It needs to be a valid object property name.");
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @return {?}
|
|
14
|
+
*/
|
|
15
|
+
export function throwStateNamePropertyError() {
|
|
16
|
+
throw new Error("States must register a 'name' property.");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @param {?} current
|
|
20
|
+
* @param {?} newName
|
|
21
|
+
* @param {?} oldName
|
|
22
|
+
* @return {?}
|
|
23
|
+
*/
|
|
24
|
+
export function throwStateUniqueError(current, newName, oldName) {
|
|
25
|
+
throw new Error("State name '" + current + "' from " + newName + " already exists in " + oldName + ".");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @param {?} name
|
|
29
|
+
* @return {?}
|
|
30
|
+
*/
|
|
31
|
+
export function throwStateDecoratorError(name) {
|
|
32
|
+
throw new Error("States must be decorated with @State() decorator, but \"" + name + "\" isn't.");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @return {?}
|
|
36
|
+
*/
|
|
37
|
+
export function throwActionDecoratorError() {
|
|
38
|
+
throw new Error('@Action() decorator cannot be used with static methods.');
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @return {?}
|
|
42
|
+
*/
|
|
43
|
+
export function throwSelectorDecoratorError() {
|
|
44
|
+
throw new Error('Selectors only work on methods.');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @return {?}
|
|
48
|
+
*/
|
|
49
|
+
export function getZoneWarningMessage() {
|
|
50
|
+
return ('Your application was bootstrapped with nooped zone and your execution strategy requires an actual NgZone!\n' +
|
|
51
|
+
'Please set the value of the executionStrategy property to NoopNgxsExecutionStrategy.\n' +
|
|
52
|
+
'NgxsModule.forRoot(states, { executionStrategy: NoopNgxsExecutionStrategy })');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {?} name
|
|
56
|
+
* @return {?}
|
|
57
|
+
*/
|
|
58
|
+
export function getUndecoratedStateInIvyWarningMessage(name) {
|
|
59
|
+
return "'" + name + "' class should be decorated with @Injectable() right after the @State() decorator";
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @return {?}
|
|
63
|
+
*/
|
|
64
|
+
export function throwSelectFactoryNotConnectedError() {
|
|
65
|
+
throw new Error('You have forgotten to import the NGXS module!');
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @return {?}
|
|
69
|
+
*/
|
|
70
|
+
export function throwPatchingArrayError() {
|
|
71
|
+
throw new Error('Patching arrays is not supported.');
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @return {?}
|
|
75
|
+
*/
|
|
76
|
+
export function throwPatchingPrimitiveError() {
|
|
77
|
+
throw new Error('Patching primitives is not supported.');
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuY29uZmlnLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMvc3RvcmUvIiwic291cmNlcyI6WyJzcmMvY29uZmlncy9tZXNzYWdlcy5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxNQUFNLFVBQVUsbUJBQW1CLENBQUMsSUFBWTtJQUM5QyxNQUFNLElBQUksS0FBSyxDQUNWLElBQUksNkVBQTBFLENBQ2xGLENBQUM7QUFDSixDQUFDOzs7O0FBRUQsTUFBTSxVQUFVLDJCQUEyQjtJQUN6QyxNQUFNLElBQUksS0FBSyxDQUFDLHlDQUF5QyxDQUFDLENBQUM7QUFDN0QsQ0FBQzs7Ozs7OztBQUVELE1BQU0sVUFBVSxxQkFBcUIsQ0FDbkMsT0FBZSxFQUNmLE9BQWUsRUFDZixPQUFlO0lBRWYsTUFBTSxJQUFJLEtBQUssQ0FBQyxpQkFBZSxPQUFPLGVBQVUsT0FBTywyQkFBc0IsT0FBTyxNQUFHLENBQUMsQ0FBQztBQUMzRixDQUFDOzs7OztBQUVELE1BQU0sVUFBVSx3QkFBd0IsQ0FBQyxJQUFZO0lBQ25ELE1BQU0sSUFBSSxLQUFLLENBQUMsNkRBQTBELElBQUksY0FBVSxDQUFDLENBQUM7QUFDNUYsQ0FBQzs7OztBQUVELE1BQU0sVUFBVSx5QkFBeUI7SUFDdkMsTUFBTSxJQUFJLEtBQUssQ0F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