@ngxs/store 18.1.5-dev.master-a6757af → 18.1.5-dev.master-6ec891b
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/plugins/index.mjs +2 -2
- package/esm2022/plugins/symbols.mjs +14 -4
- package/esm2022/src/internal/dispatcher.mjs +9 -9
- package/esm2022/src/plugin-manager.mjs +4 -3
- package/esm2022/src/standalone-features/plugin.mjs +10 -4
- package/esm2022/src/standalone-features/root-providers.mjs +1 -3
- package/fesm2022/ngxs-store-plugins.mjs +14 -4
- package/fesm2022/ngxs-store-plugins.mjs.map +1 -1
- package/fesm2022/ngxs-store.mjs +23 -17
- package/fesm2022/ngxs-store.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +7 -7
- package/plugins/index.d.ts +12 -5
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as rxjs from 'rxjs';
|
|
|
6
6
|
import { Observable, Subscription, OperatorFunction } from 'rxjs';
|
|
7
7
|
import { StateOperator } from '@ngxs/store/operators';
|
|
8
8
|
export { StateOperator } from '@ngxs/store/operators';
|
|
9
|
-
import { NgxsPlugin } from '@ngxs/store/plugins';
|
|
9
|
+
import { NgxsPlugin, NgxsPluginFn } from '@ngxs/store/plugins';
|
|
10
10
|
export { InitState, NGXS_PLUGINS, NgxsNextPluginFn, NgxsPlugin, NgxsPluginFn, UpdateState, actionMatcher, getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';
|
|
11
11
|
|
|
12
12
|
interface NgxsExecutionStrategy {
|
|
@@ -551,7 +551,7 @@ declare function provideStates(states: _StateClass[], ...features: EnvironmentPr
|
|
|
551
551
|
* });
|
|
552
552
|
* ```
|
|
553
553
|
*/
|
|
554
|
-
declare function withNgxsPlugin(plugin: Type<NgxsPlugin>): EnvironmentProviders;
|
|
554
|
+
declare function withNgxsPlugin(plugin: Type<NgxsPlugin> | NgxsPluginFn): EnvironmentProviders;
|
|
555
555
|
|
|
556
556
|
/**
|
|
557
557
|
* This function registers a preboot function which will be called before the root
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngxs/store",
|
|
3
|
-
"version": "18.1.5-dev.master-
|
|
3
|
+
"version": "18.1.5-dev.master-6ec891b",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"esm": "./esm2022/internals/ngxs-store-internals.mjs",
|
|
33
33
|
"default": "./fesm2022/ngxs-store-internals.mjs"
|
|
34
34
|
},
|
|
35
|
-
"./operators": {
|
|
36
|
-
"types": "./operators/index.d.ts",
|
|
37
|
-
"esm2022": "./esm2022/operators/ngxs-store-operators.mjs",
|
|
38
|
-
"esm": "./esm2022/operators/ngxs-store-operators.mjs",
|
|
39
|
-
"default": "./fesm2022/ngxs-store-operators.mjs"
|
|
40
|
-
},
|
|
41
35
|
"./plugins": {
|
|
42
36
|
"types": "./plugins/index.d.ts",
|
|
43
37
|
"esm2022": "./esm2022/plugins/ngxs-store-plugins.mjs",
|
|
44
38
|
"esm": "./esm2022/plugins/ngxs-store-plugins.mjs",
|
|
45
39
|
"default": "./fesm2022/ngxs-store-plugins.mjs"
|
|
46
40
|
},
|
|
41
|
+
"./operators": {
|
|
42
|
+
"types": "./operators/index.d.ts",
|
|
43
|
+
"esm2022": "./esm2022/operators/ngxs-store-operators.mjs",
|
|
44
|
+
"esm": "./esm2022/operators/ngxs-store-operators.mjs",
|
|
45
|
+
"default": "./fesm2022/ngxs-store-operators.mjs"
|
|
46
|
+
},
|
|
47
47
|
"./internals/testing": {
|
|
48
48
|
"types": "./internals/testing/index.d.ts",
|
|
49
49
|
"esm2022": "./esm2022/internals/testing/ngxs-store-internals-testing.mjs",
|
package/plugins/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ɵPlainObject as _PlainObject } from '@ngxs/store/internals';
|
|
2
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Type } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Init action
|
|
@@ -16,9 +16,8 @@ declare class UpdateState {
|
|
|
16
16
|
constructor(addedStates?: _PlainObject | undefined);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
type NgxsPluginFn = (state: any,
|
|
21
|
-
type NgxsNextPluginFn = (state: any, mutation: any) => any;
|
|
19
|
+
type NgxsNextPluginFn = (state: any, action: any) => any;
|
|
20
|
+
type NgxsPluginFn = (state: any, action: any, next: NgxsNextPluginFn) => any;
|
|
22
21
|
/**
|
|
23
22
|
* Plugin interface
|
|
24
23
|
*/
|
|
@@ -28,6 +27,14 @@ interface NgxsPlugin {
|
|
|
28
27
|
*/
|
|
29
28
|
handle(state: any, action: any, next: NgxsNextPluginFn): any;
|
|
30
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A multi-provider token used to resolve to custom NGXS plugins provided
|
|
32
|
+
* at the root and feature levels through the `{provide}` scheme.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated from v18.0.0, use `withNgxsPlugin` instead.
|
|
35
|
+
*/
|
|
36
|
+
declare const NGXS_PLUGINS: InjectionToken<NgxsPlugin[]>;
|
|
37
|
+
declare function ɵisPluginClass(plugin: Type<NgxsPlugin> | NgxsPluginFn): plugin is Type<NgxsPlugin>;
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
* Returns the type from an action instance/class.
|
|
@@ -59,4 +66,4 @@ declare const setValue: (obj: any, prop: string, val: any) => any;
|
|
|
59
66
|
*/
|
|
60
67
|
declare const getValue: (obj: any, prop: string) => any;
|
|
61
68
|
|
|
62
|
-
export { InitState, NGXS_PLUGINS, type NgxsNextPluginFn, type NgxsPlugin, type NgxsPluginFn, UpdateState, actionMatcher, getActionTypeFromInstance, getValue, setValue };
|
|
69
|
+
export { InitState, NGXS_PLUGINS, type NgxsNextPluginFn, type NgxsPlugin, type NgxsPluginFn, UpdateState, actionMatcher, getActionTypeFromInstance, getValue, setValue, ɵisPluginClass };
|