@ngxs/store 3.8.1-dev.master-5828e37 → 3.8.1-dev.master-66dd672
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/esm2020/internals/initial-state.mjs +18 -0
- package/esm2020/internals/internal-tokens.mjs +6 -0
- package/{esm2015/internals/ngxs-bootstrapper.js → esm2020/internals/ngxs-bootstrapper.mjs} +4 -4
- package/esm2020/internals/testing/fresh-platform.mjs +72 -0
- package/{esm2015/internals/testing/helpers/ngxs-test.component.js → esm2020/internals/testing/helpers/ngxs-test.component.mjs} +4 -4
- package/esm2020/internals/testing/helpers/ngxs-test.module.mjs +20 -0
- package/{esm2015/internals/testing/ngxs.setup.js → esm2020/internals/testing/ngxs.setup.mjs} +4 -2
- package/esm2020/operators/patch.mjs +21 -0
- package/{esm2015/src/actions-stream.js → esm2020/src/actions-stream.mjs} +7 -7
- package/{esm2015/src/decorators/select/select-factory.js → esm2020/src/decorators/select/select-factory.mjs} +4 -4
- package/esm2020/src/decorators/selector/selector.mjs +32 -0
- package/esm2020/src/decorators/state.mjs +36 -0
- package/{esm2015/src/dev-features/ngxs-development.module.js → esm2020/src/dev-features/ngxs-development.module.mjs} +5 -5
- package/{esm2015/src/dev-features/ngxs-unhandled-actions-logger.js → esm2020/src/dev-features/ngxs-unhandled-actions-logger.mjs} +4 -4
- package/{esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js → esm2020/src/execution/dispatch-outside-zone-ngxs-execution-strategy.mjs} +4 -4
- package/{esm2015/src/execution/internal-ngxs-execution-strategy.js → esm2020/src/execution/internal-ngxs-execution-strategy.mjs} +4 -4
- package/{esm2015/src/execution/noop-ngxs-execution-strategy.js → esm2020/src/execution/noop-ngxs-execution-strategy.mjs} +4 -4
- package/esm2020/src/execution/symbols.mjs +27 -0
- package/{esm2015/src/internal/dispatcher.js → esm2020/src/internal/dispatcher.mjs} +11 -11
- package/{esm2015/src/internal/error-handler.js → esm2020/src/internal/error-handler.mjs} +5 -5
- package/{esm2015/src/internal/lifecycle-state-manager.js → esm2020/src/internal/lifecycle-state-manager.mjs} +4 -4
- package/{esm2015/src/internal/state-context-factory.js → esm2020/src/internal/state-context-factory.mjs} +4 -4
- package/esm2020/src/internal/state-factory.mjs +292 -0
- package/{esm2015/src/internal/state-operations.js → esm2020/src/internal/state-operations.mjs} +5 -5
- package/esm2020/src/internal/state-operators.mjs +20 -0
- package/esm2020/src/internal/state-stream.mjs +27 -0
- package/{esm2015/src/ivy/ivy-enabled-in-dev-mode.js → esm2020/src/ivy/ivy-enabled-in-dev-mode.mjs} +2 -2
- package/esm2020/src/module.mjs +27 -0
- package/esm2020/src/modules/ngxs-feature.module.mjs +18 -0
- package/esm2020/src/modules/ngxs-root.module.mjs +18 -0
- package/{esm2015/src/operators/of-action.js → esm2020/src/operators/of-action.mjs} +10 -10
- package/{esm2015/src/plugin-manager.js → esm2020/src/plugin-manager.mjs} +4 -4
- package/esm2020/src/public_api.mjs +28 -0
- package/esm2020/src/selectors/create-property-selectors.mjs +20 -0
- package/esm2020/src/selectors/selector-metadata.mjs +35 -0
- package/esm2020/src/standalone-features/feature-providers.mjs +20 -0
- package/esm2020/src/standalone-features/index.mjs +4 -0
- package/esm2020/src/standalone-features/initializers.mjs +86 -0
- package/esm2020/src/standalone-features/plugin.mjs +20 -0
- package/esm2020/src/standalone-features/provide-states.mjs +26 -0
- package/esm2020/src/standalone-features/provide-store.mjs +26 -0
- package/esm2020/src/standalone-features/root-providers.mjs +47 -0
- package/{esm2015/src/store.js → esm2020/src/store.mjs} +6 -5
- package/esm2020/src/symbols.mjs +68 -0
- package/esm2020/src/utils/utils.mjs +92 -0
- package/fesm2015/{ngxs-store-internals-testing.js → ngxs-store-internals-testing.mjs} +19 -13
- package/fesm2015/ngxs-store-internals-testing.mjs.map +1 -0
- package/fesm2015/{ngxs-store-internals.js → ngxs-store-internals.mjs} +9 -7
- package/fesm2015/ngxs-store-internals.mjs.map +1 -0
- package/fesm2015/{ngxs-store-operators.js → ngxs-store-operators.mjs} +1 -1
- package/fesm2015/ngxs-store-operators.mjs.map +1 -0
- package/fesm2015/ngxs-store.mjs +2429 -0
- package/fesm2015/ngxs-store.mjs.map +1 -0
- package/fesm2020/ngxs-store-internals-testing.mjs +180 -0
- package/fesm2020/ngxs-store-internals-testing.mjs.map +1 -0
- package/fesm2020/ngxs-store-internals.mjs +103 -0
- package/fesm2020/ngxs-store-internals.mjs.map +1 -0
- package/fesm2020/ngxs-store-operators.mjs +202 -0
- package/fesm2020/ngxs-store-operators.mjs.map +1 -0
- package/{fesm2015/ngxs-store.js → fesm2020/ngxs-store.mjs} +1153 -1015
- package/fesm2020/ngxs-store.mjs.map +1 -0
- package/internals/initial-state.d.ts +1 -1
- package/internals/testing/helpers/ngxs-test.component.d.ts +1 -1
- package/package.json +46 -10
- package/src/execution/symbols.d.ts +8 -2
- package/src/module.d.ts +0 -11
- package/src/modules/ngxs-feature.module.d.ts +2 -9
- package/src/modules/ngxs-root.module.d.ts +2 -9
- package/src/public_api.d.ts +5 -4
- package/src/standalone-features/feature-providers.d.ts +7 -0
- package/src/standalone-features/index.d.ts +3 -0
- package/src/standalone-features/initializers.d.ts +29 -0
- package/src/standalone-features/plugin.d.ts +17 -0
- package/src/standalone-features/provide-states.d.ts +18 -0
- package/src/standalone-features/provide-store.d.ts +22 -0
- package/src/standalone-features/root-providers.d.ts +8 -0
- package/src/symbols.d.ts +3 -3
- package/bundles/ngxs-store-internals-testing.umd.js +0 -547
- package/bundles/ngxs-store-internals-testing.umd.js.map +0 -1
- package/bundles/ngxs-store-internals.umd.js +0 -141
- package/bundles/ngxs-store-internals.umd.js.map +0 -1
- package/bundles/ngxs-store-operators.umd.js +0 -224
- package/bundles/ngxs-store-operators.umd.js.map +0 -1
- package/bundles/ngxs-store.umd.js +0 -2939
- package/bundles/ngxs-store.umd.js.map +0 -1
- package/esm2015/internals/initial-state.js +0 -17
- package/esm2015/internals/internal-tokens.js +0 -5
- package/esm2015/internals/testing/fresh-platform.js +0 -70
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +0 -21
- package/esm2015/operators/patch.js +0 -21
- package/esm2015/src/decorators/selector/selector.js +0 -32
- package/esm2015/src/decorators/state.js +0 -36
- package/esm2015/src/execution/symbols.js +0 -23
- package/esm2015/src/internal/state-factory.js +0 -288
- package/esm2015/src/internal/state-operators.js +0 -20
- package/esm2015/src/internal/state-stream.js +0 -25
- package/esm2015/src/module.js +0 -88
- package/esm2015/src/modules/ngxs-feature.module.js +0 -45
- package/esm2015/src/modules/ngxs-root.module.js +0 -41
- package/esm2015/src/public_api.js +0 -27
- package/esm2015/src/selectors/create-property-selectors.js +0 -20
- package/esm2015/src/selectors/selector-metadata.js +0 -30
- package/esm2015/src/symbols.js +0 -58
- package/esm2015/src/utils/utils.js +0 -92
- package/fesm2015/ngxs-store-internals-testing.js.map +0 -1
- package/fesm2015/ngxs-store-internals.js.map +0 -1
- package/fesm2015/ngxs-store-operators.js.map +0 -1
- package/fesm2015/ngxs-store.js.map +0 -1
- package/internals/ngxs-store-internals.d.ts +0 -5
- package/internals/package.json +0 -10
- package/internals/testing/ngxs-store-internals-testing.d.ts +0 -5
- package/internals/testing/package.json +0 -10
- package/ngxs-store.d.ts +0 -5
- package/operators/ngxs-store-operators.d.ts +0 -5
- package/operators/package.json +0 -10
- /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- /package/{esm2015/internals/index.js → esm2020/internals/index.mjs} +0 -0
- /package/{esm2015/internals/memoize.js → esm2020/internals/memoize.mjs} +0 -0
- /package/{esm2015/internals/ngxs-store-internals.js → esm2020/internals/ngxs-store-internals.mjs} +0 -0
- /package/{esm2015/internals/src/symbols.js → esm2020/internals/src/symbols.mjs} +0 -0
- /package/{esm2015/internals/symbols.js → esm2020/internals/symbols.mjs} +0 -0
- /package/{esm2015/internals/testing/index.js → esm2020/internals/testing/index.mjs} +0 -0
- /package/{esm2015/internals/testing/ngxs-store-internals-testing.js → esm2020/internals/testing/ngxs-store-internals-testing.mjs} +0 -0
- /package/{esm2015/internals/testing/skip-console-logging.js → esm2020/internals/testing/skip-console-logging.mjs} +0 -0
- /package/{esm2015/internals/testing/symbol.js → esm2020/internals/testing/symbol.mjs} +0 -0
- /package/{esm2015/ngxs-store.js → esm2020/ngxs-store.mjs} +0 -0
- /package/{esm2015/operators/append.js → esm2020/operators/append.mjs} +0 -0
- /package/{esm2015/operators/compose.js → esm2020/operators/compose.mjs} +0 -0
- /package/{esm2015/operators/iif.js → esm2020/operators/iif.mjs} +0 -0
- /package/{esm2015/operators/index.js → esm2020/operators/index.mjs} +0 -0
- /package/{esm2015/operators/insert-item.js → esm2020/operators/insert-item.mjs} +0 -0
- /package/{esm2015/operators/ngxs-store-operators.js → esm2020/operators/ngxs-store-operators.mjs} +0 -0
- /package/{esm2015/operators/remove-item.js → esm2020/operators/remove-item.mjs} +0 -0
- /package/{esm2015/operators/types.js → esm2020/operators/types.mjs} +0 -0
- /package/{esm2015/operators/update-item.js → esm2020/operators/update-item.mjs} +0 -0
- /package/{esm2015/operators/utils.js → esm2020/operators/utils.mjs} +0 -0
- /package/{esm2015/src/actions/actions.js → esm2020/src/actions/actions.mjs} +0 -0
- /package/{esm2015/src/actions/symbols.js → esm2020/src/actions/symbols.mjs} +0 -0
- /package/{esm2015/src/configs/messages.config.js → esm2020/src/configs/messages.config.mjs} +0 -0
- /package/{esm2015/src/decorators/action.js → esm2020/src/decorators/action.mjs} +0 -0
- /package/{esm2015/src/decorators/select/select.js → esm2020/src/decorators/select/select.mjs} +0 -0
- /package/{esm2015/src/decorators/select/symbols.js → esm2020/src/decorators/select/symbols.mjs} +0 -0
- /package/{esm2015/src/decorators/selector/symbols.js → esm2020/src/decorators/selector/symbols.mjs} +0 -0
- /package/{esm2015/src/decorators/selector-options.js → esm2020/src/decorators/selector-options.mjs} +0 -0
- /package/{esm2015/src/dev-features/symbols.js → esm2020/src/dev-features/symbols.mjs} +0 -0
- /package/{esm2015/src/internal/custom-rxjs-subjects.js → esm2020/src/internal/custom-rxjs-subjects.mjs} +0 -0
- /package/{esm2015/src/internal/internals.js → esm2020/src/internal/internals.mjs} +0 -0
- /package/{esm2015/src/operators/leave-ngxs.js → esm2020/src/operators/leave-ngxs.mjs} +0 -0
- /package/{esm2015/src/plugin_api.js → esm2020/src/plugin_api.mjs} +0 -0
- /package/{esm2015/src/private_api.js → esm2020/src/private_api.mjs} +0 -0
- /package/{esm2015/src/public_to_deprecate.js → esm2020/src/public_to_deprecate.mjs} +0 -0
- /package/{esm2015/src/selectors/create-model-selector.js → esm2020/src/selectors/create-model-selector.mjs} +0 -0
- /package/{esm2015/src/selectors/create-pick-selector.js → esm2020/src/selectors/create-pick-selector.mjs} +0 -0
- /package/{esm2015/src/selectors/create-selector.js → esm2020/src/selectors/create-selector.mjs} +0 -0
- /package/{esm2015/src/selectors/index.js → esm2020/src/selectors/index.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-checks.util.js → esm2020/src/selectors/selector-checks.util.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-models.js → esm2020/src/selectors/selector-models.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-types.util.js → esm2020/src/selectors/selector-types.util.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-utils.js → esm2020/src/selectors/selector-utils.mjs} +0 -0
- /package/{esm2015/src/state-token/state-token.js → esm2020/src/state-token/state-token.mjs} +0 -0
- /package/{esm2015/src/state-token/symbols.js → esm2020/src/state-token/symbols.mjs} +0 -0
- /package/{esm2015/src/utils/compose.js → esm2020/src/utils/compose.mjs} +0 -0
- /package/{esm2015/src/utils/freeze.js → esm2020/src/utils/freeze.mjs} +0 -0
- /package/{esm2015/src/utils/store-validators.js → esm2020/src/utils/store-validators.mjs} +0 -0
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { Store } from '../store';
|
|
2
|
-
import { InternalStateOperations } from '../internal/state-operations';
|
|
3
|
-
import { StateFactory } from '../internal/state-factory';
|
|
4
|
-
import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
|
|
5
|
-
import { StateClassInternal } from '../internal/internals';
|
|
6
1
|
import * as i0 from "@angular/core";
|
|
7
2
|
/**
|
|
8
|
-
* Feature module
|
|
9
3
|
* @ignore
|
|
10
4
|
*/
|
|
11
5
|
export declare class NgxsFeatureModule {
|
|
12
|
-
constructor(
|
|
13
|
-
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, [null, null, null, { optional: true; }, null]>;
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, never>;
|
|
15
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFeatureModule, never, never, never>;
|
|
16
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFeatureModule>;
|
|
17
10
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { StateFactory } from '../internal/state-factory';
|
|
2
|
-
import { InternalStateOperations } from '../internal/state-operations';
|
|
3
|
-
import { Store } from '../store';
|
|
4
|
-
import { SelectFactory } from '../decorators/select/select-factory';
|
|
5
|
-
import { StateClassInternal } from '../internal/internals';
|
|
6
|
-
import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
|
|
7
1
|
import * as i0 from "@angular/core";
|
|
8
2
|
/**
|
|
9
|
-
* Root module
|
|
10
3
|
* @ignore
|
|
11
4
|
*/
|
|
12
5
|
export declare class NgxsRootModule {
|
|
13
|
-
constructor(
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule,
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule, never>;
|
|
15
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsRootModule, never, never, never>;
|
|
16
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsRootModule>;
|
|
17
10
|
}
|
package/src/public_api.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export { State } from './decorators/state';
|
|
|
5
5
|
export { Select } from './decorators/select/select';
|
|
6
6
|
export { SelectorOptions } from './decorators/selector-options';
|
|
7
7
|
export { Actions, ActionContext, ActionStatus } from './actions-stream';
|
|
8
|
-
export { getSelectorMetadata, getStoreMetadata, ensureStoreMetadata, ensureSelectorMetadata
|
|
9
|
-
export { ofAction, ofActionDispatched, ofActionSuccessful, ofActionCanceled, ofActionErrored, ofActionCompleted, ActionCompletion
|
|
10
|
-
export { StateContext, StateOperator, NgxsOnInit, NgxsAfterBootstrap, NgxsOnChanges, NgxsModuleOptions, NgxsSimpleChange
|
|
8
|
+
export { getSelectorMetadata, getStoreMetadata, ensureStoreMetadata, ensureSelectorMetadata } from './public_to_deprecate';
|
|
9
|
+
export { ofAction, ofActionDispatched, ofActionSuccessful, ofActionCanceled, ofActionErrored, ofActionCompleted, ActionCompletion } from './operators/of-action';
|
|
10
|
+
export { StateContext, StateOperator, NgxsOnInit, NgxsAfterBootstrap, NgxsOnChanges, NgxsModuleOptions, NgxsSimpleChange } from './symbols';
|
|
11
11
|
export { Selector } from './decorators/selector/selector';
|
|
12
12
|
export { getActionTypeFromInstance, actionMatcher } from './utils/utils';
|
|
13
13
|
export { NgxsExecutionStrategy } from './execution/symbols';
|
|
@@ -17,4 +17,5 @@ export { StateToken } from './state-token/state-token';
|
|
|
17
17
|
export { NgxsDevelopmentOptions } from './dev-features/symbols';
|
|
18
18
|
export { NgxsDevelopmentModule } from './dev-features/ngxs-development.module';
|
|
19
19
|
export { NgxsUnhandledActionsLogger } from './dev-features/ngxs-unhandled-actions-logger';
|
|
20
|
-
export { createModelSelector, createPickSelector, createPropertySelectors, createSelector, PropertySelectors, TypedSelector
|
|
20
|
+
export { createModelSelector, createPickSelector, createPropertySelectors, createSelector, PropertySelectors, TypedSelector } from './selectors';
|
|
21
|
+
export * from './standalone-features';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { StateClass } from '@ngxs/store/internals';
|
|
3
|
+
/**
|
|
4
|
+
* This function provides the required providers when calling `NgxsModule.forFeature`
|
|
5
|
+
* or `provideStates`. It is shared between the NgModule and standalone APIs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFeatureProviders(states: StateClass[]): Provider[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* This function is shared by both NgModule and standalone features.
|
|
4
|
+
* When using `NgxsModule.forRoot` and `provideStore`, we can depend on the
|
|
5
|
+
* same initialization functionality.
|
|
6
|
+
*/
|
|
7
|
+
export declare function rootStoreInitializer(): void;
|
|
8
|
+
/**
|
|
9
|
+
* This function is utilized by both NgModule and standalone features.
|
|
10
|
+
* When using `NgxsModule.forFeature` and `provideStates`, we can depend on
|
|
11
|
+
* the same initialization functionality.
|
|
12
|
+
*/
|
|
13
|
+
export declare function featureStatesInitializer(): void;
|
|
14
|
+
/**
|
|
15
|
+
* InjectionToken that registers the global Store.
|
|
16
|
+
*/
|
|
17
|
+
export declare const NGXS_ROOT_STORE_INITIALIZER: InjectionToken<void>;
|
|
18
|
+
/**
|
|
19
|
+
* InjectionToken that registers feature states.
|
|
20
|
+
*/
|
|
21
|
+
export declare const NGXS_FEATURE_STORE_INITIALIZER: InjectionToken<void>;
|
|
22
|
+
export declare const NGXS_ROOT_ENVIRONMENT_INITIALIZER: Provider[];
|
|
23
|
+
/**
|
|
24
|
+
* The `NGXS_FEATURE_ENVIRONMENT_INITIALIZER` functions as an environment initializer
|
|
25
|
+
* at the `Route` level. Angular Router creates an environment route injector for each
|
|
26
|
+
* matched route where navigation occurs. The injector is created once, ensuring that
|
|
27
|
+
* the feature states initialization only happens once as well.
|
|
28
|
+
*/
|
|
29
|
+
export declare const NGXS_FEATURE_ENVIRONMENT_INITIALIZER: Provider[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EnvironmentProviders, Type } from '@angular/core';
|
|
2
|
+
import { NgxsPlugin } from '../symbols';
|
|
3
|
+
/**
|
|
4
|
+
* This function registers a custom global plugin for the state.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* bootstrapApplication(AppComponent, {
|
|
8
|
+
* providers: [
|
|
9
|
+
* provideStore(
|
|
10
|
+
* [CountriesState],
|
|
11
|
+
* withNgxsPlugin(logoutPlugin)
|
|
12
|
+
* )
|
|
13
|
+
* ]
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function withNgxsPlugin(plugin: Type<NgxsPlugin>): EnvironmentProviders;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { StateClass } from '@ngxs/store/internals';
|
|
3
|
+
/**
|
|
4
|
+
* This version serves as a standalone alternative to `NgxsModule.forFeature`.
|
|
5
|
+
* It can be used in a similar manner to register feature states, but at the
|
|
6
|
+
* `Route` providers level:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* const routes: Routes = [
|
|
10
|
+
* {
|
|
11
|
+
* path: 'products',
|
|
12
|
+
* loadComponent: async () => {...},
|
|
13
|
+
* providers: [provideStates([ProductsState])]
|
|
14
|
+
* }
|
|
15
|
+
* ];
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function provideStates(states: StateClass[], ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { StateClass } from '@ngxs/store/internals';
|
|
3
|
+
import { NgxsModuleOptions } from '../symbols';
|
|
4
|
+
/**
|
|
5
|
+
* This function provides global store providers and initializes the store.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* bootstrapApplication(AppComponent, {
|
|
9
|
+
* providers: [provideStore([CountriesState])]
|
|
10
|
+
* });
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The `provideStore` may be optionally called with a config before the list of features:
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* provideStore([CountriesState], {
|
|
17
|
+
* developmentMode: !environment.production
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function provideStore(states?: StateClass[], ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
22
|
+
export declare function provideStore(states?: StateClass[], options?: NgxsModuleOptions, ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { StateClass } from '@ngxs/store/internals';
|
|
3
|
+
import { NgxsModuleOptions } from '../symbols';
|
|
4
|
+
/**
|
|
5
|
+
* This function provides the required providers when invoking `NgxsModule.forRoot`
|
|
6
|
+
* or `provideStore`. It is shared between the NgModule and standalone APIs.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getRootProviders(states: StateClass[], options: NgxsModuleOptions): Provider[];
|
package/src/symbols.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { NgxsExecutionStrategy } from './execution/symbols';
|
|
|
6
6
|
import { SharedSelectorOptions } from './internal/internals';
|
|
7
7
|
import { StateToken } from './state-token/state-token';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const FEATURE_STATE_TOKEN: InjectionToken<any>;
|
|
9
|
+
export declare const ROOT_STATE_TOKEN: InjectionToken<StateClass<any>[]>;
|
|
10
|
+
export declare const FEATURE_STATE_TOKEN: InjectionToken<StateClass<any>[][]>;
|
|
12
11
|
export declare const NGXS_PLUGINS: InjectionToken<unknown>;
|
|
12
|
+
export declare const NGXS_OPTIONS: InjectionToken<Partial<NgxsConfig>>;
|
|
13
13
|
export declare const META_KEY = "NGXS_META";
|
|
14
14
|
export declare const META_OPTIONS_KEY = "NGXS_OPTIONS_META";
|
|
15
15
|
export declare const SELECTOR_META_KEY = "NGXS_SELECTOR_META";
|