@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
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://github.com/ngxs/store/raw/master/docs/assets/logo.png">
|
|
3
|
-
<br />
|
|
4
|
-
NGXS is a state management pattern + library for Angular
|
|
5
|
-
<br />
|
|
6
|
-
<br />
|
|
7
|
-
<a href="https://
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
- ✨ Learn about it on the [docs site](https://ngxs.io/)
|
|
13
|
-
- 🚀 See it in action on [Stackblitz](https://stackblitz.com/edit/ngxs-repro)
|
|
14
|
-
- 😎 Checkout the [sample application](https://github.com/ngxs/store/tree/master/integration)
|
|
15
|
-
- 🗄 Learn about updates from the [changelog](https://github.com/ngxs/store/blob/master/CHANGELOG.md)
|
|
16
|
-
- ❤️ Give back by becoming a [Contributor](https://github.com/ngxs/store/blob/master/docs/community/contributing.md) or a [Sponsor](https://github.com/ngxs/store/blob/master/docs/community/sponsors.md)
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://github.com/ngxs/store/raw/master/docs/assets/logo.png">
|
|
3
|
+
<br />
|
|
4
|
+
NGXS is a state management pattern + library for Angular
|
|
5
|
+
<br />
|
|
6
|
+
<br />
|
|
7
|
+
<a href="https://join.slack.com/t/ngxs/shared_invite/zt-by26i24h-2CC5~vqwNCiZa~RRibh60Q"><img src="https://img.shields.io/badge/slack-join%20us-blue.svg?style=flat&logo=slack"></a> <a href="https://badge.fury.io/js/%40ngxs%2Fstore"><img src="https://badge.fury.io/js/%40ngxs%2Fstore.svg"></a> <a href="https://codeclimate.com/github/ngxs/store/maintainability"><img src="https://api.codeclimate.com/v1/badges/5b43106a1ddff7d76a04/maintainability" /></a> <a href="https://codeclimate.com/github/ngxs/store/test_coverage"><img src="https://api.codeclimate.com/v1/badges/5b43106a1ddff7d76a04/test_coverage" /></a> <a href="https://circleci.com/gh/ngxs/store"><img src="https://circleci.com/gh/ngxs/store/tree/master.svg?style=svg"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
- ✨ Learn about it on the [docs site](https://ngxs.io/)
|
|
13
|
+
- 🚀 See it in action on [Stackblitz](https://stackblitz.com/edit/ngxs-repro)
|
|
14
|
+
- 😎 Checkout the [sample application](https://github.com/ngxs/store/tree/master/integration)
|
|
15
|
+
- 🗄 Learn about updates from the [changelog](https://github.com/ngxs/store/blob/master/CHANGELOG.md)
|
|
16
|
+
- ❤️ Give back by becoming a [Contributor](https://github.com/ngxs/store/blob/master/docs/community/contributing.md) or a [Sponsor](https://github.com/ngxs/store/blob/master/docs/community/sponsors.md)
|
|
@@ -4,224 +4,224 @@
|
|
|
4
4
|
(global = global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs.store = global.ngxs.store || {}, global.ngxs.store.internals = {}), global.ng.core, global.rxjs));
|
|
5
5
|
}(this, function (exports, core, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview added by tsickle
|
|
9
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @param {?} a
|
|
13
|
-
* @param {?} b
|
|
14
|
-
* @return {?}
|
|
15
|
-
*/
|
|
16
|
-
function defaultEqualityCheck(a, b) {
|
|
17
|
-
return a === b;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @param {?} equalityCheck
|
|
21
|
-
* @param {?} prev
|
|
22
|
-
* @param {?} next
|
|
23
|
-
* @return {?}
|
|
24
|
-
*/
|
|
25
|
-
function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
|
|
26
|
-
if (prev === null || next === null || prev.length !== next.length) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
|
|
30
|
-
/** @type {?} */
|
|
31
|
-
var length = prev.length;
|
|
32
|
-
for (var i = 0; i < length; i++) {
|
|
33
|
-
if (!equalityCheck(prev[i], next[i])) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Memoize a function on its last inputs only.
|
|
41
|
-
* Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js
|
|
42
|
-
*
|
|
43
|
-
* @ignore
|
|
44
|
-
* @template T
|
|
45
|
-
* @param {?} func
|
|
46
|
-
* @param {?=} equalityCheck
|
|
47
|
-
* @return {?}
|
|
48
|
-
*/
|
|
49
|
-
function memoize(func, equalityCheck) {
|
|
50
|
-
if (equalityCheck === void 0) { equalityCheck = defaultEqualityCheck; }
|
|
51
|
-
/** @type {?} */
|
|
52
|
-
var lastArgs = null;
|
|
53
|
-
/** @type {?} */
|
|
54
|
-
var lastResult = null;
|
|
55
|
-
// we reference arguments instead of spreading them for performance reasons
|
|
56
|
-
/**
|
|
57
|
-
* @return {?}
|
|
58
|
-
*/
|
|
59
|
-
function memoized() {
|
|
60
|
-
if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
|
|
61
|
-
// apply arguments instead of spreading for performance.
|
|
62
|
-
lastResult = ((/** @type {?} */ (func))).apply(null, arguments);
|
|
63
|
-
}
|
|
64
|
-
lastArgs = arguments;
|
|
65
|
-
return lastResult;
|
|
66
|
-
}
|
|
67
|
-
((/** @type {?} */ (memoized))).reset = (/**
|
|
68
|
-
* @return {?}
|
|
69
|
-
*/
|
|
70
|
-
function () {
|
|
71
|
-
// The hidden (for now) ability to reset the memoization
|
|
72
|
-
lastArgs = null;
|
|
73
|
-
lastResult = null;
|
|
74
|
-
});
|
|
75
|
-
return (/** @type {?} */ (memoized));
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview added by tsickle
|
|
9
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @param {?} a
|
|
13
|
+
* @param {?} b
|
|
14
|
+
* @return {?}
|
|
15
|
+
*/
|
|
16
|
+
function defaultEqualityCheck(a, b) {
|
|
17
|
+
return a === b;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param {?} equalityCheck
|
|
21
|
+
* @param {?} prev
|
|
22
|
+
* @param {?} next
|
|
23
|
+
* @return {?}
|
|
24
|
+
*/
|
|
25
|
+
function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
|
|
26
|
+
if (prev === null || next === null || prev.length !== next.length) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
|
|
30
|
+
/** @type {?} */
|
|
31
|
+
var length = prev.length;
|
|
32
|
+
for (var i = 0; i < length; i++) {
|
|
33
|
+
if (!equalityCheck(prev[i], next[i])) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Memoize a function on its last inputs only.
|
|
41
|
+
* Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js
|
|
42
|
+
*
|
|
43
|
+
* @ignore
|
|
44
|
+
* @template T
|
|
45
|
+
* @param {?} func
|
|
46
|
+
* @param {?=} equalityCheck
|
|
47
|
+
* @return {?}
|
|
48
|
+
*/
|
|
49
|
+
function memoize(func, equalityCheck) {
|
|
50
|
+
if (equalityCheck === void 0) { equalityCheck = defaultEqualityCheck; }
|
|
51
|
+
/** @type {?} */
|
|
52
|
+
var lastArgs = null;
|
|
53
|
+
/** @type {?} */
|
|
54
|
+
var lastResult = null;
|
|
55
|
+
// we reference arguments instead of spreading them for performance reasons
|
|
56
|
+
/**
|
|
57
|
+
* @return {?}
|
|
58
|
+
*/
|
|
59
|
+
function memoized() {
|
|
60
|
+
if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
|
|
61
|
+
// apply arguments instead of spreading for performance.
|
|
62
|
+
lastResult = ((/** @type {?} */ (func))).apply(null, arguments);
|
|
63
|
+
}
|
|
64
|
+
lastArgs = arguments;
|
|
65
|
+
return lastResult;
|
|
66
|
+
}
|
|
67
|
+
((/** @type {?} */ (memoized))).reset = (/**
|
|
68
|
+
* @return {?}
|
|
69
|
+
*/
|
|
70
|
+
function () {
|
|
71
|
+
// The hidden (for now) ability to reset the memoization
|
|
72
|
+
lastArgs = null;
|
|
73
|
+
lastResult = null;
|
|
74
|
+
});
|
|
75
|
+
return (/** @type {?} */ (memoized));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* @fileoverview added by tsickle
|
|
80
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* @return {?}
|
|
84
|
-
*/
|
|
85
|
-
function _isAngularInTestMode() {
|
|
86
|
-
/** @type {?} */
|
|
87
|
-
var platformRef = core.getPlatform();
|
|
88
|
-
if (!platformRef)
|
|
89
|
-
return false;
|
|
90
|
-
/** @type {?} */
|
|
91
|
-
var compilerOptions = platformRef.injector.get(core.COMPILER_OPTIONS, null);
|
|
92
|
-
if (!compilerOptions)
|
|
93
|
-
return false;
|
|
94
|
-
/** @type {?} */
|
|
95
|
-
var isInTestMode = compilerOptions.some((/**
|
|
96
|
-
* @param {?} item
|
|
97
|
-
* @return {?}
|
|
98
|
-
*/
|
|
99
|
-
function (item) {
|
|
100
|
-
/** @type {?} */
|
|
101
|
-
var providers = (item && item.providers) || [];
|
|
102
|
-
return providers.some((/**
|
|
103
|
-
* @param {?} provider
|
|
104
|
-
* @return {?}
|
|
105
|
-
*/
|
|
106
|
-
function (provider) {
|
|
107
|
-
return ((provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||
|
|
108
|
-
false);
|
|
109
|
-
}));
|
|
110
|
-
}));
|
|
111
|
-
return isInTestMode;
|
|
112
|
-
}
|
|
113
|
-
/** @type {?} */
|
|
78
|
+
/**
|
|
79
|
+
* @fileoverview added by tsickle
|
|
80
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* @return {?}
|
|
84
|
+
*/
|
|
85
|
+
function _isAngularInTestMode() {
|
|
86
|
+
/** @type {?} */
|
|
87
|
+
var platformRef = core.getPlatform();
|
|
88
|
+
if (!platformRef)
|
|
89
|
+
return false;
|
|
90
|
+
/** @type {?} */
|
|
91
|
+
var compilerOptions = platformRef.injector.get(core.COMPILER_OPTIONS, null);
|
|
92
|
+
if (!compilerOptions)
|
|
93
|
+
return false;
|
|
94
|
+
/** @type {?} */
|
|
95
|
+
var isInTestMode = compilerOptions.some((/**
|
|
96
|
+
* @param {?} item
|
|
97
|
+
* @return {?}
|
|
98
|
+
*/
|
|
99
|
+
function (item) {
|
|
100
|
+
/** @type {?} */
|
|
101
|
+
var providers = (item && item.providers) || [];
|
|
102
|
+
return providers.some((/**
|
|
103
|
+
* @param {?} provider
|
|
104
|
+
* @return {?}
|
|
105
|
+
*/
|
|
106
|
+
function (provider) {
|
|
107
|
+
return ((provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||
|
|
108
|
+
false);
|
|
109
|
+
}));
|
|
110
|
+
}));
|
|
111
|
+
return isInTestMode;
|
|
112
|
+
}
|
|
113
|
+
/** @type {?} */
|
|
114
114
|
var isAngularInTestMode = memoize(_isAngularInTestMode);
|
|
115
115
|
|
|
116
|
-
/**
|
|
117
|
-
* @fileoverview added by tsickle
|
|
118
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
119
|
-
*/
|
|
120
|
-
var NgxsBootstrapper = /** @class */ (function () {
|
|
121
|
-
function NgxsBootstrapper() {
|
|
122
|
-
/**
|
|
123
|
-
* Use `ReplaySubject`, thus we can get cached value even if the stream is completed
|
|
124
|
-
*/
|
|
125
|
-
this.bootstrap$ = new rxjs.ReplaySubject(1);
|
|
126
|
-
}
|
|
127
|
-
Object.defineProperty(NgxsBootstrapper.prototype, "appBootstrapped$", {
|
|
128
|
-
get: /**
|
|
129
|
-
* @return {?}
|
|
130
|
-
*/
|
|
131
|
-
function () {
|
|
132
|
-
return this.bootstrap$.asObservable();
|
|
133
|
-
},
|
|
134
|
-
enumerable: true,
|
|
135
|
-
configurable: true
|
|
136
|
-
});
|
|
137
|
-
/**
|
|
138
|
-
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
139
|
-
* to the tree of views, that's a signal that application has been fully rendered
|
|
140
|
-
*/
|
|
141
|
-
/**
|
|
142
|
-
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
143
|
-
* to the tree of views, that's a signal that application has been fully rendered
|
|
144
|
-
* @return {?}
|
|
145
|
-
*/
|
|
146
|
-
NgxsBootstrapper.prototype.bootstrap = /**
|
|
147
|
-
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
148
|
-
* to the tree of views, that's a signal that application has been fully rendered
|
|
149
|
-
* @return {?}
|
|
150
|
-
*/
|
|
151
|
-
function () {
|
|
152
|
-
this.bootstrap$.next(true);
|
|
153
|
-
this.bootstrap$.complete();
|
|
154
|
-
};
|
|
155
|
-
NgxsBootstrapper.decorators = [
|
|
156
|
-
{ type: core.Injectable }
|
|
157
|
-
];
|
|
158
|
-
return NgxsBootstrapper;
|
|
159
|
-
}());
|
|
160
|
-
if (false) {
|
|
161
|
-
/**
|
|
162
|
-
* Use `ReplaySubject`, thus we can get cached value even if the stream is completed
|
|
163
|
-
* @type {?}
|
|
164
|
-
* @private
|
|
165
|
-
*/
|
|
166
|
-
NgxsBootstrapper.prototype.bootstrap$;
|
|
116
|
+
/**
|
|
117
|
+
* @fileoverview added by tsickle
|
|
118
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
119
|
+
*/
|
|
120
|
+
var NgxsBootstrapper = /** @class */ (function () {
|
|
121
|
+
function NgxsBootstrapper() {
|
|
122
|
+
/**
|
|
123
|
+
* Use `ReplaySubject`, thus we can get cached value even if the stream is completed
|
|
124
|
+
*/
|
|
125
|
+
this.bootstrap$ = new rxjs.ReplaySubject(1);
|
|
126
|
+
}
|
|
127
|
+
Object.defineProperty(NgxsBootstrapper.prototype, "appBootstrapped$", {
|
|
128
|
+
get: /**
|
|
129
|
+
* @return {?}
|
|
130
|
+
*/
|
|
131
|
+
function () {
|
|
132
|
+
return this.bootstrap$.asObservable();
|
|
133
|
+
},
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true
|
|
136
|
+
});
|
|
137
|
+
/**
|
|
138
|
+
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
139
|
+
* to the tree of views, that's a signal that application has been fully rendered
|
|
140
|
+
*/
|
|
141
|
+
/**
|
|
142
|
+
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
143
|
+
* to the tree of views, that's a signal that application has been fully rendered
|
|
144
|
+
* @return {?}
|
|
145
|
+
*/
|
|
146
|
+
NgxsBootstrapper.prototype.bootstrap = /**
|
|
147
|
+
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
148
|
+
* to the tree of views, that's a signal that application has been fully rendered
|
|
149
|
+
* @return {?}
|
|
150
|
+
*/
|
|
151
|
+
function () {
|
|
152
|
+
this.bootstrap$.next(true);
|
|
153
|
+
this.bootstrap$.complete();
|
|
154
|
+
};
|
|
155
|
+
NgxsBootstrapper.decorators = [
|
|
156
|
+
{ type: core.Injectable }
|
|
157
|
+
];
|
|
158
|
+
return NgxsBootstrapper;
|
|
159
|
+
}());
|
|
160
|
+
if (false) {
|
|
161
|
+
/**
|
|
162
|
+
* Use `ReplaySubject`, thus we can get cached value even if the stream is completed
|
|
163
|
+
* @type {?}
|
|
164
|
+
* @private
|
|
165
|
+
*/
|
|
166
|
+
NgxsBootstrapper.prototype.bootstrap$;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
/**
|
|
170
|
-
* @fileoverview added by tsickle
|
|
171
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
172
|
-
*/
|
|
173
|
-
/** @type {?} */
|
|
174
|
-
var INITIAL_STATE_TOKEN = new core.InjectionToken('INITIAL_STATE_TOKEN');
|
|
175
|
-
var InitialState = /** @class */ (function () {
|
|
176
|
-
function InitialState() {
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* @param {?} state
|
|
180
|
-
* @return {?}
|
|
181
|
-
*/
|
|
182
|
-
InitialState.set = /**
|
|
183
|
-
* @param {?} state
|
|
184
|
-
* @return {?}
|
|
185
|
-
*/
|
|
186
|
-
function (state) {
|
|
187
|
-
this.value = state;
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* @return {?}
|
|
191
|
-
*/
|
|
192
|
-
InitialState.pop = /**
|
|
193
|
-
* @return {?}
|
|
194
|
-
*/
|
|
195
|
-
function () {
|
|
196
|
-
/** @type {?} */
|
|
197
|
-
var state = this.value;
|
|
198
|
-
this.value = {};
|
|
199
|
-
return state;
|
|
200
|
-
};
|
|
201
|
-
InitialState.value = {};
|
|
202
|
-
return InitialState;
|
|
203
|
-
}());
|
|
204
|
-
if (false) {
|
|
205
|
-
/**
|
|
206
|
-
* @type {?}
|
|
207
|
-
* @private
|
|
208
|
-
*/
|
|
209
|
-
InitialState.value;
|
|
169
|
+
/**
|
|
170
|
+
* @fileoverview added by tsickle
|
|
171
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
172
|
+
*/
|
|
173
|
+
/** @type {?} */
|
|
174
|
+
var INITIAL_STATE_TOKEN = new core.InjectionToken('INITIAL_STATE_TOKEN');
|
|
175
|
+
var InitialState = /** @class */ (function () {
|
|
176
|
+
function InitialState() {
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @param {?} state
|
|
180
|
+
* @return {?}
|
|
181
|
+
*/
|
|
182
|
+
InitialState.set = /**
|
|
183
|
+
* @param {?} state
|
|
184
|
+
* @return {?}
|
|
185
|
+
*/
|
|
186
|
+
function (state) {
|
|
187
|
+
this.value = state;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* @return {?}
|
|
191
|
+
*/
|
|
192
|
+
InitialState.pop = /**
|
|
193
|
+
* @return {?}
|
|
194
|
+
*/
|
|
195
|
+
function () {
|
|
196
|
+
/** @type {?} */
|
|
197
|
+
var state = this.value;
|
|
198
|
+
this.value = {};
|
|
199
|
+
return state;
|
|
200
|
+
};
|
|
201
|
+
InitialState.value = {};
|
|
202
|
+
return InitialState;
|
|
203
|
+
}());
|
|
204
|
+
if (false) {
|
|
205
|
+
/**
|
|
206
|
+
* @type {?}
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
InitialState.value;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
/**
|
|
213
|
-
* @fileoverview added by tsickle
|
|
214
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
215
|
-
*/
|
|
216
|
-
/**
|
|
217
|
-
* @see StateContextFactory as it's referenced by this token to be accessed by plugins internally
|
|
218
|
-
* @type {?}
|
|
219
|
-
*/
|
|
220
|
-
var NGXS_STATE_CONTEXT_FACTORY = new core.InjectionToken('Internals.StateContextFactory');
|
|
221
|
-
/**
|
|
222
|
-
* @see StateFactory as it's referenced by this token to be accessed by plugins internally
|
|
223
|
-
* @type {?}
|
|
224
|
-
*/
|
|
212
|
+
/**
|
|
213
|
+
* @fileoverview added by tsickle
|
|
214
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
215
|
+
*/
|
|
216
|
+
/**
|
|
217
|
+
* @see StateContextFactory as it's referenced by this token to be accessed by plugins internally
|
|
218
|
+
* @type {?}
|
|
219
|
+
*/
|
|
220
|
+
var NGXS_STATE_CONTEXT_FACTORY = new core.InjectionToken('Internals.StateContextFactory');
|
|
221
|
+
/**
|
|
222
|
+
* @see StateFactory as it's referenced by this token to be accessed by plugins internally
|
|
223
|
+
* @type {?}
|
|
224
|
+
*/
|
|
225
225
|
var NGXS_STATE_FACTORY = new core.InjectionToken('Internals.StateFactory');
|
|
226
226
|
|
|
227
227
|
exports.INITIAL_STATE_TOKEN = INITIAL_STATE_TOKEN;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-store-internals.umd.js","sources":["ng://@ngxs/store/internals/memoize.ts","ng://@ngxs/store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts"],"sourcesContent":["function defaultEqualityCheck(a: any, b: any) {\n return a === b;\n}\n\nfunction areArgumentsShallowlyEqual(\n equalityCheck: (a: any, b: any) => boolean,\n prev: IArguments | null,\n next: IArguments | null\n) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\n const length = prev.length;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Memoize a function on its last inputs only.\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\n *\n * @ignore\n */\nexport function memoize<T extends (...args: any[]) => any>(\n func: T,\n equalityCheck = defaultEqualityCheck\n): T {\n let lastArgs: IArguments | null = null;\n let lastResult: any = null;\n // we reference arguments instead of spreading them for performance reasons\n function memoized() {\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n lastResult = (<Function>func).apply(null, arguments);\n }\n\n lastArgs = arguments;\n return lastResult;\n }\n (<any>memoized).reset = function() {\n // The hidden (for now) ability to reset the memoization\n lastArgs = null;\n lastResult = null;\n };\n return memoized as T;\n}\n","import { getPlatform, COMPILER_OPTIONS, CompilerOptions, PlatformRef } from '@angular/core';\nimport { memoize } from './memoize';\n\nfunction _isAngularInTestMode() {\n const platformRef: PlatformRef | null = getPlatform();\n if (!platformRef) return false;\n const compilerOptions = platformRef.injector.get<any>(COMPILER_OPTIONS, null);\n if (!compilerOptions) return false;\n const isInTestMode = compilerOptions.some((item: CompilerOptions) => {\n const providers = (item && item.providers) || [];\n return providers.some((provider: any) => {\n return (\n (provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||\n false\n );\n });\n });\n return isInTestMode;\n}\n\nexport const isAngularInTestMode = memoize(_isAngularInTestMode);\n","import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\n\n@Injectable()\nexport class NgxsBootstrapper {\n /**\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\n */\n private bootstrap$ = new ReplaySubject<boolean>(1);\n\n get appBootstrapped$(): Observable<boolean> {\n return this.bootstrap$.asObservable();\n }\n\n /**\n * This event will be emitted after attaching `ComponentRef` of the root component\n * to the tree of views, that's a signal that application has been fully rendered\n */\n bootstrap(): void {\n this.bootstrap$.next(true);\n this.bootstrap$.complete();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { PlainObject } from './symbols';\n\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\n\nexport class InitialState {\n private static value: PlainObject = {};\n\n public static set(state: PlainObject) {\n this.value = state;\n }\n\n public static pop(): PlainObject {\n const state: PlainObject = this.value;\n this.value = {};\n return state;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\n */\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\n 'Internals.StateContextFactory'\n);\n\n/**\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\n */\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\n 'Internals.StateFactory'\n);\n"],"names":["getPlatform","COMPILER_OPTIONS","ReplaySubject","Injectable","InjectionToken"],"mappings":";;;;;;;;;;;;;;;IAAA,SAAS,oBAAoB,CAAC,CAAM,EAAE,CAAM;QAC1C,OAAO,CAAC,KAAK,CAAC,CAAC;KAChB;;;;;;;IAED,SAAS,0BAA0B,CACjC,aAA0C,EAC1C,IAAuB,EACvB,IAAuB;QAEvB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE;YACjE,OAAO,KAAK,CAAC;SACd;;;YAGK,MAAM,GAAG,IAAI,CAAC,MAAM;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAA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store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts"],"sourcesContent":["function defaultEqualityCheck(a: any, b: any) {\r\n return a === b;\r\n}\r\n\r\nfunction areArgumentsShallowlyEqual(\r\n equalityCheck: (a: any, b: any) => boolean,\r\n prev: IArguments | null,\r\n next: IArguments | null\r\n) {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false;\r\n }\r\n\r\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\r\n const length = prev.length;\r\n for (let i = 0; i < length; i++) {\r\n if (!equalityCheck(prev[i], next[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Memoize a function on its last inputs only.\r\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\r\n *\r\n * @ignore\r\n */\r\nexport function memoize<T extends (...args: any[]) => any>(\r\n func: T,\r\n equalityCheck = defaultEqualityCheck\r\n): T {\r\n let lastArgs: IArguments | null = null;\r\n let lastResult: any = null;\r\n // we reference arguments instead of spreading them for performance reasons\r\n function memoized() {\r\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\r\n // apply arguments instead of spreading for performance.\r\n lastResult = (<Function>func).apply(null, arguments);\r\n }\r\n\r\n lastArgs = arguments;\r\n return lastResult;\r\n }\r\n (<any>memoized).reset = function() {\r\n // The hidden (for now) ability to reset the memoization\r\n lastArgs = null;\r\n lastResult = null;\r\n };\r\n return memoized as T;\r\n}\r\n","import { getPlatform, COMPILER_OPTIONS, CompilerOptions, PlatformRef } from '@angular/core';\r\nimport { memoize } from './memoize';\r\n\r\nfunction _isAngularInTestMode() {\r\n const platformRef: PlatformRef | null = getPlatform();\r\n if (!platformRef) return false;\r\n const compilerOptions = platformRef.injector.get<any>(COMPILER_OPTIONS, null);\r\n if (!compilerOptions) return false;\r\n const isInTestMode = compilerOptions.some((item: CompilerOptions) => {\r\n const providers = (item && item.providers) || [];\r\n return providers.some((provider: any) => {\r\n return (\r\n (provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||\r\n false\r\n );\r\n });\r\n });\r\n return isInTestMode;\r\n}\r\n\r\nexport const isAngularInTestMode = memoize(_isAngularInTestMode);\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, ReplaySubject } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class NgxsBootstrapper {\r\n /**\r\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\r\n */\r\n private bootstrap$ = new ReplaySubject<boolean>(1);\r\n\r\n get appBootstrapped$(): Observable<boolean> {\r\n return this.bootstrap$.asObservable();\r\n }\r\n\r\n /**\r\n * This event will be emitted after attaching `ComponentRef` of the root component\r\n * to the tree of views, that's a signal that application has been fully rendered\r\n */\r\n bootstrap(): void {\r\n this.bootstrap$.next(true);\r\n this.bootstrap$.complete();\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { PlainObject } from './symbols';\r\n\r\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\r\n\r\nexport class InitialState {\r\n private static value: PlainObject = {};\r\n\r\n public static set(state: PlainObject) {\r\n this.value = state;\r\n }\r\n\r\n public static pop(): PlainObject {\r\n const state: PlainObject = this.value;\r\n this.value = {};\r\n return state;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateContextFactory'\r\n);\r\n\r\n/**\r\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateFactory'\r\n);\r\n"],"names":["getPlatform","COMPILER_OPTIONS","ReplaySubject","Injectable","InjectionToken"],"mappings":";;;;;;;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CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;SACd;QAVc,kBAAK,GAAgB,EAAE,CAAC;QAWzC,mBAAC;KAZD,IAYC;;;;;;QAXC,mBAAuC;;;;;;;ICNzC;;;;AAKA,QAAa,0BAA0B,GAAwB,IAAIA,mBAAc,CAC/E,+BAA+B,CAChC;;;;;AAKD,QAAa,kBAAkB,GAAwB,IAAIA,mBAAc,CACvE,wBAAwB,CACzB;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://@ngxs/store/internals/memoize.ts","ng://@ngxs/store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts"],"names":["defaultEqualityCheck","a","b","memoize","func","equalityCheck","lastArgs","lastResult","memoized","prev","next","length","i","areArgumentsShallowlyEqual","arguments","apply","reset","isAngularInTestMode","platformRef","getPlatform","compilerOptions","injector","get","COMPILER_OPTIONS","some","item","providers","provider","provide","name","NgxsBootstrapper","this","bootstrap$","ReplaySubject","Object","defineProperty","prototype","asObservable","bootstrap","complete","Injectable","INITIAL_STATE_TOKEN","InjectionToken","InitialState","set","state","value","pop","NGXS_STATE_CONTEXT_FACTORY","NGXS_STATE_FACTORY"],"mappings":"iXAAA,SAASA,EAAqBC,EAAQC,GACpC,OAAOD,IAAMC,EA6Bf,SAAgBC,EACdC,EACAC,QAAA,IAAAA,IAAAA,EAAAL,OAEIM,EAA8B,KAC9BC,EAAkB,KAEtB,SAASC,IAOP,OAxCJ,SACEH,EACAI,EACAC,GAEA,GAAa,OAATD,GAA0B,OAATC,GAAiBD,EAAKE,SAAWD,EAAKC,OACzD,OAAO,EAKT,QADMA,EAASF,EAAKE,OACXC,EAAI,EAAGA,EAAID,EAAQC,IAC1B,IAAKP,EAAcI,EAAKG,GAAIF,EAAKE,IAC/B,OAAO,EAIX,OAAO,EAiBAC,CAA2BR,EAAeC,EAAUQ,aAEvDP,EAAa,EAAiBQ,MAAM,KAAMD,YAG5CR,EAAWQ,UACJP,EAOT,OALA,EAAgBS,MAAK,WAEnBV,EAAW,KACXC,EAAa,MAEf,EC/BF,IAAaU,EAAsBd,GAjBnC,eACQe,EAAkCC,EAAAA,cACxC,IAAKD,EAAa,OAAO,MACnBE,EAAkBF,EAAYG,SAASC,IAASC,EAAAA,iBAAkB,MACxE,QAAKH,GACgBA,EAAgBI,MAAI,SAAEC,GAEzC,OADmBA,GAAQA,EAAKC,WAAc,IAC7BF,MAAI,SAAEG,GACrB,OACGA,GAAYA,EAASC,SAAqC,yBAA1BD,EAASC,QAAQC,OAClD,WCbRC,EAAA,WAGA,SAAAA,IAKUC,KAAAC,WAAa,IAAIC,EAAAA,cAAuB,GAclD,OAZEC,OAAAC,eAAIL,EAAAM,UAAA,mBAAgB,KAApB,WACE,OAAOL,KAAKC,WAAWK,gDAOzBP,EAAAM,UAAAE,UAAA,WACEP,KAAKC,WAAWtB,MAAK,GACrBqB,KAAKC,WAAWO,gCAjBnBC,EAAAA,aAmBDV,EAtBA,GCGA,IAAaW,EAAsB,IAAIC,EAAAA,eAAoB,uBAE3DC,EAAA,WAAA,SAAAA,KAYA,OATgBA,EAAAC,IAAd,SAAkBC,GAChBd,KAAKe,MAAQD,GAGDF,EAAAI,IAAd,eACQF,EAAqBd,KAAKe,MAEhC,OADAf,KAAKe,MAAQ,GACND,GATMF,EAAAG,MAAqB,GAWtCH,EAZA,GCAA,IAAaK,EAAkD,IAAIN,EAAAA,eACjE,iCAMWO,EAA0C,IAAIP,EAAAA,eACzD","sourcesContent":["function defaultEqualityCheck(a: any, b: any) {\n return a === b;\n}\n\nfunction areArgumentsShallowlyEqual(\n equalityCheck: (a: any, b: any) => boolean,\n prev: IArguments | null,\n next: IArguments | null\n) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\n const length = prev.length;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Memoize a function on its last inputs only.\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\n *\n * @ignore\n */\nexport function memoize<T extends (...args: any[]) => any>(\n func: T,\n equalityCheck = defaultEqualityCheck\n): T {\n let lastArgs: IArguments | null = null;\n let lastResult: any = null;\n // we reference arguments instead of spreading them for performance reasons\n function memoized() {\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n lastResult = (<Function>func).apply(null, arguments);\n }\n\n lastArgs = arguments;\n return lastResult;\n }\n (<any>memoized).reset = function() {\n // The hidden (for now) ability to reset the memoization\n lastArgs = null;\n lastResult = null;\n };\n return memoized as T;\n}\n","import { getPlatform, COMPILER_OPTIONS, CompilerOptions, PlatformRef } from '@angular/core';\nimport { memoize } from './memoize';\n\nfunction _isAngularInTestMode() {\n const platformRef: PlatformRef | null = getPlatform();\n if (!platformRef) return false;\n const compilerOptions = platformRef.injector.get<any>(COMPILER_OPTIONS, null);\n if (!compilerOptions) return false;\n const isInTestMode = compilerOptions.some((item: CompilerOptions) => {\n const providers = (item && item.providers) || [];\n return providers.some((provider: any) => {\n return (\n (provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||\n false\n );\n });\n });\n return isInTestMode;\n}\n\nexport const isAngularInTestMode = memoize(_isAngularInTestMode);\n","import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\n\n@Injectable()\nexport class NgxsBootstrapper {\n /**\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\n */\n private bootstrap$ = new ReplaySubject<boolean>(1);\n\n get appBootstrapped$(): Observable<boolean> {\n return this.bootstrap$.asObservable();\n }\n\n /**\n * This event will be emitted after attaching `ComponentRef` of the root component\n * to the tree of views, that's a signal that application has been fully rendered\n */\n bootstrap(): void {\n this.bootstrap$.next(true);\n this.bootstrap$.complete();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { PlainObject } from './symbols';\n\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\n\nexport class InitialState {\n private static value: PlainObject = {};\n\n public static set(state: PlainObject) {\n this.value = state;\n }\n\n public static pop(): PlainObject {\n const state: PlainObject = this.value;\n this.value = {};\n return state;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\n */\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\n 'Internals.StateContextFactory'\n);\n\n/**\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\n */\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\n 'Internals.StateFactory'\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["ng://@ngxs/store/internals/memoize.ts","ng://@ngxs/store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts"],"names":["defaultEqualityCheck","a","b","memoize","func","equalityCheck","lastArgs","lastResult","memoized","prev","next","length","i","areArgumentsShallowlyEqual","arguments","apply","reset","isAngularInTestMode","platformRef","getPlatform","compilerOptions","injector","get","COMPILER_OPTIONS","some","item","providers","provider","provide","name","NgxsBootstrapper","this","bootstrap$","ReplaySubject","Object","defineProperty","prototype","asObservable","bootstrap","complete","Injectable","INITIAL_STATE_TOKEN","InjectionToken","InitialState","set","state","value","pop","NGXS_STATE_CONTEXT_FACTORY","NGXS_STATE_FACTORY"],"mappings":"iXAAA,SAASA,EAAqBC,EAAQC,GACpC,OAAOD,IAAMC,EA6Bf,SAAgBC,EACdC,EACAC,QAAA,IAAAA,IAAAA,EAAAL,OAEIM,EAA8B,KAC9BC,EAAkB,KAEtB,SAASC,IAOP,OAxCJ,SACEH,EACAI,EACAC,GAEA,GAAa,OAATD,GA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\r\n return a === b;\r\n}\r\n\r\nfunction areArgumentsShallowlyEqual(\r\n equalityCheck: (a: any, b: any) => boolean,\r\n prev: IArguments | null,\r\n next: IArguments | null\r\n) {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false;\r\n }\r\n\r\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\r\n const length = prev.length;\r\n for (let i = 0; i < length; i++) {\r\n if (!equalityCheck(prev[i], next[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Memoize a function on its last inputs only.\r\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\r\n *\r\n * @ignore\r\n */\r\nexport function memoize<T extends (...args: any[]) => any>(\r\n func: T,\r\n equalityCheck = defaultEqualityCheck\r\n): T {\r\n let lastArgs: IArguments | null = null;\r\n let lastResult: any = null;\r\n // we reference arguments instead of spreading them for performance reasons\r\n function memoized() {\r\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\r\n // apply arguments instead of spreading for performance.\r\n lastResult = (<Function>func).apply(null, arguments);\r\n }\r\n\r\n lastArgs = arguments;\r\n return lastResult;\r\n }\r\n (<any>memoized).reset = function() {\r\n // The hidden (for now) ability to reset the memoization\r\n lastArgs = null;\r\n lastResult = null;\r\n };\r\n return memoized as T;\r\n}\r\n","import { getPlatform, COMPILER_OPTIONS, CompilerOptions, PlatformRef } from '@angular/core';\r\nimport { memoize } from './memoize';\r\n\r\nfunction _isAngularInTestMode() {\r\n const platformRef: PlatformRef | null = getPlatform();\r\n if (!platformRef) return false;\r\n const compilerOptions = platformRef.injector.get<any>(COMPILER_OPTIONS, null);\r\n if (!compilerOptions) return false;\r\n const isInTestMode = compilerOptions.some((item: CompilerOptions) => {\r\n const providers = (item && item.providers) || [];\r\n return providers.some((provider: any) => {\r\n return (\r\n (provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||\r\n false\r\n );\r\n });\r\n });\r\n return isInTestMode;\r\n}\r\n\r\nexport const isAngularInTestMode = memoize(_isAngularInTestMode);\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, ReplaySubject } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class NgxsBootstrapper {\r\n /**\r\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\r\n */\r\n private bootstrap$ = new ReplaySubject<boolean>(1);\r\n\r\n get appBootstrapped$(): Observable<boolean> {\r\n return this.bootstrap$.asObservable();\r\n }\r\n\r\n /**\r\n * This event will be emitted after attaching `ComponentRef` of the root component\r\n * to the tree of views, that's a signal that application has been fully rendered\r\n */\r\n bootstrap(): void {\r\n this.bootstrap$.next(true);\r\n this.bootstrap$.complete();\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { PlainObject } from './symbols';\r\n\r\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\r\n\r\nexport class InitialState {\r\n private static value: PlainObject = {};\r\n\r\n public static set(state: PlainObject) {\r\n this.value = state;\r\n }\r\n\r\n public static pop(): PlainObject {\r\n const state: PlainObject = this.value;\r\n this.value = {};\r\n return state;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateContextFactory'\r\n);\r\n\r\n/**\r\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateFactory'\r\n);\r\n"]}
|