@wirestate/react 0.6.0 → 0.6.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 (247) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/cjs/development/index.js +2 -2
  3. package/cjs/development/index.js.map +1 -1
  4. package/cjs/development/lib.js +4 -4
  5. package/cjs/development/lib.js.map +1 -1
  6. package/cjs/development/test-utils.js +2 -1050
  7. package/cjs/development/test-utils.js.map +1 -1
  8. package/cjs/production/index.js.map +1 -1
  9. package/cjs/production/lib.js.map +1 -1
  10. package/cjs/production/test-utils.js +1 -1
  11. package/cjs/production/test-utils.js.map +1 -1
  12. package/esm/development/commands/use-command-caller.js.map +1 -0
  13. package/esm/development/commands/use-command-handler.js.map +1 -0
  14. package/esm/development/commands/use-optional-command-caller.js.map +1 -0
  15. package/esm/development/error/error-code.js.map +1 -0
  16. package/esm/development/events/use-event-emitter.js.map +1 -0
  17. package/esm/development/events/use-event.js.map +1 -0
  18. package/esm/development/events/use-events-handler.js.map +1 -0
  19. package/esm/development/{wirestate-react/events → events}/use-events.js +0 -1
  20. package/esm/development/events/use-events.js.map +1 -0
  21. package/esm/development/{wirestate-react/provision → provision}/create-injectables-provider.js +2 -2
  22. package/esm/development/provision/create-injectables-provider.js.map +1 -0
  23. package/esm/development/{wirestate-react/provision → provision}/ioc-context.js +3 -3
  24. package/esm/development/provision/ioc-context.js.map +1 -0
  25. package/esm/development/{wirestate-react/provision → provision}/ioc-provider.js +2 -2
  26. package/esm/development/provision/ioc-provider.js.map +1 -0
  27. package/esm/development/provision/use-container-revision.js.map +1 -0
  28. package/esm/development/provision/use-container.js.map +1 -0
  29. package/esm/development/provision/use-injection.js.map +1 -0
  30. package/esm/development/{wirestate-react/provision → provision}/use-ioc-context.js +2 -2
  31. package/esm/development/provision/use-ioc-context.js.map +1 -0
  32. package/esm/development/provision/use-optional-injection.js.map +1 -0
  33. package/esm/development/queries/use-optional-query-caller.js.map +1 -0
  34. package/esm/development/queries/use-optional-sync-query-caller.js.map +1 -0
  35. package/esm/development/queries/use-query-caller.js.map +1 -0
  36. package/esm/development/queries/use-query-handler.js.map +1 -0
  37. package/esm/development/queries/use-sync-query-caller.js.map +1 -0
  38. package/esm/development/{wirestate-react/test-utils → test-utils}/with-ioc-provider.js +1 -7
  39. package/esm/development/test-utils/with-ioc-provider.js.map +1 -0
  40. package/esm/production/commands/use-command-caller.js.map +1 -0
  41. package/esm/production/commands/use-command-handler.js.map +1 -0
  42. package/esm/production/commands/use-optional-command-caller.js.map +1 -0
  43. package/esm/production/error/error-code.js.map +1 -0
  44. package/esm/production/events/use-event-emitter.js.map +1 -0
  45. package/esm/production/events/use-event.js.map +1 -0
  46. package/esm/production/events/use-events-handler.js.map +1 -0
  47. package/esm/production/events/use-events.js +1 -0
  48. package/esm/production/events/use-events.js.map +1 -0
  49. package/esm/production/provision/create-injectables-provider.js +1 -0
  50. package/esm/production/provision/create-injectables-provider.js.map +1 -0
  51. package/esm/production/provision/ioc-context.js +1 -0
  52. package/esm/production/provision/ioc-context.js.map +1 -0
  53. package/esm/production/provision/ioc-provider.js +1 -0
  54. package/esm/production/provision/ioc-provider.js.map +1 -0
  55. package/esm/production/provision/use-container-revision.js.map +1 -0
  56. package/esm/production/provision/use-container.js.map +1 -0
  57. package/esm/production/provision/use-injection.js.map +1 -0
  58. package/esm/production/provision/use-ioc-context.js +1 -0
  59. package/esm/production/provision/use-ioc-context.js.map +1 -0
  60. package/esm/production/provision/use-optional-injection.js.map +1 -0
  61. package/esm/production/queries/use-optional-query-caller.js.map +1 -0
  62. package/esm/production/queries/use-optional-sync-query-caller.js.map +1 -0
  63. package/esm/production/queries/use-query-caller.js.map +1 -0
  64. package/esm/production/queries/use-query-handler.js.map +1 -0
  65. package/esm/production/queries/use-sync-query-caller.js.map +1 -0
  66. package/esm/production/test-utils/with-ioc-provider.js +1 -0
  67. package/esm/production/test-utils/with-ioc-provider.js.map +1 -0
  68. package/index.d.ts +47 -11
  69. package/package.json +1 -1
  70. package/esm/development/wirestate-core/bind/bind-constant.js +0 -19
  71. package/esm/development/wirestate-core/bind/bind-constant.js.map +0 -1
  72. package/esm/development/wirestate-core/bind/bind-dynamic-value.js +0 -28
  73. package/esm/development/wirestate-core/bind/bind-dynamic-value.js.map +0 -1
  74. package/esm/development/wirestate-core/bind/bind-entry.js +0 -39
  75. package/esm/development/wirestate-core/bind/bind-entry.js.map +0 -1
  76. package/esm/development/wirestate-core/bind/bind-service.js +0 -253
  77. package/esm/development/wirestate-core/bind/bind-service.js.map +0 -1
  78. package/esm/development/wirestate-core/bind/get-entry-token.js +0 -14
  79. package/esm/development/wirestate-core/bind/get-entry-token.js.map +0 -1
  80. package/esm/development/wirestate-core/commands/command-bus.js +0 -112
  81. package/esm/development/wirestate-core/commands/command-bus.js.map +0 -1
  82. package/esm/development/wirestate-core/commands/get-command-handler-metadata.js +0 -27
  83. package/esm/development/wirestate-core/commands/get-command-handler-metadata.js.map +0 -1
  84. package/esm/development/wirestate-core/container/create-ioc-container.js +0 -35
  85. package/esm/development/wirestate-core/container/create-ioc-container.js.map +0 -1
  86. package/esm/development/wirestate-core/container/wire-scope.js +0 -151
  87. package/esm/development/wirestate-core/container/wire-scope.js.map +0 -1
  88. package/esm/development/wirestate-core/error/error-code.js +0 -10
  89. package/esm/development/wirestate-core/error/error-code.js.map +0 -1
  90. package/esm/development/wirestate-core/error/wirestate-error.js +0 -29
  91. package/esm/development/wirestate-core/error/wirestate-error.js.map +0 -1
  92. package/esm/development/wirestate-core/events/build-event-dispatcher.js +0 -39
  93. package/esm/development/wirestate-core/events/build-event-dispatcher.js.map +0 -1
  94. package/esm/development/wirestate-core/events/event-bus.js +0 -52
  95. package/esm/development/wirestate-core/events/event-bus.js.map +0 -1
  96. package/esm/development/wirestate-core/events/get-event-handler-metadata.js +0 -27
  97. package/esm/development/wirestate-core/events/get-event-handler-metadata.js.map +0 -1
  98. package/esm/development/wirestate-core/queries/get-query-handler-metadata.js +0 -27
  99. package/esm/development/wirestate-core/queries/get-query-handler-metadata.js.map +0 -1
  100. package/esm/development/wirestate-core/queries/query-bus.js +0 -99
  101. package/esm/development/wirestate-core/queries/query-bus.js.map +0 -1
  102. package/esm/development/wirestate-core/registry.js +0 -56
  103. package/esm/development/wirestate-core/registry.js.map +0 -1
  104. package/esm/development/wirestate-core/service/get-activated-handler-metadata.js +0 -27
  105. package/esm/development/wirestate-core/service/get-activated-handler-metadata.js.map +0 -1
  106. package/esm/development/wirestate-core/service/get-deactivation-handler-metadata.js +0 -27
  107. package/esm/development/wirestate-core/service/get-deactivation-handler-metadata.js.map +0 -1
  108. package/esm/development/wirestate-core/test-utils/mock-bind-entry.js +0 -24
  109. package/esm/development/wirestate-core/test-utils/mock-bind-entry.js.map +0 -1
  110. package/esm/development/wirestate-core/test-utils/mock-container.js +0 -52
  111. package/esm/development/wirestate-core/test-utils/mock-container.js.map +0 -1
  112. package/esm/development/wirestate-core/types/commands.js +0 -12
  113. package/esm/development/wirestate-core/types/commands.js.map +0 -1
  114. package/esm/development/wirestate-react/commands/use-command-caller.js.map +0 -1
  115. package/esm/development/wirestate-react/commands/use-command-handler.js.map +0 -1
  116. package/esm/development/wirestate-react/commands/use-optional-command-caller.js.map +0 -1
  117. package/esm/development/wirestate-react/error/error-code.js.map +0 -1
  118. package/esm/development/wirestate-react/events/use-event-emitter.js.map +0 -1
  119. package/esm/development/wirestate-react/events/use-event.js.map +0 -1
  120. package/esm/development/wirestate-react/events/use-events-handler.js.map +0 -1
  121. package/esm/development/wirestate-react/events/use-events.js.map +0 -1
  122. package/esm/development/wirestate-react/provision/create-injectables-provider.js.map +0 -1
  123. package/esm/development/wirestate-react/provision/ioc-context.js.map +0 -1
  124. package/esm/development/wirestate-react/provision/ioc-provider.js.map +0 -1
  125. package/esm/development/wirestate-react/provision/use-container-revision.js.map +0 -1
  126. package/esm/development/wirestate-react/provision/use-container.js.map +0 -1
  127. package/esm/development/wirestate-react/provision/use-injection.js.map +0 -1
  128. package/esm/development/wirestate-react/provision/use-ioc-context.js.map +0 -1
  129. package/esm/development/wirestate-react/provision/use-optional-injection.js.map +0 -1
  130. package/esm/development/wirestate-react/queries/use-optional-query-caller.js.map +0 -1
  131. package/esm/development/wirestate-react/queries/use-optional-sync-query-caller.js.map +0 -1
  132. package/esm/development/wirestate-react/queries/use-query-caller.js.map +0 -1
  133. package/esm/development/wirestate-react/queries/use-query-handler.js.map +0 -1
  134. package/esm/development/wirestate-react/queries/use-sync-query-caller.js.map +0 -1
  135. package/esm/development/wirestate-react/test-utils/with-ioc-provider.js.map +0 -1
  136. package/esm/production/wirestate-core/bind/bind-constant.js +0 -1
  137. package/esm/production/wirestate-core/bind/bind-constant.js.map +0 -1
  138. package/esm/production/wirestate-core/bind/bind-dynamic-value.js +0 -1
  139. package/esm/production/wirestate-core/bind/bind-dynamic-value.js.map +0 -1
  140. package/esm/production/wirestate-core/bind/bind-entry.js +0 -1
  141. package/esm/production/wirestate-core/bind/bind-entry.js.map +0 -1
  142. package/esm/production/wirestate-core/bind/bind-service.js +0 -1
  143. package/esm/production/wirestate-core/bind/bind-service.js.map +0 -1
  144. package/esm/production/wirestate-core/bind/get-entry-token.js +0 -1
  145. package/esm/production/wirestate-core/bind/get-entry-token.js.map +0 -1
  146. package/esm/production/wirestate-core/commands/command-bus.js +0 -1
  147. package/esm/production/wirestate-core/commands/command-bus.js.map +0 -1
  148. package/esm/production/wirestate-core/commands/get-command-handler-metadata.js +0 -1
  149. package/esm/production/wirestate-core/commands/get-command-handler-metadata.js.map +0 -1
  150. package/esm/production/wirestate-core/container/create-ioc-container.js +0 -1
  151. package/esm/production/wirestate-core/container/create-ioc-container.js.map +0 -1
  152. package/esm/production/wirestate-core/container/wire-scope.js +0 -1
  153. package/esm/production/wirestate-core/container/wire-scope.js.map +0 -1
  154. package/esm/production/wirestate-core/error/error-code.js +0 -1
  155. package/esm/production/wirestate-core/error/error-code.js.map +0 -1
  156. package/esm/production/wirestate-core/error/wirestate-error.js +0 -1
  157. package/esm/production/wirestate-core/error/wirestate-error.js.map +0 -1
  158. package/esm/production/wirestate-core/events/build-event-dispatcher.js +0 -1
  159. package/esm/production/wirestate-core/events/build-event-dispatcher.js.map +0 -1
  160. package/esm/production/wirestate-core/events/event-bus.js +0 -1
  161. package/esm/production/wirestate-core/events/event-bus.js.map +0 -1
  162. package/esm/production/wirestate-core/events/get-event-handler-metadata.js +0 -1
  163. package/esm/production/wirestate-core/events/get-event-handler-metadata.js.map +0 -1
  164. package/esm/production/wirestate-core/queries/get-query-handler-metadata.js +0 -1
  165. package/esm/production/wirestate-core/queries/get-query-handler-metadata.js.map +0 -1
  166. package/esm/production/wirestate-core/queries/query-bus.js +0 -1
  167. package/esm/production/wirestate-core/queries/query-bus.js.map +0 -1
  168. package/esm/production/wirestate-core/registry.js +0 -1
  169. package/esm/production/wirestate-core/registry.js.map +0 -1
  170. package/esm/production/wirestate-core/service/get-activated-handler-metadata.js +0 -1
  171. package/esm/production/wirestate-core/service/get-activated-handler-metadata.js.map +0 -1
  172. package/esm/production/wirestate-core/service/get-deactivation-handler-metadata.js +0 -1
  173. package/esm/production/wirestate-core/service/get-deactivation-handler-metadata.js.map +0 -1
  174. package/esm/production/wirestate-core/test-utils/mock-bind-entry.js +0 -1
  175. package/esm/production/wirestate-core/test-utils/mock-bind-entry.js.map +0 -1
  176. package/esm/production/wirestate-core/test-utils/mock-container.js +0 -1
  177. package/esm/production/wirestate-core/test-utils/mock-container.js.map +0 -1
  178. package/esm/production/wirestate-core/types/commands.js +0 -1
  179. package/esm/production/wirestate-core/types/commands.js.map +0 -1
  180. package/esm/production/wirestate-react/commands/use-command-caller.js.map +0 -1
  181. package/esm/production/wirestate-react/commands/use-command-handler.js.map +0 -1
  182. package/esm/production/wirestate-react/commands/use-optional-command-caller.js.map +0 -1
  183. package/esm/production/wirestate-react/error/error-code.js.map +0 -1
  184. package/esm/production/wirestate-react/events/use-event-emitter.js.map +0 -1
  185. package/esm/production/wirestate-react/events/use-event.js.map +0 -1
  186. package/esm/production/wirestate-react/events/use-events-handler.js.map +0 -1
  187. package/esm/production/wirestate-react/events/use-events.js +0 -1
  188. package/esm/production/wirestate-react/events/use-events.js.map +0 -1
  189. package/esm/production/wirestate-react/provision/create-injectables-provider.js +0 -1
  190. package/esm/production/wirestate-react/provision/create-injectables-provider.js.map +0 -1
  191. package/esm/production/wirestate-react/provision/ioc-context.js +0 -1
  192. package/esm/production/wirestate-react/provision/ioc-context.js.map +0 -1
  193. package/esm/production/wirestate-react/provision/ioc-provider.js +0 -1
  194. package/esm/production/wirestate-react/provision/ioc-provider.js.map +0 -1
  195. package/esm/production/wirestate-react/provision/use-container-revision.js.map +0 -1
  196. package/esm/production/wirestate-react/provision/use-container.js.map +0 -1
  197. package/esm/production/wirestate-react/provision/use-injection.js.map +0 -1
  198. package/esm/production/wirestate-react/provision/use-ioc-context.js +0 -1
  199. package/esm/production/wirestate-react/provision/use-ioc-context.js.map +0 -1
  200. package/esm/production/wirestate-react/provision/use-optional-injection.js.map +0 -1
  201. package/esm/production/wirestate-react/queries/use-optional-query-caller.js.map +0 -1
  202. package/esm/production/wirestate-react/queries/use-optional-sync-query-caller.js.map +0 -1
  203. package/esm/production/wirestate-react/queries/use-query-caller.js.map +0 -1
  204. package/esm/production/wirestate-react/queries/use-query-handler.js.map +0 -1
  205. package/esm/production/wirestate-react/queries/use-sync-query-caller.js.map +0 -1
  206. package/esm/production/wirestate-react/test-utils/with-ioc-provider.js +0 -1
  207. package/esm/production/wirestate-react/test-utils/with-ioc-provider.js.map +0 -1
  208. /package/esm/development/{wirestate-react/commands → commands}/use-command-caller.js +0 -0
  209. /package/esm/development/{wirestate-react/commands → commands}/use-command-handler.js +0 -0
  210. /package/esm/development/{wirestate-react/commands → commands}/use-optional-command-caller.js +0 -0
  211. /package/esm/development/{wirestate-react/error → error}/error-code.js +0 -0
  212. /package/esm/development/{wirestate-react/events → events}/use-event-emitter.js +0 -0
  213. /package/esm/development/{wirestate-react/events → events}/use-event.js +0 -0
  214. /package/esm/development/{wirestate-react/events → events}/use-events-handler.js +0 -0
  215. /package/esm/development/{wirestate-react/index.js → index.js} +0 -0
  216. /package/esm/development/{wirestate-react/index.js.map → index.js.map} +0 -0
  217. /package/esm/development/{wirestate-react/provision → provision}/use-container-revision.js +0 -0
  218. /package/esm/development/{wirestate-react/provision → provision}/use-container.js +0 -0
  219. /package/esm/development/{wirestate-react/provision → provision}/use-injection.js +0 -0
  220. /package/esm/development/{wirestate-react/provision → provision}/use-optional-injection.js +0 -0
  221. /package/esm/development/{wirestate-react/queries → queries}/use-optional-query-caller.js +0 -0
  222. /package/esm/development/{wirestate-react/queries → queries}/use-optional-sync-query-caller.js +0 -0
  223. /package/esm/development/{wirestate-react/queries → queries}/use-query-caller.js +0 -0
  224. /package/esm/development/{wirestate-react/queries → queries}/use-query-handler.js +0 -0
  225. /package/esm/development/{wirestate-react/queries → queries}/use-sync-query-caller.js +0 -0
  226. /package/esm/development/{wirestate-react/test-utils.js → test-utils.js} +0 -0
  227. /package/esm/development/{wirestate-react/test-utils.js.map → test-utils.js.map} +0 -0
  228. /package/esm/production/{wirestate-react/commands → commands}/use-command-caller.js +0 -0
  229. /package/esm/production/{wirestate-react/commands → commands}/use-command-handler.js +0 -0
  230. /package/esm/production/{wirestate-react/commands → commands}/use-optional-command-caller.js +0 -0
  231. /package/esm/production/{wirestate-react/error → error}/error-code.js +0 -0
  232. /package/esm/production/{wirestate-react/events → events}/use-event-emitter.js +0 -0
  233. /package/esm/production/{wirestate-react/events → events}/use-event.js +0 -0
  234. /package/esm/production/{wirestate-react/events → events}/use-events-handler.js +0 -0
  235. /package/esm/production/{wirestate-react/index.js → index.js} +0 -0
  236. /package/esm/production/{wirestate-react/index.js.map → index.js.map} +0 -0
  237. /package/esm/production/{wirestate-react/provision → provision}/use-container-revision.js +0 -0
  238. /package/esm/production/{wirestate-react/provision → provision}/use-container.js +0 -0
  239. /package/esm/production/{wirestate-react/provision → provision}/use-injection.js +0 -0
  240. /package/esm/production/{wirestate-react/provision → provision}/use-optional-injection.js +0 -0
  241. /package/esm/production/{wirestate-react/queries → queries}/use-optional-query-caller.js +0 -0
  242. /package/esm/production/{wirestate-react/queries → queries}/use-optional-sync-query-caller.js +0 -0
  243. /package/esm/production/{wirestate-react/queries → queries}/use-query-caller.js +0 -0
  244. /package/esm/production/{wirestate-react/queries → queries}/use-query-handler.js +0 -0
  245. /package/esm/production/{wirestate-react/queries → queries}/use-sync-query-caller.js +0 -0
  246. /package/esm/production/{wirestate-react/test-utils.js → test-utils.js} +0 -0
  247. /package/esm/production/{wirestate-react/test-utils.js.map → test-utils.js.map} +0 -0
@@ -1,27 +0,0 @@
1
- import { DEACTIVATION_HANDLER_METADATA } from '../registry.js';
2
-
3
- /**
4
- * Retrieves `@OnDeactivation` method names from the class hierarchy.
5
- * Returns method names ordered from base to derived class.
6
- *
7
- * @param instance - service instance
8
- * @returns list of method names
9
- * @internal
10
- */
11
- function getDeactivationHandlerMetadata(instance) {
12
- var constructor = instance.constructor;
13
- var chain = [];
14
- // Traverse prototype chain up to Object/Function.
15
- while (typeof constructor === "function" && constructor !== Object && constructor !== Function.prototype) {
16
- var own = DEACTIVATION_HANDLER_METADATA.get(constructor);
17
- if (own && own.length > 0) {
18
- chain.push(own);
19
- }
20
- constructor = Object.getPrototypeOf(constructor);
21
- }
22
- // Reverse to ensure parent-first execution order.
23
- return chain.reverse().flat();
24
- }
25
-
26
- export { getDeactivationHandlerMetadata };
27
- //# sourceMappingURL=get-deactivation-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-deactivation-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/service/get-deactivation-handler-metadata.ts"],"sourcesContent":[null],"names":["getDeactivationHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","DEACTIVATION_HANDLER_METADATA","get","length","push","getPrototypeOf","reverse","flat"],"mappings":";;AAMA;;;;;;;AAOG;AACG,SAAUA,8BAA8BA,CAACC,QAAgB,EAAA;AAG7D,EAAA,IAAIC,WAAW,GAAYD,QAAQ,CAACC,WAAW;EAE/C,IAAMC,KAAK,GAAkC,EAAE;AAE/C;AACA,EAAA,OAAO,OAAOD,WAAW,KAAK,UAAU,IAAIA,WAAW,KAAKE,MAAM,IAAIF,WAAW,KAAKG,QAAQ,CAACC,SAAS,EAAE;AACxG,IAAA,IAAMC,GAAG,GAAkCC,6BAA6B,CAACC,GAAG,CAACP,WAAqB,CAAC;AAEnG,IAAA,IAAIK,GAAG,IAAIA,GAAG,CAACG,MAAM,GAAG,CAAC,EAAE;AACzBP,MAAAA,KAAK,CAACQ,IAAI,CAACJ,GAAG,CAAC;AACjB,IAAA;AAEAL,IAAAA,WAAW,GAAGE,MAAM,CAACQ,cAAc,CAACV,WAAW,CAAC;AAClD,EAAA;AAQA;EACA,OAAOC,KAAK,CAACU,OAAO,EAAE,CAACC,IAAI,EAAE;AAC/B;;;;"}
@@ -1,24 +0,0 @@
1
- import { bindEntry } from '../bind/bind-entry.js';
2
-
3
- /**
4
- * Binds a service entry to the IoC container for testing purposes.
5
- * This utility uses {@link bindEntry} internally.
6
- * It supports both service classes and injectable descriptors (constants, dynamic values, etc.).
7
- *
8
- * @param container - the IoC container to bind the entry to
9
- * @param entry - the service class or injectable descriptor to bind
10
- * @param options - optional binding configuration
11
- * @returns void
12
- */
13
- function mockBindEntry(container, entry, options) {
14
- if (options === void 0) {
15
- options = {};
16
- }
17
- var skipLifecycle = options.skipLifecycle;
18
- return bindEntry(container, entry, {
19
- isWithIgnoreLifecycle: skipLifecycle
20
- });
21
- }
22
-
23
- export { mockBindEntry };
24
- //# sourceMappingURL=mock-bind-entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-bind-entry.js","sources":["../../../../../../../../../src/wirestate-core/test-utils/mock-bind-entry.ts"],"sourcesContent":[null],"names":["mockBindEntry","container","entry","options","skipLifecycle","bindEntry","isWithIgnoreLifecycle"],"mappings":";;AAiBA;;;;;;;;;AASG;SACaA,aAAaA,CAC3BC,SAAoB,EACpBC,KAAyC,EACzCC,OAAmC,EAAA;AAAnC,EAAA,IAAAA,OAAA,KAAA,MAAA,EAAA;IAAAA,OAAA,GAAA,EAAmC;AAAA,EAAA;AAE3B,EAAA,IAAAC,aAAa,GAAKD,OAAO,CAAAC,aAAZ;AAErB,EAAA,OAAOC,SAAS,CAACJ,SAAS,EAAEC,KAAK,EAAE;AACjCI,IAAAA,qBAAqB,EAAEF;AACxB,GAAA,CAAC;AACJ;;;;"}
@@ -1,52 +0,0 @@
1
- import { getEntryToken } from '../bind/get-entry-token.js';
2
- import { createIocContainer } from '../container/create-ioc-container.js';
3
- import { ERROR_CODE_INVALID_ARGUMENTS } from '../error/error-code.js';
4
- import { WirestateError } from '../error/wirestate-error.js';
5
- import { mockBindEntry } from './mock-bind-entry.js';
6
-
7
- /**
8
- * Creates and configures a mock IoC container for testing.
9
- * This utility initializes a new container and binds the provided services or descriptors using {@link mockBindEntry}.
10
- * It also supports optional immediate activation of services.
11
- *
12
- * @param options - configuration options for the mock container
13
- * @returns a configured InversifyJS {@link Container}
14
- *
15
- * @throws {WirestateError} if an identifier in `activate` is not found in `services`
16
- */
17
- function mockContainer(options) {
18
- if (options === void 0) {
19
- options = {};
20
- }
21
- var _a = options.activate,
22
- activate = _a === void 0 ? [] : _a,
23
- _b = options.entries,
24
- entries = _b === void 0 ? [] : _b,
25
- skipLifecycle = options.skipLifecycle;
26
- if (activate.length) {
27
- var serviceTokens = entries.map(function (s) {
28
- return getEntryToken(s);
29
- });
30
- for (var _i = 0, activate_1 = activate; _i < activate_1.length; _i++) {
31
- var token = activate_1[_i];
32
- if (!serviceTokens.includes(token)) {
33
- throw new WirestateError(ERROR_CODE_INVALID_ARGUMENTS, "Provided services for activation not matching list of services to bind.");
34
- }
35
- }
36
- }
37
- var container = createIocContainer();
38
- for (var _c = 0, entries_1 = entries; _c < entries_1.length; _c++) {
39
- var it_1 = entries_1[_c];
40
- mockBindEntry(container, it_1, {
41
- skipLifecycle: skipLifecycle
42
- });
43
- }
44
- for (var _d = 0, activate_2 = activate; _d < activate_2.length; _d++) {
45
- var it_2 = activate_2[_d];
46
- container.get(it_2);
47
- }
48
- return container;
49
- }
50
-
51
- export { mockContainer };
52
- //# sourceMappingURL=mock-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-container.js","sources":["../../../../../../../../../src/wirestate-core/test-utils/mock-container.ts"],"sourcesContent":[null],"names":["mockContainer","options","_a","activate","_b","entries","skipLifecycle","length","serviceTokens","map","s","getEntryToken","_i","activate_1","token","includes","WirestateError","ERROR_CODE_INVALID_ARGUMENTS","container","createIocContainer","_c","entries_1","it_1","mockBindEntry","_d","activate_2","it_2","get"],"mappings":";;;;;;AA6BA;;;;;;;;;AASG;AACG,SAAUA,aAAaA,CAACC,OAAmC,EAAA;AAAnC,EAAA,IAAAA,OAAA,KAAA,MAAA,EAAA;IAAAA,OAAA,GAAA,EAAmC;AAAA,EAAA;AACvD,EAAA,IAAAC,EAAA,GAA+CD,OAAO,CAAAE,QAAzC;IAAbA,QAAQ,GAAAD,EAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,EAAA;IAAEE,EAAA,GAAgCH,OAAO,QAA3B;IAAZI,OAAO,mBAAG,EAAE,GAAAD,EAAA;IAAEE,aAAa,GAAKL,OAAO,CAAAK,aAAZ;EAElD,IAAIH,QAAQ,CAACI,MAAM,EAAE;IACnB,IAAMC,aAAa,GAA6BH,OAAO,CAACI,GAAG,CAAC,UAACC,CAAC,EAAA;MAAK,OAAAC,aAAa,CAACD,CAAC,CAAC;AAAhB,IAAA,CAAgB,CAAC;AAEpF,IAAA,KAAoB,IAAAE,EAAA,GAAA,CAAQ,EAARC,UAAA,GAAAV,QAAQ,EAARS,sBAAQ,EAARA,EAAA,EAAQ,EAAE;AAAzB,MAAA,IAAME,KAAK,GAAAD,UAAA,CAAAD,EAAA,CAAA;AACd,MAAA,IAAI,CAACJ,aAAa,CAACO,QAAQ,CAACD,KAAK,CAAC,EAAE;AAClC,QAAA,MAAM,IAAIE,cAAc,CACtBC,4BAA4B,EAC5B,yEAAyE,CAC1E;AACH,MAAA;AACF,IAAA;AACF,EAAA;AAEA,EAAA,IAAMC,SAAS,GAAcC,kBAAkB,EAAE;AAEjD,EAAA,KAAiB,IAAAC,EAAA,GAAA,CAAO,EAAPC,SAAA,GAAAhB,OAAO,EAAPe,qBAAO,EAAPA,EAAA,EAAO,EAAE;AAArB,IAAA,IAAME,IAAE,GAAAD,SAAA,CAAAD,EAAA,CAAA;AACXG,IAAAA,aAAa,CAACL,SAAS,EAAEI,IAAE,EAAE;AAAEhB,MAAAA,aAAa,EAAEA;AAAa,KAAE,CAAC;AAChE,EAAA;AAEA,EAAA,KAAiB,IAAAkB,EAAA,GAAA,CAAQ,EAARC,UAAA,GAAAtB,QAAQ,EAARqB,sBAAQ,EAARA,EAAA,EAAQ,EAAE;AAAtB,IAAA,IAAME,IAAE,GAAAD,UAAA,CAAAD,EAAA,CAAA;AACXN,IAAAA,SAAS,CAACS,GAAG,CAACD,IAAE,CAAC;AACnB,EAAA;AAEA,EAAA,OAAOR,SAAS;AAClB;;;;"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Command execution status.
3
- */
4
- var ECommandStatus;
5
- (function (ECommandStatus) {
6
- ECommandStatus["PENDING"] = "pending";
7
- ECommandStatus["SETTLED"] = "settled";
8
- ECommandStatus["ERROR"] = "error";
9
- })(ECommandStatus || (ECommandStatus = {}));
10
-
11
- export { ECommandStatus };
12
- //# sourceMappingURL=commands.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.js","sources":["../../../../../../../../../src/wirestate-core/types/commands.ts"],"sourcesContent":[null],"names":["ECommandStatus"],"mappings":"AA2CA;;AAEG;IACSA;AAAZ,CAAA,UAAYA,cAAc,EAAA;AACxBA,EAAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAJWA,cAAc,KAAdA,cAAc,GAAA,EAAA,CAAA,CAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-command-caller.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-command-caller.ts"],"sourcesContent":[null],"names":["useCommandCaller","container","useContainer","useCallback","type","data","get","CommandBus","command"],"mappings":";;;;AAQA;;;;AAIG;SACaA,gBAAgBA,GAAA;AAC9B,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAAgEC,IAAO,EAAEC,IAAQ,EAAA;AAM/E,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,UAAU,CAAC,CAACC,OAAO,CAAOJ,IAAI,EAAEC,IAAI,CAAC;AAC5D,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACZ;AACH;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-command-handler.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-command-handler.ts"],"sourcesContent":[null],"names":["useCommandHandler","type","handler","container","useContainer","handlerRef","useRef","useEffect","current","get","CommandBus","register","data"],"mappings":";;;;AAKA;;;;;;;AAOG;AACG,SAAUA,iBAAiBA,CAA2BC,IAAiB,EAAEC,OAA6B,EAAA;AAC1G,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAC3C,EAAA,IAAMC,UAAU,GAAGC,MAAM,CAAuBJ,OAAO,CAAC;AAExD;AACAK,EAAAA,SAAS,CAAC,YAAA;IACRF,UAAU,CAACG,OAAO,GAAGN,OAAO;AAC9B,EAAA,CAAC,CAAC;AAEFK,EAAAA,SAAS,CAAC,YAAA;AACR,IAAA,OAAOJ,SAAS,CAACM,GAAG,CAACC,UAAU,CAAC,CAACC,QAAQ,CAAOV,IAAI,EAAE,UAACW,IAAI,EAAA;AAAK,MAAA,OAAAP,UAAU,CAACG,OAAO,CAACI,IAAI,CAAC;AAAxB,IAAA,CAAwB,CAAC;AAC3F,EAAA,CAAC,EAAE,CAACT,SAAS,EAAEF,IAAI,CAAC,CAAC;AACvB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-optional-command-caller.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-optional-command-caller.ts"],"sourcesContent":[null],"names":["useOptionalCommandCaller","container","useContainer","useCallback","type","data","get","CommandBus","commandOptional"],"mappings":";;;;AAQA;;;;;AAKG;SACaA,wBAAwBA,GAAA;AACtC,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAAgEC,IAAO,EAAEC,IAAQ,EAAA;AAM/E,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,UAAU,CAAC,CAACC,eAAe,CAAOJ,IAAI,EAAEC,IAAI,CAAC;AACpE,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACZ;AACH;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-code.js","sources":["../../../../../../../../../src/wirestate-react/error/error-code.ts"],"sourcesContent":[null],"names":["ERROR_CODE_VALIDATION_ERROR","ERROR_CODE_INVALID_CONTEXT","ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER"],"mappings":"AAAO,IAAMA,2BAA2B,GAAW;AAC5C,IAAMC,0BAA0B,GAAW;AAE3C,IAAMC,0CAA0C,GAAW;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-event-emitter.js","sources":["../../../../../../../../../src/wirestate-react/events/use-event-emitter.ts"],"sourcesContent":[null],"names":["useEventEmitter","container","useIocContext","useCallback","type","payload","from","get","EventBus","emit"],"mappings":";;;;AAQA;;;;AAIG;SACaA,eAAeA,GAAA;AAC7B,EAAA,IAAMC,SAAS,GAAcC,aAAa,EAAE,CAACD,SAAS;EAEtD,OAAOE,WAAW,CAChB,UAAyBC,IAAO,EAAEC,OAAW,EAAEC,IAAc,EAAA;AAO3DL,IAAAA,SAAS,CAACM,GAAG,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC;AAAEL,MAAAA,IAAI,EAAAA,IAAA;AAAEC,MAAAA,OAAO,EAAAA,OAAA;AAAEC,MAAAA,IAAI,EAAAA;AAAA,KAAE,CAAC;AACvD,EAAA,CAAC,EACD,CAACL,SAAS,CAAC,CACZ;AACH;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-event.js","sources":["../../../../../../../../../src/wirestate-react/events/use-event.ts"],"sourcesContent":[null],"names":["useEvent","type","handler","typeRef","useRef","handlerRef","container","useContainer","useEffect","current","get","EventBus","subscribe","event","_a","call"],"mappings":";;;;AAKA;;;;;AAKG;AACG,SAAUA,QAAQA,CAACC,IAAe,EAAEC,OAAqB,EAAA;AAC7D,EAAA,IAAMC,OAAO,GAAgCC,MAAM,CAACH,IAAI,CAAC;AACzD,EAAA,IAAMI,UAAU,GAAmCD,MAAM,CAACF,OAAO,CAAC;AAClE,EAAA,IAAMI,SAAS,GAAcC,YAAY,EAAE;AAE3CC,EAAAA,SAAS,CAAC,YAAA;IACRL,OAAO,CAACM,OAAO,GAAGR,IAAI;IACtBI,UAAU,CAACI,OAAO,GAAGP,OAAO;AAC9B,EAAA,CAAC,CAAC;AAEFM,EAAAA,SAAS,CAAC,YAAA;IACR,OAAOF,SAAS,CAACI,GAAG,CAACC,QAAQ,CAAC,CAACC,SAAS,CAAC,UAACC,KAAK,EAAA;;AAC7C,MAAA,IAAIA,KAAK,CAACZ,IAAI,KAAKE,OAAO,CAACM,OAAO,EAAE;QAClC,CAAAK,EAAA,GAAAT,UAAU,CAACI,OAAO,MAAA,IAAA,IAAAK,EAAA,KAAA,MAAA,GAAA,MAAA,GAAAA,EAAA,CAAAC,IAAA,CAAAV,UAAA,EAAGQ,KAAK,CAAC;AAC7B,MAAA;AACF,IAAA,CAAC,CAAC;AACJ,EAAA,CAAC,EAAE,CAACP,SAAS,EAAEL,IAAI,CAAC,CAAC;AACvB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-events-handler.js","sources":["../../../../../../../../../src/wirestate-react/events/use-events-handler.ts"],"sourcesContent":[null],"names":["useEventsHandler","handler","handlerRef","useRef","container","useContainer","useEffect","current","get","EventBus","subscribe","event","_a","call"],"mappings":";;;;AAMA;;;;AAIG;AACG,SAAUA,gBAAgBA,CAACC,OAAqB,EAAA;AACpD,EAAA,IAAMC,UAAU,GAA0CC,MAAM,CAACF,OAAO,CAAC;AACzE,EAAA,IAAMG,SAAS,GAAcC,YAAY,EAAE;AAE3CC,EAAAA,SAAS,CAAC,YAAA;IACRJ,UAAU,CAACK,OAAO,GAAGN,OAAO;AAC9B,EAAA,CAAC,CAAC;AAEFK,EAAAA,SAAS,CAAC,YAAA;IACR,OAAOF,SAAS,CAACI,GAAG,CAACC,QAAQ,CAAC,CAACC,SAAS,CAAC,UAACC,KAAK,EAAA;;MAC7C,CAAAC,EAAA,GAAAV,UAAU,CAACK,OAAO,MAAA,IAAA,IAAAK,EAAA,KAAA,MAAA,GAAA,MAAA,GAAAA,EAAA,CAAAC,IAAA,CAAAX,UAAA,EAAGS,KAAK,CAAC;AAC7B,IAAA,CAAC,CAAC;AACJ,EAAA,CAAC,EAAE,CAACP,SAAS,CAAC,CAAC;AACjB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-events.js","sources":["../../../../../../../../../src/wirestate-react/events/use-events.ts"],"sourcesContent":[null],"names":["useEvents","types","handler","typesRef","useRef","handlerRef","container","useContainer","useEffect","current","get","EventBus","subscribe","event","includes","type","_a","call"],"mappings":";;;;;AAKA;;;;;AAKG;AACG,SAAUA,SAASA,CAACC,KAA+B,EAAEC,OAAqB,EAAA;AAC9E,EAAA,IAAMC,QAAQ,GAA+CC,MAAM,CAACH,KAAK,CAAC;AAC1E,EAAA,IAAMI,UAAU,GAAmCD,MAAM,CAACF,OAAO,CAAC;AAClE,EAAA,IAAMI,SAAS,GAAcC,YAAY,EAAE;AAE3CC,EAAAA,SAAS,CAAC,YAAA;IACRL,QAAQ,CAACM,OAAO,GAAGR,KAAK;IACxBI,UAAU,CAACI,OAAO,GAAGP,OAAO;AAC9B,EAAA,CAAC,CAAC;AAEFM,EAAAA,SAAS,CAAC,YAAA;IACR,OAAOF,SAAS,CAACI,GAAG,CAACC,QAAQ,CAAC,CAACC,SAAS,CAAC,UAACC,KAAK,EAAA;;MAC7C,IAAIV,QAAQ,CAACM,OAAO,CAACK,QAAQ,CAACD,KAAK,CAACE,IAAI,CAAC,EAAE;QACzC,CAAAC,EAAA,GAAAX,UAAU,CAACI,OAAO,MAAA,IAAA,IAAAO,EAAA,KAAA,MAAA,GAAA,MAAA,GAAAA,EAAA,CAAAC,IAAA,CAAAZ,UAAA,EAAGQ,KAAK,CAAC;AAC7B,MAAA;AACF,IAAA,CAAC,CAAC;AACJ,EAAA,CAAC,EAAE,CAACP,SAAS,CAAC,CAAC;AACjB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-injectables-provider.js","sources":["../../../../../../../../../src/wirestate-react/provision/create-injectables-provider.ts"],"sourcesContent":[null],"names":["createInjectablesProvider","entries","options","activate","length","entryTokens","map","getEntryToken","_i","activate_1","eager","includes","WirestateError","ERROR_CODE_VALIDATION_ERROR","concat","String","InjectablesProviderComponent","props","iocContext","useContext","IocContext","ERROR_CODE_INVALID_CONTEXT","initialPropsSnapshot","useState","useMemo","seeds","applySeeds","container","entries_1","entry","isBound","bindEntry","_a","activate_2","get","useEffect","didRebind","entries_2","activate_3","setRevision","r","entries_3","token","unbind","unapplySeeds","children","displayName"],"mappings":";;;;;AAkDA;;;;;;AAMG;AACG,SAAUA,yBAAyBA,CACvCC,OAA8D,EAC9DC,OAA+C,EAAA;AAA/C,EAAA,IAAAA,OAAA,KAAA,MAAA,EAAA;IAAAA,OAAA,GAAA,EAA+C;AAAA,EAAA;AAIvC,EAAA,IAAAC,QAAQ,GAAKD,OAAO,CAAAC,QAAZ;AAEhB,EAAA,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,MAAM,GAAG,CAAC,EAAE;AACnC,IAAA,IAAMC,WAAW,GAAqCJ,OAAO,CAACK,GAAG,CAACC,aAAa,CAAC;AAEhF,IAAA,KAAoB,IAAAC,EAAA,GAAA,CAAQ,EAARC,UAAA,GAAAN,QAAQ,EAARK,sBAAQ,EAARA,EAAA,EAAQ,EAAE;AAAzB,MAAA,IAAME,KAAK,GAAAD,UAAA,CAAAD,EAAA,CAAA;AACd,MAAA,IAAI,CAACH,WAAW,CAACM,QAAQ,CAACD,KAAK,CAAC,EAAE;AAChC,QAAA,MAAM,IAAIE,cAAc,CACtBC,2BAA2B,EAC3B,8BAAA,CAAAC,MAAA,CAA+BC,MAAM,CAACL,KAAK,CAAC,EAAA,8DAAA,CAA8D,CAC3G;AACH,MAAA;AACF,IAAA;AACF,EAAA;EAEA,SAASM,4BAA4BA,CAACC,KAAgC,EAAA;AACpE,IAAA,IAAMC,UAAU,GAA0BC,UAAU,CAACC,UAAU,CAAC;IAEhE,IAAI,CAACF,UAAU,EAAE;AACf,MAAA,MAAM,IAAIN,cAAc,CACtBS,0BAA0B,EAC1B,+EAA+E,CAChF;AACH,IAAA;AAEA;AACA;AACO,IAAA,IAAAC,oBAAoB,GAAIC,QAAQ,CAA4B,YAAA;AAAM,MAAA,OAAAN,KAAK;IAAL,CAAK,CAAC,CAAA,CAAA,CAApD;AAE3BO,IAAAA,OAAO,CAAC,YAAA;AASN;MACA,IAAIF,oBAAoB,CAACG,KAAK,EAAE;QAC9BC,UAAU,CAACR,UAAU,CAACS,SAAS,EAAEL,oBAAoB,CAACG,KAAK,CAAC;AAC9D,MAAA;AAEA,MAAA,KAAoB,IAAAjB,EAAA,GAAA,CAAO,EAAPoB,SAAA,GAAA3B,OAAO,EAAPO,qBAAO,EAAPA,EAAA,EAAO,EAAE;AAAxB,QAAA,IAAMqB,KAAK,GAAAD,SAAA,CAAApB,EAAA,CAAA;AACd,QAAA,IAAI,CAACU,UAAU,CAACS,SAAS,CAACG,OAAO,CAACvB,aAAa,CAACsB,KAAK,CAAC,CAAC,EAAE;AACvDE,UAAAA,SAAS,CAACb,UAAU,CAACS,SAAS,EAAEE,KAAK,CAAC;AACxC,QAAA;AACF,MAAA;AAEA,MAAA,IAAI1B,QAAQ,EAAE;AACZ,QAAA,KAAoB,IAAA6B,EAAA,GAAA,CAAQ,EAARC,UAAA,GAAA9B,QAAQ,EAAR6B,sBAAQ,EAARA,EAAA,EAAQ,EAAE;AAAzB,UAAA,IAAMtB,KAAK,GAAAuB,UAAA,CAAAD,EAAA,CAAA;AACdd,UAAAA,UAAU,CAACS,SAAS,CAACO,GAAG,CAACxB,KAAK,CAAC;AACjC,QAAA;AACF,MAAA;IACF,CAAC,EAAET,OAAO,CAAC;AAEXkC,IAAAA,SAAS,CAAC,YAAA;AASR;MACA,IAAIC,SAAS,GAAY,KAAK;MAE9B,IAAId,oBAAoB,CAACG,KAAK,EAAE;QAC9BC,UAAU,CAACR,UAAU,CAACS,SAAS,EAAEL,oBAAoB,CAACG,KAAK,CAAC;AAC9D,MAAA;AAEA,MAAA,KAAoB,IAAAjB,EAAA,GAAA,CAAO,EAAP6B,SAAA,GAAApC,OAAO,EAAPO,qBAAO,EAAPA,EAAA,EAAO,EAAE;AAAxB,QAAA,IAAMqB,KAAK,GAAAQ,SAAA,CAAA7B,EAAA,CAAA;AACd,QAAA,IAAI,CAACU,UAAU,CAACS,SAAS,CAACG,OAAO,CAACvB,aAAa,CAACsB,KAAK,CAAC,CAAC,EAAE;AACvDO,UAAAA,SAAS,GAAG,IAAI;AAChBL,UAAAA,SAAS,CAACb,UAAU,CAACS,SAAS,EAAEE,KAAK,CAAC;AACxC,QAAA;AACF,MAAA;AAEA,MAAA,IAAI1B,QAAQ,EAAE;AACZ,QAAA,KAAoB,IAAA6B,EAAA,GAAA,CAAQ,EAARM,UAAA,GAAAnC,QAAQ,EAAR6B,sBAAQ,EAARA,EAAA,EAAQ,EAAE;AAAzB,UAAA,IAAMtB,KAAK,GAAA4B,UAAA,CAAAN,EAAA,CAAA;AACdd,UAAAA,UAAU,CAACS,SAAS,CAACO,GAAG,CAACxB,KAAK,CAAC;AACjC,QAAA;AACF,MAAA;AAEA;AACA,MAAA,IAAI0B,SAAS,EAAE;AACblB,QAAAA,UAAU,CAACqB,WAAW,CAAC,UAACC,CAAC,EAAA;UAAK,OAAAA,CAAC,GAAG,CAAC;AAAL,QAAA,CAAK,CAAC;AACtC,MAAA;AAEA,MAAA,OAAO,YAAA;AAOL,QAAA,KAAoB,IAAAhC,EAAA,GAAA,CAAO,EAAPiC,SAAA,GAAAxC,OAAO,EAAPO,qBAAO,EAAPA,EAAA,EAAO,EAAE;AAAxB,UAAA,IAAMqB,KAAK,GAAAY,SAAA,CAAAjC,EAAA,CAAA;AACd,UAAA,IAAMkC,KAAK,GAAsBnC,aAAa,CAACsB,KAAK,CAAC;UAErD,IAAIX,UAAU,CAACS,SAAS,CAACG,OAAO,CAACY,KAAK,CAAC,EAAE;AACvCxB,YAAAA,UAAU,CAACS,SAAS,CAACgB,MAAM,CAACD,KAAK,CAAC;AACpC,UAAA;AACF,QAAA;AAEA;QACA,IAAIpB,oBAAoB,CAACG,KAAK,EAAE;UAC9BmB,YAAY,CAAC1B,UAAU,CAACS,SAAS,EAAEL,oBAAoB,CAACG,KAAK,CAAC;AAChE,QAAA;MACF,CAAC;IACH,CAAC,EAAExB,OAAO,CAAC;IAEX,OAAOgB,KAAK,CAAC4B,QAAwB;AACvC,EAAA;EAEA7B,4BAA4B,CAAC8B,WAAW,GAAG,qBAAqB;AAIhE,EAAA,OAAO9B,4BAA4B;AACrC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ioc-context.js","sources":["../../../../../../../../../src/wirestate-react/provision/ioc-context.ts"],"sourcesContent":[null],"names":["IocContext","createContext","displayName"],"mappings":";;AAuBA;;;AAGG;IACUA,UAAU,GAAmCC,aAAa,CAAwB,IAAI;AAEnGD,UAAU,CAACE,WAAW,GAAG,YAAY;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ioc-provider.js","sources":["../../../../../../../../../src/wirestate-react/provision/ioc-provider.ts"],"sourcesContent":[null],"names":["IocProvider","_a","externalContainer","seed","children","_b","useState","revision","setRevision","ownedContainer","createIocContainer","container","WirestateError","ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER","value","useMemo","useEffect","applySharedSeed","createElement","IocContext","Provider"],"mappings":";;;;;AAoBA;;;;;;;;AAQG;AACG,SAAUA,WAAWA,CAACC,EAAmE,EAAA;AAAtD,EAAA,IAAAC,iBAAiB,eAAA;IAAEC,IAAI,GAAAF,EAAA,CAAAE,IAAA;IAAEC,QAAQ,GAAAH,EAAA,CAAAG,QAAA;AACxE;AACM,EAAA,IAAAC,EAAA,GAA0BC,QAAQ,CAAS,CAAC,CAAC;AAA5CC,IAAAA,QAAQ,GAAAF,EAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,WAAW,GAAAH,EAAA,CAAA,CAAA,CAAuB;AACnD;AACO,EAAA,IAAAI,cAAc,GAAIH,QAAQ,CAAmB;AAAM,IAAA,OAACJ,iBAAiB,GAAG,IAAI,GAAGQ,kBAAkB,EAAE;EAAhD,CAAiD,CAAC,CAAA,CAAA,CAAvF;AAErB,EAAA,IAAMC,SAAS,GAAGT,iBAAiB,KAAA,IAAA,IAAjBA,iBAAiB,KAAA,MAAA,GAAjBA,iBAAiB,GAAIO,cAAc;EAErD,IAAI,CAACE,SAAS,EAAE;AACd,IAAA,MAAM,IAAIC,cAAc,CACtBC,0CAA0C,EAC1C,qDAAqD,CACtD;AACH,EAAA;AAEA;AACA,EAAA,IAAMC,KAAK,GAAgBC,OAAO,CAAc,YAAA;IAAM,OAAC;AAAEJ,MAAAA,SAAS,EAAAA,SAAA;AAAEJ,MAAAA,QAAQ,EAAAA,QAAA;AAAEC,MAAAA,WAAW,EAAAA;KAAE;AAArC,EAAA,CAAsC,EAAE,CAACG,SAAS,EAAEJ,QAAQ,CAAC,CAAC;AAEpHS,EAAAA,SAAS,CAAC,YAAA;AACR,IAAA,IAAIb,IAAI,EAAE;AACRc,MAAAA,eAAe,CAACN,SAAS,EAAER,IAAI,CAAC;AAClC,IAAA;AACF,EAAA,CAAC,EAAE,CAACQ,SAAS,CAAC,CAAC;AAEf,EAAA,OAAOO,aAAa,CAACC,UAAU,CAACC,QAAQ,EAAE;AAAEN,IAAAA,KAAK,EAAAA;GAAE,EAAEV,QAAQ,CAAC;AAChE;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-container-revision.js","sources":["../../../../../../../../../src/wirestate-react/provision/use-container-revision.ts"],"sourcesContent":[null],"names":["useContainerRevision","useIocContext","revision"],"mappings":";;AAEA;;;;AAIG;SACaA,oBAAoBA,GAAA;AAClC,EAAA,OAAOC,aAAa,EAAE,CAACC,QAAQ;AACjC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-container.js","sources":["../../../../../../../../../src/wirestate-react/provision/use-container.ts"],"sourcesContent":[null],"names":["useContainer","useIocContext","container"],"mappings":";;AAIA;;;;AAIG;SACaA,YAAYA,GAAA;AAC1B,EAAA,OAAOC,aAAa,EAAE,CAACC,SAAS;AAClC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-injection.js","sources":["../../../../../../../../../src/wirestate-react/provision/use-injection.ts"],"sourcesContent":[null],"names":["useInjection","injectionId","_a","useIocContext","container","revision","useMemo","get"],"mappings":";;;AASA;;;;;;AAMG;AACG,SAAUA,YAAYA,CAAIC,WAAiC,EAAA;AACzD,EAAA,IAAAC,EAAA,GAA0BC,aAAa,EAAE;IAAvCC,SAAS,GAAAF,EAAA,CAAAE,SAAA;IAAEC,QAAQ,GAAAH,EAAA,CAAAG,QAAoB;AAE/C;EACA,OAAOC,OAAO,CAAC,YAAA;AAQb,IAAA,OAAOF,SAAS,CAACG,GAAG,CAAIN,WAAW,CAAC;EACtC,CAAC,EAAE,CAACG,SAAS,EAAEC,QAAQ,EAAEJ,WAAW,CAAC,CAAC;AACxC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-ioc-context.js","sources":["../../../../../../../../../src/wirestate-react/provision/use-ioc-context.ts"],"sourcesContent":[null],"names":["useIocContext","value","useContext","IocContext","WirestateError","ERROR_CODE_INVALID_CONTEXT"],"mappings":";;;;;AAMA;;;;;AAKG;SACaA,aAAaA,GAAA;AAC3B,EAAA,IAAMC,KAAK,GAAGC,UAAU,CAACC,UAAU,CAAC;EAEpC,IAAI,CAACF,KAAK,EAAE;AACV,IAAA,MAAM,IAAIG,cAAc,CACtBC,0BAA0B,EAC1B,+EAA+E,CAChF;AACH,EAAA;AAEA,EAAA,OAAOJ,KAAK;AACd;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-optional-injection.js","sources":["../../../../../../../../../src/wirestate-react/provision/use-optional-injection.ts"],"sourcesContent":[null],"names":["useOptionalInjection","injectionId","onFallback","_a","useIocContext","container","revision","useMemo","isBound","get"],"mappings":";;;AASA;;;;;;;AAOG;AACG,SAAUA,oBAAoBA,CAClCC,WAAiC,EACjCC,UAAwC,EAAA;AAElC,EAAA,IAAAC,EAAA,GAA0BC,aAAa,EAAE;IAAvCC,SAAS,GAAAF,EAAA,CAAAE,SAAA;IAAEC,QAAQ,GAAAH,EAAA,CAAAG,QAAoB;AAE/C;EACA,OAAOC,OAAO,CAAC,YAAA;AACb,IAAA,IAAIF,SAAS,CAACG,OAAO,CAACP,WAAW,CAAC,EAAE;AASlC,MAAA,OAAOI,SAAS,CAACI,GAAG,CAAIR,WAAW,CAAC;IACtC,CAAC,MAAM,IAAIC,UAAU,EAAE;MASrB,OAAOA,UAAU,CAACG,SAAS,CAAC;AAC9B,IAAA,CAAC,MAAM;AASL,MAAA,OAAO,IAAI;AACb,IAAA;EACF,CAAC,EAAE,CAACA,SAAS,EAAEC,QAAQ,EAAEL,WAAW,CAAC,CAAC;AACxC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-optional-query-caller.js","sources":["../../../../../../../../../src/wirestate-react/queries/use-optional-query-caller.ts"],"sourcesContent":[null],"names":["useOptionalQueryCaller","container","useContainer","useCallback","type","data","get","QueryBus","queryOptional"],"mappings":";;;;AAQA;;;;;AAKG;SACaA,sBAAsBA,GAAA;AACpC,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAACC,IAAe,EAAEC,IAAc,EAAA;AAM9B,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,QAAQ,CAAC,CAACC,aAAa,CAACJ,IAAI,EAAEC,IAAI,CAAC;AAC1D,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACW;AAC1B;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-optional-sync-query-caller.js","sources":["../../../../../../../../../src/wirestate-react/queries/use-optional-sync-query-caller.ts"],"sourcesContent":[null],"names":["useOptionalSyncQueryCaller","container","useContainer","useCallback","type","data","get","QueryBus","queryOptional"],"mappings":";;;;AAQA;;;;;AAKG;SACaA,0BAA0BA,GAAA;AACxC,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAACC,IAAe,EAAEC,IAAc,EAAA;AAM9B,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,QAAQ,CAAC,CAACC,aAAa,CAACJ,IAAI,EAAEC,IAAI,CAAC;AAC1D,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACe;AAC9B;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-query-caller.js","sources":["../../../../../../../../../src/wirestate-react/queries/use-query-caller.ts"],"sourcesContent":[null],"names":["useQueryCaller","container","useContainer","useCallback","type","data","get","QueryBus","query"],"mappings":";;;;AAQA;;;;AAIG;SACaA,cAAcA,GAAA;AAC5B,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAACC,IAAe,EAAEC,IAAc,EAAA;AAM9B,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,QAAQ,CAAC,CAACC,KAAK,CAACJ,IAAI,EAAEC,IAAI,CAAC;AAClD,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACG;AAClB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-query-handler.js","sources":["../../../../../../../../../src/wirestate-react/queries/use-query-handler.ts"],"sourcesContent":[null],"names":["useQueryHandler","type","handler","container","useContainer","handlerRef","useRef","useEffect","current","get","QueryBus","register","data"],"mappings":";;;;AAKA;;;;;;;AAOG;AACG,SAAUA,eAAeA,CAC7BC,IAAO,EACPC,OAA2B,EAAA;AAE3B,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAC3C,EAAA,IAAMC,UAAU,GAAGC,MAAM,CAAqBJ,OAAO,CAAC;AAEtDK,EAAAA,SAAS,CAAC,YAAA;IACRF,UAAU,CAACG,OAAO,GAAGN,OAAO;AAC9B,EAAA,CAAC,CAAC;AAEFK,EAAAA,SAAS,CAAC,YAAA;AACR,IAAA,OAAOJ,SAAS,CAACM,GAAG,CAACC,QAAQ,CAAC,CAACC,QAAQ,CAAOV,IAAI,EAAE,UAACW,IAAI,EAAA;AAAK,MAAA,OAAAP,UAAU,CAACG,OAAO,CAACI,IAAI,CAAC;AAAxB,IAAA,CAAwB,CAAC;AACzF,EAAA,CAAC,EAAE,CAACT,SAAS,EAAEF,IAAI,CAAC,CAAC;AACvB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-sync-query-caller.js","sources":["../../../../../../../../../src/wirestate-react/queries/use-sync-query-caller.ts"],"sourcesContent":[null],"names":["useSyncQueryCaller","container","useContainer","useCallback","type","data","get","QueryBus","query"],"mappings":";;;;AAQA;;;;;AAKG;SACaA,kBAAkBA,GAAA;AAChC,EAAA,IAAMC,SAAS,GAAcC,YAAY,EAAE;AAE3C,EAAA,OAAOC,WAAW,CAChB,UAACC,IAAe,EAAEC,IAAc,EAAA;AAM9B;AACA,IAAA,OAAOJ,SAAS,CAACK,GAAG,CAACC,QAAQ,CAAC,CAACC,KAAK,CAACJ,IAAI,EAAEC,IAAI,CAAC;AAClD,EAAA,CAAC,EACD,CAACJ,SAAS,CAAC,CACO;AACtB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"with-ioc-provider.js","sources":["../../../../../../../../../src/wirestate-react/test-utils/with-ioc-provider.ts"],"sourcesContent":[null],"names":["withIocProvider","children","container","seed","mockContainer","createElement","IocProvider"],"mappings":";;;;;;;;;;AAMA;;;;;;;AAOG;SACaA,eAAeA,CAC7BC,QAAmB,EACnBC,SAAsC,EACtCC,IAA8B,EAAA;AAD9B,EAAA,IAAAD,SAAA,KAAA,MAAA,EAAA;IAAAA,SAAA,GAAuBE,aAAa,EAAE;AAAA,EAAA;EAGtC,OAAOC,aAAa,CAACC,WAAW,EAAE;AAAEJ,IAAAA,SAAS,EAAAA,SAAA;AAAEC,IAAAA,IAAI,EAAAA;GAAE,EAAEF,QAAQ,CAAC;AAClE;;;;"}
@@ -1 +0,0 @@
1
- import{bindingScopeValues as r}from"inversify";import{ERROR_CODE_BINDING_SCOPE as e}from"../error/error-code.js";import{WirestateError as o}from"../error/wirestate-error.js";function i(i,n){if(n.scopeBindingType&&n.scopeBindingType!==r.Singleton)throw new o(e,"Provided unexpected binding scope for constant value.");i.bind(n.id).toConstantValue(n.value)}export{i as bindConstant};//# sourceMappingURL=bind-constant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bind-constant.js","sources":["../../../../../../../../../src/wirestate-core/bind/bind-constant.ts"],"sourcesContent":[null],"names":["bindingScopeValues","ERROR_CODE_BINDING_SCOPE","WirestateError","bindConstant","container","entry","scopeBindingType","ScopeBindingType","Singleton","bind","id","toConstantValue","value"],"mappings":"6BAUAA,MAAA,+CAAAC,MAAA,kDAAAC,MAAA,8BAMM,SAAUC,EAAgBC,EAAsBC,GAQpD,GAAIA,EAAMC,kBAAoBD,EAAMC,mBAAqBC,EAAiBC,UACxE,MAAM,IAAIN,EAAeD,EAA0B,yDAGrDG,EAAUK,KAAQJ,EAAMK,IAA4BC,gBAAgBN,EAAMO,MAC5E,QAAAT"}
@@ -1 +0,0 @@
1
- import{bindingScopeValues as n}from"inversify";function e(e,i){var o=e.bind(i.id).toDynamicValue((function(){return i.factory?i.factory():i.value}));i.scopeBindingType&&(i.scopeBindingType===n.Transient?o.inTransientScope():i.scopeBindingType===n.Request?o.inRequestScope():o.inSingletonScope())}export{e as bindDynamicValue};//# sourceMappingURL=bind-dynamic-value.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bind-dynamic-value.js","sources":["../../../../../../../../../src/wirestate-core/bind/bind-dynamic-value.ts"],"sourcesContent":[null],"names":["bindingScopeValues","bindDynamicValue","container","entry","binding","bind","id","toDynamicValue","factory","value","scopeBindingType","Transient","inTransientScope","Request","inRequestScope","inSingletonScope"],"mappings":"6BAOAA,MAAA,YAMM,SAAUC,EAAiBC,EAAsBC,GAMrD,IAAMC,EAA6CF,EAAUG,KAAKF,EAAMG,IAAIC,gBAAe,WACzF,OAAIJ,EAAMK,QACDL,EAAMK,UAGRL,EAAMM,KACf,IAEKN,EAAMO,mBAEAP,EAAMO,mBAAqBV,EAAmBW,UACvDP,EAAQQ,mBACCT,EAAMO,mBAAqBV,EAAmBa,QACvDT,EAAQU,iBAERV,EAAQW,mBAEZ,QAAAd"}
@@ -1 +0,0 @@
1
- import{bindingTypeValues as i}from"inversify";import{bindConstant as n}from"./bind-constant.js";import{bindDynamicValue as o}from"./bind-dynamic-value.js";import{bindService as e}from"./bind-service.js";function r(r,t,m){return void 0===m&&(m={}),"function"==typeof t?e(r,t,m):t.bindingType&&t.bindingType!==i.ConstantValue?t.bindingType===i.DynamicValue?o(r,t):e(r,t.value,m):n(r,t)}export{r as bindEntry};//# sourceMappingURL=bind-entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bind-entry.js","sources":["../../../../../../../../../src/wirestate-core/bind/bind-entry.ts"],"sourcesContent":[null],"names":["bindingTypeValues","bindConstant","bindDynamicValue","bindService","bindEntry","container","entry","options","bindingType","ConstantValue","DynamicValue","value"],"mappings":"4BAiBAA,MAAA,mCAAAC,MAAA,gDAAAC,MAAA,gDAAAC,MAAA,6BAegBC,EACdC,EACAC,EACAC,GAEA,YAFA,IAAAA,IAAAA,EAAA,CAAA,GAEqB,mBAAVD,EACFH,EAAYE,EAAWC,EAAOC,GAGlCD,EAAME,aAAeF,EAAME,cAAgBR,EAAkBS,cAI9DH,EAAME,cAAgBR,EAAkBU,aAMnCR,EAAiBG,EAAWC,GAS9BH,EAAYE,EAAWC,EAAMK,MAAgCJ,GAlB3DN,EAAaI,EAAWC,EAmBnC,QAAAF"}
@@ -1 +0,0 @@
1
- import{CommandBus as e}from"../commands/command-bus.js";import{getCommandHandlerMetadata as t}from"../commands/get-command-handler-metadata.js";import{WireScope as r}from"../container/wire-scope.js";import{buildEventDispatcher as n}from"../events/build-event-dispatcher.js";import{EventBus as o}from"../events/event-bus.js";import{getQueryHandlerMetadata as i}from"../queries/get-query-handler-metadata.js";import{QueryBus as a}from"../queries/query-bus.js";import{CONTAINER_REFS_BY_SERVICE as f,WIRE_SCOPES_BY_SERVICE as c,EVENT_UNSUBSCRIBERS_BY_SERVICE as s,QUERY_UNREGISTERS_BY_SERVICE as u,COMMAND_UNREGISTERS_BY_SERVICE as v}from"../registry.js";import{getActivatedHandlerMetadata as l}from"../service/get-activated-handler-metadata.js";import{getDeactivationHandlerMetadata as m}from"../service/get-deactivation-handler-metadata.js";function d(d,h,y){var j=d.bind(h).to(h).inSingletonScope();j.onActivation((function(u,v){v.IS_DISPOSED=!1,f.set(v,d),function(e,t){var n=Reflect.getMetadata("design:paramtypes",t);if(!(null==n?void 0:n.some((function(e){return e===r}))))return;for(var o=[],i=0,a=Object.getOwnPropertyNames(e);i<a.length;i++){var f=e[a[i]];(null==f?void 0:f.constructor)===r&&o.push(f)}o.length>0&&c.set(e,o)}(v,h);var m=n(v);m&&function(e,t){var r,n=null===(r=f.get(e))||void 0===r?void 0:r.get(o);n&&s.set(e,n.subscribe(t))}(v,m);for(var j=d.get(a),b=0,S=i(v);b<S.length;b++){var D=S[b];if("function"==typeof(N=v[D.methodName])){var I=j.register(D.type,N.bind(v));g(v,I)}}for(var O=d.get(e),q=0,w=t(v);q<w.length;q++){var N;D=w[q];if("function"==typeof(N=v[D.methodName])){I=O.register(D.type,N.bind(v));p(v,I)}}if(null==y?void 0:y.isWithIgnoreLifecycle);else for(var P=function(e){var t=v[e];if("function"!=typeof t)return"continue";var r=t.call(v);r&&"function"==typeof r.then&&r.catch((function(t){console.error("[wirestate] @OnActivated rejected for:",h.name,String(e),t)}))},A=0,E=l(v);A<E.length;A++){P(E[A])}return v})),j.onDeactivation((function(e){if(null==y?void 0:y.isWithIgnoreLifecycle);else for(var t=0,r=m(e);t<r.length;t++){var n=e[r[t]];"function"==typeof n&&n.call(e)}var o,i;e.IS_DISPOSED=!0,function(e){var t=c.get(e);if(!t)return;for(var r=0,n=t;r<n.length;r++){var o=n[r];o.isDisposed=!0,o.container=null}c.delete(e)}(e),function(e){var t=v.get(e);if(!t)return;for(var r=0,n=t;r<n.length;r++){(0,n[r])()}v.delete(e)}(e),function(e){var t=u.get(e);if(!t)return;for(var r=0,n=t;r<n.length;r++){(0,n[r])()}u.delete(e)}(e),o=e,(i=s.get(o))&&(i(),s.delete(o)),f.delete(e)}))}function g(e,t){var r=u.get(e);r||(r=[],u.set(e,r)),r.push(t)}function p(e,t){var r=v.get(e);r||(r=[],v.set(e,r)),r.push(t)}export{d as bindService};//# sourceMappingURL=bind-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bind-service.js","sources":["../../../../../../../../../src/wirestate-core/bind/bind-service.ts"],"sourcesContent":[null],"names":["CommandBus","getCommandHandlerMetadata","WireScope","buildEventDispatcher","EventBus","getQueryHandlerMetadata","QueryBus","CONTAINER_REFS_BY_SERVICE","WIRE_SCOPES_BY_SERVICE","EVENT_UNSUBSCRIBERS_BY_SERVICE","QUERY_UNREGISTERS_BY_SERVICE","COMMAND_UNREGISTERS_BY_SERVICE","getActivatedHandlerMetadata","getDeactivationHandlerMetadata","bindService","container","entry","options","whenBind","bind","to","inSingletonScope","onActivation","context","instance","IS_DISPOSED","set","service","Service","paramTypes","Reflect","getMetadata","some","type","scopes","_i","_a","Object","getOwnPropertyNames","length","value","constructor","push","attachWireScopes","dispatcher","handler","bus","get","subscribe","attachEventsSubscription","queryBus","meta","method","methodName","unregister","register","attachQueryUnregister","commandBus","_b","_c","attachCommandUnregister","isWithIgnoreLifecycle","result","call","then","catch","error","console","name","String","_d","_e","onDeactivation","unsubscribe","scopes_1","scope","isDisposed","delete","detachWireScopes","list","list_2","detachCommandUnregister","list_1","detachQueryUnregister"],"mappings":"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"}
@@ -1 +0,0 @@
1
- function n(n){return"function"==typeof n?n:n.id}export{n as getEntryToken};//# sourceMappingURL=get-entry-token.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-entry-token.js","sources":["../../../../../../../../../src/wirestate-core/bind/get-entry-token.ts"],"sourcesContent":[null],"names":["getEntryToken","entry","id"],"mappings":"AAYM,SAAUA,EAAyCC,GACvD,MAAwB,mBAAVA,EAAuBA,EAAQA,EAAMC,EACrD,QAAAF"}
@@ -1 +0,0 @@
1
- import{ERROR_CODE_FAILED_TO_RESOLVE_COMMAND_HANDLER as t}from"../error/error-code.js";import{WirestateError as r}from"../error/wirestate-error.js";import{ECommandStatus as n}from"../types/commands.js";var e=function(){function e(){this.handlers=new Map}return e.prototype.register=function(t,r){var n=this,e=this.handlers.get(t);return e||(e=[],this.handlers.set(t,e)),e.push(r),function(){var e=n.handlers.get(t);if(e){var o=e.indexOf(r);o>=0&&e.splice(o,1),0===e.length&&n.handlers.delete(t)}}},e.prototype.command=function(e,o){var s=this.handlers.get(e);if(!(null==s?void 0:s.length))throw new r(t,"No command handler registered in container for type: '".concat(String(e),"'."));var i=s[s.length-1],a={task:null,status:n.PENDING};return a.task=Promise.resolve().then((function(){return i(o)})).then((function(t){return a.status=n.SETTLED,t})).catch((function(t){throw a.status=n.ERROR,t})),a},e.prototype.commandOptional=function(t,r){var n=this.handlers.get(t);return(null==n?void 0:n.length)?this.command(t,r):null},e.prototype.has=function(t){var r;return Boolean(null===(r=this.handlers.get(t))||void 0===r?void 0:r.length)},e.prototype.clear=function(){this.handlers.clear()},e}();export{e as CommandBus};//# sourceMappingURL=command-bus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-bus.js","sources":["../../../../../../../../../src/wirestate-core/commands/command-bus.ts"],"sourcesContent":[null],"names":["ERROR_CODE_FAILED_TO_RESOLVE_COMMAND_HANDLER","WirestateError","ECommandStatus","CommandBus","this","handlers","Map","prototype","register","type","handler","_this","stack","get","set","push","current","index","indexOf","splice","length","delete","command","data","concat","String","descriptor","task","status","PENDING","Promise","resolve","then","result","SETTLED","catch","error","ERROR","commandOptional","has","Boolean","_a","clear"],"mappings":"uDAcAA,MAAA,kDAAAC,MAAA,uDAAAC,MAAA,uBAMA,IAAAC,EAAA,WAAA,SAAAA,IAKmBC,KAAAC,SAAsD,IAAIC,GA4H7E,CAAA,OAlHSH,EAAAI,UAAAC,SAAP,SAA0CC,EAAoBC,GAA9D,IAAAC,EAAAP,KAOMQ,EAAuCR,KAAKC,SAASQ,IAAIJ,GAS7D,OAPKG,IACHA,EAAQ,GACRR,KAAKC,SAASS,IAAIL,EAAMG,IAG1BA,EAAMG,KAAKL,GAEJ,WAOL,IAAMM,EAAyCL,EAAKN,SAASQ,IAAIJ,GAEjE,GAAKO,EAAL,CAIA,IAAMC,EAAgBD,EAAQE,QAAQR,GAElCO,GAAS,GACXD,EAAQG,OAAOF,EAAO,GAID,IAAnBD,EAAQI,QACVT,EAAKN,SAASgB,OAAOZ,EAVvB,CAYF,CACF,EAYON,EAAAI,UAAAe,QAAP,SAAyCb,EAAoBc,GAC3D,IAAMX,EAAuCR,KAAKC,SAASQ,IAAIJ,GAE/D,KAAKG,aAAK,EAALA,EAAOQ,QACV,MAAM,IAAInB,EACRD,EACA,yDAAAwB,OAAyDC,OAAOhB,GAAK,OAIzE,IAAMC,EAAUE,EAAMA,EAAMQ,OAAS,GAE/BM,EAAoC,CACxCC,KAAM,KACNC,OAAQ1B,EAAe2B,SAgBzB,OAbCH,EAAoCC,KAAOG,QAAQC,UACjDC,MAAK,WAAM,OAAAtB,EAAQa,EAAR,IACXS,MAAK,SAACC,GAGL,OAFCP,EAA0CE,OAAS1B,EAAegC,QAE5DD,CACT,IACCE,OAAM,SAACC,GAGN,MAFCV,EAA0CE,OAAS1B,EAAemC,MAE7DD,CACR,IAEKV,CACT,EASOvB,EAAAI,UAAA+B,gBAAP,SAAiD7B,EAAoBc,GACnE,IAAMX,EAAuCR,KAAKC,SAASQ,IAAIJ,GAE/D,OAAOG,eAAAA,EAAOQ,QAAShB,KAAKkB,QAAcb,EAAMc,GAAQ,IAC1D,EAQOpB,EAAAI,UAAAgC,IAAP,SAAW9B,SACT,OAAO+B,QAA+B,QAAvBC,EAAArC,KAAKC,SAASQ,IAAIJ,UAAK,IAAAgC,OAAA,EAAAA,EAAErB,OAC1C,EAKOjB,EAAAI,UAAAmC,MAAP,WACEtC,KAAKC,SAASqC,OAChB,EACFvC,CAAA,CAjIA,UAiICA"}
@@ -1 +0,0 @@
1
- import{COMMAND_HANDLER_METADATA as t}from"../registry.js";function r(r){for(var e=r.constructor,o=[];"function"==typeof e&&e!==Object&&e!==Function.prototype;){var n=t.get(e);n&&n.length>0&&o.push(n),e=Object.getPrototypeOf(e)}return o.reverse().flat()}export{r as getCommandHandlerMetadata};//# sourceMappingURL=get-command-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-command-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/commands/get-command-handler-metadata.ts"],"sourcesContent":[null],"names":["COMMAND_HANDLER_METADATA","getCommandHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","get","length","push","getPrototypeOf","reverse","flat"],"mappings":"mCAOAA,MAAA,iBAQM,SAAUC,EAA0BC,GAWxC,IALA,IAAIC,EAAuBD,EAASC,YAE9BC,EAA+C,GAGvB,mBAAhBD,GAA8BA,IAAgBE,QAAUF,IAAgBG,SAASC,WAAW,CACxG,IAAMC,EAA6CR,EAAyBS,IAAIN,GAE5EK,GAAOA,EAAIE,OAAS,GACtBN,EAAMO,KAAKH,GAGbL,EAAcE,OAAOO,eAAeT,EACtC,CASA,OAAOC,EAAMS,UAAUC,MACzB,QAAAb"}
@@ -1 +0,0 @@
1
- import{Container as n}from"inversify";import{CommandBus as e}from"../commands/command-bus.js";import{WireScope as o}from"./wire-scope.js";import{EventBus as t}from"../events/event-bus.js";import{QueryBus as r}from"../queries/query-bus.js";import{SEEDS_TOKEN as i,SEED_TOKEN as s}from"../registry.js";function a(a){var u;void 0===a&&(a={});var m=new n({defaultScope:"Singleton",parent:a.parent});return m.bind(t).toConstantValue(new t),m.bind(r).toConstantValue(new r),m.bind(e).toConstantValue(new e),m.bind(i).toConstantValue(new Map),m.bind(s).toConstantValue(null!==(u=a.seed)&&void 0!==u?u:{}),m.bind(o).toResolvedValue((function(){return new o(m)})).inTransientScope(),m}export{a as createIocContainer};//# sourceMappingURL=create-ioc-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-ioc-container.js","sources":["../../../../../../../../../src/wirestate-core/container/create-ioc-container.ts"],"sourcesContent":[null],"names":["Container","CommandBus","WireScope","EventBus","QueryBus","SEEDS_TOKEN","SEED_TOKEN","createIocContainer","options","container","defaultScope","parent","bind","toConstantValue","Map","_a","seed","toResolvedValue","inTransientScope"],"mappings":"oBAwBAA,MAAA,iCAAAC,MAAA,iDAAAC,MAAA,qCAAAC,MAAA,4CAAAC,MAAA,gDAAAC,gBAAAC,MAAA,iBAMM,SAAUC,EAAmBC,cAAA,IAAAA,IAAAA,EAAA,CAAA,GAGjC,IAAMC,EAAuB,IAAIT,EAAU,CACzCU,aAAc,YACdC,OAAQH,EAAQG,SAgBlB,OAbAF,EAAUG,KAAKT,GAAUU,gBAAgB,IAAIV,GAC7CM,EAAUG,KAAKR,GAAUS,gBAAgB,IAAIT,GAC7CK,EAAUG,KAAKX,GAAYY,gBAAgB,IAAIZ,GAC/CQ,EAAUG,KAAKP,GAAaQ,gBAAgB,IAAIC,KAChDL,EAAUG,KAAKN,GAAYO,gBAA4B,QAAZE,EAAAP,EAAQQ,YAAI,IAAAD,EAAAA,EAAI,CAAA,GAE3DN,EACGG,KAAKV,GACLe,iBAAgB,WAAiB,OAAA,IAAIf,EAAUO,EAAd,IACjCS,mBAIIT,CACT,QAAAF"}
@@ -1 +0,0 @@
1
- import{__decorate as t,__metadata as e}from"tslib";import{injectable as r}from"inversify";import{CommandBus as o}from"../commands/command-bus.js";import{ERROR_CODE_ACCESS_AFTER_DISPOSAL as n,ERROR_CODE_ACCESS_BEFORE_ACTIVATION as i}from"../error/error-code.js";import{WirestateError as s}from"../error/wirestate-error.js";import{EventBus as a}from"../events/event-bus.js";import{QueryBus as p}from"../queries/query-bus.js";import{SEEDS_TOKEN as u,SEED_TOKEN as c}from"../registry.js";var m=function(){function m(t){this.container=t,this.isDisposed=!1}return m.prototype.getContainer=function(){if(this.container)return this.container;throw this.isDisposed?new s(n,"WireScope::container accessed after deactivation. Ensure service is properly disposed."):new s(i,"WireScope::container accessed before activation. Ensure service is bound to container and is properly resolved.")},m.prototype.resolve=function(t){return this.getContainer().get(t)},m.prototype.resolveOptional=function(t){var e=this.getContainer();return e.isBound(t)?e.get(t):null},m.prototype.emitEvent=function(t,e,r){this.getContainer().get(a).emit({type:t,payload:e,from:void 0===r?this:r})},m.prototype.queryData=function(t,e){return this.getContainer().get(p).query(t,e)},m.prototype.queryOptionalData=function(t,e){return this.getContainer().get(p).queryOptional(t,e)},m.prototype.executeCommand=function(t,e){return this.getContainer().get(o).command(t,e)},m.prototype.executeOptionalCommand=function(t,e){return this.getContainer().get(o).commandOptional(t,e)},m.prototype.getSeed=function(t){return t?this.getContainer().get(u).get(t)||null:this.getContainer().get(c)},m=t([r(),e("design:paramtypes",[Object])],m)}();export{m as WireScope};//# sourceMappingURL=wire-scope.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wire-scope.js","sources":["../../../../../../../../../src/wirestate-core/container/wire-scope.ts"],"sourcesContent":[null],"names":["__decorate","__metadata","injectable","CommandBus","ERROR_CODE_ACCESS_AFTER_DISPOSAL","ERROR_CODE_ACCESS_BEFORE_ACTIVATION","WirestateError","EventBus","QueryBus","SEEDS_TOKEN","SEED_TOKEN","WireScope","container","this","isDisposed","prototype","getContainer","resolve","injectionId","get","resolveOptional","isBound","emitEvent","type","payload","from","emit","undefined","queryData","data","query","queryOptionalData","queryOptional","executeCommand","command","executeOptionalCommand","commandOptional","getSeed","seed"],"mappings":"qBAoBAA,gBAAAC,MAAA,6BAAAC,MAAA,iCAAAC,MAAA,wEAAAC,yCAAAC,MAAA,kDAAAC,MAAA,iDAAAC,MAAA,4CAAAC,MAAA,gDAAAC,gBAAAC,MAAA,iBAMA,IAAAC,EAAA,WAME,SAAAA,EAAoCC,GAAAC,KAAAD,UAAAA,EAFpBC,KAAAC,YAAsB,CAE+B,CA0LvE,OAhLSH,EAAAI,UAAAC,aAAP,WACE,GAAIH,KAAKD,UACP,OAAOC,KAAKD,UAGd,MAAIC,KAAKC,WACD,IAAIR,EACRF,EACA,0FAGI,IAAIE,EACRD,EACA,kHAIN,EAYOM,EAAAI,UAAAE,QAAP,SAAkBC,GAMhB,OAAOL,KAAKG,eAAeG,IAAOD,EACpC,EAYOP,EAAAI,UAAAK,gBAAP,SAA0BF,GAMxB,IAAMN,EAAuBC,KAAKG,eAElC,OAAOJ,EAAUS,QAAQH,GAAeN,EAAUO,IAAOD,GAAe,IAC1E,EAYOP,EAAAI,UAAAO,UAAP,SAAuDC,EAASC,EAAaC,GAO3EZ,KAAKG,eACFG,IAAIZ,GACJmB,KAAK,CACJH,KAAIA,EACJC,QAAOA,EACPC,UAAeE,IAATF,EAAqBZ,KAAOY,GAExC,EAYOd,EAAAI,UAAAa,UAAP,SAA8EL,EAASM,GAGrF,OAAOhB,KAAKG,eAAeG,IAAIX,GAAUsB,MAAYP,EAAMM,EAC7D,EAUOlB,EAAAI,UAAAgB,kBAAP,SACER,EACAM,GAIA,OAAOhB,KAAKG,eAAeG,IAAIX,GAAUwB,cAAoBT,EAAMM,EACrE,EAYOlB,EAAAI,UAAAkB,eAAP,SACEV,EACAM,GAIA,OAAOhB,KAAKG,eAAeG,IAAIhB,GAAY+B,QAAcX,EAAMM,EACjE,EAUOlB,EAAAI,UAAAoB,uBAAP,SACEZ,EACAM,GAIA,OAAOhB,KAAKG,eAAeG,IAAIhB,GAAYiC,gBAAsBb,EAAMM,EACzE,EAeOlB,EAAAI,UAAAsB,QAAP,SAAqCC,GAKnC,OAAOA,EACFzB,KAAKG,eAAeG,IAAeV,GAAaU,IAAImB,IAAe,KACpEzB,KAAKG,eAAeG,IAAOT,EACjC,EA/LWC,EAASX,EAAA,CADrBE,qCACYS,EAgMZ,CAhMD,UADAA"}
@@ -1 +0,0 @@
1
- var r=1,a=51,e=52,o=101,p=102,t=200,v=201;export{v as ERROR_CODE_ACCESS_AFTER_DISPOSAL,t as ERROR_CODE_ACCESS_BEFORE_ACTIVATION,e as ERROR_CODE_BINDING_SCOPE,p as ERROR_CODE_FAILED_TO_RESOLVE_COMMAND_HANDLER,o as ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER,r as ERROR_CODE_GENERIC,a as ERROR_CODE_INVALID_ARGUMENTS};//# sourceMappingURL=error-code.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-code.js","sources":["../../../../../../../../../src/wirestate-core/error/error-code.ts"],"sourcesContent":[null],"names":["ERROR_CODE_GENERIC","ERROR_CODE_INVALID_ARGUMENTS","ERROR_CODE_BINDING_SCOPE","ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER","ERROR_CODE_FAILED_TO_RESOLVE_COMMAND_HANDLER","ERROR_CODE_ACCESS_BEFORE_ACTIVATION","ERROR_CODE_ACCESS_AFTER_DISPOSAL"],"mappings":"AAAO,IAAMA,EAA6B,EAG7BC,EAAuC,GACvCC,EAAmC,GAGnCC,EAAqD,IACrDC,EAAuD,IAEvDC,EAA8C,IAC9CC,EAA2C,WAAAA,sCAAAD,yCAAAH,8BAAAE,kDAAAD,gDAAAH,wBAAAC"}
@@ -1 +0,0 @@
1
- import{__extends as r}from"tslib";import{ERROR_CODE_GENERIC as e}from"./error-code.js";var o=function(o){function t(r,t){void 0===r&&(r=e);var i=o.call(this)||this;return i.name="WirestateError",i.code=r,i.message=t||"Wirestate error.",i}return r(t,o),t}(Error);export{o as WirestateError};//# sourceMappingURL=wirestate-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wirestate-error.js","sources":["../../../../../../../../../src/wirestate-core/error/wirestate-error.ts"],"sourcesContent":[null],"names":["__extends","ERROR_CODE_GENERIC","WirestateError","_super","code","detail","_this","this","name","message","Error"],"mappings":"oBAEAA,MAAA,qCAAAC,MAAA,kBAMA,IAAAC,EAAA,SAAAC,GAcE,SAAAD,EAAmBE,EAAmCC,QAAnC,IAAAD,IAAAA,EAAAH,GACjB,IAAAK,EAAAH,cAAOI,YAXOD,EAAAE,KAAe,iBAa7BF,EAAKF,KAAOA,EACZE,EAAKG,QAAUJ,GAAU,oBAC3B,CACF,OApBoCL,EAAAE,EAAAC,GAoBpCD,CAAA,CApBA,CAAoCQ,cAAKR"}
@@ -1 +0,0 @@
1
- import{getEventHandlerMetadata as e}from"./get-event-handler-metadata.js";function t(t){for(var n=[],r=0,a=e(t);r<a.length;r++){var l=a[r],o=t[l.methodName];"function"==typeof o&&n.push({types:l.types,handler:o.bind(t)})}return n.length?function(e){for(var t=0,r=n;t<r.length;t++){var a=r[t];(null===a.types||a.types.includes(e.type))&&a.handler(e)}}:null}export{t as buildEventDispatcher};//# sourceMappingURL=build-event-dispatcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-event-dispatcher.js","sources":["../../../../../../../../../src/wirestate-core/events/build-event-dispatcher.ts"],"sourcesContent":[null],"names":["getEventHandlerMetadata","buildEventDispatcher","instance","entries","_i","_a","length","meta","method","methodName","push","types","handler","bind","event","entries_1","entry","includes","type"],"mappings":"kCAOAA,MAAA,kCAOM,SAAUC,EAAuCC,GAMrD,IAHA,IAAMC,EAAsC,GAGzBC,EAAA,EAAAC,EAAAL,EAAwBE,GAAxBE,EAAAC,EAAAC,OAAAF,IAAmC,CAAjD,IAAMG,EAAIF,EAAAD,GACPI,EAAUN,EAAyDK,EAAKE,YAExD,mBAAXD,GACTL,EAAQO,KAAK,CACXC,MAAOJ,EAAKI,MACZC,QAAUJ,EAAyBK,KAAKX,IAG9C,CAEA,OAAIC,EAAQG,OAOH,SAACQ,GAEN,IAAoB,IAAAV,EAAA,EAAAW,EAAAZ,EAAAC,WAAAA,IAAS,CAAxB,IAAMY,EAAKD,EAAAX,IACM,OAAhBY,EAAML,OAAkBK,EAAML,MAAMM,SAASH,EAAMI,QACrDF,EAAMJ,QAAQE,EAElB,CACF,EAQO,IAEX,QAAAb"}
@@ -1 +0,0 @@
1
- var r=function(){function r(){this.handlers=new Set}return r.prototype.emit=function(r){for(var t=0,e=Array.from(this.handlers);t<e.length;t++){var n=e[t];try{n(r)}catch(r){console.error("[wirestate] Event handler threw:",r)}}},r.prototype.subscribe=function(r){var t=this;return this.handlers.add(r),function(){t.handlers.delete(r)}},r.prototype.clear=function(){this.handlers.clear()},r}();export{r as EventBus};//# sourceMappingURL=event-bus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-bus.js","sources":["../../../../../../../../../src/wirestate-core/events/event-bus.ts"],"sourcesContent":[null],"names":["EventBus","this","handlers","Set","prototype","emit","event","_i","snapshot_1","Array","from","handler","error","console","subscribe","_this","add","delete","clear"],"mappings":"AAQA,IAAAA,EAAA,WAAA,SAAAA,IACmBC,KAAAC,SAA+B,IAAIC,GAsDtD,CAAA,OA/CSH,EAAAI,UAAAC,KAAP,SAAyEC,GAIvE,IAFA,IAEsBC,EAAA,EAAAC,EAFiBC,MAAMC,KAAKT,KAAKC,UAEjCK,WAAAA,IAAU,CAA3B,IAAMI,EAAOH,EAAAD,GAChB,IACEI,EAAQL,EACV,CAAE,MAAOM,GAEPC,QAAQD,MAAM,mCAAoCA,EACpD,CACF,CACF,EASOZ,EAAAI,UAAAU,UAAP,SAAiBH,GAAjB,IAAAI,EAAAd,KAQE,OAFAA,KAAKC,SAASc,IAAIL,GAEX,WAMLI,EAAKb,SAASe,OAAON,EACvB,CACF,EAOOX,EAAAI,UAAAc,MAAP,WACEjB,KAAKC,SAASgB,OAChB,EACFlB,CAAA,CAvDA,UAuDCA"}
@@ -1 +0,0 @@
1
- import{EVENT_HANDLER_METADATA as t}from"../registry.js";function r(r){for(var e=r.constructor,o=[];"function"==typeof e&&e!==Object&&e!==Function.prototype;){var n=t.get(e);n&&n.length>0&&o.push(n),e=Object.getPrototypeOf(e)}return o.reverse().flat()}export{r as getEventHandlerMetadata};//# sourceMappingURL=get-event-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-event-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/events/get-event-handler-metadata.ts"],"sourcesContent":[null],"names":["EVENT_HANDLER_METADATA","getEventHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","get","length","push","getPrototypeOf","reverse","flat"],"mappings":"iCAOAA,MAAA,iBAQM,SAAUC,EAAwBC,GAQtC,IALA,IAAIC,EAAuBD,EAASC,YAE9BC,EAA6C,GAGrB,mBAAhBD,GAA8BA,IAAgBE,QAAUF,IAAgBG,SAASC,WAAW,CACxG,IAAMC,EAA2CR,EAAuBS,IAAIN,GAExEK,GAAOA,EAAIE,OAAS,GACtBN,EAAMO,KAAKH,GAGbL,EAAcE,OAAOO,eAAeT,EACtC,CASA,OAAOC,EAAMS,UAAUC,MACzB,QAAAb"}
@@ -1 +0,0 @@
1
- import{QUERY_HANDLER_METADATA as t}from"../registry.js";function r(r){for(var e=r.constructor,o=[];"function"==typeof e&&e!==Object&&e!==Function.prototype;){var n=t.get(e);n&&n.length>0&&o.push(n),e=Object.getPrototypeOf(e)}return o.reverse().flat()}export{r as getQueryHandlerMetadata};//# sourceMappingURL=get-query-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-query-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/queries/get-query-handler-metadata.ts"],"sourcesContent":[null],"names":["QUERY_HANDLER_METADATA","getQueryHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","get","length","push","getPrototypeOf","reverse","flat"],"mappings":"iCAOAA,MAAA,iBAQM,SAAUC,EAAwBC,GAQtC,IALA,IAAIC,EAAuBD,EAASC,YAE9BC,EAA6C,GAGrB,mBAAhBD,GAA8BA,IAAgBE,QAAUF,IAAgBG,SAASC,WAAW,CACxG,IAAMC,EAA2CR,EAAuBS,IAAIN,GAExEK,GAAOA,EAAIE,OAAS,GACtBN,EAAMO,KAAKH,GAGbL,EAAcE,OAAOO,eAAeT,EACtC,CASA,OAAOC,EAAMS,UAAUC,MACzB,QAAAb"}
@@ -1 +0,0 @@
1
- import{ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER as r}from"../error/error-code.js";import{WirestateError as e}from"../error/wirestate-error.js";var t=function(){function t(){this.handlers=new Map}return t.prototype.register=function(r,e){var t=this,n=this.handlers.get(r);return n||(n=[],this.handlers.set(r,n)),n.push(e),function(){var n=t.handlers.get(r);if(n){var o=n.indexOf(e);o>=0&&n.splice(o,1),0===n.length&&t.handlers.delete(r)}}},t.prototype.query=function(t,n){var o=this.handlers.get(t);if(null==o?void 0:o.length)return o[o.length-1](n);throw new e(r,"No query handler registered in container for type: '".concat(String(t),"'."))},t.prototype.queryOptional=function(r,e){var t=this.handlers.get(r);return(null==t?void 0:t.length)?t[t.length-1](e):null},t.prototype.has=function(r){var e=this.handlers.get(r);return Boolean(e&&e.length)},t.prototype.clear=function(){this.handlers.clear()},t}();export{t as QueryBus};//# sourceMappingURL=query-bus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-bus.js","sources":["../../../../../../../../../src/wirestate-core/queries/query-bus.ts"],"sourcesContent":[null],"names":["ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER","WirestateError","QueryBus","this","handlers","Map","prototype","register","type","handler","_this","stack","get","set","push","current","index","indexOf","splice","length","delete","query","data","concat","String","queryOptional","has","Boolean","clear"],"mappings":"qDAQAA,MAAA,kDAAAC,MAAA,8BAGA,IAAAC,EAAA,WAAA,SAAAA,IAKmBC,KAAAC,SAAkD,IAAIC,GAmHzE,CAAA,OAzGSH,EAAAI,UAAAC,SAAP,SAA0CC,EAAkBC,GAA5D,IAAAC,EAAAP,KAOMQ,EAAqCR,KAAKC,SAASQ,IAAIJ,GAS3D,OAPKG,IACHA,EAAQ,GACRR,KAAKC,SAASS,IAAIL,EAAMG,IAG1BA,EAAMG,KAAKL,GAEJ,WAOL,IAAMM,EAAuCL,EAAKN,SAASQ,IAAIJ,GAE/D,GAAKO,EAAL,CAIA,IAAMC,EAAgBD,EAAQE,QAAQR,GAElCO,GAAS,GACXD,EAAQG,OAAOF,EAAO,GAID,IAAnBD,EAAQI,QACVT,EAAKN,SAASgB,OAAOZ,EAVvB,CAYF,CACF,EAWON,EAAAI,UAAAe,MAAP,SAA0Eb,EAASc,GACjF,IAAMX,EAAqCR,KAAKC,SAASQ,IAAIJ,GAG7D,GAAIG,aAAK,EAALA,EAAOQ,OACT,OAAQR,EAAMA,EAAMQ,OAAS,GAA2BG,GAG1D,MAAM,IAAIrB,EACRD,EACA,uDAAAuB,OAAuDC,OAAOhB,GAAK,MAEvE,EASON,EAAAI,UAAAmB,cAAP,SACEjB,EACAc,GAEA,IAAMX,EAAqCR,KAAKC,SAASQ,IAAIJ,GAE7D,OAAIG,aAAK,EAALA,EAAOQ,QACDR,EAAMA,EAAMQ,OAAS,GAA2BG,GAGnD,IACT,EAQOpB,EAAAI,UAAAoB,IAAP,SAAWlB,GACT,IAAMG,EAAqCR,KAAKC,SAASQ,IAAIJ,GAE7D,OAAOmB,QAAQhB,GAASA,EAAMQ,OAChC,EAOOjB,EAAAI,UAAAsB,MAAP,WACEzB,KAAKC,SAASwB,OAChB,EACF1B,CAAA,CAxHA,UAwHCA"}
@@ -1 +0,0 @@
1
- var e=Symbol("@wirestate/seeds"),a=Symbol("@wirestate/seed"),w=new WeakMap,p=new WeakMap,k=new WeakMap,n=new WeakMap,M=new WeakMap,W=new WeakMap,s=new WeakMap,t=new WeakMap,r=new WeakMap,o=new WeakMap;export{k as ACTIVATED_HANDLER_METADATA,p as COMMAND_HANDLER_METADATA,o as COMMAND_UNREGISTERS_BY_SERVICE,W as CONTAINER_REFS_BY_SERVICE,n as DEACTIVATION_HANDLER_METADATA,M as EVENT_HANDLER_METADATA,t as EVENT_UNSUBSCRIBERS_BY_SERVICE,w as QUERY_HANDLER_METADATA,r as QUERY_UNREGISTERS_BY_SERVICE,e as SEEDS_TOKEN,a as SEED_TOKEN,s as WIRE_SCOPES_BY_SERVICE};//# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sources":["../../../../../../../../src/wirestate-core/registry.ts"],"sourcesContent":[null],"names":["SEEDS_TOKEN","Symbol","SEED_TOKEN","QUERY_HANDLER_METADATA","WeakMap","COMMAND_HANDLER_METADATA","ACTIVATED_HANDLER_METADATA","DEACTIVATION_HANDLER_METADATA","EVENT_HANDLER_METADATA","CONTAINER_REFS_BY_SERVICE","WIRE_SCOPES_BY_SERVICE","EVENT_UNSUBSCRIBERS_BY_SERVICE","QUERY_UNREGISTERS_BY_SERVICE","COMMAND_UNREGISTERS_BY_SERVICE"],"mappings":"IAUaA,EAA6BC,OAAO,oBAKpCC,EAA4BD,OAAO,mBAMnCE,EAAwE,IAAIC,QAM5EC,EAA4E,IAAID,QAMhFE,EAAsE,IAAIF,QAM1EG,EAAyE,IAAIH,QAM7EI,EAAwE,IAAIJ,QAK5EK,EAAwD,IAAIL,QAK5DM,EAA4D,IAAIN,QAKhEO,EAAsE,IAAIP,QAK1EQ,EAAyE,IAAIR,QAK7ES,EAA6E,IAAIT,eAAOE,gCAAAD,8BAAAQ,oCAAAJ,+BAAAF,mCAAAC,4BAAAG,oCAAAR,4BAAAS,kCAAAZ,iBAAAE,gBAAAQ"}
@@ -1 +0,0 @@
1
- import{ACTIVATED_HANDLER_METADATA as t}from"../registry.js";function r(r){for(var e=r.constructor,o=[];"function"==typeof e&&e!==Object&&e!==Function.prototype;){var n=t.get(e);n&&n.length>0&&o.push(n),e=Object.getPrototypeOf(e)}return o.reverse().flat()}export{r as getActivatedHandlerMetadata};//# sourceMappingURL=get-activated-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-activated-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/service/get-activated-handler-metadata.ts"],"sourcesContent":[null],"names":["ACTIVATED_HANDLER_METADATA","getActivatedHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","get","length","push","getPrototypeOf","reverse","flat"],"mappings":"qCAMAA,MAAA,iBAQM,SAAUC,EAA4BC,GAQ1C,IALA,IAAIC,EAAuBD,EAASC,YAE9BC,EAAuC,GAGf,mBAAhBD,GAA8BA,IAAgBE,QAAUF,IAAgBG,SAASC,WAAW,CACxG,IAAMC,EAAqCR,EAA2BS,IAAIN,GAEtEK,GAAOA,EAAIE,OAAS,GACtBN,EAAMO,KAAKH,GAGbL,EAAcE,OAAOO,eAAeT,EACtC,CAKA,OAAOC,EAAMS,UAAUC,MACzB,QAAAb"}
@@ -1 +0,0 @@
1
- import{DEACTIVATION_HANDLER_METADATA as t}from"../registry.js";function r(r){for(var e=r.constructor,o=[];"function"==typeof e&&e!==Object&&e!==Function.prototype;){var n=t.get(e);n&&n.length>0&&o.push(n),e=Object.getPrototypeOf(e)}return o.reverse().flat()}export{r as getDeactivationHandlerMetadata};//# sourceMappingURL=get-deactivation-handler-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-deactivation-handler-metadata.js","sources":["../../../../../../../../../src/wirestate-core/service/get-deactivation-handler-metadata.ts"],"sourcesContent":[null],"names":["DEACTIVATION_HANDLER_METADATA","getDeactivationHandlerMetadata","instance","constructor","chain","Object","Function","prototype","own","get","length","push","getPrototypeOf","reverse","flat"],"mappings":"wCAMAA,MAAA,iBAQM,SAAUC,EAA+BC,GAQ7C,IALA,IAAIC,EAAuBD,EAASC,YAE9BC,EAAuC,GAGf,mBAAhBD,GAA8BA,IAAgBE,QAAUF,IAAgBG,SAASC,WAAW,CACxG,IAAMC,EAAqCR,EAA8BS,IAAIN,GAEzEK,GAAOA,EAAIE,OAAS,GACtBN,EAAMO,KAAKH,GAGbL,EAAcE,OAAOO,eAAeT,EACtC,CASA,OAAOC,EAAMS,UAAUC,MACzB,QAAAb"}
@@ -1 +0,0 @@
1
- import{bindEntry as i}from"../bind/bind-entry.js";function e(e,r,n){void 0===n&&(n={});var o=n.skipLifecycle;return i(e,r,{isWithIgnoreLifecycle:o})}export{e as mockBindEntry};//# sourceMappingURL=mock-bind-entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-bind-entry.js","sources":["../../../../../../../../../src/wirestate-core/test-utils/mock-bind-entry.ts"],"sourcesContent":[null],"names":["bindEntry","mockBindEntry","container","entry","options","skipLifecycle","isWithIgnoreLifecycle"],"mappings":"oBAiBAA,MAAA,iCAUgBC,EACdC,EACAC,EACAC,QAAA,IAAAA,IAAAA,EAAA,CAAA,GAEQ,IAAAC,EAAkBD,EAAOC,cAEjC,OAAOL,EAAUE,EAAWC,EAAO,CACjCG,sBAAuBD,GAE3B,QAAAJ"}
@@ -1 +0,0 @@
1
- import{getEntryToken as r}from"../bind/get-entry-token.js";import{createIocContainer as e}from"../container/create-ioc-container.js";import{ERROR_CODE_INVALID_ARGUMENTS as o}from"../error/error-code.js";import{WirestateError as t}from"../error/wirestate-error.js";import{mockBindEntry as i}from"./mock-bind-entry.js";function n(n){void 0===n&&(n={});var c=n.activate,a=void 0===c?[]:c,f=n.entries,s=void 0===f?[]:f,v=n.skipLifecycle;if(a.length)for(var m=s.map((function(e){return r(e)})),d=0,p=a;d<p.length;d++){var l=p[d];if(!m.includes(l))throw new t(o,"Provided services for activation not matching list of services to bind.")}for(var g=e(),h=0,j=s;h<j.length;h++){var u=j[h];i(g,u,{skipLifecycle:v})}for(var k=0,y=a;k<y.length;k++){var b=y[k];g.get(b)}return g}export{n as mockContainer};//# sourceMappingURL=mock-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-container.js","sources":["../../../../../../../../../src/wirestate-core/test-utils/mock-container.ts"],"sourcesContent":[null],"names":["getEntryToken","createIocContainer","ERROR_CODE_INVALID_ARGUMENTS","WirestateError","mockBindEntry","mockContainer","options","_a","activate","_b","entries","skipLifecycle","length","serviceTokens","map","s","_i","activate_1","token","includes","container","_c","entries_1","it_1","_d","activate_2","it_2","get"],"mappings":"wBA6BAA,MAAA,0DAAAC,MAAA,8EAAAC,MAAA,kDAAAC,MAAA,sDAAAC,MAAA,uBAUM,SAAUC,EAAcC,QAAA,IAAAA,IAAAA,EAAA,CAAA,GACpB,IAAAC,EAA+CD,EAAOE,SAAtDA,OAAQ,IAAAD,EAAG,GAAEA,EAAEE,EAAgCH,UAAhCI,aAAU,GAAED,EAAEE,EAAkBL,EAAOK,cAE9D,GAAIH,EAASI,OAGX,IAFA,IAAMC,EAA0CH,EAAQI,KAAI,SAACC,GAAM,OAAAf,EAAce,EAAd,IAE/CC,EAAA,EAAAC,EAAAT,EAAAQ,WAAAA,IAAU,CAAzB,IAAME,EAAKD,EAAAD,GACd,IAAKH,EAAcM,SAASD,GAC1B,MAAM,IAAIf,EACRD,EACA,0EAGN,CAKF,IAFA,IAAMkB,EAAuBnB,IAEZoB,EAAA,EAAAC,EAAAZ,EAAAW,WAAAA,IAAS,CAArB,IAAME,EAAED,EAAAD,GACXjB,EAAcgB,EAAWG,EAAI,CAAEZ,cAAeA,GAChD,CAEA,IAAiB,IAAAa,EAAA,EAAAC,EAAAjB,EAAAgB,WAAAA,IAAU,CAAtB,IAAME,EAAED,EAAAD,GACXJ,EAAUO,IAAID,EAChB,CAEA,OAAON,CACT,QAAAf"}
@@ -1 +0,0 @@
1
- var e;!function(e){e.PENDING="pending",e.SETTLED="settled",e.ERROR="error"}(e||(e={}));export{e as ECommandStatus};//# sourceMappingURL=commands.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.js","sources":["../../../../../../../../../src/wirestate-core/types/commands.ts"],"sourcesContent":[null],"names":["ECommandStatus"],"mappings":"IA8CYA,GAAZ,SAAYA,GACVA,EAAA,QAAA,UACAA,EAAA,QAAA,UACAA,EAAA,MAAA,OACD,CAJD,CAAYA,IAAAA,EAAc,CAAA,WAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-command-caller.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-command-caller.ts"],"sourcesContent":[null],"names":["CommandBus","useCallback","useContainer","useCommandCaller","container","type","data","get","command"],"mappings":"qBAQAA,MAAA,wCAAAC,MAAA,+BAAAC,MAAA,yCAKgBC,IACd,IAAMC,EAAuBF,IAE7B,OAAOD,GACL,SAAgEI,EAASC,GAMvE,OAAOF,EAAUG,IAAIP,GAAYQ,QAAcH,EAAMC,EACvD,GACA,CAACF,GAEL,QAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-command-handler.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-command-handler.ts"],"sourcesContent":[null],"names":["CommandBus","useRef","useEffect","useContainer","useCommandHandler","type","handler","container","handlerRef","current","get","register","data"],"mappings":"qBAKAA,MAAA,mCAAAC,eAAAC,MAAA,+BAAAC,MAAA,gCAQM,SAAUC,EAA4CC,EAAmBC,GAC7E,IAAMC,EAAuBJ,IACvBK,EAAaP,EAA6BK,GAGhDJ,GAAU,WACRM,EAAWC,QAAUH,CACvB,IAEAJ,GAAU,WACR,OAAOK,EAAUG,IAAIV,GAAYW,SAAeN,GAAM,SAACO,GAAS,OAAAJ,EAAWC,QAAQG,EAAnB,GAClE,GAAG,CAACL,EAAWF,GACjB,QAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-optional-command-caller.js","sources":["../../../../../../../../../src/wirestate-react/commands/use-optional-command-caller.ts"],"sourcesContent":[null],"names":["CommandBus","useCallback","useContainer","useOptionalCommandCaller","container","type","data","get","commandOptional"],"mappings":"qBAQAA,MAAA,wCAAAC,MAAA,+BAAAC,MAAA,yCAMgBC,IACd,IAAMC,EAAuBF,IAE7B,OAAOD,GACL,SAAgEI,EAASC,GAMvE,OAAOF,EAAUG,IAAIP,GAAYQ,gBAAsBH,EAAMC,EAC/D,GACA,CAACF,GAEL,QAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-code.js","sources":["../../../../../../../../../src/wirestate-react/error/error-code.ts"],"sourcesContent":[null],"names":["ERROR_CODE_VALIDATION_ERROR","ERROR_CODE_INVALID_CONTEXT","ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER"],"mappings":"AAAO,IAAMA,EAAsC,KACtCC,EAAqC,KAErCC,EAAqD,YAAAA,gDAAAD,gCAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-event-emitter.js","sources":["../../../../../../../../../src/wirestate-react/events/use-event-emitter.ts"],"sourcesContent":[null],"names":["EventBus","useCallback","useIocContext","useEventEmitter","container","type","payload","from","get","emit"],"mappings":"mBAQAA,MAAA,wCAAAC,MAAA,gCAAAC,MAAA,2CAKgBC,IACd,IAAMC,EAAuBF,IAAgBE,UAE7C,OAAOH,GACL,SAAyBI,EAASC,EAAaC,GAO7CH,EAAUI,IAAIR,GAAUS,KAAK,CAAEJ,KAAIA,EAAEC,QAAOA,EAAEC,KAAIA,GACpD,GACA,CAACH,GAEL,QAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-event.js","sources":["../../../../../../../../../src/wirestate-react/events/use-event.ts"],"sourcesContent":[null],"names":["EventBus","useRef","useEffect","useContainer","useEvent","type","handler","typeRef","handlerRef","container","current","get","subscribe","event","_a","call"],"mappings":"mBAKAA,MAAA,mCAAAC,eAAAC,MAAA,+BAAAC,MAAA,gCAMM,SAAUC,EAASC,EAAiBC,GACxC,IAAMC,EAAuCN,EAAOI,GAC9CG,EAA6CP,EAAOK,GACpDG,EAAuBN,IAE7BD,GAAU,WACRK,EAAQG,QAAUL,EAClBG,EAAWE,QAAUJ,CACvB,IAEAJ,GAAU,WACR,OAAOO,EAAUE,IAAIX,GAAUY,WAAU,SAACC,SACpCA,EAAMR,OAASE,EAAQG,UACP,QAAlBI,EAAAN,EAAWE,eAAO,IAAAI,GAAAA,EAAAC,KAAAP,EAAGK,GAEzB,GACF,GAAG,CAACJ,EAAWJ,GACjB,QAAAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-events-handler.js","sources":["../../../../../../../../../src/wirestate-react/events/use-events-handler.ts"],"sourcesContent":[null],"names":["EventBus","useRef","useEffect","useContainer","useEventsHandler","handler","handlerRef","container","current","get","subscribe","event","_a","call"],"mappings":"mBAMAA,MAAA,mCAAAC,eAAAC,MAAA,+BAAAC,MAAA,gCAKM,SAAUC,EAAiBC,GAC/B,IAAMC,EAAoDL,EAAOI,GAC3DE,EAAuBJ,IAE7BD,GAAU,WACRI,EAAWE,QAAUH,CACvB,IAEAH,GAAU,WACR,OAAOK,EAAUE,IAAIT,GAAUU,WAAU,SAACC,SACtB,QAAlBC,EAAAN,EAAWE,eAAO,IAAAI,GAAAA,EAAAC,KAAAP,EAAGK,EACvB,GACF,GAAG,CAACJ,GACN,QAAAH"}
@@ -1 +0,0 @@
1
- import{EventBus as r}from"@wirestate/core";import{useRef as t,useEffect as o}from"react";import{useContainer as n}from"../provision/use-container.js";import"../provision/ioc-context.js";function i(i,e){var c=t(i),u=t(e),s=n();o((function(){c.current=i,u.current=e})),o((function(){return s.get(r).subscribe((function(r){var t;c.current.includes(r.type)&&(null===(t=u.current)||void 0===t||t.call(u,r))}))}),[s])}export{i as useEvents};//# sourceMappingURL=use-events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-events.js","sources":["../../../../../../../../../src/wirestate-react/events/use-events.ts"],"sourcesContent":[null],"names":["EventBus","useRef","useEffect","useContainer","useEvents","types","handler","typesRef","handlerRef","container","current","get","subscribe","event","includes","type","_a","call"],"mappings":"mBAKAA,MAAA,mCAAAC,eAAAC,MAAA,+BAAAC,MAAA,sCAAA,8BAMM,SAAUC,EAAUC,EAAiCC,GACzD,IAAMC,EAAuDN,EAAOI,GAC9DG,EAA6CP,EAAOK,GACpDG,EAAuBN,IAE7BD,GAAU,WACRK,EAASG,QAAUL,EACnBG,EAAWE,QAAUJ,CACvB,IAEAJ,GAAU,WACR,OAAOO,EAAUE,IAAIX,GAAUY,WAAU,SAACC,SACpCN,EAASG,QAAQI,SAASD,EAAME,QAChB,QAAlBC,EAAAR,EAAWE,eAAO,IAAAM,GAAAA,EAAAC,KAAAT,EAAGK,GAEzB,GACF,GAAG,CAACJ,GACN,QAAAL"}
@@ -1 +0,0 @@
1
- import{getEntryToken as e,WirestateError as r,applySeeds as n,bindEntry as t,unapplySeeds as i}from"@wirestate/core";import{useContext as o,useState as a,useMemo as c,useEffect as s}from"react";import{ERROR_CODE_VALIDATION_ERROR as d,ERROR_CODE_INVALID_CONTEXT as v}from"../error/error-code.js";import{IocContext as f}from"./ioc-context.js";function u(u,l){void 0===l&&(l={});var m=l.activate;if(m&&m.length>0)for(var g=u.map(e),h=0,p=m;h<p.length;h++){var b=p[h];if(!g.includes(b))throw new r(d,"createInjectablesProvider: '".concat(String(b),"' is listed in 'activate' but was not provided in 'entries'."))}function w(d){var l=o(f);if(!l)throw new r(v,"<InjectablesProvider> must be rendered inside an <IocProvider> React subtree.");var g=a((function(){return d}))[0];return c((function(){g.seeds&&n(l.container,g.seeds);for(var r=0,i=u;r<i.length;r++){var o=i[r];l.container.isBound(e(o))||t(l.container,o)}if(m)for(var a=0,c=m;a<c.length;a++){var s=c[a];l.container.get(s)}}),u),s((function(){var r=!1;g.seeds&&n(l.container,g.seeds);for(var o=0,a=u;o<a.length;o++){var c=a[o];l.container.isBound(e(c))||(r=!0,t(l.container,c))}if(m)for(var s=0,d=m;s<d.length;s++){var v=d[s];l.container.get(v)}return r&&l.setRevision((function(e){return e+1})),function(){for(var r=0,n=u;r<n.length;r++){var t=n[r],o=e(t);l.container.isBound(o)&&l.container.unbind(o)}g.seeds&&i(l.container,g.seeds)}}),u),d.children}return w.displayName="InjectablesProvider",w}export{u as createInjectablesProvider};//# sourceMappingURL=create-injectables-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-injectables-provider.js","sources":["../../../../../../../../../src/wirestate-react/provision/create-injectables-provider.ts"],"sourcesContent":[null],"names":["getEntryToken","WirestateError","applySeeds","bindEntry","unapplySeeds","useContext","useState","useMemo","useEffect","ERROR_CODE_VALIDATION_ERROR","ERROR_CODE_INVALID_CONTEXT","IocContext","createInjectablesProvider","entries","options","activate","length","entryTokens","map","_i","activate_1","eager","includes","concat","String","InjectablesProviderComponent","props","iocContext","initialPropsSnapshot","seeds","container","entries_1","entry","isBound","_a","activate_2","get","didRebind","entries_2","activate_3","setRevision","r","entries_3","token","unbind","children","displayName"],"mappings":"wBAkDAA,oBAAAC,gBAAAC,eAAAC,kBAAAC,MAAA,uCAAAC,cAAAC,aAAAC,eAAAC,MAAA,8CAAAC,gCAAAC,MAAA,8CAAAC,MAAA,mBAOM,SAAUC,EACdC,EACAC,QAAA,IAAAA,IAAAA,EAAA,CAAA,GAIQ,IAAAC,EAAaD,EAAOC,SAE5B,GAAIA,GAAYA,EAASC,OAAS,EAGhC,IAFA,IAAMC,EAAgDJ,EAAQK,IAAIlB,GAE9CmB,EAAA,EAAAC,EAAAL,EAAAI,WAAAA,IAAU,CAAzB,IAAME,EAAKD,EAAAD,GACd,IAAKF,EAAYK,SAASD,GACxB,MAAM,IAAIpB,EACRQ,EACA,+BAAAc,OAA+BC,OAAOH,GAAM,gEAGlD,CAGF,SAASI,EAA6BC,GACpC,IAAMC,EAAoCtB,EAAWM,GAErD,IAAKgB,EACH,MAAM,IAAI1B,EACRS,EACA,iFAMG,IAAAkB,EAAwBtB,GAAoC,WAAM,OAAAoB,CAAA,IAAM,GAqF/E,OAnFAnB,GAAQ,WAUFqB,EAAqBC,OACvB3B,EAAWyB,EAAWG,UAAWF,EAAqBC,OAGxD,IAAoB,IAAAV,EAAA,EAAAY,EAAAlB,EAAAM,WAAAA,IAAS,CAAxB,IAAMa,EAAKD,EAAAZ,GACTQ,EAAWG,UAAUG,QAAQjC,EAAcgC,KAC9C7B,EAAUwB,EAAWG,UAAWE,EAEpC,CAEA,GAAIjB,EACF,IAAoB,IAAAmB,EAAA,EAAAC,EAAApB,EAAAmB,WAAAA,IAAU,CAAzB,IAAMb,EAAKc,EAAAD,GACdP,EAAWG,UAAUM,IAAIf,EAC3B,CAEJ,GAAGR,GAEHL,GAAU,WAUR,IAAI6B,GAAqB,EAErBT,EAAqBC,OACvB3B,EAAWyB,EAAWG,UAAWF,EAAqBC,OAGxD,IAAoB,IAAAV,EAAA,EAAAmB,EAAAzB,EAAAM,WAAAA,IAAS,CAAxB,IAAMa,EAAKM,EAAAnB,GACTQ,EAAWG,UAAUG,QAAQjC,EAAcgC,MAC9CK,GAAY,EACZlC,EAAUwB,EAAWG,UAAWE,GAEpC,CAEA,GAAIjB,EACF,IAAoB,IAAAmB,EAAA,EAAAK,EAAAxB,EAAAmB,WAAAA,IAAU,CAAzB,IAAMb,EAAKkB,EAAAL,GACdP,EAAWG,UAAUM,IAAIf,EAC3B,CAQF,OAJIgB,GACFV,EAAWa,aAAY,SAACC,GAAM,OAAAA,EAAI,CAAJ,IAGzB,WAOL,IAAoB,IAAAtB,EAAA,EAAAuB,EAAA7B,EAAAM,WAAAA,IAAS,CAAxB,IAAMa,EAAKU,EAAAvB,GACRwB,EAA2B3C,EAAcgC,GAE3CL,EAAWG,UAAUG,QAAQU,IAC/BhB,EAAWG,UAAUc,OAAOD,EAEhC,CAGIf,EAAqBC,OACvBzB,EAAauB,EAAWG,UAAWF,EAAqBC,MAE5D,CACF,GAAGhB,GAEIa,EAAMmB,QACf,CAMA,OAJApB,EAA6BqB,YAAc,sBAIpCrB,CACT,QAAAb"}
@@ -1 +0,0 @@
1
- import{createContext as o}from"react";var r=o(null);r.displayName="IocContext";export{r as IocContext};//# sourceMappingURL=ioc-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ioc-context.js","sources":["../../../../../../../../../src/wirestate-react/provision/ioc-context.ts"],"sourcesContent":[null],"names":["createContext","IocContext","displayName"],"mappings":"wBAuBAA,MAAA,YAIaC,EAA6CD,EAAqC,MAE/FC,EAAWC,YAAc,oBAAYD"}
@@ -1 +0,0 @@
1
- import{createIocContainer as r,WirestateError as o,applySharedSeed as e}from"@wirestate/core";import{useState as n,useMemo as t,useEffect as i,createElement as c}from"react";import{ERROR_CODE_FAILED_TO_RESOLVE_QUERY_HANDLER as a}from"../error/error-code.js";import{IocContext as f}from"./ioc-context.js";function u(u){var s=u.container,l=u.seed,m=u.children,v=n(1),d=v[0],p=v[1],w=n((function(){return s?null:r()}))[0],h=null!=s?s:w;if(!h)throw new o(a,"IocProvider failed to resolve a container instance.");var j=t((function(){return{container:h,revision:d,setRevision:p}}),[h,d]);return i((function(){l&&e(h,l)}),[h]),c(f.Provider,{value:j},m)}export{u as IocProvider};//# sourceMappingURL=ioc-provider.js.map