@ngxs/store 3.6.2-dev.master-8e14fe1 → 3.7.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.
- package/README.md +16 -16
- package/bundles/ngxs-store-internals.umd.js +210 -210
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.min.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +326 -321
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.min.js +10 -10
- package/bundles/ngxs-store-operators.umd.min.js.map +1 -1
- package/bundles/ngxs-store.umd.js +4401 -4386
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +11 -11
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/index.js +13 -13
- package/esm2015/internals/angular.js +40 -40
- package/esm2015/internals/index.js +10 -10
- 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 +8 -8
- package/esm2015/internals/src/symbols.js +14 -14
- package/esm2015/internals/symbols.js +14 -14
- package/esm2015/ngxs-store.js +25 -25
- 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 +87 -87
- package/esm2015/src/decorators/action.js +44 -44
- package/esm2015/src/decorators/select/select-factory.js +39 -39
- package/esm2015/src/decorators/select/select.js +45 -46
- package/esm2015/src/decorators/select/symbols.js +50 -50
- package/esm2015/src/decorators/selector/selector.js +55 -55
- package/esm2015/src/decorators/selector/symbols.js +5 -5
- package/esm2015/src/decorators/selector-options.js +34 -34
- package/esm2015/src/decorators/state.js +75 -75
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +96 -96
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +45 -45
- package/esm2015/src/execution/noop-ngxs-execution-strategy.js +27 -27
- package/esm2015/src/execution/symbols.js +29 -29
- package/esm2015/src/host-environment/host-environment.js +31 -31
- package/esm2015/src/internal/config-validator.js +67 -67
- package/esm2015/src/internal/dispatcher.js +210 -202
- package/esm2015/src/internal/internals.js +489 -489
- 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 +401 -392
- package/esm2015/src/internal/state-operations.js +125 -125
- package/esm2015/src/internal/state-operators.js +33 -33
- package/esm2015/src/internal/state-stream.js +21 -21
- package/esm2015/src/ivy/ensure-state-class-is-injectable.js +34 -34
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +40 -50
- package/esm2015/src/module.js +171 -171
- package/esm2015/src/modules/ngxs-feature.module.js +63 -63
- package/esm2015/src/modules/ngxs-root.module.js +52 -52
- package/esm2015/src/operators/leave-ngxs.js +58 -58
- package/esm2015/src/operators/of-action.js +191 -188
- 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 +174 -174
- package/esm2015/src/symbols.js +221 -221
- 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 +65 -65
- package/esm2015/src/utils/utils.js +95 -93
- package/esm5/index.js +13 -13
- package/esm5/internals/angular.js +40 -40
- package/esm5/internals/index.js +10 -10
- 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 +8 -8
- package/esm5/internals/src/symbols.js +14 -14
- package/esm5/internals/symbols.js +14 -14
- package/esm5/ngxs-store.js +25 -25
- 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 +104 -104
- package/esm5/src/decorators/action.js +56 -56
- package/esm5/src/decorators/select/select-factory.js +37 -37
- package/esm5/src/decorators/select/select.js +50 -51
- package/esm5/src/decorators/select/symbols.js +51 -51
- package/esm5/src/decorators/selector/selector.js +55 -55
- package/esm5/src/decorators/selector/symbols.js +5 -5
- package/esm5/src/decorators/selector-options.js +34 -34
- package/esm5/src/decorators/state.js +76 -76
- package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +121 -121
- package/esm5/src/execution/internal-ngxs-execution-strategy.js +54 -54
- package/esm5/src/execution/noop-ngxs-execution-strategy.js +41 -41
- package/esm5/src/execution/symbols.js +29 -29
- package/esm5/src/host-environment/host-environment.js +29 -29
- package/esm5/src/internal/config-validator.js +76 -76
- package/esm5/src/internal/dispatcher.js +246 -238
- package/esm5/src/internal/internals.js +491 -491
- 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 +528 -519
- package/esm5/src/internal/state-operations.js +139 -139
- package/esm5/src/internal/state-operators.js +34 -34
- package/esm5/src/internal/state-stream.js +25 -25
- package/esm5/src/ivy/ensure-state-class-is-injectable.js +34 -34
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +40 -50
- package/esm5/src/module.js +214 -214
- package/esm5/src/modules/ngxs-feature.module.js +65 -65
- package/esm5/src/modules/ngxs-root.module.js +47 -47
- package/esm5/src/operators/leave-ngxs.js +58 -58
- package/esm5/src/operators/of-action.js +217 -214
- 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 +225 -225
- package/esm5/src/symbols.js +230 -230
- 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 +86 -86
- package/esm5/src/utils/utils.js +98 -96
- package/fesm2015/ngxs-store-internals.js +191 -191
- 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 +3878 -3868
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store-internals.js +216 -216
- 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 +4397 -4387
- package/fesm5/ngxs-store.js.map +1 -1
- package/index.d.ts +8 -8
- package/internals/angular.d.ts +3 -3
- package/internals/index.d.ts +6 -6
- 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/src/symbols.d.ts +7 -7
- package/internals/symbols.d.ts +7 -7
- package/ngxs-store.d.ts +22 -22
- 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 +4 -4
- 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 +30 -30
- package/src/decorators/action.d.ts +5 -5
- package/src/decorators/select/select-factory.d.ts +12 -12
- package/src/decorators/select/select.d.ts +4 -5
- 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 +12 -12
- 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 +6 -6
- package/src/host-environment/host-environment.d.ts +6 -6
- package/src/internal/config-validator.d.ts +10 -10
- package/src/internal/dispatcher.d.ts +31 -31
- package/src/internal/internals.d.ts +167 -167
- 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 +21 -21
- package/src/internal/state-operators.d.ts +2 -2
- package/src/internal/state-stream.d.ts +9 -9
- package/src/ivy/ensure-state-class-is-injectable.d.ts +6 -6
- package/src/ivy/ivy-enabled-in-dev-mode.d.ts +14 -14
- 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 -42
- 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 +53 -53
- package/src/symbols.d.ts +137 -137
- 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 +8 -8
- package/src/utils/utils.d.ts +29 -29
- package/types/index.d.ts +2 -2
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
* @template T, U
|
|
8
|
-
*/
|
|
9
|
-
export function ActionDef() { }
|
|
10
|
-
if (false) {
|
|
11
|
-
/** @type {?} */
|
|
12
|
-
ActionDef.prototype.type;
|
|
13
|
-
/* Skipping unhandled member: new (...args: T[]): U;*/
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Actions that can be provided in a action decorator.
|
|
17
|
-
* @record
|
|
18
|
-
*/
|
|
19
|
-
export function ActionOptions() { }
|
|
20
|
-
if (false) {
|
|
21
|
-
/**
|
|
22
|
-
* Cancel the previous uncompleted observable(s).
|
|
23
|
-
* @type {?|undefined}
|
|
24
|
-
*/
|
|
25
|
-
ActionOptions.prototype.cancelUncompleted;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @record
|
|
29
|
-
*/
|
|
30
|
-
export function ActionHandlerMetaData() { }
|
|
31
|
-
if (false) {
|
|
32
|
-
/** @type {?} */
|
|
33
|
-
ActionHandlerMetaData.prototype.fn;
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
ActionHandlerMetaData.prototype.options;
|
|
36
|
-
/** @type {?} */
|
|
37
|
-
ActionHandlerMetaData.prototype.type;
|
|
38
|
-
}
|
|
39
|
-
//# 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
|
+
* @record
|
|
7
|
+
* @template T, U
|
|
8
|
+
*/
|
|
9
|
+
export function ActionDef() { }
|
|
10
|
+
if (false) {
|
|
11
|
+
/** @type {?} */
|
|
12
|
+
ActionDef.prototype.type;
|
|
13
|
+
/* Skipping unhandled member: new (...args: T[]): U;*/
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Actions that can be provided in a action decorator.
|
|
17
|
+
* @record
|
|
18
|
+
*/
|
|
19
|
+
export function ActionOptions() { }
|
|
20
|
+
if (false) {
|
|
21
|
+
/**
|
|
22
|
+
* Cancel the previous uncompleted observable(s).
|
|
23
|
+
* @type {?|undefined}
|
|
24
|
+
*/
|
|
25
|
+
ActionOptions.prototype.cancelUncompleted;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @record
|
|
29
|
+
*/
|
|
30
|
+
export function ActionHandlerMetaData() { }
|
|
31
|
+
if (false) {
|
|
32
|
+
/** @type {?} */
|
|
33
|
+
ActionHandlerMetaData.prototype.fn;
|
|
34
|
+
/** @type {?} */
|
|
35
|
+
ActionHandlerMetaData.prototype.options;
|
|
36
|
+
/** @type {?} */
|
|
37
|
+
ActionHandlerMetaData.prototype.type;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9scy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3hzL3N0b3JlLyIsInNvdXJjZXMiOlsic3JjL2FjdGlvbnMvc3ltYm9scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLCtCQUlDOzs7SUFIQyx5QkFBYTs7Ozs7OztBQVVmLG1DQUtDOzs7Ozs7SUFEQywwQ0FBNEI7Ozs7O0FBRzlCLDJDQUlDOzs7SUFIQyxtQ0FBb0I7O0lBQ3BCLHdDQUF1Qjs7SUFDdkIscUNBQWEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIEFjdGlvbkRlZjxUID0gYW55LCBVID0gYW55PiB7XHJcbiAgdHlwZTogc3RyaW5nO1xyXG5cclxuICBuZXcgKC4uLmFyZ3M6IFRbXSk6IFU7XHJcbn1cclxuXHJcbmV4cG9ydCB0eXBlIEFjdGlvblR5cGUgPSBBY3Rpb25EZWYgfCB7IHR5cGU6IHN0cmluZyB9O1xyXG5cclxuLyoqXHJcbiAqIEFjdGlvbnMgdGhhdCBjYW4gYmUgcHJvdmlkZWQgaW4gYSBhY3Rpb24gZGVjb3JhdG9yLlxyXG4gKi9cclxuZXhwb3J0IGludGVyZmFjZSBBY3Rpb25PcHRpb25zIHtcclxuICAvKipcclxuICAgKiBDYW5jZWwgdGhlIHByZXZpb3VzIHVuY29tcGxldGVkIG9ic2VydmFibGUocykuXHJcbiAgICovXHJcbiAgY2FuY2VsVW5jb21wbGV0ZWQ/OiBib29sZWFuO1xyXG59XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIEFjdGlvbkhhbmRsZXJNZXRhRGF0YSB7XHJcbiAgZm46IHN0cmluZyB8IHN5bWJvbDtcclxuICBvcHRpb25zOiBBY3Rpb25PcHRpb25zO1xyXG4gIHR5cGU6IHN0cmluZztcclxufVxyXG4iXX0=
|
|
@@ -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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