@angular-architects/ngrx-toolkit 19.0.2 → 19.2.0

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 (31) hide show
  1. package/fesm2022/angular-architects-ngrx-toolkit-redux-connector.mjs +8 -8
  2. package/fesm2022/angular-architects-ngrx-toolkit-redux-connector.mjs.map +1 -1
  3. package/fesm2022/angular-architects-ngrx-toolkit.mjs +951 -504
  4. package/fesm2022/angular-architects-ngrx-toolkit.mjs.map +1 -1
  5. package/index.d.ts +18 -8
  6. package/lib/devtools/internal/glitch-tracker.service.d.ts +1 -1
  7. package/lib/devtools/internal/models.d.ts +2 -3
  8. package/lib/devtools/provide-devtools-config.d.ts +20 -0
  9. package/lib/devtools/update-state.d.ts +1 -2
  10. package/lib/devtools/with-devtools.d.ts +2 -8
  11. package/lib/immutable-state/deep-freeze.d.ts +11 -0
  12. package/lib/immutable-state/is-dev-mode.d.ts +1 -0
  13. package/lib/immutable-state/with-immutable-state.d.ts +60 -0
  14. package/lib/storage-sync/features/with-indexed-db.d.ts +2 -0
  15. package/lib/storage-sync/features/with-local-storage.d.ts +3 -0
  16. package/lib/storage-sync/internal/indexeddb.service.d.ts +29 -0
  17. package/lib/storage-sync/internal/local-storage.service.d.ts +8 -0
  18. package/lib/storage-sync/internal/models.d.ts +34 -0
  19. package/lib/storage-sync/internal/session-storage.service.d.ts +8 -0
  20. package/lib/storage-sync/with-storage-sync.d.ts +45 -0
  21. package/lib/with-call-state.d.ts +19 -2
  22. package/lib/with-conditional.d.ts +50 -0
  23. package/lib/with-data-service.d.ts +5 -5
  24. package/lib/with-feature-factory.d.ts +28 -0
  25. package/lib/with-pagination.d.ts +6 -32
  26. package/lib/with-redux.d.ts +3 -1
  27. package/lib/with-undo-redo.d.ts +1 -1
  28. package/package.json +3 -3
  29. package/redux-connector/src/lib/rxjs-interop/redux-method.d.ts +2 -2
  30. package/redux-connector/src/lib/signal-redux-store.d.ts +4 -16
  31. package/lib/with-storage-sync.d.ts +0 -52
@@ -1,52 +0,0 @@
1
- import { SignalStoreFeature, SignalStoreFeatureResult, EmptyFeatureResult } from '@ngrx/signals';
2
- type WithStorageSyncFeatureResult = EmptyFeatureResult & {
3
- methods: {
4
- clearStorage(): void;
5
- readFromStorage(): void;
6
- writeToStorage(): void;
7
- };
8
- };
9
- export type SyncConfig<State> = {
10
- /**
11
- * The key which is used to access the storage.
12
- */
13
- key: string;
14
- /**
15
- * Flag indicating if the store should read from storage on init and write to storage on every state change.
16
- *
17
- * `true` by default
18
- */
19
- autoSync?: boolean;
20
- /**
21
- * Function to select that portion of the state which should be stored.
22
- *
23
- * Returns the whole state object by default
24
- */
25
- select?: (state: State) => Partial<State>;
26
- /**
27
- * Function used to parse the state coming from storage.
28
- *
29
- * `JSON.parse()` by default
30
- */
31
- parse?: (stateString: string) => State;
32
- /**
33
- * Function used to tranform the state into a string representation.
34
- *
35
- * `JSON.stringify()` by default
36
- */
37
- stringify?: (state: State) => string;
38
- /**
39
- * Factory function used to select the storage.
40
- *
41
- * `localstorage` by default
42
- */
43
- storage?: () => Storage;
44
- };
45
- /**
46
- * Enables store synchronization with storage.
47
- *
48
- * Only works on browser platform.
49
- */
50
- export declare function withStorageSync<Input extends SignalStoreFeatureResult>(key: string): SignalStoreFeature<Input, WithStorageSyncFeatureResult>;
51
- export declare function withStorageSync<Input extends SignalStoreFeatureResult>(config: SyncConfig<Input['state']>): SignalStoreFeature<Input, WithStorageSyncFeatureResult>;
52
- export {};