@contember/react-binding 2.1.0-beta.1 → 2.2.0-alpha.1

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 (427) hide show
  1. package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  2. package/dist/development/src/accessorPropagation/AccessorProvider.js.map +1 -1
  3. package/dist/development/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  4. package/dist/development/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  5. package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  6. package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  7. package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  8. package/dist/development/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  9. package/dist/development/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  10. package/dist/development/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  11. package/dist/development/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  12. package/dist/development/src/accessorPropagation/useBindingOperations.js.map +1 -1
  13. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  14. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  15. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  16. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  17. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  18. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  19. package/dist/development/src/accessorPropagation/useEntity.cjs.map +1 -1
  20. package/dist/development/src/accessorPropagation/useEntity.js.map +1 -1
  21. package/dist/development/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  22. package/dist/development/src/accessorPropagation/useEntityKey.js.map +1 -1
  23. package/dist/development/src/accessorPropagation/useEntityList.cjs.map +1 -1
  24. package/dist/development/src/accessorPropagation/useEntityList.js.map +1 -1
  25. package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  26. package/dist/development/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  27. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  28. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  29. package/dist/development/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  30. package/dist/development/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  31. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  32. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  33. package/dist/development/src/accessorPropagation/useEnvironment.cjs.map +1 -1
  34. package/dist/development/src/accessorPropagation/useEnvironment.js.map +1 -1
  35. package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  36. package/dist/development/src/accessorPropagation/useExtendTree.js.map +1 -1
  37. package/dist/development/src/accessorPropagation/useField.cjs.map +1 -1
  38. package/dist/development/src/accessorPropagation/useField.js.map +1 -1
  39. package/dist/development/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  40. package/dist/development/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  41. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  42. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  43. package/dist/development/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  44. package/dist/development/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  45. package/dist/development/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  46. package/dist/development/src/accessorPropagation/useHasEntity.js.map +1 -1
  47. package/dist/development/src/accessorPropagation/usePersist.cjs.map +1 -1
  48. package/dist/development/src/accessorPropagation/usePersist.js.map +1 -1
  49. package/dist/development/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  50. package/dist/development/src/accessorPropagation/useTreeRootId.js.map +1 -1
  51. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  52. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  53. package/dist/development/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  54. package/dist/development/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  55. package/dist/development/src/accessorTree/AccessorTree.cjs.map +1 -1
  56. package/dist/development/src/accessorTree/AccessorTree.js.map +1 -1
  57. package/dist/development/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  58. package/dist/development/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  59. package/dist/development/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  60. package/dist/development/src/accessorTree/useAccessorTreeState.js.map +1 -1
  61. package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
  62. package/dist/development/src/accessorTree/useDataBinding.js.map +1 -1
  63. package/dist/development/src/accessorTree/useDirtinessState.cjs.map +1 -1
  64. package/dist/development/src/accessorTree/useDirtinessState.js.map +1 -1
  65. package/dist/development/src/accessorTree/useMutationState.cjs.map +1 -1
  66. package/dist/development/src/accessorTree/useMutationState.js.map +1 -1
  67. package/dist/development/src/coreComponents/Component.cjs.map +1 -1
  68. package/dist/development/src/coreComponents/Component.js.map +1 -1
  69. package/dist/development/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  70. package/dist/development/src/coreComponents/DataBindingProvider.js.map +1 -1
  71. package/dist/development/src/coreComponents/Entity.cjs.map +1 -1
  72. package/dist/development/src/coreComponents/Entity.js.map +1 -1
  73. package/dist/development/src/coreComponents/EntityList.cjs.map +1 -1
  74. package/dist/development/src/coreComponents/EntityList.js.map +1 -1
  75. package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  76. package/dist/development/src/coreComponents/EntityListSubTree.js.map +1 -1
  77. package/dist/development/src/coreComponents/EntitySubTree.cjs.map +1 -1
  78. package/dist/development/src/coreComponents/EntitySubTree.js.map +1 -1
  79. package/dist/development/src/coreComponents/Field.cjs.map +1 -1
  80. package/dist/development/src/coreComponents/Field.js.map +1 -1
  81. package/dist/development/src/coreComponents/HasMany.cjs.map +1 -1
  82. package/dist/development/src/coreComponents/HasMany.js.map +1 -1
  83. package/dist/development/src/coreComponents/HasOne.cjs.map +1 -1
  84. package/dist/development/src/coreComponents/HasOne.js.map +1 -1
  85. package/dist/development/src/coreComponents/ParentEntity.cjs.map +1 -1
  86. package/dist/development/src/coreComponents/ParentEntity.js.map +1 -1
  87. package/dist/development/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  88. package/dist/development/src/entityEvents/useDataBindingEvent.js.map +1 -1
  89. package/dist/development/src/entityEvents/useDerivedField.cjs.map +1 -1
  90. package/dist/development/src/entityEvents/useDerivedField.js.map +1 -1
  91. package/dist/development/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  92. package/dist/development/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  93. package/dist/development/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  94. package/dist/development/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  95. package/dist/development/src/entityEvents/useEntityEvent.cjs.map +1 -1
  96. package/dist/development/src/entityEvents/useEntityEvent.js.map +1 -1
  97. package/dist/development/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  98. package/dist/development/src/entityEvents/useEntityPersistError.js.map +1 -1
  99. package/dist/development/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  100. package/dist/development/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  101. package/dist/development/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  102. package/dist/development/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  103. package/dist/development/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  104. package/dist/development/src/helperComponents/DeferredSubTrees.js.map +1 -1
  105. package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  106. package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  107. package/dist/development/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  108. package/dist/development/src/helperComponents/DimensionRenderer.js.map +1 -1
  109. package/dist/development/src/helperComponents/EntityView.cjs.map +1 -1
  110. package/dist/development/src/helperComponents/EntityView.js.map +1 -1
  111. package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
  112. package/dist/development/src/helperComponents/FieldView.js.map +1 -1
  113. package/dist/development/src/helperComponents/If.cjs.map +1 -1
  114. package/dist/development/src/helperComponents/If.js.map +1 -1
  115. package/dist/development/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  116. package/dist/development/src/helperComponents/LabelMiddleware.js.map +1 -1
  117. package/dist/development/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  118. package/dist/development/src/helperComponents/RecursionTerminator.js.map +1 -1
  119. package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  120. package/dist/development/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  121. package/dist/development/src/helperComponents/StaticRender.cjs.map +1 -1
  122. package/dist/development/src/helperComponents/StaticRender.js.map +1 -1
  123. package/dist/development/src/helperComponents/SugaredField.cjs.map +1 -1
  124. package/dist/development/src/helperComponents/SugaredField.js.map +1 -1
  125. package/dist/development/src/helperComponents/Variable.cjs.map +1 -1
  126. package/dist/development/src/helperComponents/Variable.js.map +1 -1
  127. package/dist/development/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  128. package/dist/development/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  129. package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs +33 -0
  130. package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  131. package/dist/development/src/helperComponents/helpers/evaluateCondition.js +33 -0
  132. package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  133. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  134. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  135. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  136. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  137. package/dist/development/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  138. package/dist/development/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  139. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs +1 -1
  140. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  141. package/dist/development/src/helperComponents/persist/PersistTrigger.js +1 -1
  142. package/dist/development/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  143. package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  144. package/dist/development/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  145. package/dist/development/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  146. package/dist/development/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  147. package/dist/development/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  148. package/dist/development/src/markers/MarkerTreeGenerator.js.map +1 -1
  149. package/dist/production/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  150. package/dist/production/src/accessorPropagation/AccessorProvider.js.map +1 -1
  151. package/dist/production/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  152. package/dist/production/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  153. package/dist/production/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  154. package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  155. package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  156. package/dist/production/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  157. package/dist/production/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  158. package/dist/production/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  159. package/dist/production/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  160. package/dist/production/src/accessorPropagation/useBindingOperations.js.map +1 -1
  161. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  162. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  163. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  164. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  165. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  166. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  167. package/dist/production/src/accessorPropagation/useEntity.cjs.map +1 -1
  168. package/dist/production/src/accessorPropagation/useEntity.js.map +1 -1
  169. package/dist/production/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  170. package/dist/production/src/accessorPropagation/useEntityKey.js.map +1 -1
  171. package/dist/production/src/accessorPropagation/useEntityList.cjs.map +1 -1
  172. package/dist/production/src/accessorPropagation/useEntityList.js.map +1 -1
  173. package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  174. package/dist/production/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  175. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  176. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  177. package/dist/production/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  178. package/dist/production/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  179. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  180. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  181. package/dist/production/src/accessorPropagation/useEnvironment.cjs.map +1 -1
  182. package/dist/production/src/accessorPropagation/useEnvironment.js.map +1 -1
  183. package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  184. package/dist/production/src/accessorPropagation/useExtendTree.js.map +1 -1
  185. package/dist/production/src/accessorPropagation/useField.cjs.map +1 -1
  186. package/dist/production/src/accessorPropagation/useField.js.map +1 -1
  187. package/dist/production/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  188. package/dist/production/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  189. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  190. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  191. package/dist/production/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  192. package/dist/production/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  193. package/dist/production/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  194. package/dist/production/src/accessorPropagation/useHasEntity.js.map +1 -1
  195. package/dist/production/src/accessorPropagation/usePersist.cjs.map +1 -1
  196. package/dist/production/src/accessorPropagation/usePersist.js.map +1 -1
  197. package/dist/production/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  198. package/dist/production/src/accessorPropagation/useTreeRootId.js.map +1 -1
  199. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  200. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  201. package/dist/production/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  202. package/dist/production/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  203. package/dist/production/src/accessorTree/AccessorTree.cjs.map +1 -1
  204. package/dist/production/src/accessorTree/AccessorTree.js.map +1 -1
  205. package/dist/production/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  206. package/dist/production/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  207. package/dist/production/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  208. package/dist/production/src/accessorTree/useAccessorTreeState.js.map +1 -1
  209. package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
  210. package/dist/production/src/accessorTree/useDataBinding.js.map +1 -1
  211. package/dist/production/src/accessorTree/useDirtinessState.cjs.map +1 -1
  212. package/dist/production/src/accessorTree/useDirtinessState.js.map +1 -1
  213. package/dist/production/src/accessorTree/useMutationState.cjs.map +1 -1
  214. package/dist/production/src/accessorTree/useMutationState.js.map +1 -1
  215. package/dist/production/src/coreComponents/Component.cjs.map +1 -1
  216. package/dist/production/src/coreComponents/Component.js.map +1 -1
  217. package/dist/production/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  218. package/dist/production/src/coreComponents/DataBindingProvider.js.map +1 -1
  219. package/dist/production/src/coreComponents/Entity.cjs.map +1 -1
  220. package/dist/production/src/coreComponents/Entity.js.map +1 -1
  221. package/dist/production/src/coreComponents/EntityList.cjs.map +1 -1
  222. package/dist/production/src/coreComponents/EntityList.js.map +1 -1
  223. package/dist/production/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  224. package/dist/production/src/coreComponents/EntityListSubTree.js.map +1 -1
  225. package/dist/production/src/coreComponents/EntitySubTree.cjs.map +1 -1
  226. package/dist/production/src/coreComponents/EntitySubTree.js.map +1 -1
  227. package/dist/production/src/coreComponents/Field.cjs.map +1 -1
  228. package/dist/production/src/coreComponents/Field.js.map +1 -1
  229. package/dist/production/src/coreComponents/HasMany.cjs.map +1 -1
  230. package/dist/production/src/coreComponents/HasMany.js.map +1 -1
  231. package/dist/production/src/coreComponents/HasOne.cjs.map +1 -1
  232. package/dist/production/src/coreComponents/HasOne.js.map +1 -1
  233. package/dist/production/src/coreComponents/ParentEntity.cjs.map +1 -1
  234. package/dist/production/src/coreComponents/ParentEntity.js.map +1 -1
  235. package/dist/production/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  236. package/dist/production/src/entityEvents/useDataBindingEvent.js.map +1 -1
  237. package/dist/production/src/entityEvents/useDerivedField.cjs.map +1 -1
  238. package/dist/production/src/entityEvents/useDerivedField.js.map +1 -1
  239. package/dist/production/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  240. package/dist/production/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  241. package/dist/production/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  242. package/dist/production/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  243. package/dist/production/src/entityEvents/useEntityEvent.cjs.map +1 -1
  244. package/dist/production/src/entityEvents/useEntityEvent.js.map +1 -1
  245. package/dist/production/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  246. package/dist/production/src/entityEvents/useEntityPersistError.js.map +1 -1
  247. package/dist/production/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  248. package/dist/production/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  249. package/dist/production/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  250. package/dist/production/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  251. package/dist/production/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  252. package/dist/production/src/helperComponents/DeferredSubTrees.js.map +1 -1
  253. package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  254. package/dist/production/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  255. package/dist/production/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  256. package/dist/production/src/helperComponents/DimensionRenderer.js.map +1 -1
  257. package/dist/production/src/helperComponents/EntityView.cjs.map +1 -1
  258. package/dist/production/src/helperComponents/EntityView.js.map +1 -1
  259. package/dist/production/src/helperComponents/FieldView.cjs.map +1 -1
  260. package/dist/production/src/helperComponents/FieldView.js.map +1 -1
  261. package/dist/production/src/helperComponents/If.cjs.map +1 -1
  262. package/dist/production/src/helperComponents/If.js.map +1 -1
  263. package/dist/production/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  264. package/dist/production/src/helperComponents/LabelMiddleware.js.map +1 -1
  265. package/dist/production/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  266. package/dist/production/src/helperComponents/RecursionTerminator.js.map +1 -1
  267. package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  268. package/dist/production/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  269. package/dist/production/src/helperComponents/StaticRender.cjs.map +1 -1
  270. package/dist/production/src/helperComponents/StaticRender.js.map +1 -1
  271. package/dist/production/src/helperComponents/SugaredField.cjs.map +1 -1
  272. package/dist/production/src/helperComponents/SugaredField.js.map +1 -1
  273. package/dist/production/src/helperComponents/Variable.cjs.map +1 -1
  274. package/dist/production/src/helperComponents/Variable.js.map +1 -1
  275. package/dist/production/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  276. package/dist/production/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  277. package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs +33 -0
  278. package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  279. package/dist/production/src/helperComponents/helpers/evaluateCondition.js +33 -0
  280. package/dist/production/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  281. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  282. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  283. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  284. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  285. package/dist/production/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  286. package/dist/production/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  287. package/dist/production/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  288. package/dist/production/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  289. package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  290. package/dist/production/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  291. package/dist/production/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  292. package/dist/production/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  293. package/dist/production/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  294. package/dist/production/src/markers/MarkerTreeGenerator.js.map +1 -1
  295. package/dist/types/accessorPropagation/index.d.ts +28 -28
  296. package/dist/types/accessorPropagation/index.d.ts.map +1 -1
  297. package/dist/types/accessorSorting/index.d.ts +5 -5
  298. package/dist/types/accessorSorting/index.d.ts.map +1 -1
  299. package/dist/types/accessorTree/AccessorTree.d.ts +1 -1
  300. package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -1
  301. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +1 -1
  302. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -1
  303. package/dist/types/accessorTree/index.d.ts +11 -11
  304. package/dist/types/accessorTree/index.d.ts.map +1 -1
  305. package/dist/types/accessorTree/useAccessorTreeState.d.ts +1 -1
  306. package/dist/types/accessorTree/useAccessorTreeState.d.ts.map +1 -1
  307. package/dist/types/accessorTree/useDataBinding.d.ts +1 -1
  308. package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
  309. package/dist/types/coreComponents/Component.d.ts +1 -1
  310. package/dist/types/coreComponents/Component.d.ts.map +1 -1
  311. package/dist/types/coreComponents/DataBindingProvider.d.ts +1 -1
  312. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
  313. package/dist/types/coreComponents/EntityListSubTree.d.ts +1 -1
  314. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
  315. package/dist/types/coreComponents/EntitySubTree.d.ts +1 -1
  316. package/dist/types/coreComponents/EntitySubTree.d.ts.map +1 -1
  317. package/dist/types/coreComponents/HasMany.d.ts +1 -1
  318. package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
  319. package/dist/types/coreComponents/index.d.ts +10 -10
  320. package/dist/types/coreComponents/index.d.ts.map +1 -1
  321. package/dist/types/entityEvents/index.d.ts +8 -8
  322. package/dist/types/entityEvents/index.d.ts.map +1 -1
  323. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts +1 -1
  324. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts.map +1 -1
  325. package/dist/types/helperComponents/SugaredField.d.ts +1 -1
  326. package/dist/types/helperComponents/SugaredField.d.ts.map +1 -1
  327. package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +1 -1
  328. package/dist/types/helperComponents/index.d.ts +13 -13
  329. package/dist/types/helperComponents/index.d.ts.map +1 -1
  330. package/dist/types/helperComponents/persist/PersistTrigger.d.ts +3 -0
  331. package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -1
  332. package/dist/types/helperComponents/persist/index.d.ts +4 -4
  333. package/dist/types/helperComponents/persist/index.d.ts.map +1 -1
  334. package/dist/types/index.d.ts +7 -7
  335. package/dist/types/index.d.ts.map +1 -1
  336. package/dist/types/markers/index.d.ts +2 -2
  337. package/dist/types/markers/index.d.ts.map +1 -1
  338. package/dist/types/tsconfig.tsbuildinfo +1 -1
  339. package/package.json +7 -8
  340. package/src/accessorPropagation/AccessorProvider.tsx +2 -2
  341. package/src/accessorPropagation/BindingOperationsProvider.tsx +1 -1
  342. package/src/accessorPropagation/EntityKeyProvider.tsx +1 -1
  343. package/src/accessorPropagation/EnvironmentContext.tsx +2 -2
  344. package/src/accessorPropagation/TreeRootIdProvider.tsx +1 -1
  345. package/src/accessorPropagation/index.ts +31 -31
  346. package/src/accessorPropagation/useBindingOperations.ts +1 -1
  347. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +1 -1
  348. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +1 -1
  349. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +1 -1
  350. package/src/accessorPropagation/useEntity.ts +4 -4
  351. package/src/accessorPropagation/useEntityKey.ts +1 -1
  352. package/src/accessorPropagation/useEntityList.ts +4 -4
  353. package/src/accessorPropagation/useEntityListSubTree.ts +3 -3
  354. package/src/accessorPropagation/useEntityListSubTreeLoader.ts +3 -3
  355. package/src/accessorPropagation/useEntitySubTree.ts +3 -3
  356. package/src/accessorPropagation/useEntitySubTreeLoader.ts +2 -2
  357. package/src/accessorPropagation/useEnvironment.ts +1 -1
  358. package/src/accessorPropagation/useExtendTree.ts +2 -2
  359. package/src/accessorPropagation/useField.ts +4 -4
  360. package/src/accessorPropagation/useGetEntityByKey.ts +1 -1
  361. package/src/accessorPropagation/useGetEntityListSubTree.ts +3 -3
  362. package/src/accessorPropagation/useGetEntitySubTree.ts +3 -3
  363. package/src/accessorPropagation/useHasEntity.ts +1 -1
  364. package/src/accessorPropagation/usePersist.ts +1 -1
  365. package/src/accessorPropagation/useTreeRootId.ts +1 -1
  366. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +3 -3
  367. package/src/accessorSorting/addEntityAtIndex.ts +2 -2
  368. package/src/accessorSorting/index.ts +5 -5
  369. package/src/accessorTree/AccessorTree.tsx +6 -6
  370. package/src/accessorTree/AccessorTreeStateContext.ts +1 -1
  371. package/src/accessorTree/index.ts +11 -11
  372. package/src/accessorTree/useAccessorTreeState.ts +1 -1
  373. package/src/accessorTree/useDataBinding.ts +4 -4
  374. package/src/accessorTree/useDirtinessState.ts +1 -1
  375. package/src/accessorTree/useMutationState.ts +1 -1
  376. package/src/coreComponents/Component.tsx +2 -2
  377. package/src/coreComponents/DataBindingProvider.tsx +1 -1
  378. package/src/coreComponents/Entity.tsx +2 -2
  379. package/src/coreComponents/EntityList.tsx +2 -2
  380. package/src/coreComponents/EntityListSubTree.tsx +4 -4
  381. package/src/coreComponents/EntitySubTree.tsx +5 -5
  382. package/src/coreComponents/Field.tsx +2 -2
  383. package/src/coreComponents/HasMany.tsx +4 -4
  384. package/src/coreComponents/HasOne.tsx +4 -4
  385. package/src/coreComponents/ParentEntity.tsx +1 -1
  386. package/src/coreComponents/index.ts +10 -10
  387. package/src/entityEvents/index.ts +8 -8
  388. package/src/entityEvents/useDataBindingEvent.ts +1 -1
  389. package/src/entityEvents/useDerivedField.ts +1 -1
  390. package/src/entityEvents/useEntityBeforePersist.ts +1 -1
  391. package/src/entityEvents/useEntityBeforeUpdate.ts +1 -1
  392. package/src/entityEvents/useEntityEvent.ts +1 -1
  393. package/src/entityEvents/useEntityPersistError.ts +1 -1
  394. package/src/entityEvents/useEntityPersistSuccess.ts +1 -1
  395. package/src/entityEvents/useOnConnectionUpdate.ts +1 -1
  396. package/src/helperComponents/DeferredSubTrees.tsx +4 -4
  397. package/src/helperComponents/DeleteEntityTrigger.tsx +3 -3
  398. package/src/helperComponents/DimensionRenderer.tsx +2 -2
  399. package/src/helperComponents/EntityView.tsx +1 -1
  400. package/src/helperComponents/FieldView.tsx +3 -3
  401. package/src/helperComponents/If.tsx +4 -4
  402. package/src/helperComponents/LabelMiddleware.tsx +1 -1
  403. package/src/helperComponents/RecursionTerminator.tsx +1 -1
  404. package/src/helperComponents/RecursionTerminatorPortal.tsx +3 -3
  405. package/src/helperComponents/StaticRender.tsx +1 -1
  406. package/src/helperComponents/SugaredField.tsx +1 -1
  407. package/src/helperComponents/Variable.tsx +1 -1
  408. package/src/helperComponents/helpers/FilterEvaluator.ts +1 -1
  409. package/src/helperComponents/helpers/evaluateCondition.ts +33 -0
  410. package/src/helperComponents/index.ts +13 -13
  411. package/src/helperComponents/persist/PersistOnFieldChange.tsx +3 -3
  412. package/src/helperComponents/persist/PersistOnHasOneChange.tsx +3 -3
  413. package/src/helperComponents/persist/PersistOnKey.tsx +1 -1
  414. package/src/helperComponents/persist/PersistTrigger.tsx +5 -2
  415. package/src/helperComponents/persist/index.tsx +4 -4
  416. package/src/helperComponents/persist/useDecoratedPersist.ts +1 -1
  417. package/src/index.ts +7 -7
  418. package/src/markers/MarkerStaticAnalyzer.ts +2 -2
  419. package/src/markers/MarkerTreeGenerator.ts +1 -1
  420. package/src/markers/index.ts +2 -2
  421. package/tests/cases/unit/core/entityOperations.test.tsx +3 -3
  422. package/tests/cases/unit/core/eventManager.test.tsx +3 -3
  423. package/tests/cases/unit/helperComponents/FilterEvaluator.spec.ts +3 -3
  424. package/tests/cases/unit/helperComponents/FilterFieldsCollector.spec.ts +2 -2
  425. package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +1 -1
  426. package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +1 -1
  427. package/tests/lib/bindingFactory.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AccessorProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key ?? props.accessor.getAccessor}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":["jsxDEV","EntityKeyContext","EnvironmentContext"],"mappings":";;;;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,SACCA,qCAACC,iBAAAA,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,aACtE,UAAAD,qCAACE,mBAAAA,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,gBAAM,YAAvE,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAgF,EAAA,GADjF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;;"}
1
+ {"version":3,"file":"AccessorProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext.js'\nimport { EnvironmentContext } from './EnvironmentContext.js'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key ?? props.accessor.getAccessor}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":["jsxDEV","EntityKeyContext","EnvironmentContext"],"mappings":";;;;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,SACCA,qCAACC,iBAAAA,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,aACtE,UAAAD,qCAACE,mBAAAA,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,gBAAM,YAAvE,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAgF,EAAA,GADjF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccessorProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key ?? props.accessor.getAccessor}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,SACC,uBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,aACtE,UAAA,uBAAC,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,gBAAM,YAAvE,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAgF,EAAA,GADjF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;"}
1
+ {"version":3,"file":"AccessorProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext.js'\nimport { EnvironmentContext } from './EnvironmentContext.js'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key ?? props.accessor.getAccessor}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,SACC,uBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,aACtE,UAAA,uBAAC,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,gBAAM,YAAvE,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAgF,EAAA,GADjF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BindingOperationsProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations<ReactNode> | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":["jsxDEV","BindingOperationsContext","defaultBindingOperations"],"mappings":";;;;AASO,SAAS,0BAA0B,OAAuC;AAChF,SACCA,8BAAAA,OAACC,yBAAAA,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqBC,yBAAAA,0BACnE,UAAA,MAAM,SAAA,GADR,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;;"}
1
+ {"version":3,"file":"BindingOperationsProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext.js'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations<ReactNode> | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":["jsxDEV","BindingOperationsContext","defaultBindingOperations"],"mappings":";;;;AASO,SAAS,0BAA0B,OAAuC;AAChF,SACCA,8BAAAA,OAACC,yBAAAA,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqBC,yBAAAA,0BACnE,UAAA,MAAM,SAAA,GADR,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BindingOperationsProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations<ReactNode> | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;AASO,SAAS,0BAA0B,OAAuC;AAChF,SACC,uBAAC,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqB,0BACnE,UAAA,MAAM,SAAA,GADR,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;"}
1
+ {"version":3,"file":"BindingOperationsProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext.js'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations<ReactNode> | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;AASO,SAAS,0BAA0B,OAAuC;AAChF,SACC,uBAAC,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqB,0BACnE,UAAA,MAAM,SAAA,GADR,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityKeyProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EntityAccessor } from '@contember/binding'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string | (() => EntityAccessor)\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":["jsxDEV","EntityKeyContext"],"mappings":";;;;AASO,SAAS,kBAAkB,OAA+B;AAChE,SAAOA,8BAAAA,OAACC,iBAAAA,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,YAA1D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAmE;AAC3E;;"}
1
+ {"version":3,"file":"EntityKeyProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext.js'\nimport { EntityAccessor } from '@contember/binding'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string | (() => EntityAccessor)\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":["jsxDEV","EntityKeyContext"],"mappings":";;;;AASO,SAAS,kBAAkB,OAA+B;AAChE,SAAOA,8BAAAA,OAACC,iBAAAA,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,YAA1D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAmE;AAC3E;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityKeyProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EntityAccessor } from '@contember/binding'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string | (() => EntityAccessor)\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,kBAAkB,OAA+B;AAChE,SAAO,uBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,YAA1D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAmE;AAC3E;"}
1
+ {"version":3,"file":"EntityKeyProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext.js'\nimport { EntityAccessor } from '@contember/binding'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string | (() => EntityAccessor)\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,kBAAkB,OAA+B;AAChE,SAAO,uBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,YAA1D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAmE;AAC3E;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["createContext","Environment","Component","useEnvironment","useMemo","this","useCallback","jsxDEV"],"mappings":";;;;;;;AAKO,MAAM,qBAAqBA,MAAAA,cAA2BC,QAAAA,YAAY,OAAA,CAAQ;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwBC,UAAAA;AAAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAMC,eAAAA,eAAA;AAEZ,UAAM,mBAAmBC,MAAAA;AAAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA,MAC5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAA,CAAG;AAAA,IAAA;AAG9B,gDAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAA,GAAvD,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAC,MAAgE;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,4EAAU,SAAA,GAAH,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAY;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAC9B;AAAA,EAAA;AAEF;AAQO,MAAM,+BAAgGH,UAAAA;AAAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAASI,MAAAA,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACxG,WAAOC,8BAAAA,OAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAF,MAAiD;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AACvE,WAAOE,8BAAAA,OAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAF,MAAiD;AAAA,EACzD;AACD;;;;"}
1
+ {"version":3,"file":"EnvironmentContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\nimport { Component } from '../coreComponents/index.js'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["createContext","Environment","Component","useEnvironment","useMemo","this","useCallback","jsxDEV"],"mappings":";;;;;;;AAKO,MAAM,qBAAqBA,MAAAA,cAA2BC,QAAAA,YAAY,OAAA,CAAQ;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwBC,UAAAA;AAAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAMC,eAAAA,eAAA;AAEZ,UAAM,mBAAmBC,MAAAA;AAAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA,MAC5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAA,CAAG;AAAA,IAAA;AAG9B,gDAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAA,GAAvD,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAC,MAAgE;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,4EAAU,SAAA,GAAH,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAY;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAC9B;AAAA,EAAA;AAEF;AAQO,MAAM,+BAAgGH,UAAAA;AAAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAASI,MAAAA,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACxG,WAAOC,8BAAAA,OAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAF,MAAiD;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AACvE,WAAOE,8BAAAA,OAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAF,MAAiD;AAAA,EACzD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["this"],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,OAAA,CAAQ;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAM,eAAA;AAEZ,UAAM,mBAAmB;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA,MAC5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAA,CAAG;AAAA,IAAA;AAG9B,kCAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAA,GAAvD,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAgE;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,gDAAU,SAAA,GAAH,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAY;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAC9B;AAAA,EAAA;AAEF;AAQO,MAAM,+BAAgG;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACxG,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AACvE,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AACD;"}
1
+ {"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\nimport { Component } from '../coreComponents/index.js'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["this"],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,OAAA,CAAQ;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAM,eAAA;AAEZ,UAAM,mBAAmB;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA,MAC5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAA,CAAG;AAAA,IAAA;AAG9B,kCAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAA,GAAvD,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAgE;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,gDAAU,SAAA,GAAH,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAY;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAC9B;AAAA,EAAA;AAEF;AAQO,MAAM,+BAAgG;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACxG,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AACvE,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsxDEV","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAOA,8BAAAA,OAACC,kBAAAA,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;;"}
1
+ {"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext.js'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsxDEV","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAOA,8BAAAA,OAACC,kBAAAA,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAO,uBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;"}
1
+ {"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext.js'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAO,uBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBindingOperations.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":["useContext","BindingOperationsContext"],"mappings":";;;;AAIO,MAAM,uBAAuB,MAAoCA,MAAAA,WAAWC,yBAAAA,wBAAwB;;"}
1
+ {"version":3,"file":"useBindingOperations.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext.js'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":["useContext","BindingOperationsContext"],"mappings":";;;;AAIO,MAAM,uBAAuB,MAAoCA,MAAAA,WAAWC,yBAAAA,wBAAwB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBindingOperations.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":[],"mappings":";;AAIO,MAAM,uBAAuB,MAAoC,WAAW,wBAAwB;"}
1
+ {"version":3,"file":"useBindingOperations.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext.js'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":[],"mappings":";;AAIO,MAAM,uBAAuB,MAAoC,WAAW,wBAAwB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,UACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,UACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;"}
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,YACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,YACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,WACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,WACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useAccessorUpdateSubscription","useDesugaredRelativeSingleEntity","useConstantLengthInvariant","entity","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClHA,uCAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoBC,MAAAA,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAOC,8BAAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuBC,iCAAAA,iCAAiC,2BAA2B;AACzF,QAAM,YAAYF,MAAAA,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzBG,eAAAA;AAAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACC,SAAQ,EAAE,QAAQ,IAAIH,8BAAAA,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnDI,4BAAAA,sBAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOD;AAAAA,EACR;AACA,SAAO;AACR;;"}
1
+ {"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index.js'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents/index.js'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity.js'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useAccessorUpdateSubscription","useDesugaredRelativeSingleEntity","useConstantLengthInvariant","entity","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClHA,uCAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoBC,MAAAA,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAOC,8BAAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuBC,iCAAAA,iCAAiC,2BAA2B;AACzF,QAAM,YAAYF,MAAAA,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzBG,eAAAA;AAAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACC,SAAQ,EAAE,QAAQ,IAAIH,8BAAAA,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnDI,4BAAAA,sBAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOD;AAAAA,EACR;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["entity"],"mappings":";;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClH,4BAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAO,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuB,iCAAiC,2BAA2B;AACzF,QAAM,YAAY,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACA,SAAQ,EAAE,QAAQ,IAAI,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOA;AAAAA,EACR;AACA,SAAO;AACR;"}
1
+ {"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index.js'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents/index.js'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity.js'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["entity"],"mappings":";;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClH,4BAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAO,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuB,iCAAiC,2BAA2B;AACzF,QAAM,YAAY,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACA,SAAQ,EAAE,QAAQ,IAAI,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOA;AAAAA,EACR;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAYA,MAAAA,WAAWC,iCAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAIC,QAAAA;AAAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;;"}
1
+ {"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext.js'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAYA,MAAAA,WAAWC,iCAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAIC,QAAAA;AAAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAY,WAAW,gBAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;"}
1
+ {"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext.js'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAY,WAAW,gBAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":["useDesugaredRelativeEntityList","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqBA,+BAAAA,+BAA+B,yBAAyB;AACnFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,gBAAgBC,MAAAA,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvBC,eAAAA;AAAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjDC,4BAAAA,sBAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}
1
+ {"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index.js'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents/index.js'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList.js'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":["useDesugaredRelativeEntityList","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqBA,+BAAAA,+BAA+B,yBAAyB;AACnFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,gBAAgBC,MAAAA,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvBC,eAAAA;AAAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjDC,4BAAAA,sBAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":[],"mappings":";;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqB,+BAA+B,yBAAyB;AACnF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AACvB,QAAM,gBAAgB,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAI,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjD,4BAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;"}
1
+ {"version":3,"file":"useEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index.js'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents/index.js'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList.js'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":[],"mappings":";;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqB,+BAA+B,yBAAyB;AACnF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AACvB,QAAM,gBAAgB,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAI,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjD,4BAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntityListSubTree","useEntityListSubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAaA,wBAAAA,wBAAA;AACnB,QAAM,aAAaC,+BAAAA,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
1
+ {"version":3,"file":"useEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters.js'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree.js'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntityListSubTree","useEntityListSubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAaA,wBAAAA,wBAAA;AACnB,QAAM,aAAaC,+BAAAA,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa,wBAAA;AACnB,QAAM,aAAa,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
1
+ {"version":3,"file":"useEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters.js'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree.js'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa,wBAAA;AACnB,QAAM,aAAa,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntityListSubTree","useCallback"],"mappings":";;;;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,mBAAmBG,WAAAA,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,kBAAAA,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
1
+ {"version":3,"file":"useEntityListSubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree.js'\nimport { EntityListSubTree } from '../coreComponents/index.js'\nimport { useEnvironment } from './useEnvironment.js'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntityListSubTree","useCallback"],"mappings":";;;;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,mBAAmBG,WAAAA,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,kBAAAA,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,mBAAmB,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
1
+ {"version":3,"file":"useEntityListSubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree.js'\nimport { EntityListSubTree } from '../coreComponents/index.js'\nimport { useEnvironment } from './useEnvironment.js'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,mBAAmB,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntitySubTree","useEntitySubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAaA,oBAAAA,oBAAA;AACnB,QAAM,aAAaC,2BAAAA,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
1
+ {"version":3,"file":"useEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters.js'\nimport { useGetEntitySubTree } from './useGetEntitySubTree.js'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntitySubTree","useEntitySubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAaA,oBAAAA,oBAAA;AACnB,QAAM,aAAaC,2BAAAA,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAa,oBAAA;AACnB,QAAM,aAAa,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
1
+ {"version":3,"file":"useEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters.js'\nimport { useGetEntitySubTree } from './useGetEntitySubTree.js'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAa,oBAAA;AACnB,QAAM,aAAa,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntitySubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntitySubTree","useCallback"],"mappings":";;;;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,iBAAiBG,WAAAA,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,cAAAA,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
1
+ {"version":3,"file":"useEntitySubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree.js'\nimport { EntitySubTree } from '../coreComponents/index.js'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntitySubTree","useCallback"],"mappings":";;;;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,iBAAiBG,WAAAA,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,cAAAA,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntitySubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,iBAAiB,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
1
+ {"version":3,"file":"useEntitySubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree.js'\nimport { EntitySubTree } from '../coreComponents/index.js'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,iBAAiB,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEnvironment.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { Environment } from '@contember/binding'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport const useEnvironment = (): Environment => {\n\treturn useContext(EnvironmentContext)\n}\n"],"names":["useContext","EnvironmentContext"],"mappings":";;;;AAIO,MAAM,iBAAiB,MAAmB;AAChD,SAAOA,MAAAA,WAAWC,mBAAAA,kBAAkB;AACrC;;"}
1
+ {"version":3,"file":"useEnvironment.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { Environment } from '@contember/binding'\nimport { EnvironmentContext } from './EnvironmentContext.js'\n\nexport const useEnvironment = (): Environment => {\n\treturn useContext(EnvironmentContext)\n}\n"],"names":["useContext","EnvironmentContext"],"mappings":";;;;AAIO,MAAM,iBAAiB,MAAmB;AAChD,SAAOA,MAAAA,WAAWC,mBAAAA,kBAAkB;AACrC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEnvironment.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { Environment } from '@contember/binding'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport const useEnvironment = (): Environment => {\n\treturn useContext(EnvironmentContext)\n}\n"],"names":[],"mappings":";;AAIO,MAAM,iBAAiB,MAAmB;AAChD,SAAO,WAAW,kBAAkB;AACrC;"}
1
+ {"version":3,"file":"useEnvironment.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { Environment } from '@contember/binding'\nimport { EnvironmentContext } from './EnvironmentContext.js'\n\nexport const useEnvironment = (): Environment => {\n\treturn useContext(EnvironmentContext)\n}\n"],"names":[],"mappings":";;AAIO,MAAM,iBAAiB,MAAmB;AAChD,SAAO,WAAW,kBAAkB;AACrC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useExtendTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":["useAbortController","useBindingOperations","useIsMounted","useEnvironment","useCallback","DataBindingExtendAborted"],"mappings":";;;;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQA,WAAAA,mBAAA;AACd,QAAM,EAAE,WAAA,IAAeC,0CAAA;AACvB,QAAM,eAAeC,WAAAA,aAAA;AACrB,QAAM,cAAcC,eAAAA,eAAA;AACpB,SAAOC,MAAAA,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAMC,QAAAA,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;;"}
1
+ {"version":3,"file":"useExtendTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations.js'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":["useAbortController","useBindingOperations","useIsMounted","useEnvironment","useCallback","DataBindingExtendAborted"],"mappings":";;;;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQA,WAAAA,mBAAA;AACd,QAAM,EAAE,WAAA,IAAeC,0CAAA;AACvB,QAAM,eAAeC,WAAAA,aAAA;AACrB,QAAM,cAAcC,eAAAA,eAAA;AACpB,SAAOC,MAAAA,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAMC,QAAAA,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useExtendTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQ,mBAAA;AACd,QAAM,EAAE,WAAA,IAAe,qBAAA;AACvB,QAAM,eAAe,aAAA;AACrB,QAAM,cAAc,eAAA;AACpB,SAAO,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAM,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;"}
1
+ {"version":3,"file":"useExtendTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations.js'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment.js'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQ,mBAAA;AACd,QAAM,EAAE,WAAA,IAAe,qBAAA;AACvB,QAAM,eAAe,aAAA;AACrB,QAAM,cAAc,eAAA;AACpB,SAAO,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAM,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [field, { update }] = useAccessorUpdateSubscription(getField)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":["useDesugaredRelativeSingleField","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAeA,SAAS,SACR,4BACmC;AACnC,QAAM,sBAAsBA,gCAAAA,gCAAgC,0BAA0B;AACtFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,WAAWC,MAAAA,YAAY,MAAM;AAClC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,SAAgB,mBAAoB;AAAA,EACnD,GAAG,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AACxBC,eAAAA;AAAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAED,UAAM,CAAC,OAAO,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,QAAQ;AAElE,QAAI,oBAAoB,mBAAmB,QAAQ;AAClDC,4BAAAA,sBAAsB,oBAAoB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC9E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}
1
+ {"version":3,"file":"useField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index.js'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents/index.js'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription.js'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField.js'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [field, { update }] = useAccessorUpdateSubscription(getField)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":["useDesugaredRelativeSingleField","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAeA,SAAS,SACR,4BACmC;AACnC,QAAM,sBAAsBA,gCAAAA,gCAAgC,0BAA0B;AACtFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,WAAWC,MAAAA,YAAY,MAAM;AAClC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,SAAgB,mBAAoB;AAAA,EACnD,GAAG,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AACxBC,eAAAA;AAAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAED,UAAM,CAAC,OAAO,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,QAAQ;AAElE,QAAI,oBAAoB,mBAAmB,QAAQ;AAClDC,4BAAAA,sBAAsB,oBAAoB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC9E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}