@ngxs/store 3.7.6-dev.master-fb318b1 → 3.7.6-dev.master-dcdd391

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 (230) hide show
  1. package/bundles/ngxs-store-internals-testing.umd.js +409 -420
  2. package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
  3. package/bundles/ngxs-store-internals.umd.js +48 -117
  4. package/bundles/ngxs-store-internals.umd.js.map +1 -1
  5. package/bundles/ngxs-store-operators.umd.js +60 -402
  6. package/bundles/ngxs-store-operators.umd.js.map +1 -1
  7. package/bundles/ngxs-store.umd.js +1041 -3269
  8. package/bundles/ngxs-store.umd.js.map +1 -1
  9. package/esm2015/index.js +7 -7
  10. package/esm2015/internals/angular.js +1 -8
  11. package/esm2015/internals/index.js +2 -6
  12. package/esm2015/internals/initial-state.js +1 -21
  13. package/esm2015/internals/internal-tokens.js +4 -15
  14. package/esm2015/internals/memoize.js +8 -33
  15. package/esm2015/internals/ngxs-bootstrapper.js +7 -20
  16. package/esm2015/internals/ngxs-store-internals.js +2 -6
  17. package/esm2015/internals/src/symbols.js +2 -14
  18. package/esm2015/internals/symbols.js +2 -14
  19. package/esm2015/internals/testing/fresh-platform.js +13 -53
  20. package/esm2015/internals/testing/helpers/ngxs-test.component.js +11 -17
  21. package/esm2015/internals/testing/helpers/ngxs-test.module.js +13 -16
  22. package/esm2015/internals/testing/index.js +1 -5
  23. package/esm2015/internals/testing/ngxs-store-internals-testing.js +2 -6
  24. package/esm2015/internals/testing/ngxs.setup.js +1 -31
  25. package/esm2015/internals/testing/skip-console-logging.js +7 -42
  26. package/esm2015/internals/testing/symbol.js +2 -29
  27. package/esm2015/ngxs-store.js +2 -23
  28. package/esm2015/operators/append.js +7 -18
  29. package/esm2015/operators/compose.js +4 -22
  30. package/esm2015/operators/iif.js +12 -30
  31. package/esm2015/operators/index.js +1 -5
  32. package/esm2015/operators/insert-item.js +10 -22
  33. package/esm2015/operators/ngxs-store-operators.js +2 -6
  34. package/esm2015/operators/patch.js +5 -22
  35. package/esm2015/operators/remove-item.js +5 -17
  36. package/esm2015/operators/types.js +2 -5
  37. package/esm2015/operators/update-item.js +12 -26
  38. package/esm2015/operators/utils.js +1 -32
  39. package/esm2015/src/actions/actions.js +1 -18
  40. package/esm2015/src/actions/symbols.js +2 -39
  41. package/esm2015/src/actions-stream.js +24 -90
  42. package/esm2015/src/configs/messages.config.js +1 -44
  43. package/esm2015/src/decorators/action.js +3 -18
  44. package/esm2015/src/decorators/select/select-factory.js +10 -27
  45. package/esm2015/src/decorators/select/select.js +3 -22
  46. package/esm2015/src/decorators/select/symbols.js +4 -25
  47. package/esm2015/src/decorators/selector/selector.js +5 -29
  48. package/esm2015/src/decorators/selector/symbols.js +2 -5
  49. package/esm2015/src/decorators/selector-options.js +4 -18
  50. package/esm2015/src/decorators/state.js +5 -44
  51. package/esm2015/src/dev-features/ngxs-development.module.js +8 -12
  52. package/esm2015/src/dev-features/ngxs-unhandled-actions-logger.js +12 -37
  53. package/esm2015/src/dev-features/symbols.js +2 -18
  54. package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +10 -56
  55. package/esm2015/src/execution/internal-ngxs-execution-strategy.js +10 -32
  56. package/esm2015/src/execution/noop-ngxs-execution-strategy.js +7 -19
  57. package/esm2015/src/execution/symbols.js +3 -32
  58. package/esm2015/src/internal/dispatcher.js +26 -121
  59. package/esm2015/src/internal/error-handler.js +18 -72
  60. package/esm2015/src/internal/internals.js +24 -244
  61. package/esm2015/src/internal/lifecycle-state-manager.js +19 -117
  62. package/esm2015/src/internal/state-context-factory.js +9 -67
  63. package/esm2015/src/internal/state-factory.js +42 -225
  64. package/esm2015/src/internal/state-operations.js +19 -80
  65. package/esm2015/src/internal/state-operators.js +6 -20
  66. package/esm2015/src/internal/state-stream.js +7 -13
  67. package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +7 -17
  68. package/esm2015/src/module.js +12 -47
  69. package/esm2015/src/modules/ngxs-feature.module.js +18 -36
  70. package/esm2015/src/modules/ngxs-root.module.js +18 -26
  71. package/esm2015/src/operators/leave-ngxs.js +8 -43
  72. package/esm2015/src/operators/of-action.js +16 -111
  73. package/esm2015/src/plugin-manager.js +17 -50
  74. package/esm2015/src/plugin_api.js +1 -5
  75. package/esm2015/src/private_api.js +3 -0
  76. package/esm2015/src/public_api.js +1 -5
  77. package/esm2015/src/public_to_deprecate.js +1 -51
  78. package/esm2015/src/state-token/state-token.js +4 -32
  79. package/esm2015/src/state-token/symbols.js +2 -5
  80. package/esm2015/src/store.js +20 -104
  81. package/esm2015/src/symbols.js +7 -177
  82. package/esm2015/src/utils/compose.js +5 -23
  83. package/esm2015/src/utils/freeze.js +5 -20
  84. package/esm2015/src/utils/selector-utils.js +23 -136
  85. package/esm2015/src/utils/store-validators.js +3 -36
  86. package/esm2015/src/utils/utils.js +13 -64
  87. package/fesm2015/ngxs-store-internals-testing.js +38 -159
  88. package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
  89. package/fesm2015/ngxs-store-internals.js +18 -100
  90. package/fesm2015/ngxs-store-internals.js.map +1 -1
  91. package/fesm2015/ngxs-store-operators.js +52 -185
  92. package/fesm2015/ngxs-store-operators.js.map +1 -1
  93. package/fesm2015/ngxs-store.js +400 -2473
  94. package/fesm2015/ngxs-store.js.map +1 -1
  95. package/index.d.ts +4 -0
  96. package/internals/index.d.ts +1 -1
  97. package/internals/internal-tokens.d.ts +2 -8
  98. package/internals/ngxs-bootstrapper.d.ts +4 -1
  99. package/internals/ngxs-store-internals.d.ts +1 -0
  100. package/internals/package.json +2 -5
  101. package/internals/testing/helpers/ngxs-test.component.d.ts +3 -0
  102. package/internals/testing/helpers/ngxs-test.module.d.ts +6 -0
  103. package/internals/testing/ngxs-store-internals-testing.d.ts +1 -0
  104. package/internals/testing/package.json +2 -5
  105. package/ngxs-store.d.ts +1 -18
  106. package/operators/ngxs-store-operators.d.ts +1 -0
  107. package/operators/package.json +2 -5
  108. package/package.json +3 -6
  109. package/src/actions/actions.d.ts +2 -2
  110. package/src/actions-stream.d.ts +5 -0
  111. package/src/decorators/select/select-factory.d.ts +3 -0
  112. package/src/decorators/state.d.ts +1 -1
  113. package/src/dev-features/ngxs-development.module.d.ts +4 -0
  114. package/src/dev-features/ngxs-unhandled-actions-logger.d.ts +3 -0
  115. package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +3 -0
  116. package/src/execution/internal-ngxs-execution-strategy.d.ts +3 -0
  117. package/src/execution/noop-ngxs-execution-strategy.d.ts +3 -0
  118. package/src/internal/dispatcher.d.ts +5 -0
  119. package/src/internal/error-handler.d.ts +4 -1
  120. package/src/internal/lifecycle-state-manager.d.ts +3 -0
  121. package/src/internal/state-context-factory.d.ts +3 -0
  122. package/src/internal/state-factory.d.ts +7 -4
  123. package/src/internal/state-operations.d.ts +3 -0
  124. package/src/internal/state-stream.d.ts +3 -0
  125. package/src/module.d.ts +4 -0
  126. package/src/modules/ngxs-feature.module.d.ts +4 -0
  127. package/src/modules/ngxs-root.module.d.ts +4 -0
  128. package/src/plugin-manager.d.ts +4 -1
  129. package/src/private_api.d.ts +2 -0
  130. package/src/store.d.ts +3 -0
  131. package/src/symbols.d.ts +4 -1
  132. package/src/utils/utils.d.ts +1 -1
  133. package/bundles/ngxs-store-internals-testing.umd.min.js +0 -16
  134. package/bundles/ngxs-store-internals-testing.umd.min.js.map +0 -1
  135. package/bundles/ngxs-store-internals.umd.min.js +0 -2
  136. package/bundles/ngxs-store-internals.umd.min.js.map +0 -1
  137. package/bundles/ngxs-store-operators.umd.min.js +0 -16
  138. package/bundles/ngxs-store-operators.umd.min.js.map +0 -1
  139. package/bundles/ngxs-store.umd.min.js +0 -16
  140. package/bundles/ngxs-store.umd.min.js.map +0 -1
  141. package/esm5/index.js +0 -13
  142. package/esm5/internals/angular.js +0 -20
  143. package/esm5/internals/index.js +0 -10
  144. package/esm5/internals/initial-state.js +0 -45
  145. package/esm5/internals/internal-tokens.js +0 -16
  146. package/esm5/internals/memoize.js +0 -71
  147. package/esm5/internals/ngxs-bootstrapper.js +0 -56
  148. package/esm5/internals/ngxs-store-internals.js +0 -9
  149. package/esm5/internals/src/symbols.js +0 -14
  150. package/esm5/internals/symbols.js +0 -14
  151. package/esm5/internals/testing/fresh-platform.js +0 -121
  152. package/esm5/internals/testing/helpers/ngxs-test.component.js +0 -32
  153. package/esm5/internals/testing/helpers/ngxs-test.module.js +0 -32
  154. package/esm5/internals/testing/index.js +0 -8
  155. package/esm5/internals/testing/ngxs-store-internals-testing.js +0 -9
  156. package/esm5/internals/testing/ngxs.setup.js +0 -98
  157. package/esm5/internals/testing/skip-console-logging.js +0 -62
  158. package/esm5/internals/testing/symbol.js +0 -29
  159. package/esm5/ngxs-store.js +0 -26
  160. package/esm5/operators/append.js +0 -31
  161. package/esm5/operators/compose.js +0 -28
  162. package/esm5/operators/iif.js +0 -56
  163. package/esm5/operators/index.js +0 -18
  164. package/esm5/operators/insert-item.js +0 -41
  165. package/esm5/operators/ngxs-store-operators.js +0 -9
  166. package/esm5/operators/patch.js +0 -39
  167. package/esm5/operators/remove-item.js +0 -34
  168. package/esm5/operators/types.js +0 -5
  169. package/esm5/operators/update-item.js +0 -54
  170. package/esm5/operators/utils.js +0 -50
  171. package/esm5/src/actions/actions.js +0 -62
  172. package/esm5/src/actions/symbols.js +0 -39
  173. package/esm5/src/actions-stream.js +0 -201
  174. package/esm5/src/configs/messages.config.js +0 -79
  175. package/esm5/src/decorators/action.js +0 -60
  176. package/esm5/src/decorators/select/select-factory.js +0 -46
  177. package/esm5/src/decorators/select/select.js +0 -50
  178. package/esm5/src/decorators/select/symbols.js +0 -51
  179. package/esm5/src/decorators/selector/selector.js +0 -59
  180. package/esm5/src/decorators/selector/symbols.js +0 -5
  181. package/esm5/src/decorators/selector-options.js +0 -34
  182. package/esm5/src/decorators/state.js +0 -78
  183. package/esm5/src/dev-features/ngxs-development.module.js +0 -34
  184. package/esm5/src/dev-features/ngxs-unhandled-actions-logger.js +0 -100
  185. package/esm5/src/dev-features/symbols.js +0 -22
  186. package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +0 -123
  187. package/esm5/src/execution/internal-ngxs-execution-strategy.js +0 -54
  188. package/esm5/src/execution/noop-ngxs-execution-strategy.js +0 -43
  189. package/esm5/src/execution/symbols.js +0 -52
  190. package/esm5/src/internal/dispatcher.js +0 -231
  191. package/esm5/src/internal/error-handler.js +0 -125
  192. package/esm5/src/internal/internals.js +0 -470
  193. package/esm5/src/internal/lifecycle-state-manager.js +0 -224
  194. package/esm5/src/internal/state-context-factory.js +0 -135
  195. package/esm5/src/internal/state-factory.js +0 -599
  196. package/esm5/src/internal/state-operations.js +0 -134
  197. package/esm5/src/internal/state-operators.js +0 -34
  198. package/esm5/src/internal/state-stream.js +0 -37
  199. package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +0 -28
  200. package/esm5/src/module.js +0 -202
  201. package/esm5/src/modules/ngxs-feature.module.js +0 -65
  202. package/esm5/src/modules/ngxs-root.module.js +0 -44
  203. package/esm5/src/operators/leave-ngxs.js +0 -58
  204. package/esm5/src/operators/of-action.js +0 -223
  205. package/esm5/src/plugin-manager.js +0 -82
  206. package/esm5/src/plugin_api.js +0 -10
  207. package/esm5/src/public_api.js +0 -31
  208. package/esm5/src/public_to_deprecate.js +0 -64
  209. package/esm5/src/state-token/state-token.js +0 -57
  210. package/esm5/src/state-token/symbols.js +0 -5
  211. package/esm5/src/store.js +0 -241
  212. package/esm5/src/symbols.js +0 -230
  213. package/esm5/src/utils/compose.js +0 -55
  214. package/esm5/src/utils/freeze.js +0 -35
  215. package/esm5/src/utils/selector-utils.js +0 -230
  216. package/esm5/src/utils/store-validators.js +0 -78
  217. package/esm5/src/utils/utils.js +0 -151
  218. package/fesm5/ngxs-store-internals-testing.js +0 -345
  219. package/fesm5/ngxs-store-internals-testing.js.map +0 -1
  220. package/fesm5/ngxs-store-internals.js +0 -217
  221. package/fesm5/ngxs-store-internals.js.map +0 -1
  222. package/fesm5/ngxs-store-operators.js +0 -341
  223. package/fesm5/ngxs-store-operators.js.map +0 -1
  224. package/fesm5/ngxs-store.js +0 -4783
  225. package/fesm5/ngxs-store.js.map +0 -1
  226. package/internals/ngxs-store-internals.metadata.json +0 -1
  227. package/internals/testing/ngxs-store-internals-testing.metadata.json +0 -1
  228. package/ngxs-store.metadata.json +0 -1
  229. package/operators/ngxs-store-operators.metadata.json +0 -1
  230. package/types/index.d.ts +0 -2
package/index.d.ts CHANGED
@@ -6,3 +6,7 @@ export * from './src/public_api';
6
6
  * The plugin api for the stuff that a plugins needs
7
7
  */
8
8
  export * from './src/plugin_api';
9
+ /**
10
+ * Private exports required for the Ivy compilation.
11
+ */
12
+ export * from './src/private_api';
@@ -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
- * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally
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
- readonly appBootstrapped$: Observable<boolean>;
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
  }
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@ngxs/store/internals" />
4
5
  export * from './index';
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "main": "../bundles/ngxs-store-internals.umd.js",
3
- "module": "../fesm5/ngxs-store-internals.js",
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,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@ngxs/store/internals/testing" />
4
5
  export * from './index';
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "main": "../../bundles/ngxs-store-internals-testing.umd.js",
3
- "module": "../../fesm5/ngxs-store-internals-testing.js",
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,22 +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 ɵt } from './src/decorators/select/select-factory';
7
- export { NGXS_DEVELOPMENT_OPTIONS as ɵj } from './src/dev-features/symbols';
8
- export { InternalNgxsExecutionStrategy as ɵr } from './src/execution/internal-ngxs-execution-strategy';
9
- export { NGXS_EXECUTION_STRATEGY as ɵi, USER_PROVIDED_NGXS_EXECUTION_STRATEGY as ɵh } from './src/execution/symbols';
10
- export { InternalDispatchedActionResults as ɵm, InternalDispatcher as ɵn } from './src/internal/dispatcher';
11
- export { InternalErrorReporter as ɵs } from './src/internal/error-handler';
12
- export { StateClassInternal as ɵu, ensureSelectorMetadata as ɵx, ensureStoreMetadata as ɵv, getSelectorMetadata as ɵy, getStoreMetadata as ɵw } from './src/internal/internals';
13
- export { LifecycleStateManager as ɵz } from './src/internal/lifecycle-state-manager';
14
- export { StateContextFactory as ɵo } from './src/internal/state-context-factory';
15
- export { StateFactory as ɵl } from './src/internal/state-factory';
16
- export { InternalStateOperations as ɵp } from './src/internal/state-operations';
17
- export { NgxsFeatureModule as ɵba } from './src/modules/ngxs-feature.module';
18
- export { NgxsRootModule as ɵk } from './src/modules/ngxs-root.module';
19
- export { PluginManager as ɵq } from './src/plugin-manager';
20
- export { TokenName as ɵbb } from './src/state-token/symbols';
21
- export { FEATURE_STATE_TOKEN as ɵd, NgxsConfig as ɵf, ROOT_STATE_TOKEN as ɵc, SELECTOR_META_KEY as ɵe } from './src/symbols';
22
- export { mergeDeep as ɵg } from './src/utils/utils';
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@ngxs/store/operators" />
4
5
  export * from './index';
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "main": "../bundles/ngxs-store-operators.umd.js",
3
- "module": "../fesm5/ngxs-store-operators.js",
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/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.7.6-dev.master-fb318b1",
4
+ "version": "3.7.6-dev.master-dcdd391",
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": "fesm5/ngxs-store.js",
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": "^1.9.0"
18
+ "tslib": "^2.2.0"
22
19
  },
23
20
  "repository": {
24
21
  "type": "git",
@@ -3,13 +3,13 @@ import { PlainObject } from '@ngxs/store/internals';
3
3
  * Init action
4
4
  */
5
5
  export declare class InitState {
6
- static readonly type: string;
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 readonly type: string;
13
+ static get type(): string;
14
14
  constructor(addedStates?: PlainObject | undefined);
15
15
  }
@@ -1,6 +1,7 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { Subject, Observable } from 'rxjs';
3
3
  import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * Status of a dispatched action
6
7
  */
@@ -40,6 +41,8 @@ export declare class OrderedSubject<T> extends Subject<T> {
40
41
  */
41
42
  export declare class InternalActions extends OrderedSubject<ActionContext> implements OnDestroy {
42
43
  ngOnDestroy(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalActions, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalActions>;
43
46
  }
44
47
  /**
45
48
  * Action stream that is emitted anytime an action is dispatched.
@@ -48,4 +51,6 @@ export declare class InternalActions extends OrderedSubject<ActionContext> imple
48
51
  */
49
52
  export declare class Actions extends Observable<ActionContext> {
50
53
  constructor(internalActions$: InternalActions, internalExecutionStrategy: InternalNgxsExecutionStrategy);
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<Actions, never>;
55
+ static ɵprov: i0.ɵɵInjectableDeclaration<Actions>;
51
56
  }
@@ -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
  }
@@ -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<any>) => void;
6
+ export declare function State<T>(options: StoreOptions<T>): (target: StateClass) => void;
@@ -1,5 +1,9 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import { NgxsDevelopmentOptions } from './symbols';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class NgxsDevelopmentModule {
4
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>;
5
9
  }
@@ -1,5 +1,6 @@
1
1
  import { ActionType } from '../actions/symbols';
2
2
  import { NgxsDevelopmentOptions } from './symbols';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class NgxsUnhandledActionsLogger {
4
5
  /**
5
6
  * These actions should be ignored by default; the user can increase this
@@ -11,4 +12,6 @@ export declare class NgxsUnhandledActionsLogger {
11
12
  * Adds actions to the internal list of actions that should be ignored.
12
13
  */
13
14
  ignoreActions(...actions: ActionType[]): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsUnhandledActionsLogger, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsUnhandledActionsLogger>;
14
17
  }
@@ -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
  }
@@ -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
  }
@@ -1,6 +1,7 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { NgxsExecutionStrategy } from '../execution/symbols';
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * This operator is used for piping the observable result
6
7
  * from the `dispatch()`. It has a "smart" error handling
@@ -13,11 +14,13 @@ import { NgxsExecutionStrategy } from '../execution/symbols';
13
14
  * 4) `toPromise()` without `catch` -> do `handleError()`
14
15
  * 5) `toPromise()` with `catch` -> don't `handleError()`
15
16
  */
16
- export declare function ngxsErrorHandler<T>(internalErrorReporter: InternalErrorReporter, ngxsExecutionStrategy: NgxsExecutionStrategy): (source: Observable<T>) => Observable<{}>;
17
+ export declare function ngxsErrorHandler<T>(internalErrorReporter: InternalErrorReporter, ngxsExecutionStrategy: NgxsExecutionStrategy): (source: Observable<T>) => Observable<unknown>;
17
18
  export declare class InternalErrorReporter {
18
19
  private _injector;
19
20
  /** Will be set lazily to be backward compatible. */
20
21
  private _errorHandler;
21
22
  constructor(_injector: Injector);
22
23
  reportErrorSafely(error: any): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalErrorReporter, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalErrorReporter>;
23
26
  }
@@ -5,6 +5,7 @@ import { InternalErrorReporter } from './error-handler';
5
5
  import { StateContextFactory } from './state-context-factory';
6
6
  import { InternalStateOperations } from './state-operations';
7
7
  import { StatesAndDefaults } from './internals';
8
+ import * as i0 from "@angular/core";
8
9
  export declare class LifecycleStateManager implements OnDestroy {
9
10
  private _store;
10
11
  private _internalErrorReporter;
@@ -18,4 +19,6 @@ export declare class LifecycleStateManager implements OnDestroy {
18
19
  private _invokeInitOnStates;
19
20
  private _invokeBootstrapOnStates;
20
21
  private _getStateContext;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<LifecycleStateManager, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<LifecycleStateManager>;
21
24
  }
@@ -1,6 +1,7 @@
1
1
  import { StateContext } from '../symbols';
2
2
  import { MappedStore } from '../internal/internals';
3
3
  import { InternalStateOperations } from '../internal/state-operations';
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * State Context factory class
6
7
  * @ignore
@@ -12,4 +13,6 @@ export declare class StateContextFactory {
12
13
  * Create the state context
13
14
  */
14
15
  createStateContext<T>(mappedStore: MappedStore): StateContext<T>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<StateContextFactory, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<StateContextFactory>;
15
18
  }
@@ -5,6 +5,7 @@ import { MappedStore, StateClassInternal, StatesAndDefaults, StatesByName, Runti
5
5
  import { ActionContext, InternalActions } from '../actions-stream';
6
6
  import { InternalDispatchedActionResults } from '../internal/dispatcher';
7
7
  import { StateContextFactory } from '../internal/state-context-factory';
8
+ import * as i0 from "@angular/core";
8
9
  /**
9
10
  * State factory class
10
11
  * @ignore
@@ -20,11 +21,11 @@ export declare class StateFactory implements OnDestroy {
20
21
  private _actionsSubscription;
21
22
  constructor(_injector: Injector, _config: NgxsConfig, _parentFactory: StateFactory, _actions: InternalActions, _actionResults: InternalDispatchedActionResults, _stateContextFactory: StateContextFactory, _initialState: any);
22
23
  private _states;
23
- readonly states: MappedStore[];
24
+ get states(): MappedStore[];
24
25
  private _statesByName;
25
- readonly statesByName: StatesByName;
26
+ get statesByName(): StatesByName;
26
27
  private _statePaths;
27
- private readonly statePaths;
28
+ private get statePaths();
28
29
  getRuntimeSelectorContext: () => RuntimeSelectorContext;
29
30
  private static cloneDefaults;
30
31
  ngOnDestroy(): void;
@@ -43,7 +44,7 @@ export declare class StateFactory implements OnDestroy {
43
44
  /**
44
45
  * Invoke actions on the states.
45
46
  */
46
- invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<{}[]>;
47
+ invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<unknown[]>;
47
48
  private addToStatesMap;
48
49
  private addRuntimeInfoToMeta;
49
50
  /**
@@ -54,4 +55,6 @@ export declare class StateFactory implements OnDestroy {
54
55
  * @param path
55
56
  */
56
57
  private hasBeenMountedAndBootstrapped;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<StateFactory, [null, null, { optional: true; skipSelf: true; }, null, null, null, { optional: true; }]>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<StateFactory>;
57
60
  }
@@ -2,6 +2,7 @@ import { StateOperations, StatesAndDefaults } from '../internal/internals';
2
2
  import { InternalDispatcher } from '../internal/dispatcher';
3
3
  import { StateStream } from './state-stream';
4
4
  import { NgxsConfig } from '../symbols';
5
+ import * as i0 from "@angular/core";
5
6
  /**
6
7
  * State Context factory class
7
8
  * @ignore
@@ -16,4 +17,6 @@ export declare class InternalStateOperations {
16
17
  */
17
18
  getRootStateOperations(): StateOperations<any>;
18
19
  setStateToTheCurrentWithNew(results: StatesAndDefaults): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalStateOperations, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalStateOperations>;
19
22
  }
@@ -1,6 +1,7 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { PlainObject } from '@ngxs/store/internals';
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * BehaviorSubject of the entire state.
6
7
  * @ignore
@@ -8,4 +9,6 @@ import { PlainObject } from '@ngxs/store/internals';
8
9
  export declare class StateStream extends BehaviorSubject<PlainObject> implements OnDestroy {
9
10
  constructor();
10
11
  ngOnDestroy(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<StateStream, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<StateStream>;
11
14
  }
package/src/module.d.ts CHANGED
@@ -3,6 +3,7 @@ import { StateClass } from '@ngxs/store/internals';
3
3
  import { NgxsModuleOptions } from './symbols';
4
4
  import { NgxsRootModule } from './modules/ngxs-root.module';
5
5
  import { NgxsFeatureModule } from './modules/ngxs-feature.module';
6
+ import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Ngxs Module
8
9
  */
@@ -20,4 +21,7 @@ export declare class NgxsModule {
20
21
  private static ngxsConfigFactory;
21
22
  private static appBootstrapListenerFactory;
22
23
  private static getInitialState;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsModule, never>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsModule, never, never, never>;
26
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsModule>;
23
27
  }
@@ -3,6 +3,7 @@ import { InternalStateOperations } from '../internal/state-operations';
3
3
  import { StateFactory } from '../internal/state-factory';
4
4
  import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
5
5
  import { StateClassInternal } from '../internal/internals';
6
+ import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Feature module
8
9
  * @ignore
@@ -10,4 +11,7 @@ import { StateClassInternal } from '../internal/internals';
10
11
  export declare class NgxsFeatureModule {
11
12
  constructor(_store: Store, internalStateOperations: InternalStateOperations, factory: StateFactory, states: StateClassInternal<any, any>[][] | undefined, lifecycleStateManager: LifecycleStateManager);
12
13
  private static flattenStates;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, [null, null, null, { optional: true; }, null]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFeatureModule, never, never, never>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFeatureModule>;
13
17
  }
@@ -4,10 +4,14 @@ import { Store } from '../store';
4
4
  import { SelectFactory } from '../decorators/select/select-factory';
5
5
  import { StateClassInternal } from '../internal/internals';
6
6
  import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
7
+ import * as i0 from "@angular/core";
7
8
  /**
8
9
  * Root module
9
10
  * @ignore
10
11
  */
11
12
  export declare class NgxsRootModule {
12
13
  constructor(factory: StateFactory, internalStateOperations: InternalStateOperations, _store: Store, _select: SelectFactory, states: StateClassInternal<any, any>[] | undefined, lifecycleStateManager: LifecycleStateManager);
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule, [null, null, null, null, { optional: true; }, null]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsRootModule, never, never, never>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsRootModule>;
13
17
  }
@@ -1,10 +1,13 @@
1
1
  import { NgxsPlugin, NgxsPluginFn } from './symbols';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class PluginManager {
3
4
  private _parentManager;
4
5
  private _pluginHandlers;
5
6
  plugins: NgxsPluginFn[];
6
7
  constructor(_parentManager: PluginManager, _pluginHandlers: NgxsPlugin[]);
7
- private readonly rootPlugins;
8
+ private get rootPlugins();
8
9
  private registerHandlers;
9
10
  private getPluginHandlers;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<PluginManager, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<PluginManager>;
10
13
  }
@@ -0,0 +1,2 @@
1
+ export { NgxsRootModule as ɵNgxsRootModule } from './modules/ngxs-root.module';
2
+ export { NgxsFeatureModule as ɵNgxsFeatureModule } from './modules/ngxs-feature.module';
package/src/store.d.ts CHANGED
@@ -6,6 +6,7 @@ import { StateStream } from './internal/state-stream';
6
6
  import { NgxsConfig } from './symbols';
7
7
  import { StateToken } from './state-token/state-token';
8
8
  import { StateFactory } from './internal/state-factory';
9
+ import * as i0 from "@angular/core";
9
10
  export declare class Store {
10
11
  private _stateStream;
11
12
  private _internalStateOperations;
@@ -56,4 +57,6 @@ export declare class Store {
56
57
  reset(state: any): any;
57
58
  private getStoreBoundSelectorFn;
58
59
  private initStateStream;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<Store, [null, null, null, null, null, { optional: true; }]>;
61
+ static ɵprov: i0.ɵɵInjectableDeclaration<Store>;
59
62
  }
package/src/symbols.d.ts CHANGED
@@ -5,9 +5,10 @@ import { StateOperator } from '@ngxs/store/operators';
5
5
  import { NgxsExecutionStrategy } from './execution/symbols';
6
6
  import { SharedSelectorOptions } from './internal/internals';
7
7
  import { StateToken } from './state-token/state-token';
8
+ import * as i0 from "@angular/core";
8
9
  export declare const ROOT_STATE_TOKEN: InjectionToken<any>;
9
10
  export declare const FEATURE_STATE_TOKEN: InjectionToken<any>;
10
- export declare const NGXS_PLUGINS: InjectionToken<{}>;
11
+ export declare const NGXS_PLUGINS: InjectionToken<unknown>;
11
12
  export declare const META_KEY = "NGXS_META";
12
13
  export declare const META_OPTIONS_KEY = "NGXS_OPTIONS_META";
13
14
  export declare const SELECTOR_META_KEY = "NGXS_SELECTOR_META";
@@ -59,6 +60,8 @@ export declare class NgxsConfig {
59
60
  */
60
61
  selectorOptions: SharedSelectorOptions;
61
62
  constructor();
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsConfig, never>;
64
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsConfig>;
62
65
  }
63
66
  export { StateOperator };
64
67
  /**
@@ -35,7 +35,7 @@ export declare const getValue: (obj: any, prop: string) => any;
35
35
  *
36
36
  * @ignore
37
37
  */
38
- export declare const isObject: (item: any) => boolean;
38
+ export declare const isObject: (item: any) => any;
39
39
  /**
40
40
  * Deep merge two objects.
41
41
  *
@@ -1,16 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/core/testing"),require("@angular/common"),require("@angular/platform-browser"),require("@angular/platform-browser-dynamic/testing"),require("@ngxs/store")):"function"==typeof define&&define.amd?define("@ngxs/store/internals/testing",["exports","@angular/core","@angular/core/testing","@angular/common","@angular/platform-browser","@angular/platform-browser-dynamic/testing","@ngxs/store"],t):t(((e=e||self).ngxs=e.ngxs||{},e.ngxs.store=e.ngxs.store||{},e.ngxs.store.internals=e.ngxs.store.internals||{},e.ngxs.store.internals.testing={}),e.ng.core,e.ng.core.testing,e.ng.common,e.ng.platformBrowser,e.ng.platformBrowserDynamic.testing,e.ngxs.store)}(this,(function(e,t,n,r,o,s,i){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function a(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}var f=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"app-root",template:""}]}],e}(),p=function(){function e(){}return e.ngDoBootstrap=function(e){e.bootstrap(f)},e.decorators=[{type:t.NgModule,args:[{imports:[o.BrowserModule],declarations:[f],entryComponents:[f]}]}],e}(),g=function(){function e(){}return e.configureTestingStates=function(t){return this.resetTestBed(),t.before&&t.before(),n.TestBed.configureTestingModule({imports:l([p,i.NgxsModule.forRoot(t.states||[],t.ngxsOptions||{})],t.imports||[])}).compileComponents(),e.ngxsBootstrap(),{get store(){return n.TestBed.inject(i.Store)},get getTestBed(){return n.TestBed}}},e.ngxsBootstrap=function(){e.createRootNode(),p.ngDoBootstrap(n.TestBed.inject(t.ApplicationRef))},e.resetTestBed=function(){n.TestBed.resetTestEnvironment(),n.TestBed.initTestEnvironment(s.BrowserDynamicTestingModule,s.platformBrowserDynamicTesting())},e.createRootNode=function(e){void 0===e&&(e="app-root");var t=n.TestBed.inject(r.DOCUMENT),s=(new o.ɵBrowserDomAdapter).createElement(e);t.body.appendChild(s)},e}();function m(){t.destroyPlatform(),function(){var e=n.TestBed.inject(r.DOCUMENT),t=o.ɵgetDOM().createElement("app-root",e);e.body.appendChild(t)}()}function d(){!function(){var e=document.getElementsByTagName("app-root").item(0);try{document.body.removeChild(e)}catch(e){}}(),t.destroyPlatform(),+t.VERSION.major<14&&t.createPlatform(n.TestBed)}e.NgxsTestBed=g,e.freshPlatform=function(e){var t=null,n=null,r=null,o=1===e.length;return o&&(r=new Promise((function(e,r){t=e,n=r}))),function(){return a(this,void 0,void 0,(function(){return c(this,(function(s){switch(s.label){case 0:return s.trys.push([0,,6,7]),m(),o?[4,e((function(e){e?n(e):t()}))]:[3,3];case 1:return s.sent(),[4,r];case 2:return s.sent(),[3,5];case 3:return[4,e()];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:return d(),[7];case 7:return[2]}}))}))}},e.skipConsoleLogging=function(e){var t=[jest.spyOn(console,"log").mockImplementation((function(){})),jest.spyOn(console,"warn").mockImplementation((function(){})),jest.spyOn(console,"error").mockImplementation((function(){})),jest.spyOn(console,"info").mockImplementation((function(){}))];function n(){t.forEach((function(e){return e.mockRestore()}))}var r=!1;try{var o=e();return o instanceof Promise?(r=!0,o.finally((function(){return n()}))):o}finally{r||n()}},Object.defineProperty(e,"__esModule",{value:!0})}));
16
- //# sourceMappingURL=ngxs-store-internals-testing.umd.min.js.map