@ngxs/store 3.8.2-dev.master-414599c → 3.8.2-dev.master-9f0fcb0
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/esm2022/internals/initial-state.mjs +18 -0
- package/{esm2020 → esm2022}/internals/memoize.mjs +1 -1
- package/{esm2020 → esm2022}/internals/ngxs-bootstrapper.mjs +4 -4
- package/{esm2020 → esm2022}/internals/testing/helpers/ngxs-test.component.mjs +4 -4
- package/{esm2020 → esm2022}/internals/testing/helpers/ngxs-test.module.mjs +5 -5
- package/{esm2020 → esm2022}/operators/append.mjs +1 -1
- package/{esm2020 → esm2022}/operators/insert-item.mjs +1 -1
- package/esm2022/src/actions/actions.mjs +16 -0
- package/{esm2020 → esm2022}/src/actions-stream.mjs +8 -8
- package/esm2022/src/decorators/select/select-factory.mjs +29 -0
- package/{esm2020 → esm2022}/src/decorators/select/select.mjs +1 -1
- package/esm2022/src/decorators/selector/selector.mjs +32 -0
- package/{esm2020 → esm2022}/src/decorators/selector/symbols.mjs +1 -1
- package/esm2022/src/decorators/selector-options.mjs +21 -0
- package/{esm2020 → esm2022}/src/dev-features/ngxs-development.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/dev-features/ngxs-unhandled-actions-logger.mjs +6 -6
- package/{esm2020 → esm2022}/src/execution/dispatch-outside-zone-ngxs-execution-strategy.mjs +6 -6
- package/{esm2020 → esm2022}/src/execution/internal-ngxs-execution-strategy.mjs +6 -6
- package/{esm2020 → esm2022}/src/execution/noop-ngxs-execution-strategy.mjs +4 -4
- package/{esm2020 → esm2022}/src/internal/dispatcher.mjs +8 -8
- package/{esm2020 → esm2022}/src/internal/error-handler.mjs +5 -5
- package/{esm2020 → esm2022}/src/internal/lifecycle-state-manager.mjs +5 -5
- package/{esm2020 → esm2022}/src/internal/state-context-factory.mjs +5 -5
- package/esm2022/src/internal/state-factory.mjs +298 -0
- package/{esm2020 → esm2022}/src/internal/state-operations.mjs +5 -5
- package/{esm2020 → esm2022}/src/internal/state-stream.mjs +5 -5
- package/{esm2020 → esm2022}/src/module.mjs +5 -5
- package/{esm2020 → esm2022}/src/modules/ngxs-feature.module.mjs +6 -6
- package/{esm2020 → esm2022}/src/modules/ngxs-root.module.mjs +6 -6
- package/{esm2020 → esm2022}/src/operators/of-action.mjs +1 -1
- package/{esm2020 → esm2022}/src/plugin-manager.mjs +6 -6
- package/{esm2020 → esm2022}/src/selectors/selector-metadata.mjs +4 -4
- package/esm2022/src/selectors/selector-utils.mjs +74 -0
- package/{esm2020 → esm2022}/src/store.mjs +6 -6
- package/{esm2020 → esm2022}/src/symbols.mjs +5 -5
- package/esm2022/src/utils/compose.mjs +26 -0
- package/{esm2020 → esm2022}/src/utils/freeze.mjs +1 -1
- package/{esm2020 → esm2022}/src/utils/utils.mjs +1 -1
- package/{fesm2020 → fesm2022}/ngxs-store-internals-testing.mjs +10 -10
- package/{fesm2020 → fesm2022}/ngxs-store-internals-testing.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngxs-store-internals.mjs +4 -4
- package/fesm2022/ngxs-store-internals.mjs.map +1 -0
- package/fesm2022/ngxs-store-operators.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngxs-store.mjs +133 -127
- package/fesm2022/ngxs-store.mjs.map +1 -0
- package/internals/src/symbols.d.ts +1 -1
- package/internals/symbols.d.ts +1 -1
- package/operators/patch.d.ts +2 -2
- package/operators/types.d.ts +5 -5
- package/operators/utils.d.ts +1 -1
- package/package.json +17 -29
- package/schematics/src/actions/files/__name__.actions.ts__template__ +2 -2
- package/schematics/src/ng-add/ng-add.factory.d.ts +1 -1
- package/schematics/src/starter-kit/files/store/auth/auth.actions.ts__template__ +2 -3
- package/schematics/src/starter-kit/files/store/auth/auth.state.ts__template__ +2 -2
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.actions.ts__template__ +3 -6
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.state.ts__template__ +4 -4
- package/schematics/src/starter-kit/files/store/dashboard/states/user/user.actions.ts__template__ +2 -2
- package/schematics/src/starter-kit/files/store/dashboard/states/user/user.state.ts__template__ +2 -2
- package/schematics/src/state/files/__name__.state.ts__template__ +1 -1
- package/schematics/src/state/state.factory.js +1 -1
- package/schematics/src/state/state.factory.js.map +1 -1
- package/schematics/src/store/files/__name__.actions.ts__template__ +3 -3
- package/schematics/src/store/files/__name__.state.ts__template__ +2 -2
- package/schematics/src/store/store.factory.js +1 -1
- package/schematics/src/store/store.factory.js.map +1 -1
- package/schematics/src/utils/common/lib.config.js +1 -1
- package/schematics/src/utils/common/lib.config.js.map +1 -1
- package/schematics/src/utils/ng-utils/project.js +6 -3
- package/schematics/src/utils/ng-utils/project.js.map +1 -1
- package/schematics/src/utils/ng-utils/standalone/code_block.d.ts +2 -2
- package/src/actions/symbols.d.ts +1 -1
- package/src/decorators/select/symbols.d.ts +1 -1
- package/src/decorators/selector/symbols.d.ts +2 -2
- package/src/internal/internals.d.ts +4 -4
- package/src/operators/of-action.d.ts +2 -2
- package/src/selectors/create-model-selector.d.ts +2 -2
- package/src/selectors/create-pick-selector.d.ts +1 -1
- package/src/selectors/create-property-selectors.d.ts +1 -1
- package/src/selectors/create-selector.d.ts +1 -1
- package/src/selectors/selector-types.util.d.ts +5 -5
- package/src/state-token/symbols.d.ts +3 -3
- package/src/symbols.d.ts +6 -6
- package/src/utils/compose.d.ts +1 -1
- package/esm2020/internals/initial-state.mjs +0 -18
- package/esm2020/src/actions/actions.mjs +0 -16
- package/esm2020/src/decorators/select/select-factory.mjs +0 -29
- package/esm2020/src/decorators/selector/selector.mjs +0 -32
- package/esm2020/src/decorators/selector-options.mjs +0 -21
- package/esm2020/src/internal/state-factory.mjs +0 -292
- package/esm2020/src/selectors/selector-utils.mjs +0 -74
- package/esm2020/src/utils/compose.mjs +0 -26
- package/fesm2015/ngxs-store-internals-testing.mjs +0 -183
- package/fesm2015/ngxs-store-internals-testing.mjs.map +0 -1
- package/fesm2015/ngxs-store-internals.mjs +0 -114
- package/fesm2015/ngxs-store-internals.mjs.map +0 -1
- package/fesm2015/ngxs-store-operators.mjs +0 -202
- package/fesm2015/ngxs-store-operators.mjs.map +0 -1
- package/fesm2015/ngxs-store.mjs +0 -2454
- package/fesm2015/ngxs-store.mjs.map +0 -1
- package/fesm2020/ngxs-store-internals.mjs.map +0 -1
- package/fesm2020/ngxs-store-operators.mjs.map +0 -1
- package/fesm2020/ngxs-store.mjs.map +0 -1
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/index.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/internal-tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/ngxs-store-internals.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/src/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/fresh-platform.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/ngxs-store-internals-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/ngxs.setup.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/skip-console-logging.mjs +0 -0
- /package/{esm2020 → esm2022}/internals/testing/symbol.mjs +0 -0
- /package/{esm2020 → esm2022}/ngxs-store.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/compose.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/iif.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/index.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/ngxs-store-operators.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/patch.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/remove-item.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/types.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/update-item.mjs +0 -0
- /package/{esm2020 → esm2022}/operators/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/src/actions/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/src/configs/messages.config.mjs +0 -0
- /package/{esm2020 → esm2022}/src/decorators/action.mjs +0 -0
- /package/{esm2020 → esm2022}/src/decorators/select/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/src/decorators/state.mjs +0 -0
- /package/{esm2020 → esm2022}/src/dev-features/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/src/execution/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/src/internal/custom-rxjs-subjects.mjs +0 -0
- /package/{esm2020 → esm2022}/src/internal/internals.mjs +0 -0
- /package/{esm2020 → esm2022}/src/internal/state-operators.mjs +0 -0
- /package/{esm2020 → esm2022}/src/ivy/ivy-enabled-in-dev-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/src/operators/leave-ngxs.mjs +0 -0
- /package/{esm2020 → esm2022}/src/plugin_api.mjs +0 -0
- /package/{esm2020 → esm2022}/src/private_api.mjs +0 -0
- /package/{esm2020 → esm2022}/src/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/src/public_to_deprecate.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/create-model-selector.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/create-pick-selector.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/create-property-selectors.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/create-selector.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/selector-checks.util.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/selector-models.mjs +0 -0
- /package/{esm2020 → esm2022}/src/selectors/selector-types.util.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/feature-providers.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/initializers.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/plugin.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/provide-states.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/provide-store.mjs +0 -0
- /package/{esm2020 → esm2022}/src/standalone-features/root-providers.mjs +0 -0
- /package/{esm2020 → esm2022}/src/state-token/state-token.mjs +0 -0
- /package/{esm2020 → esm2022}/src/state-token/symbols.mjs +0 -0
- /package/{esm2020 → esm2022}/src/utils/store-validators.mjs +0 -0
- /package/{fesm2020 → fesm2022}/ngxs-store-operators.mjs +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, NgZone, PLATFORM_ID, Inject, InjectionToken, inject, INJECTOR, ɵglobal, ErrorHandler, Optional, SkipSelf, ENVIRONMENT_INITIALIZER, NgModule, APP_BOOTSTRAP_LISTENER, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Injectable, NgZone, PLATFORM_ID, Inject, InjectionToken, inject, INJECTOR, ɵglobal as _global, ErrorHandler, Optional, SkipSelf, ɵisPromise as _isPromise, ENVIRONMENT_INITIALIZER, NgModule, APP_BOOTSTRAP_LISTENER, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { Observable, Subject, BehaviorSubject, of, forkJoin, throwError, EMPTY, from, isObservable, ReplaySubject } from 'rxjs';
|
|
4
4
|
import { share, shareReplay, filter, take, exhaustMap, map, mergeMap, defaultIfEmpty, catchError, takeUntil, distinctUntilChanged, tap, startWith, pairwise } from 'rxjs/operators';
|
|
5
5
|
import * as i5 from '@ngxs/store/internals';
|
|
6
|
-
import { ɵMETA_KEY, ɵSELECTOR_META_KEY, memoize, INITIAL_STATE_TOKEN, NgxsBootstrapper, ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY, ɵMETA_OPTIONS_KEY } from '@ngxs/store/internals';
|
|
6
|
+
import { ɵMETA_KEY as _META_KEY, ɵSELECTOR_META_KEY as _SELECTOR_META_KEY, memoize, INITIAL_STATE_TOKEN, NgxsBootstrapper, ɵNGXS_STATE_CONTEXT_FACTORY as _NGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY as _NGXS_STATE_FACTORY, ɵMETA_OPTIONS_KEY as _META_OPTIONS_KEY } from '@ngxs/store/internals';
|
|
7
7
|
import { isPlatformServer } from '@angular/common';
|
|
8
8
|
import { isStateOperator } from '@ngxs/store/operators';
|
|
9
9
|
|
|
@@ -14,10 +14,10 @@ class NoopNgxsExecutionStrategy {
|
|
|
14
14
|
leave(func) {
|
|
15
15
|
return func();
|
|
16
16
|
}
|
|
17
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NoopNgxsExecutionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
18
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NoopNgxsExecutionStrategy, providedIn: 'root' }); }
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
/** @nocollapse */ NoopNgxsExecutionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NoopNgxsExecutionStrategy, providedIn: 'root' });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NoopNgxsExecutionStrategy, decorators: [{
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NoopNgxsExecutionStrategy, decorators: [{
|
|
21
21
|
type: Injectable,
|
|
22
22
|
args: [{ providedIn: 'root' }]
|
|
23
23
|
}] });
|
|
@@ -101,16 +101,16 @@ class DispatchOutsideZoneNgxsExecutionStrategy {
|
|
|
101
101
|
}
|
|
102
102
|
return func();
|
|
103
103
|
}
|
|
104
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DispatchOutsideZoneNgxsExecutionStrategy, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DispatchOutsideZoneNgxsExecutionStrategy, providedIn: 'root' }); }
|
|
104
106
|
}
|
|
105
|
-
|
|
106
|
-
/** @nocollapse */ DispatchOutsideZoneNgxsExecutionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DispatchOutsideZoneNgxsExecutionStrategy, providedIn: 'root' });
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DispatchOutsideZoneNgxsExecutionStrategy, decorators: [{
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DispatchOutsideZoneNgxsExecutionStrategy, decorators: [{
|
|
108
108
|
type: Injectable,
|
|
109
109
|
args: [{ providedIn: 'root' }]
|
|
110
|
-
}], ctorParameters:
|
|
110
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
|
|
111
111
|
type: Inject,
|
|
112
112
|
args: [PLATFORM_ID]
|
|
113
|
-
}] }]
|
|
113
|
+
}] }] });
|
|
114
114
|
// Caretaker note: this should exist as a separate function and not a class method,
|
|
115
115
|
// since class methods are not tree-shakable.
|
|
116
116
|
function verifyZoneIsNotNooped(ngZone) {
|
|
@@ -141,7 +141,7 @@ const NGXS_EXECUTION_STRATEGY = new InjectionToken(NG_DEV_MODE$4 ? 'NGXS_EXECUTI
|
|
|
141
141
|
const executionStrategy = injector.get(CUSTOM_NGXS_EXECUTION_STRATEGY);
|
|
142
142
|
return executionStrategy
|
|
143
143
|
? injector.get(executionStrategy)
|
|
144
|
-
: injector.get(typeof
|
|
144
|
+
: injector.get(typeof _global.Zone !== 'undefined'
|
|
145
145
|
? DispatchOutsideZoneNgxsExecutionStrategy
|
|
146
146
|
: NoopNgxsExecutionStrategy);
|
|
147
147
|
}
|
|
@@ -157,16 +157,16 @@ class InternalNgxsExecutionStrategy {
|
|
|
157
157
|
leave(func) {
|
|
158
158
|
return this._executionStrategy.leave(func);
|
|
159
159
|
}
|
|
160
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalNgxsExecutionStrategy, deps: [{ token: NGXS_EXECUTION_STRATEGY }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
161
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalNgxsExecutionStrategy, providedIn: 'root' }); }
|
|
160
162
|
}
|
|
161
|
-
|
|
162
|
-
/** @nocollapse */ InternalNgxsExecutionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalNgxsExecutionStrategy, providedIn: 'root' });
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalNgxsExecutionStrategy, decorators: [{
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalNgxsExecutionStrategy, decorators: [{
|
|
164
164
|
type: Injectable,
|
|
165
165
|
args: [{ providedIn: 'root' }]
|
|
166
|
-
}], ctorParameters:
|
|
166
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
167
167
|
type: Inject,
|
|
168
168
|
args: [NGXS_EXECUTION_STRATEGY]
|
|
169
|
-
}] }]
|
|
169
|
+
}] }] });
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* Composes a array of functions from left to right. Example:
|
|
@@ -268,13 +268,13 @@ class InternalErrorReporter {
|
|
|
268
268
|
}
|
|
269
269
|
catch { }
|
|
270
270
|
}
|
|
271
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalErrorReporter, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
272
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalErrorReporter, providedIn: 'root' }); }
|
|
271
273
|
}
|
|
272
|
-
|
|
273
|
-
/** @nocollapse */ InternalErrorReporter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalErrorReporter, providedIn: 'root' });
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalErrorReporter, decorators: [{
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalErrorReporter, decorators: [{
|
|
275
275
|
type: Injectable,
|
|
276
276
|
args: [{ providedIn: 'root' }]
|
|
277
|
-
}], ctorParameters:
|
|
277
|
+
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
280
|
* This wraps the provided function, and will enforce the following:
|
|
@@ -374,10 +374,10 @@ class InternalActions extends OrderedSubject {
|
|
|
374
374
|
ngOnDestroy() {
|
|
375
375
|
this.complete();
|
|
376
376
|
}
|
|
377
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalActions, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
378
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalActions, providedIn: 'root' }); }
|
|
377
379
|
}
|
|
378
|
-
|
|
379
|
-
/** @nocollapse */ InternalActions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalActions, providedIn: 'root' });
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalActions, decorators: [{
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalActions, decorators: [{
|
|
381
381
|
type: Injectable,
|
|
382
382
|
args: [{ providedIn: 'root' }]
|
|
383
383
|
}] });
|
|
@@ -403,13 +403,13 @@ class Actions extends Observable {
|
|
|
403
403
|
observer.add(childSubscription);
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Actions, deps: [{ token: InternalActions }, { token: InternalNgxsExecutionStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
407
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Actions, providedIn: 'root' }); }
|
|
406
408
|
}
|
|
407
|
-
|
|
408
|
-
/** @nocollapse */ Actions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: Actions, providedIn: 'root' });
|
|
409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: Actions, decorators: [{
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Actions, decorators: [{
|
|
410
410
|
type: Injectable,
|
|
411
411
|
args: [{ providedIn: 'root' }]
|
|
412
|
-
}], ctorParameters:
|
|
412
|
+
}], ctorParameters: () => [{ type: InternalActions }, { type: InternalNgxsExecutionStrategy }] });
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
415
|
* BehaviorSubject of the entire state.
|
|
@@ -427,13 +427,13 @@ class StateStream extends OrderedBehaviorSubject {
|
|
|
427
427
|
// or `store.subscribe`, it can result in significant memory leaks in SSR apps.
|
|
428
428
|
this.complete();
|
|
429
429
|
}
|
|
430
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateStream, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
431
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateStream, providedIn: 'root' }); }
|
|
430
432
|
}
|
|
431
|
-
|
|
432
|
-
/** @nocollapse */ StateStream.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateStream, providedIn: 'root' });
|
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateStream, decorators: [{
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateStream, decorators: [{
|
|
434
434
|
type: Injectable,
|
|
435
435
|
args: [{ providedIn: 'root' }]
|
|
436
|
-
}], ctorParameters:
|
|
436
|
+
}], ctorParameters: () => [] });
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
439
|
* Returns the type from an action instance/class.
|
|
@@ -566,16 +566,16 @@ class NgxsConfig {
|
|
|
566
566
|
};
|
|
567
567
|
this.executionStrategy = DispatchOutsideZoneNgxsExecutionStrategy;
|
|
568
568
|
}
|
|
569
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
570
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsConfig, providedIn: 'root', useFactory: () => mergeDeep(new NgxsConfig(), inject(NGXS_OPTIONS)) }); }
|
|
569
571
|
}
|
|
570
|
-
|
|
571
|
-
/** @nocollapse */ NgxsConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsConfig, providedIn: 'root', useFactory: () => mergeDeep(new NgxsConfig(), inject(NGXS_OPTIONS)) });
|
|
572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsConfig, decorators: [{
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsConfig, decorators: [{
|
|
573
573
|
type: Injectable,
|
|
574
574
|
args: [{
|
|
575
575
|
providedIn: 'root',
|
|
576
576
|
useFactory: () => mergeDeep(new NgxsConfig(), inject(NGXS_OPTIONS))
|
|
577
577
|
}]
|
|
578
|
-
}], ctorParameters:
|
|
578
|
+
}], ctorParameters: () => [] });
|
|
579
579
|
/**
|
|
580
580
|
* Represents a basic change from a previous to a new value for a single state instance.
|
|
581
581
|
* Passed as a value in a NgxsSimpleChanges object to the ngxsOnChanges hook.
|
|
@@ -606,12 +606,12 @@ class PluginManager {
|
|
|
606
606
|
const handlers = this._pluginHandlers || [];
|
|
607
607
|
return handlers.map((plugin) => (plugin.handle ? plugin.handle.bind(plugin) : plugin));
|
|
608
608
|
}
|
|
609
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: PluginManager, deps: [{ token: PluginManager, optional: true, skipSelf: true }, { token: NGXS_PLUGINS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
610
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: PluginManager }); }
|
|
609
611
|
}
|
|
610
|
-
|
|
611
|
-
/** @nocollapse */ PluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: PluginManager });
|
|
612
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: PluginManager, decorators: [{
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: PluginManager, decorators: [{
|
|
613
613
|
type: Injectable
|
|
614
|
-
}], ctorParameters:
|
|
614
|
+
}], ctorParameters: () => [{ type: PluginManager, decorators: [{
|
|
615
615
|
type: Optional
|
|
616
616
|
}, {
|
|
617
617
|
type: SkipSelf
|
|
@@ -620,7 +620,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
620
620
|
args: [NGXS_PLUGINS]
|
|
621
621
|
}, {
|
|
622
622
|
type: Optional
|
|
623
|
-
}] }]
|
|
623
|
+
}] }] });
|
|
624
624
|
|
|
625
625
|
/**
|
|
626
626
|
* Internal Action result stream that is emitted when an action is completed.
|
|
@@ -629,10 +629,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
629
629
|
* The dispatcher then asynchronously pushes the result from this stream onto the main action stream as a result.
|
|
630
630
|
*/
|
|
631
631
|
class InternalDispatchedActionResults extends Subject {
|
|
632
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatchedActionResults, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
633
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatchedActionResults, providedIn: 'root' }); }
|
|
632
634
|
}
|
|
633
|
-
|
|
634
|
-
/** @nocollapse */ InternalDispatchedActionResults.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalDispatchedActionResults, providedIn: 'root' });
|
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalDispatchedActionResults, decorators: [{
|
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatchedActionResults, decorators: [{
|
|
636
636
|
type: Injectable,
|
|
637
637
|
args: [{ providedIn: 'root' }]
|
|
638
638
|
}] });
|
|
@@ -702,13 +702,13 @@ class InternalDispatcher {
|
|
|
702
702
|
}))
|
|
703
703
|
.pipe(shareReplay());
|
|
704
704
|
}
|
|
705
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatcher, deps: [{ token: InternalActions }, { token: InternalDispatchedActionResults }, { token: PluginManager }, { token: StateStream }, { token: InternalNgxsExecutionStrategy }, { token: InternalErrorReporter }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
706
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatcher, providedIn: 'root' }); }
|
|
705
707
|
}
|
|
706
|
-
|
|
707
|
-
/** @nocollapse */ InternalDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalDispatcher, providedIn: 'root' });
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalDispatcher, decorators: [{
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalDispatcher, decorators: [{
|
|
709
709
|
type: Injectable,
|
|
710
710
|
args: [{ providedIn: 'root' }]
|
|
711
|
-
}], ctorParameters:
|
|
711
|
+
}], ctorParameters: () => [{ type: InternalActions }, { type: InternalDispatchedActionResults }, { type: PluginManager }, { type: StateStream }, { type: InternalNgxsExecutionStrategy }, { type: InternalErrorReporter }] });
|
|
712
712
|
|
|
713
713
|
/**
|
|
714
714
|
* Object freeze code
|
|
@@ -764,13 +764,13 @@ class InternalStateOperations {
|
|
|
764
764
|
// Set the state to the current + new
|
|
765
765
|
stateOperations.setState({ ...currentState, ...results.defaults });
|
|
766
766
|
}
|
|
767
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalStateOperations, deps: [{ token: StateStream }, { token: InternalDispatcher }, { token: NgxsConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
768
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalStateOperations, providedIn: 'root' }); }
|
|
767
769
|
}
|
|
768
|
-
|
|
769
|
-
/** @nocollapse */ InternalStateOperations.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalStateOperations, providedIn: 'root' });
|
|
770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: InternalStateOperations, decorators: [{
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: InternalStateOperations, decorators: [{
|
|
771
771
|
type: Injectable,
|
|
772
772
|
args: [{ providedIn: 'root' }]
|
|
773
|
-
}], ctorParameters:
|
|
773
|
+
}], ctorParameters: () => [{ type: StateStream }, { type: InternalDispatcher }, { type: NgxsConfig }] });
|
|
774
774
|
function ensureStateAndActionsAreImmutable(root) {
|
|
775
775
|
return {
|
|
776
776
|
getState: () => root.getState(),
|
|
@@ -790,7 +790,7 @@ function ensureStateAndActionsAreImmutable(root) {
|
|
|
790
790
|
* @ignore
|
|
791
791
|
*/
|
|
792
792
|
function ensureStoreMetadata$1(target) {
|
|
793
|
-
if (!target.hasOwnProperty(
|
|
793
|
+
if (!target.hasOwnProperty(_META_KEY)) {
|
|
794
794
|
const defaultMetadata = {
|
|
795
795
|
name: null,
|
|
796
796
|
actions: {},
|
|
@@ -801,7 +801,7 @@ function ensureStoreMetadata$1(target) {
|
|
|
801
801
|
},
|
|
802
802
|
children: []
|
|
803
803
|
};
|
|
804
|
-
Object.defineProperty(target,
|
|
804
|
+
Object.defineProperty(target, _META_KEY, { value: defaultMetadata });
|
|
805
805
|
}
|
|
806
806
|
return getStoreMetadata$1(target);
|
|
807
807
|
}
|
|
@@ -811,7 +811,7 @@ function ensureStoreMetadata$1(target) {
|
|
|
811
811
|
* @ignore
|
|
812
812
|
*/
|
|
813
813
|
function getStoreMetadata$1(target) {
|
|
814
|
-
return target[
|
|
814
|
+
return target[_META_KEY];
|
|
815
815
|
}
|
|
816
816
|
/**
|
|
817
817
|
* Ensures metadata is attached to the selector and returns it.
|
|
@@ -819,7 +819,7 @@ function getStoreMetadata$1(target) {
|
|
|
819
819
|
* @ignore
|
|
820
820
|
*/
|
|
821
821
|
function ensureSelectorMetadata$1(target) {
|
|
822
|
-
if (!target.hasOwnProperty(
|
|
822
|
+
if (!target.hasOwnProperty(_SELECTOR_META_KEY)) {
|
|
823
823
|
const defaultMetadata = {
|
|
824
824
|
makeRootSelector: null,
|
|
825
825
|
originalFn: null,
|
|
@@ -827,7 +827,7 @@ function ensureSelectorMetadata$1(target) {
|
|
|
827
827
|
selectorName: null,
|
|
828
828
|
getSelectorOptions: () => ({})
|
|
829
829
|
};
|
|
830
|
-
Object.defineProperty(target,
|
|
830
|
+
Object.defineProperty(target, _SELECTOR_META_KEY, { value: defaultMetadata });
|
|
831
831
|
}
|
|
832
832
|
return getSelectorMetadata$1(target);
|
|
833
833
|
}
|
|
@@ -837,7 +837,7 @@ function ensureSelectorMetadata$1(target) {
|
|
|
837
837
|
* @ignore
|
|
838
838
|
*/
|
|
839
839
|
function getSelectorMetadata$1(target) {
|
|
840
|
-
return target[
|
|
840
|
+
return target[_SELECTOR_META_KEY];
|
|
841
841
|
}
|
|
842
842
|
/**
|
|
843
843
|
* Get a deeply nested value. Example:
|
|
@@ -913,10 +913,10 @@ function buildGraph(stateClasses) {
|
|
|
913
913
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !meta) {
|
|
914
914
|
throw new Error(`Child state not found: ${stateClass}. \r\nYou may have forgotten to add states to module`);
|
|
915
915
|
}
|
|
916
|
-
return meta[
|
|
916
|
+
return meta[_META_KEY].name;
|
|
917
917
|
};
|
|
918
918
|
return stateClasses.reduce((result, stateClass) => {
|
|
919
|
-
const { name, children } = stateClass[
|
|
919
|
+
const { name, children } = stateClass[_META_KEY];
|
|
920
920
|
result[name] = (children || []).map(findName);
|
|
921
921
|
return result;
|
|
922
922
|
}, {});
|
|
@@ -933,7 +933,7 @@ function buildGraph(stateClasses) {
|
|
|
933
933
|
*/
|
|
934
934
|
function nameToState(states) {
|
|
935
935
|
return states.reduce((result, stateClass) => {
|
|
936
|
-
const meta = stateClass[
|
|
936
|
+
const meta = stateClass[_META_KEY];
|
|
937
937
|
result[meta.name] = stateClass;
|
|
938
938
|
return result;
|
|
939
939
|
}, {});
|
|
@@ -1036,7 +1036,7 @@ function createRootSelectorFactory(selectorMetaData, selectors, memoizedSelector
|
|
|
1036
1036
|
const { argumentSelectorFunctions, selectorOptions } = getRuntimeSelectorInfo(context, selectorMetaData, selectors);
|
|
1037
1037
|
return function selectFromRoot(rootState) {
|
|
1038
1038
|
// Determine arguments from the app state using the selectors
|
|
1039
|
-
const results = argumentSelectorFunctions.map(
|
|
1039
|
+
const results = argumentSelectorFunctions.map(argFn => argFn(rootState));
|
|
1040
1040
|
// if the lambda tries to access a something on the
|
|
1041
1041
|
// state that doesn't exist, it will throw a TypeError.
|
|
1042
1042
|
// since this is quite usual behaviour, we simply return undefined if so.
|
|
@@ -1070,13 +1070,13 @@ function getRuntimeSelectorInfo(context, selectorMetaData, selectors = []) {
|
|
|
1070
1070
|
const localSelectorOptions = selectorMetaData.getSelectorOptions();
|
|
1071
1071
|
const selectorOptions = context.getSelectorOptions(localSelectorOptions);
|
|
1072
1072
|
const selectorsToApply = getSelectorsToApply(selectors, selectorOptions, selectorMetaData.containerClass);
|
|
1073
|
-
const argumentSelectorFunctions = selectorsToApply.map(
|
|
1073
|
+
const argumentSelectorFunctions = selectorsToApply.map(selector => {
|
|
1074
1074
|
const factory = getRootSelectorFactory(selector);
|
|
1075
1075
|
return factory(context);
|
|
1076
1076
|
});
|
|
1077
1077
|
return {
|
|
1078
1078
|
selectorOptions,
|
|
1079
|
-
argumentSelectorFunctions
|
|
1079
|
+
argumentSelectorFunctions
|
|
1080
1080
|
};
|
|
1081
1081
|
}
|
|
1082
1082
|
function getSelectorsToApply(selectors = [], selectorOptions, containerClass) {
|
|
@@ -1256,13 +1256,13 @@ class StateContextFactory {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateContextFactory, deps: [{ token: InternalStateOperations }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1260
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateContextFactory, providedIn: 'root' }); }
|
|
1259
1261
|
}
|
|
1260
|
-
|
|
1261
|
-
/** @nocollapse */ StateContextFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateContextFactory, providedIn: 'root' });
|
|
1262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateContextFactory, decorators: [{
|
|
1262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateContextFactory, decorators: [{
|
|
1263
1263
|
type: Injectable,
|
|
1264
1264
|
args: [{ providedIn: 'root' }]
|
|
1265
|
-
}], ctorParameters:
|
|
1265
|
+
}], ctorParameters: () => [{ type: InternalStateOperations }] });
|
|
1266
1266
|
function setStateValue(root, currentAppState, newValue, path) {
|
|
1267
1267
|
const newAppState = setValue(currentAppState, path, newValue);
|
|
1268
1268
|
root.setState(newAppState);
|
|
@@ -1334,17 +1334,17 @@ function jit_hasInjectableAnnotation(stateClass) {
|
|
|
1334
1334
|
* Init action
|
|
1335
1335
|
*/
|
|
1336
1336
|
class InitState {
|
|
1337
|
+
static { this.type = '@@INIT'; }
|
|
1337
1338
|
}
|
|
1338
|
-
InitState.type = '@@INIT';
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Update action
|
|
1341
1341
|
*/
|
|
1342
1342
|
class UpdateState {
|
|
1343
|
+
static { this.type = '@@UPDATE_STATE'; }
|
|
1343
1344
|
constructor(addedStates) {
|
|
1344
1345
|
this.addedStates = addedStates;
|
|
1345
1346
|
}
|
|
1346
1347
|
}
|
|
1347
|
-
UpdateState.type = '@@UPDATE_STATE';
|
|
1348
1348
|
|
|
1349
1349
|
const NGXS_DEVELOPMENT_OPTIONS = new InjectionToken('NGXS_DEVELOPMENT_OPTIONS', {
|
|
1350
1350
|
providedIn: 'root',
|
|
@@ -1382,15 +1382,15 @@ class NgxsUnhandledActionsLogger {
|
|
|
1382
1382
|
: action.type;
|
|
1383
1383
|
console.warn(`The ${action} action has been dispatched but hasn't been handled. This may happen if the state with an action handler for this action is not registered.`);
|
|
1384
1384
|
}
|
|
1385
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsUnhandledActionsLogger, deps: [{ token: NGXS_DEVELOPMENT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1386
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsUnhandledActionsLogger }); }
|
|
1385
1387
|
}
|
|
1386
|
-
|
|
1387
|
-
/** @nocollapse */ NgxsUnhandledActionsLogger.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsUnhandledActionsLogger });
|
|
1388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsUnhandledActionsLogger, decorators: [{
|
|
1388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsUnhandledActionsLogger, decorators: [{
|
|
1389
1389
|
type: Injectable
|
|
1390
|
-
}], ctorParameters:
|
|
1390
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1391
1391
|
type: Inject,
|
|
1392
1392
|
args: [NGXS_DEVELOPMENT_OPTIONS]
|
|
1393
|
-
}] }]
|
|
1393
|
+
}] }] });
|
|
1394
1394
|
|
|
1395
1395
|
const NG_DEV_MODE$2 = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1396
1396
|
/**
|
|
@@ -1498,7 +1498,7 @@ class StateFactory {
|
|
|
1498
1498
|
for (const name of sortedStates) {
|
|
1499
1499
|
const stateClass = nameGraph[name];
|
|
1500
1500
|
const path = paths[name];
|
|
1501
|
-
const meta = stateClass[
|
|
1501
|
+
const meta = stateClass[_META_KEY];
|
|
1502
1502
|
this.addRuntimeInfoToMeta(meta, path);
|
|
1503
1503
|
// Note: previously we called `ensureStateClassIsInjectable` within the
|
|
1504
1504
|
// `State` decorator. This check is moved here because the `ɵprov` property
|
|
@@ -1566,7 +1566,13 @@ class StateFactory {
|
|
|
1566
1566
|
const stateContext = this._stateContextFactory.createStateContext(metadata);
|
|
1567
1567
|
try {
|
|
1568
1568
|
let result = metadata.instance[actionMeta.fn](stateContext, action);
|
|
1569
|
-
|
|
1569
|
+
// We need to use `isPromise` instead of checking whether
|
|
1570
|
+
// `result instanceof Promise`. In zone.js patched environments, `global.Promise`
|
|
1571
|
+
// is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js
|
|
1572
|
+
// for certain reasons, might not work with `instanceof`. For instance, the dynamic
|
|
1573
|
+
// import returns a native promise (not a `ZoneAwarePromise`), causing this check to
|
|
1574
|
+
// be falsy.
|
|
1575
|
+
if (_isPromise(result)) {
|
|
1570
1576
|
result = from(result);
|
|
1571
1577
|
}
|
|
1572
1578
|
if (isObservable(result)) {
|
|
@@ -1579,7 +1585,7 @@ class StateFactory {
|
|
|
1579
1585
|
// then the action will be canceled.
|
|
1580
1586
|
// See https://github.com/ngxs/store/issues/1568
|
|
1581
1587
|
result = result.pipe(mergeMap((value) => {
|
|
1582
|
-
if (value
|
|
1588
|
+
if (_isPromise(value)) {
|
|
1583
1589
|
return from(value);
|
|
1584
1590
|
}
|
|
1585
1591
|
if (isObservable(value)) {
|
|
@@ -1649,12 +1655,12 @@ class StateFactory {
|
|
|
1649
1655
|
// its lifecycle is in 'bootstrapped' state.
|
|
1650
1656
|
return this.statesByName[name] && valueIsBootstrappedInInitialState;
|
|
1651
1657
|
}
|
|
1658
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateFactory, deps: [{ token: i0.Injector }, { token: NgxsConfig }, { token: StateFactory, optional: true, skipSelf: true }, { token: InternalActions }, { token: InternalDispatchedActionResults }, { token: StateContextFactory }, { token: INITIAL_STATE_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1659
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateFactory }); }
|
|
1652
1660
|
}
|
|
1653
|
-
|
|
1654
|
-
/** @nocollapse */ StateFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateFactory });
|
|
1655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: StateFactory, decorators: [{
|
|
1661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: StateFactory, decorators: [{
|
|
1656
1662
|
type: Injectable
|
|
1657
|
-
}], ctorParameters:
|
|
1663
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: NgxsConfig }, { type: StateFactory, decorators: [{
|
|
1658
1664
|
type: Optional
|
|
1659
1665
|
}, {
|
|
1660
1666
|
type: SkipSelf
|
|
@@ -1663,7 +1669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
1663
1669
|
}, {
|
|
1664
1670
|
type: Inject,
|
|
1665
1671
|
args: [INITIAL_STATE_TOKEN]
|
|
1666
|
-
}] }]
|
|
1672
|
+
}] }] });
|
|
1667
1673
|
|
|
1668
1674
|
// tslint:disable:unified-signatures
|
|
1669
1675
|
class Store {
|
|
@@ -1743,24 +1749,26 @@ class Store {
|
|
|
1743
1749
|
this._stateStream.next(storeValues);
|
|
1744
1750
|
}
|
|
1745
1751
|
}
|
|
1752
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Store, deps: [{ token: StateStream }, { token: InternalStateOperations }, { token: NgxsConfig }, { token: InternalNgxsExecutionStrategy }, { token: StateFactory }, { token: INITIAL_STATE_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1753
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Store, providedIn: 'root' }); }
|
|
1746
1754
|
}
|
|
1747
|
-
|
|
1748
|
-
/** @nocollapse */ Store.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: Store, providedIn: 'root' });
|
|
1749
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: Store, decorators: [{
|
|
1755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: Store, decorators: [{
|
|
1750
1756
|
type: Injectable,
|
|
1751
1757
|
args: [{ providedIn: 'root' }]
|
|
1752
|
-
}], ctorParameters:
|
|
1758
|
+
}], ctorParameters: () => [{ type: StateStream }, { type: InternalStateOperations }, { type: NgxsConfig }, { type: InternalNgxsExecutionStrategy }, { type: StateFactory }, { type: undefined, decorators: [{
|
|
1753
1759
|
type: Optional
|
|
1754
1760
|
}, {
|
|
1755
1761
|
type: Inject,
|
|
1756
1762
|
args: [INITIAL_STATE_TOKEN]
|
|
1757
|
-
}] }]
|
|
1763
|
+
}] }] });
|
|
1758
1764
|
|
|
1759
1765
|
/**
|
|
1760
1766
|
* Allows the select decorator to get access to the DI store, this is used internally
|
|
1761
1767
|
* in `@Select` decorator.
|
|
1762
1768
|
*/
|
|
1763
1769
|
class SelectFactory {
|
|
1770
|
+
static { this.store = null; }
|
|
1771
|
+
static { this.config = null; }
|
|
1764
1772
|
constructor(store, config) {
|
|
1765
1773
|
SelectFactory.store = store;
|
|
1766
1774
|
SelectFactory.config = config;
|
|
@@ -1769,15 +1777,13 @@ class SelectFactory {
|
|
|
1769
1777
|
SelectFactory.store = null;
|
|
1770
1778
|
SelectFactory.config = null;
|
|
1771
1779
|
}
|
|
1780
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: SelectFactory, deps: [{ token: Store }, { token: NgxsConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1781
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: SelectFactory, providedIn: 'root' }); }
|
|
1772
1782
|
}
|
|
1773
|
-
|
|
1774
|
-
SelectFactory.config = null;
|
|
1775
|
-
/** @nocollapse */ SelectFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: SelectFactory, deps: [{ token: Store }, { token: NgxsConfig }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1776
|
-
/** @nocollapse */ SelectFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: SelectFactory, providedIn: 'root' });
|
|
1777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: SelectFactory, decorators: [{
|
|
1783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: SelectFactory, decorators: [{
|
|
1778
1784
|
type: Injectable,
|
|
1779
1785
|
args: [{ providedIn: 'root' }]
|
|
1780
|
-
}], ctorParameters:
|
|
1786
|
+
}], ctorParameters: () => [{ type: Store }, { type: NgxsConfig }] });
|
|
1781
1787
|
|
|
1782
1788
|
const NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1783
1789
|
class LifecycleStateManager {
|
|
@@ -1850,13 +1856,13 @@ class LifecycleStateManager {
|
|
|
1850
1856
|
_getStateContext(mappedStore) {
|
|
1851
1857
|
return this._stateContextFactory.createStateContext(mappedStore);
|
|
1852
1858
|
}
|
|
1859
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LifecycleStateManager, deps: [{ token: Store }, { token: InternalErrorReporter }, { token: InternalStateOperations }, { token: StateContextFactory }, { token: i5.NgxsBootstrapper }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1860
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LifecycleStateManager, providedIn: 'root' }); }
|
|
1853
1861
|
}
|
|
1854
|
-
|
|
1855
|
-
/** @nocollapse */ LifecycleStateManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LifecycleStateManager, providedIn: 'root' });
|
|
1856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LifecycleStateManager, decorators: [{
|
|
1862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LifecycleStateManager, decorators: [{
|
|
1857
1863
|
type: Injectable,
|
|
1858
1864
|
args: [{ providedIn: 'root' }]
|
|
1859
|
-
}], ctorParameters:
|
|
1865
|
+
}], ctorParameters: () => [{ type: Store }, { type: InternalErrorReporter }, { type: InternalStateOperations }, { type: StateContextFactory }, { type: i5.NgxsBootstrapper }] });
|
|
1860
1866
|
|
|
1861
1867
|
const NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1862
1868
|
/**
|
|
@@ -1943,13 +1949,13 @@ class NgxsRootModule {
|
|
|
1943
1949
|
constructor() {
|
|
1944
1950
|
rootStoreInitializer();
|
|
1945
1951
|
}
|
|
1952
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1953
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: NgxsRootModule }); }
|
|
1954
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsRootModule }); }
|
|
1946
1955
|
}
|
|
1947
|
-
|
|
1948
|
-
/** @nocollapse */ NgxsRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: NgxsRootModule });
|
|
1949
|
-
/** @nocollapse */ NgxsRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsRootModule });
|
|
1950
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsRootModule, decorators: [{
|
|
1956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsRootModule, decorators: [{
|
|
1951
1957
|
type: NgModule
|
|
1952
|
-
}], ctorParameters:
|
|
1958
|
+
}], ctorParameters: () => [] });
|
|
1953
1959
|
|
|
1954
1960
|
/**
|
|
1955
1961
|
* @ignore
|
|
@@ -1958,13 +1964,13 @@ class NgxsFeatureModule {
|
|
|
1958
1964
|
constructor() {
|
|
1959
1965
|
featureStatesInitializer();
|
|
1960
1966
|
}
|
|
1967
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsFeatureModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1968
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: NgxsFeatureModule }); }
|
|
1969
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsFeatureModule }); }
|
|
1961
1970
|
}
|
|
1962
|
-
|
|
1963
|
-
/** @nocollapse */ NgxsFeatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: NgxsFeatureModule });
|
|
1964
|
-
/** @nocollapse */ NgxsFeatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsFeatureModule });
|
|
1965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsFeatureModule, decorators: [{
|
|
1971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsFeatureModule, decorators: [{
|
|
1966
1972
|
type: NgModule
|
|
1967
|
-
}], ctorParameters:
|
|
1973
|
+
}], ctorParameters: () => [] });
|
|
1968
1974
|
|
|
1969
1975
|
/**
|
|
1970
1976
|
* This function provides the required providers when invoking `NgxsModule.forRoot`
|
|
@@ -1996,11 +2002,11 @@ function getRootProviders(states, options) {
|
|
|
1996
2002
|
useValue: options.executionStrategy
|
|
1997
2003
|
},
|
|
1998
2004
|
{
|
|
1999
|
-
provide:
|
|
2005
|
+
provide: _NGXS_STATE_CONTEXT_FACTORY,
|
|
2000
2006
|
useExisting: StateContextFactory
|
|
2001
2007
|
},
|
|
2002
2008
|
{
|
|
2003
|
-
provide:
|
|
2009
|
+
provide: _NGXS_STATE_FACTORY,
|
|
2004
2010
|
useExisting: StateFactory
|
|
2005
2011
|
}
|
|
2006
2012
|
];
|
|
@@ -2036,11 +2042,11 @@ class NgxsModule {
|
|
|
2036
2042
|
providers: getFeatureProviders(states)
|
|
2037
2043
|
};
|
|
2038
2044
|
}
|
|
2045
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2046
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: NgxsModule }); }
|
|
2047
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsModule }); }
|
|
2039
2048
|
}
|
|
2040
|
-
|
|
2041
|
-
/** @nocollapse */ NgxsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: NgxsModule });
|
|
2042
|
-
/** @nocollapse */ NgxsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsModule });
|
|
2043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsModule, decorators: [{
|
|
2049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsModule, decorators: [{
|
|
2044
2050
|
type: NgModule
|
|
2045
2051
|
}] });
|
|
2046
2052
|
|
|
@@ -2085,11 +2091,11 @@ function State(options) {
|
|
|
2085
2091
|
const inheritedStateClass = Object.getPrototypeOf(stateClass);
|
|
2086
2092
|
const optionsWithInheritance = getStateOptions(inheritedStateClass, options);
|
|
2087
2093
|
mutateMetaData({ meta, inheritedStateClass, optionsWithInheritance });
|
|
2088
|
-
stateClass[
|
|
2094
|
+
stateClass[_META_OPTIONS_KEY] = optionsWithInheritance;
|
|
2089
2095
|
};
|
|
2090
2096
|
}
|
|
2091
2097
|
function getStateOptions(inheritedStateClass, options) {
|
|
2092
|
-
const inheritanceOptions = inheritedStateClass[
|
|
2098
|
+
const inheritanceOptions = inheritedStateClass[_META_OPTIONS_KEY] || {};
|
|
2093
2099
|
return { ...inheritanceOptions, ...options };
|
|
2094
2100
|
}
|
|
2095
2101
|
function mutateMetaData(params) {
|
|
@@ -2099,8 +2105,8 @@ function mutateMetaData(params) {
|
|
|
2099
2105
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2100
2106
|
ensureStateNameIsValid(stateName);
|
|
2101
2107
|
}
|
|
2102
|
-
if (inheritedStateClass.hasOwnProperty(
|
|
2103
|
-
const inheritedMeta = inheritedStateClass[
|
|
2108
|
+
if (inheritedStateClass.hasOwnProperty(_META_KEY)) {
|
|
2109
|
+
const inheritedMeta = inheritedStateClass[_META_KEY] || {};
|
|
2104
2110
|
meta.actions = { ...meta.actions, ...inheritedMeta.actions };
|
|
2105
2111
|
}
|
|
2106
2112
|
meta.children = children;
|
|
@@ -2168,7 +2174,7 @@ const selectorOptionsMetaAccessor = {
|
|
|
2168
2174
|
if (!target)
|
|
2169
2175
|
return;
|
|
2170
2176
|
target[SELECTOR_OPTIONS_META_KEY] = options;
|
|
2171
|
-
}
|
|
2177
|
+
}
|
|
2172
2178
|
};
|
|
2173
2179
|
function setupSelectorMetadata(originalFn, creationMetadata) {
|
|
2174
2180
|
const selectorMetaData = ensureSelectorMetadata$1(originalFn);
|
|
@@ -2189,7 +2195,7 @@ function getLocalSelectorOptions(selectorMetaData, explicitOptions) {
|
|
|
2189
2195
|
...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.containerClass) || {}),
|
|
2190
2196
|
...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.originalFn) || {}),
|
|
2191
2197
|
...(selectorMetaData.getSelectorOptions() || {}),
|
|
2192
|
-
...explicitOptions
|
|
2198
|
+
...explicitOptions
|
|
2193
2199
|
};
|
|
2194
2200
|
}
|
|
2195
2201
|
|
|
@@ -2199,7 +2205,7 @@ function getLocalSelectorOptions(selectorMetaData, explicitOptions) {
|
|
|
2199
2205
|
function SelectorOptions(options) {
|
|
2200
2206
|
return (function decorate(target, methodName, descriptor) {
|
|
2201
2207
|
if (methodName) {
|
|
2202
|
-
descriptor
|
|
2208
|
+
descriptor ||= Object.getOwnPropertyDescriptor(target, methodName);
|
|
2203
2209
|
// Method Decorator
|
|
2204
2210
|
const originalFn = descriptor.value || descriptor.originalFn;
|
|
2205
2211
|
if (originalFn) {
|
|
@@ -2235,7 +2241,7 @@ function createSelector(selectors, projector, creationMetadata) {
|
|
|
2235
2241
|
|
|
2236
2242
|
function Selector(selectors) {
|
|
2237
2243
|
return (target, key, descriptor) => {
|
|
2238
|
-
descriptor
|
|
2244
|
+
descriptor ||= Object.getOwnPropertyDescriptor(target, key);
|
|
2239
2245
|
const originalFn = descriptor?.value;
|
|
2240
2246
|
// Caretaker note: we have still left the `typeof` condition in order to avoid
|
|
2241
2247
|
// creating a breaking change for projects that still use the View Engine.
|
|
@@ -2249,13 +2255,13 @@ function Selector(selectors) {
|
|
|
2249
2255
|
selectorName: key.toString(),
|
|
2250
2256
|
getSelectorOptions() {
|
|
2251
2257
|
return {};
|
|
2252
|
-
}
|
|
2258
|
+
}
|
|
2253
2259
|
});
|
|
2254
2260
|
const newDescriptor = {
|
|
2255
2261
|
configurable: true,
|
|
2256
2262
|
get() {
|
|
2257
2263
|
return memoizedFn;
|
|
2258
|
-
}
|
|
2264
|
+
}
|
|
2259
2265
|
};
|
|
2260
2266
|
// Add hidden property to descriptor
|
|
2261
2267
|
newDescriptor['originalFn'] = originalFn;
|
|
@@ -2289,11 +2295,11 @@ class NgxsDevelopmentModule {
|
|
|
2289
2295
|
]
|
|
2290
2296
|
};
|
|
2291
2297
|
}
|
|
2298
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsDevelopmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2299
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: NgxsDevelopmentModule }); }
|
|
2300
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsDevelopmentModule }); }
|
|
2292
2301
|
}
|
|
2293
|
-
|
|
2294
|
-
/** @nocollapse */ NgxsDevelopmentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: NgxsDevelopmentModule });
|
|
2295
|
-
/** @nocollapse */ NgxsDevelopmentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsDevelopmentModule });
|
|
2296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgxsDevelopmentModule, decorators: [{
|
|
2302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: NgxsDevelopmentModule, decorators: [{
|
|
2297
2303
|
type: NgModule
|
|
2298
2304
|
}] });
|
|
2299
2305
|
|