@ngxs/store 3.7.6 → 3.8.0-dev.master-c341c15
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-testing.umd.js +409 -420
- package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.js +48 -117
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +62 -402
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.js +1296 -3219
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/esm2015/index.js +7 -7
- package/esm2015/internals/angular.js +1 -8
- package/esm2015/internals/index.js +2 -6
- package/esm2015/internals/initial-state.js +1 -21
- package/esm2015/internals/internal-tokens.js +4 -15
- package/esm2015/internals/memoize.js +8 -33
- package/esm2015/internals/ngxs-bootstrapper.js +7 -20
- package/esm2015/internals/ngxs-store-internals.js +2 -6
- package/esm2015/internals/src/symbols.js +2 -14
- package/esm2015/internals/symbols.js +2 -14
- package/esm2015/internals/testing/fresh-platform.js +13 -53
- package/esm2015/internals/testing/helpers/ngxs-test.component.js +11 -17
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +13 -16
- package/esm2015/internals/testing/index.js +1 -5
- package/esm2015/internals/testing/ngxs-store-internals-testing.js +2 -6
- package/esm2015/internals/testing/ngxs.setup.js +1 -31
- package/esm2015/internals/testing/skip-console-logging.js +7 -42
- package/esm2015/internals/testing/symbol.js +2 -29
- package/esm2015/ngxs-store.js +2 -22
- package/esm2015/operators/append.js +7 -18
- package/esm2015/operators/compose.js +4 -22
- package/esm2015/operators/iif.js +12 -30
- package/esm2015/operators/index.js +2 -6
- package/esm2015/operators/insert-item.js +10 -22
- package/esm2015/operators/ngxs-store-operators.js +2 -6
- package/esm2015/operators/patch.js +5 -23
- package/esm2015/operators/remove-item.js +5 -17
- package/esm2015/operators/types.js +2 -0
- package/esm2015/operators/update-item.js +13 -25
- package/esm2015/operators/utils.js +1 -32
- package/esm2015/src/actions/actions.js +1 -18
- package/esm2015/src/actions/symbols.js +2 -39
- package/esm2015/src/actions-stream.js +20 -122
- package/esm2015/src/configs/messages.config.js +1 -44
- package/esm2015/src/decorators/action.js +3 -18
- package/esm2015/src/decorators/select/select-factory.js +10 -27
- package/esm2015/src/decorators/select/select.js +3 -22
- package/esm2015/src/decorators/select/symbols.js +4 -25
- package/esm2015/src/decorators/selector/selector.js +11 -38
- package/esm2015/src/decorators/selector/symbols.js +2 -5
- package/esm2015/src/decorators/selector-options.js +6 -19
- package/esm2015/src/decorators/state.js +5 -44
- package/esm2015/src/dev-features/ngxs-development.module.js +22 -0
- package/esm2015/src/dev-features/ngxs-unhandled-actions-logger.js +46 -0
- package/esm2015/src/dev-features/symbols.js +6 -0
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +10 -56
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +10 -32
- package/esm2015/src/execution/noop-ngxs-execution-strategy.js +7 -19
- package/esm2015/src/execution/symbols.js +3 -32
- package/esm2015/src/internal/custom-rxjs-subjects.js +81 -0
- package/esm2015/src/internal/dispatcher.js +26 -121
- package/esm2015/src/internal/error-handler.js +18 -72
- package/esm2015/src/internal/internals.js +24 -244
- package/esm2015/src/internal/lifecycle-state-manager.js +19 -117
- package/esm2015/src/internal/state-context-factory.js +8 -66
- package/esm2015/src/internal/state-factory.js +60 -227
- package/esm2015/src/internal/state-operations.js +19 -80
- package/esm2015/src/internal/state-operators.js +15 -28
- package/esm2015/src/internal/state-stream.js +9 -15
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +7 -17
- package/esm2015/src/module.js +12 -47
- package/esm2015/src/modules/ngxs-feature.module.js +18 -36
- package/esm2015/src/modules/ngxs-root.module.js +18 -26
- package/esm2015/src/operators/leave-ngxs.js +8 -43
- package/esm2015/src/operators/of-action.js +16 -105
- package/esm2015/src/plugin-manager.js +17 -50
- package/esm2015/src/plugin_api.js +1 -5
- package/esm2015/src/private_api.js +3 -0
- package/esm2015/src/public_api.js +7 -9
- package/esm2015/src/public_to_deprecate.js +1 -51
- package/esm2015/src/selectors/create-model-selector.js +28 -0
- package/esm2015/src/selectors/create-pick-selector.js +14 -0
- package/esm2015/src/selectors/create-property-selectors.js +18 -0
- package/esm2015/src/selectors/create-selector.js +9 -0
- package/esm2015/src/selectors/index.js +6 -0
- package/esm2015/src/selectors/selector-checks.util.js +18 -0
- package/esm2015/src/selectors/selector-metadata.js +30 -0
- package/esm2015/src/selectors/selector-models.js +2 -0
- package/esm2015/src/selectors/selector-types.util.js +2 -0
- package/esm2015/src/selectors/selector-utils.js +74 -0
- package/esm2015/src/state-token/state-token.js +4 -32
- package/esm2015/src/state-token/symbols.js +2 -5
- package/esm2015/src/store.js +24 -108
- package/esm2015/src/symbols.js +7 -177
- package/esm2015/src/utils/compose.js +5 -23
- package/esm2015/src/utils/freeze.js +5 -20
- package/esm2015/src/utils/store-validators.js +3 -36
- package/esm2015/src/utils/utils.js +13 -64
- package/fesm2015/ngxs-store-internals-testing.js +38 -159
- package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
- package/fesm2015/ngxs-store-internals.js +18 -100
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store-operators.js +54 -186
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +662 -2488
- package/fesm2015/ngxs-store.js.map +1 -1
- package/index.d.ts +4 -0
- package/internals/index.d.ts +1 -1
- package/internals/internal-tokens.d.ts +2 -8
- package/internals/ngxs-bootstrapper.d.ts +4 -1
- package/internals/ngxs-store-internals.d.ts +1 -0
- package/internals/package.json +2 -5
- package/internals/testing/helpers/ngxs-test.component.d.ts +3 -0
- package/internals/testing/helpers/ngxs-test.module.d.ts +6 -0
- package/internals/testing/ngxs-store-internals-testing.d.ts +1 -0
- package/internals/testing/package.json +2 -5
- package/ngxs-store.d.ts +1 -17
- package/operators/append.d.ts +2 -3
- package/operators/compose.d.ts +2 -2
- package/operators/iif.d.ts +3 -4
- package/operators/index.d.ts +3 -2
- package/operators/insert-item.d.ts +2 -3
- package/operators/ngxs-store-operators.d.ts +1 -0
- package/operators/package.json +2 -5
- package/operators/patch.d.ts +5 -8
- package/operators/remove-item.d.ts +3 -4
- package/operators/types.d.ts +56 -0
- package/operators/update-item.d.ts +3 -4
- package/operators/utils.d.ts +2 -3
- package/package.json +4 -7
- package/src/actions/actions.d.ts +2 -2
- package/src/actions-stream.d.ts +8 -22
- package/src/decorators/select/select-factory.d.ts +3 -0
- package/src/decorators/selector/selector.d.ts +7 -2
- package/src/decorators/state.d.ts +1 -1
- package/src/dev-features/ngxs-development.module.d.ts +9 -0
- package/src/dev-features/ngxs-unhandled-actions-logger.d.ts +17 -0
- package/src/dev-features/symbols.d.ts +8 -0
- package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +3 -0
- package/src/execution/internal-ngxs-execution-strategy.d.ts +3 -0
- package/src/execution/noop-ngxs-execution-strategy.d.ts +3 -0
- package/src/internal/custom-rxjs-subjects.d.ts +37 -0
- package/src/internal/dispatcher.d.ts +5 -0
- package/src/internal/error-handler.d.ts +4 -1
- package/src/internal/lifecycle-state-manager.d.ts +3 -0
- package/src/internal/state-context-factory.d.ts +3 -0
- package/src/internal/state-factory.d.ts +7 -4
- package/src/internal/state-operations.d.ts +3 -0
- package/src/internal/state-operators.d.ts +2 -2
- package/src/internal/state-stream.d.ts +5 -2
- package/src/module.d.ts +4 -0
- package/src/modules/ngxs-feature.module.d.ts +4 -0
- package/src/modules/ngxs-root.module.d.ts +4 -0
- package/src/operators/of-action.d.ts +20 -7
- package/src/plugin-manager.d.ts +4 -1
- package/src/private_api.d.ts +2 -0
- package/src/public_api.d.ts +8 -5
- package/src/selectors/create-model-selector.d.ts +10 -0
- package/src/selectors/create-pick-selector.d.ts +6 -0
- package/src/selectors/create-property-selectors.d.ts +5 -0
- package/src/selectors/create-selector.d.ts +19 -0
- package/src/selectors/index.d.ts +5 -0
- package/src/selectors/selector-checks.util.d.ts +9 -0
- package/src/selectors/selector-metadata.d.ts +7 -0
- package/src/selectors/selector-models.d.ts +10 -0
- package/src/selectors/selector-types.util.d.ts +7 -0
- package/src/selectors/selector-utils.d.ts +9 -0
- package/src/store.d.ts +3 -0
- package/src/symbols.d.ts +7 -3
- package/src/utils/utils.d.ts +1 -1
- package/bundles/ngxs-store-internals-testing.umd.min.js +0 -16
- package/bundles/ngxs-store-internals-testing.umd.min.js.map +0 -1
- package/bundles/ngxs-store-internals.umd.min.js +0 -2
- package/bundles/ngxs-store-internals.umd.min.js.map +0 -1
- package/bundles/ngxs-store-operators.umd.min.js +0 -16
- package/bundles/ngxs-store-operators.umd.min.js.map +0 -1
- package/bundles/ngxs-store.umd.min.js +0 -16
- package/bundles/ngxs-store.umd.min.js.map +0 -1
- package/esm2015/operators/internals.js +0 -5
- package/esm2015/src/utils/selector-utils.js +0 -221
- package/esm5/index.js +0 -13
- package/esm5/internals/angular.js +0 -20
- package/esm5/internals/index.js +0 -10
- package/esm5/internals/initial-state.js +0 -45
- package/esm5/internals/internal-tokens.js +0 -16
- package/esm5/internals/memoize.js +0 -71
- package/esm5/internals/ngxs-bootstrapper.js +0 -56
- package/esm5/internals/ngxs-store-internals.js +0 -9
- package/esm5/internals/src/symbols.js +0 -14
- package/esm5/internals/symbols.js +0 -14
- package/esm5/internals/testing/fresh-platform.js +0 -121
- package/esm5/internals/testing/helpers/ngxs-test.component.js +0 -32
- package/esm5/internals/testing/helpers/ngxs-test.module.js +0 -32
- package/esm5/internals/testing/index.js +0 -8
- package/esm5/internals/testing/ngxs-store-internals-testing.js +0 -9
- package/esm5/internals/testing/ngxs.setup.js +0 -98
- package/esm5/internals/testing/skip-console-logging.js +0 -62
- package/esm5/internals/testing/symbol.js +0 -29
- package/esm5/ngxs-store.js +0 -25
- package/esm5/operators/append.js +0 -31
- package/esm5/operators/compose.js +0 -28
- package/esm5/operators/iif.js +0 -56
- package/esm5/operators/index.js +0 -18
- package/esm5/operators/insert-item.js +0 -41
- package/esm5/operators/internals.js +0 -5
- package/esm5/operators/ngxs-store-operators.js +0 -9
- package/esm5/operators/patch.js +0 -40
- package/esm5/operators/remove-item.js +0 -34
- package/esm5/operators/update-item.js +0 -52
- package/esm5/operators/utils.js +0 -50
- package/esm5/src/actions/actions.js +0 -62
- package/esm5/src/actions/symbols.js +0 -39
- package/esm5/src/actions-stream.js +0 -203
- package/esm5/src/configs/messages.config.js +0 -79
- package/esm5/src/decorators/action.js +0 -60
- package/esm5/src/decorators/select/select-factory.js +0 -46
- package/esm5/src/decorators/select/select.js +0 -50
- package/esm5/src/decorators/select/symbols.js +0 -51
- package/esm5/src/decorators/selector/selector.js +0 -59
- package/esm5/src/decorators/selector/symbols.js +0 -5
- package/esm5/src/decorators/selector-options.js +0 -34
- package/esm5/src/decorators/state.js +0 -78
- package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +0 -123
- package/esm5/src/execution/internal-ngxs-execution-strategy.js +0 -54
- package/esm5/src/execution/noop-ngxs-execution-strategy.js +0 -43
- package/esm5/src/execution/symbols.js +0 -52
- package/esm5/src/internal/dispatcher.js +0 -231
- package/esm5/src/internal/error-handler.js +0 -125
- package/esm5/src/internal/internals.js +0 -470
- package/esm5/src/internal/lifecycle-state-manager.js +0 -224
- package/esm5/src/internal/state-context-factory.js +0 -135
- package/esm5/src/internal/state-factory.js +0 -583
- package/esm5/src/internal/state-operations.js +0 -134
- package/esm5/src/internal/state-operators.js +0 -34
- package/esm5/src/internal/state-stream.js +0 -37
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +0 -28
- package/esm5/src/module.js +0 -202
- package/esm5/src/modules/ngxs-feature.module.js +0 -65
- package/esm5/src/modules/ngxs-root.module.js +0 -44
- package/esm5/src/operators/leave-ngxs.js +0 -58
- package/esm5/src/operators/of-action.js +0 -217
- package/esm5/src/plugin-manager.js +0 -82
- package/esm5/src/plugin_api.js +0 -10
- package/esm5/src/public_api.js +0 -29
- package/esm5/src/public_to_deprecate.js +0 -64
- package/esm5/src/state-token/state-token.js +0 -57
- package/esm5/src/state-token/symbols.js +0 -5
- package/esm5/src/store.js +0 -241
- package/esm5/src/symbols.js +0 -230
- package/esm5/src/utils/compose.js +0 -55
- package/esm5/src/utils/freeze.js +0 -35
- package/esm5/src/utils/selector-utils.js +0 -230
- package/esm5/src/utils/store-validators.js +0 -78
- package/esm5/src/utils/utils.js +0 -151
- package/fesm5/ngxs-store-internals-testing.js +0 -345
- package/fesm5/ngxs-store-internals-testing.js.map +0 -1
- package/fesm5/ngxs-store-internals.js +0 -217
- package/fesm5/ngxs-store-internals.js.map +0 -1
- package/fesm5/ngxs-store-operators.js +0 -340
- package/fesm5/ngxs-store-operators.js.map +0 -1
- package/fesm5/ngxs-store.js +0 -4619
- package/fesm5/ngxs-store.js.map +0 -1
- package/internals/ngxs-store-internals.metadata.json +0 -1
- package/internals/testing/ngxs-store-internals-testing.metadata.json +0 -1
- package/ngxs-store.metadata.json +0 -1
- package/operators/internals.d.ts +0 -2
- package/operators/ngxs-store-operators.metadata.json +0 -1
- package/src/utils/selector-utils.d.ts +0 -23
- package/types/index.d.ts +0 -2
package/index.d.ts
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { NgxsBootstrapper } from './ngxs-bootstrapper';
|
|
|
3
3
|
export { memoize } from './memoize';
|
|
4
4
|
export { INITIAL_STATE_TOKEN, InitialState } from './initial-state';
|
|
5
5
|
export { PlainObjectOf, PlainObject, StateClass } from './symbols';
|
|
6
|
-
export { NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY } from './internal-tokens';
|
|
6
|
+
export { ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY } from './internal-tokens';
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export declare const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any>;
|
|
6
|
-
/**
|
|
7
|
-
* @see StateFactory as it's referenced by this token to be accessed by plugins internally
|
|
8
|
-
*/
|
|
9
|
-
export declare const NGXS_STATE_FACTORY: InjectionToken<any>;
|
|
2
|
+
export declare const ɵNGXS_STATE_FACTORY: InjectionToken<any>;
|
|
3
|
+
export declare const ɵNGXS_STATE_CONTEXT_FACTORY: InjectionToken<any>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class NgxsBootstrapper {
|
|
3
4
|
/**
|
|
4
5
|
* Use `ReplaySubject`, thus we can get cached value even if the stream is completed
|
|
5
6
|
*/
|
|
6
7
|
private bootstrap$;
|
|
7
|
-
|
|
8
|
+
get appBootstrapped$(): Observable<boolean>;
|
|
8
9
|
/**
|
|
9
10
|
* This event will be emitted after attaching `ComponentRef` of the root component
|
|
10
11
|
* to the tree of views, that's a signal that application has been fully rendered
|
|
11
12
|
*/
|
|
12
13
|
bootstrap(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsBootstrapper, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsBootstrapper>;
|
|
13
16
|
}
|
package/internals/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/ngxs-store-internals.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/ngxs-store-internals.js",
|
|
4
4
|
"es2015": "../fesm2015/ngxs-store-internals.js",
|
|
5
|
-
"esm5": "../esm5/internals/ngxs-store-internals.js",
|
|
6
5
|
"esm2015": "../esm2015/internals/ngxs-store-internals.js",
|
|
7
|
-
"fesm5": "../fesm5/ngxs-store-internals.js",
|
|
8
6
|
"fesm2015": "../fesm2015/ngxs-store-internals.js",
|
|
9
7
|
"typings": "ngxs-store-internals.d.ts",
|
|
10
|
-
"metadata": "ngxs-store-internals.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@ngxs/store/internals"
|
|
13
|
-
}
|
|
10
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class NgxsTestComponent implements OnInit, AfterViewInit {
|
|
3
4
|
ngOnInit(): void;
|
|
4
5
|
ngAfterViewInit(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsTestComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxsTestComponent, "app-root", never, {}, {}, never, never>;
|
|
5
8
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ApplicationRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./ngxs-test.component";
|
|
4
|
+
import * as i2 from "@angular/platform-browser";
|
|
2
5
|
export declare class NgxsTestModule {
|
|
3
6
|
static ngDoBootstrap(app: ApplicationRef): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsTestModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsTestModule, [typeof i1.NgxsTestComponent], [typeof i2.BrowserModule], never>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsTestModule>;
|
|
4
10
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../../bundles/ngxs-store-internals-testing.umd.js",
|
|
3
|
-
"module": "../../
|
|
3
|
+
"module": "../../fesm2015/ngxs-store-internals-testing.js",
|
|
4
4
|
"es2015": "../../fesm2015/ngxs-store-internals-testing.js",
|
|
5
|
-
"esm5": "../../esm5/internals/testing/ngxs-store-internals-testing.js",
|
|
6
5
|
"esm2015": "../../esm2015/internals/testing/ngxs-store-internals-testing.js",
|
|
7
|
-
"fesm5": "../../fesm5/ngxs-store-internals-testing.js",
|
|
8
6
|
"fesm2015": "../../fesm2015/ngxs-store-internals-testing.js",
|
|
9
7
|
"typings": "ngxs-store-internals-testing.d.ts",
|
|
10
|
-
"metadata": "ngxs-store-internals-testing.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@ngxs/store/internals/testing"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/ngxs-store.d.ts
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
+
/// <amd-module name="@ngxs/store" />
|
|
4
5
|
export * from './index';
|
|
5
|
-
export { InternalActions as ɵb, OrderedSubject as ɵa } from './src/actions-stream';
|
|
6
|
-
export { SelectFactory as ɵs } from './src/decorators/select/select-factory';
|
|
7
|
-
export { InternalNgxsExecutionStrategy as ɵq } from './src/execution/internal-ngxs-execution-strategy';
|
|
8
|
-
export { NGXS_EXECUTION_STRATEGY as ɵi, USER_PROVIDED_NGXS_EXECUTION_STRATEGY as ɵh } from './src/execution/symbols';
|
|
9
|
-
export { InternalDispatchedActionResults as ɵl, InternalDispatcher as ɵm } from './src/internal/dispatcher';
|
|
10
|
-
export { InternalErrorReporter as ɵr } from './src/internal/error-handler';
|
|
11
|
-
export { StateClassInternal as ɵt, ensureSelectorMetadata as ɵw, ensureStoreMetadata as ɵu, getSelectorMetadata as ɵx, getStoreMetadata as ɵv } from './src/internal/internals';
|
|
12
|
-
export { LifecycleStateManager as ɵy } from './src/internal/lifecycle-state-manager';
|
|
13
|
-
export { StateContextFactory as ɵn } from './src/internal/state-context-factory';
|
|
14
|
-
export { StateFactory as ɵk } from './src/internal/state-factory';
|
|
15
|
-
export { InternalStateOperations as ɵo } from './src/internal/state-operations';
|
|
16
|
-
export { NgxsFeatureModule as ɵz } from './src/modules/ngxs-feature.module';
|
|
17
|
-
export { NgxsRootModule as ɵj } from './src/modules/ngxs-root.module';
|
|
18
|
-
export { PluginManager as ɵp } from './src/plugin-manager';
|
|
19
|
-
export { TokenName as ɵba } from './src/state-token/symbols';
|
|
20
|
-
export { FEATURE_STATE_TOKEN as ɵd, NgxsConfig as ɵf, ROOT_STATE_TOKEN as ɵc, SELECTOR_META_KEY as ɵe } from './src/symbols';
|
|
21
|
-
export { mergeDeep as ɵg } from './src/utils/utils';
|
package/operators/append.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
import { RepairType } from './utils';
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* @param items - Specific items to append to the end of an array
|
|
5
4
|
*/
|
|
6
|
-
export declare function append<T>(items: T[]): StateOperator<
|
|
5
|
+
export declare function append<T>(items: NoInfer<T[]>): StateOperator<T[]>;
|
package/operators/compose.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
export declare function compose<T>(...operators: StateOperator<T>[]): StateOperator<T>;
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
2
|
+
export declare function compose<T>(...operators: NoInfer<StateOperator<T>[]>): StateOperator<T>;
|
package/operators/iif.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
import {
|
|
3
|
-
import { Predicate } from './internals';
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
2
|
+
import { Predicate } from './utils';
|
|
4
3
|
/**
|
|
5
4
|
* @param condition - Condition can be a plain boolean value or a function,
|
|
6
5
|
* that returns boolean, also this function can take a value as an argument
|
|
@@ -8,4 +7,4 @@ import { Predicate } from './internals';
|
|
|
8
7
|
* @param trueOperatorOrValue - Any value or a state operator
|
|
9
8
|
* @param elseOperatorOrValue - Any value or a state operator
|
|
10
9
|
*/
|
|
11
|
-
export declare function iif<T>(condition: Predicate<T
|
|
10
|
+
export declare function iif<T>(condition: NoInfer<Predicate<T>> | boolean, trueOperatorOrValue: NoInfer<StateOperator<T> | T>, elseOperatorOrValue?: NoInfer<StateOperator<T> | T>): StateOperator<T>;
|
package/operators/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export { append } from './append';
|
|
|
7
7
|
export { compose } from './compose';
|
|
8
8
|
export { iif } from './iif';
|
|
9
9
|
export { insertItem } from './insert-item';
|
|
10
|
-
export { patch } from './patch';
|
|
11
|
-
export { isStateOperator } from './utils';
|
|
10
|
+
export { patch, ɵPatchSpec } from './patch';
|
|
11
|
+
export { isStateOperator, isPredicate, Predicate } from './utils';
|
|
12
12
|
export { updateItem } from './update-item';
|
|
13
13
|
export { removeItem } from './remove-item';
|
|
14
|
+
export { ExistingState, NoInfer, StateOperator } from './types';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
import { RepairType } from './utils';
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* @param value - Value to insert
|
|
5
4
|
* @param [beforePosition] - Specified index to insert value before, optional
|
|
6
5
|
*/
|
|
7
|
-
export declare function insertItem<T>(value: T
|
|
6
|
+
export declare function insertItem<T>(value: NoInfer<T>, beforePosition?: number): StateOperator<T[]>;
|
package/operators/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/ngxs-store-operators.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/ngxs-store-operators.js",
|
|
4
4
|
"es2015": "../fesm2015/ngxs-store-operators.js",
|
|
5
|
-
"esm5": "../esm5/operators/ngxs-store-operators.js",
|
|
6
5
|
"esm2015": "../esm2015/operators/ngxs-store-operators.js",
|
|
7
|
-
"fesm5": "../fesm5/ngxs-store-operators.js",
|
|
8
6
|
"fesm2015": "../fesm2015/ngxs-store-operators.js",
|
|
9
7
|
"typings": "ngxs-store-operators.d.ts",
|
|
10
|
-
"metadata": "ngxs-store-operators.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@ngxs/store/operators"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/operators/patch.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
2
|
+
declare type NotUndefined<T> = T extends undefined ? never : T;
|
|
3
|
+
export declare type ɵPatchSpec<T> = {
|
|
4
|
+
[P in keyof T]?: T[P] | StateOperator<NotUndefined<T[P]>>;
|
|
4
5
|
};
|
|
5
|
-
declare
|
|
6
|
-
readonly [P in keyof T]?: T[P] extends (...args: any[]) => infer R ? R : T[P];
|
|
7
|
-
};
|
|
8
|
-
declare type PatchOperator<T> = <U extends PatchValues<T>>(existing: Readonly<U>) => U;
|
|
9
|
-
export declare function patch<T>(patchObject: PatchSpec<T>): PatchOperator<T>;
|
|
6
|
+
export declare function patch<T extends Record<string, any>>(patchObject: NoInfer<ɵPatchSpec<T>>): StateOperator<T>;
|
|
10
7
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
import { Predicate } from './
|
|
3
|
-
import { RepairType } from './utils';
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
2
|
+
import { Predicate } from './utils';
|
|
4
3
|
/**
|
|
5
4
|
* @param selector - index or predicate to remove an item from an array by
|
|
6
5
|
*/
|
|
7
|
-
export declare function removeItem<T>(selector: number | Predicate<T
|
|
6
|
+
export declare function removeItem<T>(selector: number | NoInfer<Predicate<T>>): StateOperator<T[]>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
declare type _NoInfer<T> = T extends infer S ? S : never;
|
|
2
|
+
/**
|
|
3
|
+
* Blocks the ability of the typescript inferrence engine to be able to use the provided type as part of
|
|
4
|
+
* inferring any type parameters from this usage.
|
|
5
|
+
* @example
|
|
6
|
+
* Primarily used to wrap parameters of functions in order to prevent the TypeScript inferrence engine
|
|
7
|
+
* from inferring a type parameter of the function from the value provided to this parameter.
|
|
8
|
+
* This essentially blocks the Contravariance of the function (through its parameters) so that the
|
|
9
|
+
* function type parameter is purely determined by the Covariant requirements of the function's return type.
|
|
10
|
+
* This is key to creating `StateOperator`s that are typed based on their contextual usage and not on the arguments
|
|
11
|
+
* provided to them. This is critical for type safety and intellisense for State Operators.
|
|
12
|
+
* Here is an example of how this benefits a state operator:
|
|
13
|
+
* ```ts
|
|
14
|
+
* declare function append<T>(items: NoInfer<T[]>): StateOperator<T[]>;
|
|
15
|
+
* declare function appendBad<T>(items: T[]): StateOperator<T[]>;
|
|
16
|
+
*
|
|
17
|
+
* interface AAA {
|
|
18
|
+
* foo?: boolean;
|
|
19
|
+
* bar?: boolean;
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* // Works
|
|
23
|
+
* // (T in append is correctly inferred as AAA)
|
|
24
|
+
* patch<{ test: AAA[] }>({ test: append([{ foo: true }]) });
|
|
25
|
+
*
|
|
26
|
+
* // Incorrectly throws: Type 'AAA' is not assignable to type '{ foo: true; }'.ts(2322)
|
|
27
|
+
* // (T in appendBad is incorrectly inferred as { foo: true; })
|
|
28
|
+
* patch<{ test: AAA[] }>({ test: appendBad([{ foo: true }]) });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare type NoInfer<T> = T extends (infer O)[] ? _NoInfer<O>[] : _NoInfer<T>;
|
|
33
|
+
/**
|
|
34
|
+
* IMPORTANT NOTE: This should not be used externally to the library, rather
|
|
35
|
+
* the exported type `ExistingState<T>` should be used instead.
|
|
36
|
+
*
|
|
37
|
+
* Used to convert a type to its readonly form. This can be given any type, from
|
|
38
|
+
* primitives to objects or arrays that could already be readonly or not.
|
|
39
|
+
* This does not apply the readonly construct to nested objects, but only to the top level type.
|
|
40
|
+
*/
|
|
41
|
+
declare type ɵAsReadonly<T> = T extends Readonly<infer O> ? (O extends T ? Readonly<T> : T) : T;
|
|
42
|
+
/**
|
|
43
|
+
* Represents the existing state that is passed into a `StateOperator` which should
|
|
44
|
+
* not be modified but will be used to build the new state returned by the `StateOperator`.
|
|
45
|
+
*/
|
|
46
|
+
export declare type ExistingState<T> = T extends any ? ɵAsReadonly<T> : never;
|
|
47
|
+
/**
|
|
48
|
+
* This is a monotype unary function that is used to create a new state from an existing state.
|
|
49
|
+
* A state operator is usually created by a function that is given some data
|
|
50
|
+
* to integrate with the state and returns a state operator which integrates this data or instruction.
|
|
51
|
+
*
|
|
52
|
+
* In state management terminology this creator function is commonly referred to as a state operator
|
|
53
|
+
* because it represents the operation to be performed. ie. `patch`, `append`, `insertItem`, `compose`, `iif`, etc.
|
|
54
|
+
*/
|
|
55
|
+
export declare type StateOperator<T> = (existing: ExistingState<T>) => T;
|
|
56
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
import {
|
|
3
|
-
import { Predicate } from './internals';
|
|
1
|
+
import { NoInfer, StateOperator } from './types';
|
|
2
|
+
import { Predicate } from './utils';
|
|
4
3
|
/**
|
|
5
4
|
* @param selector - Index of item in the array or a predicate function
|
|
6
5
|
* that can be provided in `Array.prototype.findIndex`
|
|
7
6
|
* @param operatorOrValue - New value under the `selector` index or a
|
|
8
7
|
* function that can be applied to an existing value
|
|
9
8
|
*/
|
|
10
|
-
export declare function updateItem<T>(selector: number | Predicate<T
|
|
9
|
+
export declare function updateItem<T>(selector: number | NoInfer<Predicate<T>>, operatorOrValue: NoInfer<T> | NoInfer<StateOperator<T>>): StateOperator<T[]>;
|
package/operators/utils.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { StateOperator } from '
|
|
2
|
-
|
|
1
|
+
import { StateOperator } from './types';
|
|
2
|
+
export declare type Predicate<T = any> = (value: T | Readonly<T>) => boolean;
|
|
3
3
|
export declare function isStateOperator<T>(value: T | StateOperator<T>): value is StateOperator<T>;
|
|
4
4
|
export declare function isUndefined(value: any): value is undefined;
|
|
5
5
|
export declare function isPredicate<T>(value: Predicate<T> | boolean | number): value is Predicate<T>;
|
|
6
6
|
export declare function isNumber(value: any): value is number;
|
|
7
7
|
export declare function invalidIndex(index: number): boolean;
|
|
8
8
|
export declare function isNil<T>(value: T | null | undefined): value is null | undefined;
|
|
9
|
-
export declare type RepairType<T> = T extends true ? boolean : (T extends false ? boolean : T);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
|
3
3
|
"name": "@ngxs/store",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.8.0-dev.master-c341c15",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
@@ -9,16 +9,13 @@
|
|
|
9
9
|
"rxjs": ">=6.5.5"
|
|
10
10
|
},
|
|
11
11
|
"main": "bundles/ngxs-store.umd.js",
|
|
12
|
-
"module": "
|
|
12
|
+
"module": "fesm2015/ngxs-store.js",
|
|
13
13
|
"es2015": "fesm2015/ngxs-store.js",
|
|
14
|
-
"esm5": "esm5/ngxs-store.js",
|
|
15
14
|
"esm2015": "esm2015/ngxs-store.js",
|
|
16
|
-
"fesm5": "fesm5/ngxs-store.js",
|
|
17
15
|
"fesm2015": "fesm2015/ngxs-store.js",
|
|
18
16
|
"typings": "ngxs-store.d.ts",
|
|
19
|
-
"metadata": "ngxs-store.metadata.json",
|
|
20
17
|
"dependencies": {
|
|
21
|
-
"tslib": "^
|
|
18
|
+
"tslib": "^2.2.0"
|
|
22
19
|
},
|
|
23
20
|
"repository": {
|
|
24
21
|
"type": "git",
|
|
@@ -63,4 +60,4 @@
|
|
|
63
60
|
"type": "opencollective",
|
|
64
61
|
"url": "https://opencollective.com/ngxs"
|
|
65
62
|
}
|
|
66
|
-
}
|
|
63
|
+
}
|
package/src/actions/actions.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ import { PlainObject } from '@ngxs/store/internals';
|
|
|
3
3
|
* Init action
|
|
4
4
|
*/
|
|
5
5
|
export declare class InitState {
|
|
6
|
-
static
|
|
6
|
+
static get type(): string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Update action
|
|
10
10
|
*/
|
|
11
11
|
export declare class UpdateState {
|
|
12
12
|
addedStates?: PlainObject | undefined;
|
|
13
|
-
static
|
|
13
|
+
static get type(): string;
|
|
14
14
|
constructor(addedStates?: PlainObject | undefined);
|
|
15
15
|
}
|
package/src/actions-stream.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
|
|
4
|
+
import { OrderedSubject } from './internal/custom-rxjs-subjects';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
4
6
|
/**
|
|
5
7
|
* Status of a dispatched action
|
|
6
8
|
*/
|
|
@@ -15,37 +17,21 @@ export interface ActionContext<T = any> {
|
|
|
15
17
|
action: T;
|
|
16
18
|
error?: Error;
|
|
17
19
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
20
|
-
* A standard Subject does not have this guarantee.
|
|
21
|
-
* For example, given the following code:
|
|
22
|
-
* ```typescript
|
|
23
|
-
* const subject = new Subject<string>();
|
|
24
|
-
subject.subscribe(value => {
|
|
25
|
-
if (value === 'start') subject.next('end');
|
|
26
|
-
});
|
|
27
|
-
subject.subscribe(value => { });
|
|
28
|
-
subject.next('start');
|
|
29
|
-
* ```
|
|
30
|
-
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
31
|
-
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
32
|
-
*/
|
|
33
|
-
export declare class OrderedSubject<T> extends Subject<T> {
|
|
34
|
-
private _itemQueue;
|
|
35
|
-
private _busyPushingNext;
|
|
36
|
-
next(value?: T): void;
|
|
37
|
-
}
|
|
38
20
|
/**
|
|
39
21
|
* Internal Action stream that is emitted anytime an action is dispatched.
|
|
40
22
|
*/
|
|
41
23
|
export declare class InternalActions extends OrderedSubject<ActionContext> implements OnDestroy {
|
|
42
24
|
ngOnDestroy(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InternalActions, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InternalActions>;
|
|
43
27
|
}
|
|
44
28
|
/**
|
|
45
29
|
* Action stream that is emitted anytime an action is dispatched.
|
|
46
30
|
*
|
|
47
31
|
* You can listen to this in services to react without stores.
|
|
48
32
|
*/
|
|
49
|
-
export declare class Actions extends Observable<
|
|
33
|
+
export declare class Actions extends Observable<ActionContext> {
|
|
50
34
|
constructor(internalActions$: InternalActions, internalExecutionStrategy: InternalNgxsExecutionStrategy);
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Actions, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Actions>;
|
|
51
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Store } from '../../store';
|
|
3
3
|
import { NgxsConfig } from '../../symbols';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* Allows the select decorator to get access to the DI store, this is used internally
|
|
6
7
|
* in `@Select` decorator.
|
|
@@ -10,4 +11,6 @@ export declare class SelectFactory implements OnDestroy {
|
|
|
10
11
|
static config: NgxsConfig | null;
|
|
11
12
|
constructor(store: Store, config: NgxsConfig);
|
|
12
13
|
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectFactory, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectFactory>;
|
|
13
16
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { SelectorDef } from '../../selectors';
|
|
1
2
|
import { SelectorType } from './symbols';
|
|
2
3
|
/**
|
|
3
|
-
* Decorator for
|
|
4
|
+
* Decorator for creating a state selector for the current state.
|
|
4
5
|
*/
|
|
5
|
-
export declare function Selector
|
|
6
|
+
export declare function Selector(): SelectorType<unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Decorator for creating a state selector from the provided selectors (and optionally the container State, depending on the applicable Selector Options).
|
|
9
|
+
*/
|
|
10
|
+
export declare function Selector<T extends SelectorDef<any>>(selectors: T[]): SelectorType<T>;
|
|
@@ -3,4 +3,4 @@ import { StoreOptions } from '../symbols';
|
|
|
3
3
|
/**
|
|
4
4
|
* Decorates a class with ngxs state information.
|
|
5
5
|
*/
|
|
6
|
-
export declare function State<T>(options: StoreOptions<T>): (target: StateClass
|
|
6
|
+
export declare function State<T>(options: StoreOptions<T>): (target: StateClass) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { NgxsDevelopmentOptions } from './symbols';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgxsDevelopmentModule {
|
|
5
|
+
static forRoot(options: NgxsDevelopmentOptions): ModuleWithProviders<NgxsDevelopmentModule>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsDevelopmentModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsDevelopmentModule, never, never, never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsDevelopmentModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ActionType } from '../actions/symbols';
|
|
2
|
+
import { NgxsDevelopmentOptions } from './symbols';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgxsUnhandledActionsLogger {
|
|
5
|
+
/**
|
|
6
|
+
* These actions should be ignored by default; the user can increase this
|
|
7
|
+
* list in the future via the `ignoreActions` method.
|
|
8
|
+
*/
|
|
9
|
+
private _ignoredActions;
|
|
10
|
+
constructor(options: NgxsDevelopmentOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Adds actions to the internal list of actions that should be ignored.
|
|
13
|
+
*/
|
|
14
|
+
ignoreActions(...actions: ActionType[]): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsUnhandledActionsLogger, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsUnhandledActionsLogger>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ActionType } from '../actions/symbols';
|
|
3
|
+
export interface NgxsDevelopmentOptions {
|
|
4
|
+
warnOnUnhandledActions: true | {
|
|
5
|
+
ignore: ActionType[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const NGXS_DEVELOPMENT_OPTIONS: InjectionToken<NgxsDevelopmentOptions>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { NgxsExecutionStrategy } from './symbols';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class DispatchOutsideZoneNgxsExecutionStrategy implements NgxsExecutionStrategy {
|
|
4
5
|
private _ngZone;
|
|
5
6
|
private _platformId;
|
|
@@ -8,4 +9,6 @@ export declare class DispatchOutsideZoneNgxsExecutionStrategy implements NgxsExe
|
|
|
8
9
|
leave<T>(func: () => T): T;
|
|
9
10
|
private runInsideAngular;
|
|
10
11
|
private runOutsideAngular;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DispatchOutsideZoneNgxsExecutionStrategy, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DispatchOutsideZoneNgxsExecutionStrategy>;
|
|
11
14
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { NgxsExecutionStrategy } from './symbols';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class InternalNgxsExecutionStrategy implements NgxsExecutionStrategy {
|
|
3
4
|
private _executionStrategy;
|
|
4
5
|
constructor(_executionStrategy: NgxsExecutionStrategy);
|
|
5
6
|
enter<T>(func: () => T): T;
|
|
6
7
|
leave<T>(func: () => T): T;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InternalNgxsExecutionStrategy, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InternalNgxsExecutionStrategy>;
|
|
7
10
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { NgxsExecutionStrategy } from './symbols';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class NoopNgxsExecutionStrategy implements NgxsExecutionStrategy {
|
|
3
4
|
enter<T>(func: () => T): T;
|
|
4
5
|
leave<T>(func: () => T): T;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoopNgxsExecutionStrategy, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NoopNgxsExecutionStrategy>;
|
|
5
8
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
|
|
4
|
+
* A standard Subject does not have this guarantee.
|
|
5
|
+
* For example, given the following code:
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const subject = new Subject<string>();
|
|
8
|
+
subject.subscribe(value => {
|
|
9
|
+
if (value === 'start') subject.next('end');
|
|
10
|
+
});
|
|
11
|
+
subject.subscribe(value => { });
|
|
12
|
+
subject.next('start');
|
|
13
|
+
* ```
|
|
14
|
+
* When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
|
|
15
|
+
* When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class OrderedSubject<T> extends Subject<T> {
|
|
18
|
+
next: (value?: T | undefined) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Custom BehaviorSubject that ensures that subscribers are notified of values in the order that they arrived.
|
|
22
|
+
* A standard BehaviorSubject does not have this guarantee.
|
|
23
|
+
* For example, given the following code:
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const subject = new BehaviorSubject<string>();
|
|
26
|
+
subject.subscribe(value => {
|
|
27
|
+
if (value === 'start') subject.next('end');
|
|
28
|
+
});
|
|
29
|
+
subject.subscribe(value => { });
|
|
30
|
+
subject.next('start');
|
|
31
|
+
* ```
|
|
32
|
+
* When `subject` is a standard `BehaviorSubject<T>` the second subscriber would recieve `end` and then `start`.
|
|
33
|
+
* When `subject` is a `OrderedBehaviorSubject<T>` the second subscriber would recieve `start` and then `end`.
|
|
34
|
+
*/
|
|
35
|
+
export declare class OrderedBehaviorSubject<T> extends BehaviorSubject<T> {
|
|
36
|
+
next: (value: T) => void;
|
|
37
|
+
}
|
|
@@ -4,6 +4,7 @@ import { ActionContext, InternalActions } from '../actions-stream';
|
|
|
4
4
|
import { StateStream } from './state-stream';
|
|
5
5
|
import { PluginManager } from '../plugin-manager';
|
|
6
6
|
import { InternalNgxsExecutionStrategy } from '../execution/internal-ngxs-execution-strategy';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* Internal Action result stream that is emitted when an action is completed.
|
|
9
10
|
* This is used as a method of returning the action result to the dispatcher
|
|
@@ -11,6 +12,8 @@ import { InternalNgxsExecutionStrategy } from '../execution/internal-ngxs-execut
|
|
|
11
12
|
* The dispatcher then asynchronously pushes the result from this stream onto the main action stream as a result.
|
|
12
13
|
*/
|
|
13
14
|
export declare class InternalDispatchedActionResults extends Subject<ActionContext> {
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InternalDispatchedActionResults, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InternalDispatchedActionResults>;
|
|
14
17
|
}
|
|
15
18
|
export declare class InternalDispatcher {
|
|
16
19
|
private _actions;
|
|
@@ -28,4 +31,6 @@ export declare class InternalDispatcher {
|
|
|
28
31
|
private dispatchSingle;
|
|
29
32
|
private getActionResultStream;
|
|
30
33
|
private createDispatchObservable;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InternalDispatcher, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InternalDispatcher>;
|
|
31
36
|
}
|