@ngxs/store 18.1.1-dev.master-a8f62df → 18.1.1-dev.master-b178ff0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngxs/store",
3
- "version": "18.1.1-dev.master-a8f62df",
3
+ "version": "18.1.1-dev.master-b178ff0",
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",
@@ -0,0 +1,12 @@
1
+ import { type OnDestroy } from '@angular/core';
2
+ import type { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export type ActionHandlerFn = (action: any) => void | Promise<void> | Observable<unknown>;
5
+ export declare class NgxsActionRegistry implements OnDestroy {
6
+ private readonly _actionTypeToHandlersMap;
7
+ ngOnDestroy(): void;
8
+ get(type: string): Set<ActionHandlerFn> | undefined;
9
+ register(type: string, handler: ActionHandlerFn): () => void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsActionRegistry, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsActionRegistry>;
12
+ }
@@ -1,6 +1,6 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { ɵOrderedSubject } from '@ngxs/store/internals';
3
- import { Observable } from 'rxjs';
3
+ import { Observable, Subject } from 'rxjs';
4
4
  import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
@@ -21,6 +21,8 @@ export interface ActionContext<T = any> {
21
21
  * Internal Action stream that is emitted anytime an action is dispatched.
22
22
  */
23
23
  export declare class InternalActions extends ɵOrderedSubject<ActionContext> implements OnDestroy {
24
+ readonly dispatched$: Subject<ActionContext<any>>;
25
+ constructor();
24
26
  ngOnDestroy(): void;
25
27
  static ɵfac: i0.ɵɵFactoryDeclaration<InternalActions, never>;
26
28
  static ɵprov: i0.ɵɵInjectableDeclaration<InternalActions>;
@@ -1,16 +1,7 @@
1
- import { Injector, OnDestroy } from '@angular/core';
2
- import { ɵStateClassInternal, ɵRuntimeSelectorContext, ɵActionHandlerMetaData } from '@ngxs/store/internals';
3
- import { Observable } from 'rxjs';
4
- import { NgxsConfig } from '../symbols';
1
+ import { OnDestroy } from '@angular/core';
2
+ import { ɵStateClassInternal, ɵRuntimeSelectorContext } from '@ngxs/store/internals';
5
3
  import { MappedStore, StatesAndDefaults, StatesByName } from './internals';
6
- import { ActionContext, InternalActions } from '../actions-stream';
7
- import { InternalDispatchedActionResults } from '../internal/dispatcher';
8
- import { StateContextFactory } from '../internal/state-context-factory';
9
4
  import * as i0 from "@angular/core";
10
- interface InvokableActionHandlerMetaData extends ɵActionHandlerMetaData {
11
- path: string;
12
- instance: any;
13
- }
14
5
  /**
15
6
  * The `StateFactory` class adds root and feature states to the graph.
16
7
  * This extracts state names from state classes, checks if they already
@@ -25,19 +16,17 @@ interface InvokableActionHandlerMetaData extends ɵActionHandlerMetaData {
25
16
  * @ignore
26
17
  */
27
18
  export declare class StateFactory implements OnDestroy {
28
- private _injector;
29
- private _config;
30
- private _parentFactory;
31
- private _actions;
32
- private _actionResults;
33
- private _stateContextFactory;
34
- private _initialState;
19
+ private readonly _injector;
20
+ private readonly _config;
21
+ private readonly _parentFactory;
22
+ private readonly _stateContextFactory;
23
+ private readonly _actions;
24
+ private readonly _actionResults;
25
+ private readonly _initialState;
26
+ private readonly _actionRegistry;
27
+ private readonly _propGetter;
35
28
  private _actionsSubscription;
36
- private _propGetter;
37
29
  private _ngxsUnhandledErrorHandler;
38
- constructor(_injector: Injector, _config: NgxsConfig, _parentFactory: StateFactory, _actions: InternalActions, _actionResults: InternalDispatchedActionResults, _stateContextFactory: StateContextFactory, _initialState: any);
39
- private _actionTypeToMetasMap;
40
- get actionTypeToMetasMap(): Map<string, InvokableActionHandlerMetaData[]>;
41
30
  private _states;
42
31
  get states(): MappedStore[];
43
32
  private _statesByName;
@@ -58,12 +47,11 @@ export declare class StateFactory implements OnDestroy {
58
47
  /**
59
48
  * Invoke actions on the states.
60
49
  */
61
- invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<any[]>;
50
+ invokeActions(action: any): import("rxjs").Observable<[void | Promise<void> | import("rxjs").Observable<unknown>]>;
62
51
  private addToStatesMap;
63
52
  private addRuntimeInfoToMeta;
64
53
  private hasBeenMountedAndBootstrapped;
65
54
  private hydrateActionMetasMap;
66
- static ɵfac: i0.ɵɵFactoryDeclaration<StateFactory, [null, null, { optional: true; skipSelf: true; }, null, null, null, { optional: true; }]>;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<StateFactory, never>;
67
56
  static ɵprov: i0.ɵɵInjectableDeclaration<StateFactory>;
68
57
  }
69
- export {};