@ngxs/store 3.8.0 → 3.8.1
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 +11 -7
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.js +222 -214
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/esm2015/internals/initial-state.js +9 -6
- 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/custom-rxjs-subjects.js +16 -5
- 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 -4
- package/esm2015/src/internal/state-stream.js +4 -3
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +13 -6
- package/esm2015/src/module.js +6 -42
- package/esm2015/src/store.js +4 -3
- package/esm2015/src/symbols.js +10 -3
- package/fesm2015/ngxs-store-internals.js +11 -7
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store.js +208 -200
- package/fesm2015/ngxs-store.js.map +1 -1
- package/internals/initial-state.d.ts +2 -2
- package/package.json +2 -2
- package/src/internal/custom-rxjs-subjects.d.ts +7 -2
- package/src/internal/state-factory.d.ts +10 -11
- package/src/internal/state-operations.d.ts +0 -1
- package/src/module.d.ts +0 -3
- package/src/symbols.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { PlainObject } from './symbols';
|
|
3
|
-
export declare const INITIAL_STATE_TOKEN: InjectionToken<any>;
|
|
4
3
|
export declare class InitialState {
|
|
5
|
-
private static
|
|
4
|
+
private static _value;
|
|
6
5
|
static set(state: PlainObject): void;
|
|
7
6
|
static pop(): PlainObject;
|
|
8
7
|
}
|
|
8
|
+
export declare const INITIAL_STATE_TOKEN: InjectionToken<any>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
|
3
3
|
"name": "@ngxs/store",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@angular/core": ">=
|
|
8
|
+
"@angular/core": ">=12.0.0 <17.0.0",
|
|
9
9
|
"rxjs": ">=6.5.5"
|
|
10
10
|
},
|
|
11
11
|
"main": "bundles/ngxs-store.umd.js",
|
|
@@ -15,7 +15,8 @@ import { Subject, BehaviorSubject } from 'rxjs';
|
|
|
15
15
|
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
16
16
|
*/
|
|
17
17
|
export declare class OrderedSubject<T> extends Subject<T> {
|
|
18
|
-
|
|
18
|
+
private _orderedNext;
|
|
19
|
+
next(value?: T): void;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Custom BehaviorSubject that ensures that subscribers are notified of values in the order that they arrived.
|
|
@@ -33,5 +34,9 @@ export declare class OrderedSubject<T> extends Subject<T> {
|
|
|
33
34
|
* When `subject` is a `OrderedBehaviorSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
34
35
|
*/
|
|
35
36
|
export declare class OrderedBehaviorSubject<T> extends BehaviorSubject<T> {
|
|
36
|
-
|
|
37
|
+
private _orderedNext;
|
|
38
|
+
private _currentValue;
|
|
39
|
+
constructor(value: T);
|
|
40
|
+
getValue(): T;
|
|
41
|
+
next(value: T): void;
|
|
37
42
|
}
|
|
@@ -7,7 +7,16 @@ import { InternalDispatchedActionResults } from '../internal/dispatcher';
|
|
|
7
7
|
import { StateContextFactory } from '../internal/state-context-factory';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* The `StateFactory` class adds root and feature states to the graph.
|
|
11
|
+
* This extracts state names from state classes, checks if they already
|
|
12
|
+
* exist in the global graph, throws errors if their names are invalid, etc.
|
|
13
|
+
* See its constructor, state factories inject state factories that are
|
|
14
|
+
* parent-level providers. This is required to get feature states from the
|
|
15
|
+
* injector on the same level.
|
|
16
|
+
*
|
|
17
|
+
* The `NgxsModule.forFeature(...)` returns `providers: [StateFactory, ...states]`.
|
|
18
|
+
* The `StateFactory` is initialized on the feature level and goes through `...states`
|
|
19
|
+
* to get them from the injector through `injector.get(state)`.
|
|
11
20
|
* @ignore
|
|
12
21
|
*/
|
|
13
22
|
export declare class StateFactory implements OnDestroy {
|
|
@@ -37,9 +46,6 @@ export declare class StateFactory implements OnDestroy {
|
|
|
37
46
|
* Add a set of states to the store and return the defaults
|
|
38
47
|
*/
|
|
39
48
|
addAndReturnDefaults(stateClasses: StateClassInternal[]): StatesAndDefaults;
|
|
40
|
-
/**
|
|
41
|
-
* Bind the actions to the handlers
|
|
42
|
-
*/
|
|
43
49
|
connectActionHandlers(): void;
|
|
44
50
|
/**
|
|
45
51
|
* Invoke actions on the states.
|
|
@@ -47,13 +53,6 @@ export declare class StateFactory implements OnDestroy {
|
|
|
47
53
|
invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<unknown[]>;
|
|
48
54
|
private addToStatesMap;
|
|
49
55
|
private addRuntimeInfoToMeta;
|
|
50
|
-
/**
|
|
51
|
-
* @description
|
|
52
|
-
* the method checks if the state has already been added to the tree
|
|
53
|
-
* and completed the life cycle
|
|
54
|
-
* @param name
|
|
55
|
-
* @param path
|
|
56
|
-
*/
|
|
57
56
|
private hasBeenMountedAndBootstrapped;
|
|
58
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<StateFactory, [null, null, { optional: true; skipSelf: true; }, null, null, null, { optional: true; }]>;
|
|
59
58
|
static ɵprov: i0.ɵɵInjectableDeclaration<StateFactory>;
|
package/src/module.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* Ngxs Module
|
|
9
9
|
*/
|
|
10
10
|
export declare class NgxsModule {
|
|
11
|
-
private static readonly ROOT_OPTIONS;
|
|
12
11
|
/**
|
|
13
12
|
* Root module factory
|
|
14
13
|
*/
|
|
@@ -18,9 +17,7 @@ export declare class NgxsModule {
|
|
|
18
17
|
*/
|
|
19
18
|
static forFeature(states?: StateClass[]): ModuleWithProviders<NgxsFeatureModule>;
|
|
20
19
|
private static ngxsTokenProviders;
|
|
21
|
-
private static ngxsConfigFactory;
|
|
22
20
|
private static appBootstrapListenerFactory;
|
|
23
|
-
private static getInitialState;
|
|
24
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsModule, never>;
|
|
25
22
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsModule, never, never, never>;
|
|
26
23
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsModule>;
|
package/src/symbols.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ 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 ROOT_OPTIONS: InjectionToken<Partial<NgxsConfig>>;
|
|
9
10
|
export declare const ROOT_STATE_TOKEN: InjectionToken<any>;
|
|
10
11
|
export declare const FEATURE_STATE_TOKEN: InjectionToken<any>;
|
|
11
12
|
export declare const NGXS_PLUGINS: InjectionToken<unknown>;
|