@ngxs/store 3.8.1 → 3.8.2

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.
Files changed (33) hide show
  1. package/bundles/ngxs-store-internals-testing.umd.js +664 -527
  2. package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
  3. package/bundles/ngxs-store-internals.umd.js +0 -14
  4. package/bundles/ngxs-store-internals.umd.js.map +1 -1
  5. package/bundles/ngxs-store-operators.umd.js +1 -1
  6. package/bundles/ngxs-store-operators.umd.js.map +1 -1
  7. package/bundles/ngxs-store.umd.js +3014 -2898
  8. package/bundles/ngxs-store.umd.js.map +1 -1
  9. package/esm2015/internals/index.js +1 -2
  10. package/esm2015/operators/patch.js +2 -2
  11. package/esm2015/src/actions/actions.js +3 -9
  12. package/esm2015/src/decorators/state.js +23 -25
  13. package/esm2015/src/internal/custom-rxjs-subjects.js +2 -2
  14. package/esm2015/src/internal/state-context-factory.js +25 -27
  15. package/esm2015/src/internal/state-factory.js +8 -11
  16. package/esm2015/src/selectors/create-model-selector.js +11 -9
  17. package/esm2015/src/selectors/create-pick-selector.js +5 -3
  18. package/esm2015/src/selectors/create-property-selectors.js +8 -6
  19. package/esm2015/src/utils/store-validators.js +19 -21
  20. package/fesm2015/ngxs-store-internals.js +1 -14
  21. package/fesm2015/ngxs-store-internals.js.map +1 -1
  22. package/fesm2015/ngxs-store-operators.js +1 -1
  23. package/fesm2015/ngxs-store-operators.js.map +1 -1
  24. package/fesm2015/ngxs-store.js +91 -100
  25. package/fesm2015/ngxs-store.js.map +1 -1
  26. package/internals/index.d.ts +0 -1
  27. package/package.json +2 -2
  28. package/src/actions/actions.d.ts +2 -2
  29. package/src/internal/custom-rxjs-subjects.d.ts +1 -1
  30. package/src/internal/state-factory.d.ts +1 -1
  31. package/src/utils/store-validators.d.ts +3 -6
  32. package/esm2015/internals/angular.js +0 -13
  33. package/internals/angular.d.ts +0 -1
@@ -1,4 +1,3 @@
1
- export { isAngularInTestMode } from './angular';
2
1
  export { NgxsBootstrapper } from './ngxs-bootstrapper';
3
2
  export { memoize } from './memoize';
4
3
  export { INITIAL_STATE_TOKEN, InitialState } from './initial-state';
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.1",
4
+ "version": "3.8.2",
5
5
  "license": "MIT",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@angular/core": ">=12.0.0 <17.0.0",
8
+ "@angular/core": ">=12.0.0 <18.0.0",
9
9
  "rxjs": ">=6.5.5"
10
10
  },
11
11
  "main": "bundles/ngxs-store.umd.js",
@@ -3,13 +3,13 @@ import { PlainObject } from '@ngxs/store/internals';
3
3
  * Init action
4
4
  */
5
5
  export declare class InitState {
6
- static get type(): string;
6
+ static readonly type = "@@INIT";
7
7
  }
8
8
  /**
9
9
  * Update action
10
10
  */
11
11
  export declare class UpdateState {
12
12
  addedStates?: PlainObject | undefined;
13
- static get type(): string;
13
+ static readonly type = "@@UPDATE_STATE";
14
14
  constructor(addedStates?: PlainObject | undefined);
15
15
  }
@@ -1,4 +1,4 @@
1
- import { Subject, BehaviorSubject } from 'rxjs';
1
+ import { BehaviorSubject, Subject } from 'rxjs';
2
2
  /**
3
3
  * Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
4
4
  * A standard Subject does not have this guarantee.
@@ -36,7 +36,7 @@ export declare class StateFactory implements OnDestroy {
36
36
  private _statePaths;
37
37
  private get statePaths();
38
38
  getRuntimeSelectorContext: () => RuntimeSelectorContext;
39
- private static cloneDefaults;
39
+ private static _cloneDefaults;
40
40
  ngOnDestroy(): void;
41
41
  /**
42
42
  * Add a new state to the global defs.
@@ -1,7 +1,4 @@
1
1
  import { StateClassInternal, StatesByName } from '../internal/internals';
2
- export declare abstract class StoreValidators {
3
- private static stateNameRegex;
4
- static checkThatStateIsNamedCorrectly(name: string | null): void | never;
5
- static checkThatStateNameIsUnique(stateName: string, state: StateClassInternal, statesByName: StatesByName): void | never;
6
- static checkThatStateClassesHaveBeenDecorated(stateClasses: StateClassInternal[]): void | never;
7
- }
2
+ export declare function ensureStateNameIsValid(name: string | null): void | never;
3
+ export declare function ensureStateNameIsUnique(stateName: string, state: StateClassInternal, statesByName: StatesByName): void | never;
4
+ export declare function ensureStatesAreDecorated(stateClasses: StateClassInternal[]): void | never;
@@ -1,13 +0,0 @@
1
- export function isAngularInTestMode() {
2
- // This is safe to check for these properties in the following way since `typeof` does not
3
- // throw an exception if the value does not exist in the scope.
4
- // We should not try to read these values from the global scope (e.g. `ɵglobal` from the `@angular/core`).
5
- // This is related to how these frameworks compile and execute modules. E.g. Jest wraps the module into
6
- // its internal code where `jest` variable exists in the scope. It cannot be read from the global scope, e.g.
7
- // this will return undefined `global.jest`, but `jest` will not equal undefined.
8
- return (typeof __karma__ !== 'undefined' ||
9
- typeof jasmine !== 'undefined' ||
10
- typeof jest !== 'undefined' ||
11
- typeof Mocha !== 'undefined');
12
- }
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL3N0b3JlL2ludGVybmFscy9zcmMvYW5ndWxhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxNQUFNLFVBQVUsbUJBQW1CO0lBQ2pDLDBGQUEwRjtJQUMxRiwrREFBK0Q7SUFDL0QsMEdBQTBHO0lBQzFHLHVHQUF1RztJQUN2Ryw2R0FBNkc7SUFDN0csaUZBQWlGO0lBQ2pGLE9BQU8sQ0FDTCxPQUFPLFNBQVMsS0FBSyxXQUFXO1FBQ2hDLE9BQU8sT0FBTyxLQUFLLFdBQVc7UUFDOUIsT0FBTyxJQUFJLEtBQUssV0FBVztRQUMzQixPQUFPLEtBQUssS0FBSyxXQUFXLENBQ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