@ngxs/store 3.8.0-dev.master-fb273e5 → 3.8.0-dev.master-c31ed89
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/bundles/ngxs-store-internals.umd.js +3 -2
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.js +87 -86
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/esm2015/internals/ngxs-bootstrapper.js +4 -3
- package/esm2015/src/actions-stream.js +7 -5
- package/esm2015/src/decorators/select/select-factory.js +4 -3
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +4 -3
- package/esm2015/src/internal/dispatcher.js +7 -5
- package/esm2015/src/internal/lifecycle-state-manager.js +4 -3
- package/esm2015/src/internal/state-context-factory.js +4 -3
- package/esm2015/src/internal/state-factory.js +24 -23
- package/esm2015/src/internal/state-operations.js +4 -3
- package/esm2015/src/internal/state-stream.js +4 -3
- package/esm2015/src/module.js +2 -21
- package/esm2015/src/store.js +4 -3
- package/fesm2015/ngxs-store-internals.js +3 -2
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store.js +77 -76
- package/fesm2015/ngxs-store.js.map +1 -1
- package/package.json +1 -1
- package/src/internal/state-factory.d.ts +10 -11
|
@@ -62,9 +62,10 @@
|
|
|
62
62
|
return NgxsBootstrapper;
|
|
63
63
|
}());
|
|
64
64
|
/** @nocollapse */ NgxsBootstrapper.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsBootstrapper, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
65
|
-
/** @nocollapse */ NgxsBootstrapper.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsBootstrapper });
|
|
65
|
+
/** @nocollapse */ NgxsBootstrapper.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsBootstrapper, providedIn: 'root' });
|
|
66
66
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsBootstrapper, decorators: [{
|
|
67
|
-
type: i0.Injectable
|
|
67
|
+
type: i0.Injectable,
|
|
68
|
+
args: [{ providedIn: 'root' }]
|
|
68
69
|
}] });
|
|
69
70
|
|
|
70
71
|
function defaultEqualityCheck(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-store-internals.umd.js","sources":["../../../packages/store/internals/src/angular.ts","../../../packages/store/internals/src/ngxs-bootstrapper.ts","../../../packages/store/internals/src/memoize.ts","../../../packages/store/internals/src/initial-state.ts","../../../packages/store/internals/src/internal-tokens.ts","../../../packages/store/internals/src/ngxs-store-internals.ts"],"sourcesContent":["declare const __karma__: unknown;\ndeclare const jasmine: unknown;\ndeclare const jest: unknown;\ndeclare const Mocha: unknown;\n\nexport function isAngularInTestMode(): boolean {\n // This is safe to check for these properties in the following way since `typeof` does not\n // throw an exception if the value does not exist in the scope.\n // We should not try to read these values from the global scope (e.g. `ɵglobal` from the `@angular/core`).\n // This is related to how these frameworks compile and execute modules. E.g. Jest wraps the module into\n // its internal code where `jest` variable exists in the scope. It cannot be read from the global scope, e.g.\n // this will return undefined `global.jest`, but `jest` will not equal undefined.\n return (\n typeof __karma__ !== 'undefined' ||\n typeof jasmine !== 'undefined' ||\n typeof jest !== 'undefined' ||\n typeof Mocha !== 'undefined'\n );\n}\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","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 // eslint-disable-next-line prefer-rest-params\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n lastResult = (<Function>func).apply(null, arguments);\n }\n // eslint-disable-next-line prefer-rest-params\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 { 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// These tokens are internal and can change at any point.\n\nexport const ɵNGXS_STATE_FACTORY = new InjectionToken<any>('ɵNGXS_STATE_FACTORY');\n\nexport const ɵNGXS_STATE_CONTEXT_FACTORY = new InjectionToken<any>(\n 'ɵNGXS_STATE_CONTEXT_FACTORY'\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ReplaySubject","i0","Injectable","InjectionToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;aAKgB,mBAAmB,GAAA;;;;;;;IAOjC,IAAA,QACE,OAAO,SAAS,KAAK,WAAW;YAChC,OAAO,OAAO,KAAK,WAAW;YAC9B,OAAO,IAAI,KAAK,WAAW;IAC3B,QAAA,OAAO,KAAK,KAAK,WAAW,EAC5B;IACJ;;ACdA,QAAA,gBAAA,kBAAA,YAAA;IADA,IAAA,SAAA,gBAAA,GAAA;IAEE;;IAEG;YACK,IAAA,CAAA,UAAU,GAAG,IAAIA,kBAAa,CAAU,CAAC,CAAC,CAAC;SAcpD;IAZC,IAAA,MAAA,CAAA,cAAA,CAAI,gBAAgB,CAAA,SAAA,EAAA,kBAAA,EAAA;IAApB,QAAA,GAAA,EAAA,YAAA;IACE,YAAA,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;aACvC;;;IAAA,KAAA,CAAA,CAAA;IAED;;;IAGG;IACH,IAAA,gBAAA,CAAA,SAAA,CAAA,SAAS,GAAT,YAAA;IACE,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;SAC5B,CAAA;;;2JAjBU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAC,aAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA
|
|
1
|
+
{"version":3,"file":"ngxs-store-internals.umd.js","sources":["../../../packages/store/internals/src/angular.ts","../../../packages/store/internals/src/ngxs-bootstrapper.ts","../../../packages/store/internals/src/memoize.ts","../../../packages/store/internals/src/initial-state.ts","../../../packages/store/internals/src/internal-tokens.ts","../../../packages/store/internals/src/ngxs-store-internals.ts"],"sourcesContent":["declare const __karma__: unknown;\ndeclare const jasmine: unknown;\ndeclare const jest: unknown;\ndeclare const Mocha: unknown;\n\nexport function isAngularInTestMode(): boolean {\n // This is safe to check for these properties in the following way since `typeof` does not\n // throw an exception if the value does not exist in the scope.\n // We should not try to read these values from the global scope (e.g. `ɵglobal` from the `@angular/core`).\n // This is related to how these frameworks compile and execute modules. E.g. Jest wraps the module into\n // its internal code where `jest` variable exists in the scope. It cannot be read from the global scope, e.g.\n // this will return undefined `global.jest`, but `jest` will not equal undefined.\n return (\n typeof __karma__ !== 'undefined' ||\n typeof jasmine !== 'undefined' ||\n typeof jest !== 'undefined' ||\n typeof Mocha !== 'undefined'\n );\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\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","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 // eslint-disable-next-line prefer-rest-params\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n lastResult = (<Function>func).apply(null, arguments);\n }\n // eslint-disable-next-line prefer-rest-params\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 { 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// These tokens are internal and can change at any point.\n\nexport const ɵNGXS_STATE_FACTORY = new InjectionToken<any>('ɵNGXS_STATE_FACTORY');\n\nexport const ɵNGXS_STATE_CONTEXT_FACTORY = new InjectionToken<any>(\n 'ɵNGXS_STATE_CONTEXT_FACTORY'\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ReplaySubject","i0","Injectable","InjectionToken"],"mappings":"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"}
|
|
@@ -1290,9 +1290,10 @@
|
|
|
1290
1290
|
return InternalNgxsExecutionStrategy;
|
|
1291
1291
|
}());
|
|
1292
1292
|
/** @nocollapse */ InternalNgxsExecutionStrategy.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalNgxsExecutionStrategy, deps: [{ token: NGXS_EXECUTION_STRATEGY }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1293
|
-
/** @nocollapse */ InternalNgxsExecutionStrategy.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalNgxsExecutionStrategy });
|
|
1293
|
+
/** @nocollapse */ InternalNgxsExecutionStrategy.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalNgxsExecutionStrategy, providedIn: 'root' });
|
|
1294
1294
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalNgxsExecutionStrategy, decorators: [{
|
|
1295
|
-
type: i0.Injectable
|
|
1295
|
+
type: i0.Injectable,
|
|
1296
|
+
args: [{ providedIn: 'root' }]
|
|
1296
1297
|
}], ctorParameters: function () {
|
|
1297
1298
|
return [{ type: undefined, decorators: [{
|
|
1298
1299
|
type: i0.Inject,
|
|
@@ -1314,9 +1315,10 @@
|
|
|
1314
1315
|
return InternalActions;
|
|
1315
1316
|
}(OrderedSubject));
|
|
1316
1317
|
/** @nocollapse */ InternalActions.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalActions, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1317
|
-
/** @nocollapse */ InternalActions.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalActions });
|
|
1318
|
+
/** @nocollapse */ InternalActions.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalActions, providedIn: 'root' });
|
|
1318
1319
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalActions, decorators: [{
|
|
1319
|
-
type: i0.Injectable
|
|
1320
|
+
type: i0.Injectable,
|
|
1321
|
+
args: [{ providedIn: 'root' }]
|
|
1320
1322
|
}] });
|
|
1321
1323
|
/**
|
|
1322
1324
|
* Action stream that is emitted anytime an action is dispatched.
|
|
@@ -1346,9 +1348,10 @@
|
|
|
1346
1348
|
return Actions;
|
|
1347
1349
|
}(rxjs.Observable));
|
|
1348
1350
|
/** @nocollapse */ Actions.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Actions, deps: [{ token: InternalActions }, { token: InternalNgxsExecutionStrategy }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1349
|
-
/** @nocollapse */ Actions.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Actions });
|
|
1351
|
+
/** @nocollapse */ Actions.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Actions, providedIn: 'root' });
|
|
1350
1352
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Actions, decorators: [{
|
|
1351
|
-
type: i0.Injectable
|
|
1353
|
+
type: i0.Injectable,
|
|
1354
|
+
args: [{ providedIn: 'root' }]
|
|
1352
1355
|
}], ctorParameters: function () { return [{ type: InternalActions }, { type: InternalNgxsExecutionStrategy }]; } });
|
|
1353
1356
|
|
|
1354
1357
|
/**
|
|
@@ -1508,9 +1511,10 @@
|
|
|
1508
1511
|
return StateStream;
|
|
1509
1512
|
}(OrderedBehaviorSubject));
|
|
1510
1513
|
/** @nocollapse */ StateStream.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateStream, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1511
|
-
/** @nocollapse */ StateStream.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateStream });
|
|
1514
|
+
/** @nocollapse */ StateStream.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateStream, providedIn: 'root' });
|
|
1512
1515
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateStream, decorators: [{
|
|
1513
|
-
type: i0.Injectable
|
|
1516
|
+
type: i0.Injectable,
|
|
1517
|
+
args: [{ providedIn: 'root' }]
|
|
1514
1518
|
}], ctorParameters: function () { return []; } });
|
|
1515
1519
|
|
|
1516
1520
|
/**
|
|
@@ -1527,9 +1531,10 @@
|
|
|
1527
1531
|
return InternalDispatchedActionResults;
|
|
1528
1532
|
}(rxjs.Subject));
|
|
1529
1533
|
/** @nocollapse */ InternalDispatchedActionResults.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatchedActionResults, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1530
|
-
/** @nocollapse */ InternalDispatchedActionResults.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatchedActionResults });
|
|
1534
|
+
/** @nocollapse */ InternalDispatchedActionResults.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatchedActionResults, providedIn: 'root' });
|
|
1531
1535
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatchedActionResults, decorators: [{
|
|
1532
|
-
type: i0.Injectable
|
|
1536
|
+
type: i0.Injectable,
|
|
1537
|
+
args: [{ providedIn: 'root' }]
|
|
1533
1538
|
}] });
|
|
1534
1539
|
var InternalDispatcher = /** @class */ (function () {
|
|
1535
1540
|
function InternalDispatcher(_actions, _actionResults, _pluginManager, _stateStream, _ngxsExecutionStrategy, _internalErrorReporter) {
|
|
@@ -1603,9 +1608,10 @@
|
|
|
1603
1608
|
return InternalDispatcher;
|
|
1604
1609
|
}());
|
|
1605
1610
|
/** @nocollapse */ InternalDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatcher, deps: [{ token: InternalActions }, { token: InternalDispatchedActionResults }, { token: PluginManager }, { token: StateStream }, { token: InternalNgxsExecutionStrategy }, { token: InternalErrorReporter }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1606
|
-
/** @nocollapse */ InternalDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatcher });
|
|
1611
|
+
/** @nocollapse */ InternalDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatcher, providedIn: 'root' });
|
|
1607
1612
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalDispatcher, decorators: [{
|
|
1608
|
-
type: i0.Injectable
|
|
1613
|
+
type: i0.Injectable,
|
|
1614
|
+
args: [{ providedIn: 'root' }]
|
|
1609
1615
|
}], ctorParameters: function () { return [{ type: InternalActions }, { type: InternalDispatchedActionResults }, { type: PluginManager }, { type: StateStream }, { type: InternalNgxsExecutionStrategy }, { type: InternalErrorReporter }]; } });
|
|
1610
1616
|
|
|
1611
1617
|
function simplePatch(value) {
|
|
@@ -1686,9 +1692,10 @@
|
|
|
1686
1692
|
return InternalStateOperations;
|
|
1687
1693
|
}());
|
|
1688
1694
|
/** @nocollapse */ InternalStateOperations.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalStateOperations, deps: [{ token: StateStream }, { token: InternalDispatcher }, { token: NgxsConfig }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1689
|
-
/** @nocollapse */ InternalStateOperations.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalStateOperations });
|
|
1695
|
+
/** @nocollapse */ InternalStateOperations.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalStateOperations, providedIn: 'root' });
|
|
1690
1696
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InternalStateOperations, decorators: [{
|
|
1691
|
-
type: i0.Injectable
|
|
1697
|
+
type: i0.Injectable,
|
|
1698
|
+
args: [{ providedIn: 'root' }]
|
|
1692
1699
|
}], ctorParameters: function () { return [{ type: StateStream }, { type: InternalDispatcher }, { type: NgxsConfig }]; } });
|
|
1693
1700
|
function ensureStateAndActionsAreImmutable(root) {
|
|
1694
1701
|
return {
|
|
@@ -1762,13 +1769,24 @@
|
|
|
1762
1769
|
return StateContextFactory;
|
|
1763
1770
|
}());
|
|
1764
1771
|
/** @nocollapse */ StateContextFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateContextFactory, deps: [{ token: InternalStateOperations }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1765
|
-
/** @nocollapse */ StateContextFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateContextFactory });
|
|
1772
|
+
/** @nocollapse */ StateContextFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateContextFactory, providedIn: 'root' });
|
|
1766
1773
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StateContextFactory, decorators: [{
|
|
1767
|
-
type: i0.Injectable
|
|
1774
|
+
type: i0.Injectable,
|
|
1775
|
+
args: [{ providedIn: 'root' }]
|
|
1768
1776
|
}], ctorParameters: function () { return [{ type: InternalStateOperations }]; } });
|
|
1769
1777
|
|
|
1778
|
+
var NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1770
1779
|
/**
|
|
1771
|
-
*
|
|
1780
|
+
* The `StateFactory` class adds root and feature states to the graph.
|
|
1781
|
+
* This extracts state names from state classes, checks if they already
|
|
1782
|
+
* exist in the global graph, throws errors if their names are invalid, etc.
|
|
1783
|
+
* See its constructor, state factories inject state factories that are
|
|
1784
|
+
* parent-level providers. This is required to get feature states from the
|
|
1785
|
+
* injector on the same level.
|
|
1786
|
+
*
|
|
1787
|
+
* The `NgxsModule.forFeature(...)` returns `providers: [StateFactory, ...states]`.
|
|
1788
|
+
* The `StateFactory` is initialized on the feature level and goes through `...states`
|
|
1789
|
+
* to get them from the injector through `injector.get(state)`.
|
|
1772
1790
|
* @ignore
|
|
1773
1791
|
*/
|
|
1774
1792
|
var StateFactory = /** @class */ (function () {
|
|
@@ -1858,18 +1876,15 @@
|
|
|
1858
1876
|
return value;
|
|
1859
1877
|
};
|
|
1860
1878
|
StateFactory.prototype.ngOnDestroy = function () {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
this._actionsSubscription.unsubscribe();
|
|
1879
|
+
var _a;
|
|
1880
|
+
(_a = this._actionsSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1864
1881
|
};
|
|
1865
1882
|
/**
|
|
1866
1883
|
* Add a new state to the global defs.
|
|
1867
1884
|
*/
|
|
1868
1885
|
StateFactory.prototype.add = function (stateClasses) {
|
|
1869
|
-
var e_1,
|
|
1870
|
-
|
|
1871
|
-
// creating a breaking change for projects that still use the View Engine.
|
|
1872
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1886
|
+
var e_1, _b;
|
|
1887
|
+
if (NG_DEV_MODE) {
|
|
1873
1888
|
StoreValidators.checkThatStateClassesHaveBeenDecorated(stateClasses);
|
|
1874
1889
|
}
|
|
1875
1890
|
var newStates = this.addToStatesMap(stateClasses).newStates;
|
|
@@ -1914,7 +1929,7 @@
|
|
|
1914
1929
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1915
1930
|
finally {
|
|
1916
1931
|
try {
|
|
1917
|
-
if (sortedStates_1_1 && !sortedStates_1_1.done && (
|
|
1932
|
+
if (sortedStates_1_1 && !sortedStates_1_1.done && (_b = sortedStates_1.return)) _b.call(sortedStates_1);
|
|
1918
1933
|
}
|
|
1919
1934
|
finally { if (e_1) throw e_1.error; }
|
|
1920
1935
|
}
|
|
@@ -1929,13 +1944,14 @@
|
|
|
1929
1944
|
var defaults = mappedStores.reduce(function (result, mappedStore) { return setValue(result, mappedStore.path, mappedStore.defaults); }, {});
|
|
1930
1945
|
return { defaults: defaults, states: mappedStores };
|
|
1931
1946
|
};
|
|
1932
|
-
/**
|
|
1933
|
-
* Bind the actions to the handlers
|
|
1934
|
-
*/
|
|
1935
1947
|
StateFactory.prototype.connectActionHandlers = function () {
|
|
1936
1948
|
var _this = this;
|
|
1937
|
-
|
|
1949
|
+
// Note: We have to connect actions only once when the `StateFactory`
|
|
1950
|
+
// is being created for the first time. This checks if we're in
|
|
1951
|
+
// a child state factory and the parent state factory already exists.
|
|
1952
|
+
if (this._parentFactory || this._actionsSubscription !== null) {
|
|
1938
1953
|
return;
|
|
1954
|
+
}
|
|
1939
1955
|
var dispatched$ = new rxjs.Subject();
|
|
1940
1956
|
this._actionsSubscription = this._actions
|
|
1941
1957
|
.pipe(operators.filter(function (ctx) { return ctx.status === "DISPATCHED"; } /* Dispatched */), operators.mergeMap(function (ctx) {
|
|
@@ -1949,15 +1965,15 @@
|
|
|
1949
1965
|
* Invoke actions on the states.
|
|
1950
1966
|
*/
|
|
1951
1967
|
StateFactory.prototype.invokeActions = function (dispatched$, action) {
|
|
1952
|
-
var e_2,
|
|
1968
|
+
var e_2, _b, e_3, _c;
|
|
1953
1969
|
var type = getActionTypeFromInstance(action);
|
|
1954
1970
|
var results = [];
|
|
1955
1971
|
// Determines whether the dispatched action has been handled, this is assigned
|
|
1956
1972
|
// to `true` within the below `for` loop if any `actionMetas` has been found.
|
|
1957
1973
|
var actionHasBeenHandled = false;
|
|
1958
1974
|
try {
|
|
1959
|
-
for (var
|
|
1960
|
-
var metadata =
|
|
1975
|
+
for (var _d = __values(this.states), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1976
|
+
var metadata = _e.value;
|
|
1961
1977
|
var actionMetas = metadata.actions[type];
|
|
1962
1978
|
if (actionMetas) {
|
|
1963
1979
|
try {
|
|
@@ -2006,7 +2022,7 @@
|
|
|
2006
2022
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
2007
2023
|
finally {
|
|
2008
2024
|
try {
|
|
2009
|
-
if (actionMetas_1_1 && !actionMetas_1_1.done && (
|
|
2025
|
+
if (actionMetas_1_1 && !actionMetas_1_1.done && (_c = actionMetas_1.return)) _c.call(actionMetas_1);
|
|
2010
2026
|
}
|
|
2011
2027
|
finally { if (e_3) throw e_3.error; }
|
|
2012
2028
|
}
|
|
@@ -2016,13 +2032,13 @@
|
|
|
2016
2032
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2017
2033
|
finally {
|
|
2018
2034
|
try {
|
|
2019
|
-
if (
|
|
2035
|
+
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
|
2020
2036
|
}
|
|
2021
2037
|
finally { if (e_2) throw e_2.error; }
|
|
2022
2038
|
}
|
|
2023
2039
|
// The `NgxsUnhandledActionsLogger` is a tree-shakable class which functions
|
|
2024
2040
|
// only during development.
|
|
2025
|
-
if (
|
|
2041
|
+
if (NG_DEV_MODE && !actionHasBeenHandled) {
|
|
2026
2042
|
var unhandledActionsLogger = this._injector.get(NgxsUnhandledActionsLogger, null);
|
|
2027
2043
|
// The `NgxsUnhandledActionsLogger` will not be resolved by the injector if the
|
|
2028
2044
|
// `NgxsDevelopmentModule` is not provided. It's enough to check whether the `injector.get`
|
|
@@ -2037,16 +2053,14 @@
|
|
|
2037
2053
|
return rxjs.forkJoin(results);
|
|
2038
2054
|
};
|
|
2039
2055
|
StateFactory.prototype.addToStatesMap = function (stateClasses) {
|
|
2040
|
-
var e_4,
|
|
2056
|
+
var e_4, _b;
|
|
2041
2057
|
var newStates = [];
|
|
2042
2058
|
var statesMap = this.statesByName;
|
|
2043
2059
|
try {
|
|
2044
2060
|
for (var stateClasses_1 = __values(stateClasses), stateClasses_1_1 = stateClasses_1.next(); !stateClasses_1_1.done; stateClasses_1_1 = stateClasses_1.next()) {
|
|
2045
2061
|
var stateClass = stateClasses_1_1.value;
|
|
2046
2062
|
var stateName = getStoreMetadata$1(stateClass).name;
|
|
2047
|
-
|
|
2048
|
-
// creating a breaking change for projects that still use the View Engine.
|
|
2049
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2063
|
+
if (NG_DEV_MODE) {
|
|
2050
2064
|
StoreValidators.checkThatStateNameIsUnique(stateName, stateClass, statesMap);
|
|
2051
2065
|
}
|
|
2052
2066
|
var unmountedState = !statesMap[stateName];
|
|
@@ -2059,7 +2073,7 @@
|
|
|
2059
2073
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
2060
2074
|
finally {
|
|
2061
2075
|
try {
|
|
2062
|
-
if (stateClasses_1_1 && !stateClasses_1_1.done && (
|
|
2076
|
+
if (stateClasses_1_1 && !stateClasses_1_1.done && (_b = stateClasses_1.return)) _b.call(stateClasses_1);
|
|
2063
2077
|
}
|
|
2064
2078
|
finally { if (e_4) throw e_4.error; }
|
|
2065
2079
|
}
|
|
@@ -2072,15 +2086,10 @@
|
|
|
2072
2086
|
// We will need to come up with an alternative in v4 because this is used by many plugins
|
|
2073
2087
|
meta.path = path;
|
|
2074
2088
|
};
|
|
2075
|
-
/**
|
|
2076
|
-
* @description
|
|
2077
|
-
* the method checks if the state has already been added to the tree
|
|
2078
|
-
* and completed the life cycle
|
|
2079
|
-
* @param name
|
|
2080
|
-
* @param path
|
|
2081
|
-
*/
|
|
2082
2089
|
StateFactory.prototype.hasBeenMountedAndBootstrapped = function (name, path) {
|
|
2083
2090
|
var valueIsBootstrappedInInitialState = getValue(this._initialState, path) !== undefined;
|
|
2091
|
+
// This checks whether a state has been already added to the global graph and
|
|
2092
|
+
// its lifecycle is in 'bootstrapped' state.
|
|
2084
2093
|
return this.statesByName[name] && valueIsBootstrappedInInitialState;
|
|
2085
2094
|
};
|
|
2086
2095
|
return StateFactory;
|
|
@@ -2261,9 +2270,10 @@
|
|
|
2261
2270
|
return Store;
|
|
2262
2271
|
}());
|
|
2263
2272
|
/** @nocollapse */ Store.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Store, deps: [{ token: StateStream }, { token: InternalStateOperations }, { token: NgxsConfig }, { token: InternalNgxsExecutionStrategy }, { token: StateFactory }, { token: i5.INITIAL_STATE_TOKEN, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2264
|
-
/** @nocollapse */ Store.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Store });
|
|
2273
|
+
/** @nocollapse */ Store.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Store, providedIn: 'root' });
|
|
2265
2274
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Store, decorators: [{
|
|
2266
|
-
type: i0.Injectable
|
|
2275
|
+
type: i0.Injectable,
|
|
2276
|
+
args: [{ providedIn: 'root' }]
|
|
2267
2277
|
}], ctorParameters: function () {
|
|
2268
2278
|
return [{ type: StateStream }, { type: InternalStateOperations }, { type: NgxsConfig }, { type: InternalNgxsExecutionStrategy }, { type: StateFactory }, { type: undefined, decorators: [{
|
|
2269
2279
|
type: i0.Optional
|
|
@@ -2273,6 +2283,30 @@
|
|
|
2273
2283
|
}] }];
|
|
2274
2284
|
} });
|
|
2275
2285
|
|
|
2286
|
+
/**
|
|
2287
|
+
* Allows the select decorator to get access to the DI store, this is used internally
|
|
2288
|
+
* in `@Select` decorator.
|
|
2289
|
+
*/
|
|
2290
|
+
var SelectFactory = /** @class */ (function () {
|
|
2291
|
+
function SelectFactory(store, config) {
|
|
2292
|
+
SelectFactory.store = store;
|
|
2293
|
+
SelectFactory.config = config;
|
|
2294
|
+
}
|
|
2295
|
+
SelectFactory.prototype.ngOnDestroy = function () {
|
|
2296
|
+
SelectFactory.store = null;
|
|
2297
|
+
SelectFactory.config = null;
|
|
2298
|
+
};
|
|
2299
|
+
return SelectFactory;
|
|
2300
|
+
}());
|
|
2301
|
+
SelectFactory.store = null;
|
|
2302
|
+
SelectFactory.config = null;
|
|
2303
|
+
/** @nocollapse */ SelectFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory, deps: [{ token: Store }, { token: NgxsConfig }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2304
|
+
/** @nocollapse */ SelectFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory, providedIn: 'root' });
|
|
2305
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory, decorators: [{
|
|
2306
|
+
type: i0.Injectable,
|
|
2307
|
+
args: [{ providedIn: 'root' }]
|
|
2308
|
+
}], ctorParameters: function () { return [{ type: Store }, { type: NgxsConfig }]; } });
|
|
2309
|
+
|
|
2276
2310
|
var LifecycleStateManager = /** @class */ (function () {
|
|
2277
2311
|
function LifecycleStateManager(_store, _internalErrorReporter, _internalStateOperations, _stateContextFactory, _bootstrapper) {
|
|
2278
2312
|
this._store = _store;
|
|
@@ -2359,34 +2393,12 @@
|
|
|
2359
2393
|
return LifecycleStateManager;
|
|
2360
2394
|
}());
|
|
2361
2395
|
/** @nocollapse */ LifecycleStateManager.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LifecycleStateManager, deps: [{ token: Store }, { token: InternalErrorReporter }, { token: InternalStateOperations }, { token: StateContextFactory }, { token: i5__namespace.NgxsBootstrapper }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2362
|
-
/** @nocollapse */ LifecycleStateManager.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LifecycleStateManager });
|
|
2396
|
+
/** @nocollapse */ LifecycleStateManager.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LifecycleStateManager, providedIn: 'root' });
|
|
2363
2397
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LifecycleStateManager, decorators: [{
|
|
2364
|
-
type: i0.Injectable
|
|
2398
|
+
type: i0.Injectable,
|
|
2399
|
+
args: [{ providedIn: 'root' }]
|
|
2365
2400
|
}], ctorParameters: function () { return [{ type: Store }, { type: InternalErrorReporter }, { type: InternalStateOperations }, { type: StateContextFactory }, { type: i5__namespace.NgxsBootstrapper }]; } });
|
|
2366
2401
|
|
|
2367
|
-
/**
|
|
2368
|
-
* Allows the select decorator to get access to the DI store, this is used internally
|
|
2369
|
-
* in `@Select` decorator.
|
|
2370
|
-
*/
|
|
2371
|
-
var SelectFactory = /** @class */ (function () {
|
|
2372
|
-
function SelectFactory(store, config) {
|
|
2373
|
-
SelectFactory.store = store;
|
|
2374
|
-
SelectFactory.config = config;
|
|
2375
|
-
}
|
|
2376
|
-
SelectFactory.prototype.ngOnDestroy = function () {
|
|
2377
|
-
SelectFactory.store = null;
|
|
2378
|
-
SelectFactory.config = null;
|
|
2379
|
-
};
|
|
2380
|
-
return SelectFactory;
|
|
2381
|
-
}());
|
|
2382
|
-
SelectFactory.store = null;
|
|
2383
|
-
SelectFactory.config = null;
|
|
2384
|
-
/** @nocollapse */ SelectFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory, deps: [{ token: Store }, { token: NgxsConfig }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2385
|
-
/** @nocollapse */ SelectFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory });
|
|
2386
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectFactory, decorators: [{
|
|
2387
|
-
type: i0.Injectable
|
|
2388
|
-
}], ctorParameters: function () { return [{ type: Store }, { type: NgxsConfig }]; } });
|
|
2389
|
-
|
|
2390
2402
|
/**
|
|
2391
2403
|
* Root module
|
|
2392
2404
|
* @ignore
|
|
@@ -2472,18 +2484,6 @@
|
|
|
2472
2484
|
ngModule: NgxsRootModule,
|
|
2473
2485
|
providers: __spreadArray(__spreadArray([
|
|
2474
2486
|
StateFactory,
|
|
2475
|
-
StateContextFactory,
|
|
2476
|
-
Actions,
|
|
2477
|
-
InternalActions,
|
|
2478
|
-
i5.NgxsBootstrapper,
|
|
2479
|
-
LifecycleStateManager,
|
|
2480
|
-
InternalDispatcher,
|
|
2481
|
-
InternalDispatchedActionResults,
|
|
2482
|
-
InternalStateOperations,
|
|
2483
|
-
InternalNgxsExecutionStrategy,
|
|
2484
|
-
Store,
|
|
2485
|
-
StateStream,
|
|
2486
|
-
SelectFactory,
|
|
2487
2487
|
PluginManager
|
|
2488
2488
|
], __read(states)), __read(NgxsModule.ngxsTokenProviders(states, options)))
|
|
2489
2489
|
};
|
|
@@ -2496,6 +2496,7 @@
|
|
|
2496
2496
|
return {
|
|
2497
2497
|
ngModule: NgxsFeatureModule,
|
|
2498
2498
|
providers: __spreadArray(__spreadArray([
|
|
2499
|
+
// This is required on the feature level, see comments in `state-factory.ts`.
|
|
2499
2500
|
StateFactory,
|
|
2500
2501
|
PluginManager
|
|
2501
2502
|
], __read(states)), [
|