@contember/react-binding 2.1.0-alpha.8 → 2.1.0-beta.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 (558) hide show
  1. package/CLAUDE.md +57 -0
  2. package/dist/development/index.cjs +99 -99
  3. package/dist/development/index.js +48 -48
  4. package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  5. package/dist/development/src/accessorPropagation/AccessorProvider.js.map +1 -1
  6. package/dist/development/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
  7. package/dist/development/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
  8. package/dist/development/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  9. package/dist/development/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  10. package/dist/development/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
  11. package/dist/development/src/accessorPropagation/EntityKeyContext.js.map +1 -1
  12. package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  13. package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  14. package/dist/development/src/accessorPropagation/EnvironmentContext.cjs +0 -1
  15. package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  16. package/dist/development/src/accessorPropagation/EnvironmentContext.js +1 -2
  17. package/dist/development/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  18. package/dist/development/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
  19. package/dist/development/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
  20. package/dist/development/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  21. package/dist/development/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  22. package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
  23. package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  24. package/dist/development/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  25. package/dist/development/src/accessorPropagation/useBindingOperations.js.map +1 -1
  26. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
  27. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  28. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
  29. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  30. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
  31. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  32. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
  33. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  34. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
  35. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  36. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
  37. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  38. package/dist/development/src/accessorPropagation/useEntity.cjs.map +1 -1
  39. package/dist/development/src/accessorPropagation/useEntity.js.map +1 -1
  40. package/dist/development/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  41. package/dist/development/src/accessorPropagation/useEntityKey.js.map +1 -1
  42. package/dist/development/src/accessorPropagation/useEntityList.cjs.map +1 -1
  43. package/dist/development/src/accessorPropagation/useEntityList.js.map +1 -1
  44. package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  45. package/dist/development/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  46. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
  47. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  48. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
  49. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  50. package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
  51. package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  52. package/dist/development/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  53. package/dist/development/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  54. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
  55. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  56. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
  57. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  58. package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
  59. package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  60. package/dist/development/src/accessorPropagation/useExtendTree.cjs +1 -4
  61. package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  62. package/dist/development/src/accessorPropagation/useExtendTree.js +1 -4
  63. package/dist/development/src/accessorPropagation/useExtendTree.js.map +1 -1
  64. package/dist/development/src/accessorPropagation/useField.cjs.map +1 -1
  65. package/dist/development/src/accessorPropagation/useField.js.map +1 -1
  66. package/dist/development/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  67. package/dist/development/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  68. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  69. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  70. package/dist/development/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  71. package/dist/development/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  72. package/dist/development/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  73. package/dist/development/src/accessorPropagation/useHasEntity.js.map +1 -1
  74. package/dist/development/src/accessorPropagation/usePersist.cjs.map +1 -1
  75. package/dist/development/src/accessorPropagation/usePersist.js.map +1 -1
  76. package/dist/development/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  77. package/dist/development/src/accessorPropagation/useTreeRootId.js.map +1 -1
  78. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs +10 -10
  79. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  80. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js +10 -10
  81. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  82. package/dist/development/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  83. package/dist/development/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  84. package/dist/development/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
  85. package/dist/development/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
  86. package/dist/development/src/accessorSorting/sortEntities.cjs.map +1 -1
  87. package/dist/development/src/accessorSorting/sortEntities.js.map +1 -1
  88. package/dist/development/src/accessorTree/AccessorTree.cjs.map +1 -1
  89. package/dist/development/src/accessorTree/AccessorTree.js.map +1 -1
  90. package/dist/development/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  91. package/dist/development/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  92. package/dist/development/src/accessorTree/DirtinessContext.cjs.map +1 -1
  93. package/dist/development/src/accessorTree/DirtinessContext.js.map +1 -1
  94. package/dist/development/src/accessorTree/MutationStateContext.cjs.map +1 -1
  95. package/dist/development/src/accessorTree/MutationStateContext.js.map +1 -1
  96. package/dist/development/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  97. package/dist/development/src/accessorTree/useAccessorTreeState.js.map +1 -1
  98. package/dist/development/src/accessorTree/useDataBinding.cjs +17 -13
  99. package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
  100. package/dist/development/src/accessorTree/useDataBinding.js +19 -15
  101. package/dist/development/src/accessorTree/useDataBinding.js.map +1 -1
  102. package/dist/development/src/accessorTree/useDirtinessState.cjs.map +1 -1
  103. package/dist/development/src/accessorTree/useDirtinessState.js.map +1 -1
  104. package/dist/development/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
  105. package/dist/development/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
  106. package/dist/development/src/accessorTree/useMutationState.cjs.map +1 -1
  107. package/dist/development/src/accessorTree/useMutationState.js.map +1 -1
  108. package/dist/development/src/coreComponents/Component.cjs.map +1 -1
  109. package/dist/development/src/coreComponents/Component.js.map +1 -1
  110. package/dist/development/src/coreComponents/DataBindingProvider.cjs +1 -1
  111. package/dist/development/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  112. package/dist/development/src/coreComponents/DataBindingProvider.js +1 -1
  113. package/dist/development/src/coreComponents/DataBindingProvider.js.map +1 -1
  114. package/dist/development/src/coreComponents/Entity.cjs.map +1 -1
  115. package/dist/development/src/coreComponents/Entity.js.map +1 -1
  116. package/dist/development/src/coreComponents/EntityList.cjs +3 -3
  117. package/dist/development/src/coreComponents/EntityList.cjs.map +1 -1
  118. package/dist/development/src/coreComponents/EntityList.js +3 -3
  119. package/dist/development/src/coreComponents/EntityList.js.map +1 -1
  120. package/dist/development/src/coreComponents/EntityListSubTree.cjs +3 -3
  121. package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  122. package/dist/development/src/coreComponents/EntityListSubTree.js +4 -4
  123. package/dist/development/src/coreComponents/EntityListSubTree.js.map +1 -1
  124. package/dist/development/src/coreComponents/EntitySubTree.cjs.map +1 -1
  125. package/dist/development/src/coreComponents/EntitySubTree.js +1 -1
  126. package/dist/development/src/coreComponents/EntitySubTree.js.map +1 -1
  127. package/dist/development/src/coreComponents/Field.cjs +2 -2
  128. package/dist/development/src/coreComponents/Field.cjs.map +1 -1
  129. package/dist/development/src/coreComponents/Field.js +3 -3
  130. package/dist/development/src/coreComponents/Field.js.map +1 -1
  131. package/dist/development/src/coreComponents/HasMany.cjs +3 -3
  132. package/dist/development/src/coreComponents/HasMany.cjs.map +1 -1
  133. package/dist/development/src/coreComponents/HasMany.js +4 -4
  134. package/dist/development/src/coreComponents/HasMany.js.map +1 -1
  135. package/dist/development/src/coreComponents/HasOne.cjs.map +1 -1
  136. package/dist/development/src/coreComponents/HasOne.js +1 -1
  137. package/dist/development/src/coreComponents/HasOne.js.map +1 -1
  138. package/dist/development/src/coreComponents/ParentEntity.cjs.map +1 -1
  139. package/dist/development/src/coreComponents/ParentEntity.js.map +1 -1
  140. package/dist/development/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  141. package/dist/development/src/entityEvents/useDataBindingEvent.js.map +1 -1
  142. package/dist/development/src/entityEvents/useDerivedField.cjs.map +1 -1
  143. package/dist/development/src/entityEvents/useDerivedField.js.map +1 -1
  144. package/dist/development/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  145. package/dist/development/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  146. package/dist/development/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  147. package/dist/development/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  148. package/dist/development/src/entityEvents/useEntityEvent.cjs.map +1 -1
  149. package/dist/development/src/entityEvents/useEntityEvent.js.map +1 -1
  150. package/dist/development/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  151. package/dist/development/src/entityEvents/useEntityPersistError.js.map +1 -1
  152. package/dist/development/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  153. package/dist/development/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  154. package/dist/development/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  155. package/dist/development/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  156. package/dist/development/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  157. package/dist/development/src/helperComponents/DeferredSubTrees.js.map +1 -1
  158. package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs +1 -1
  159. package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  160. package/dist/development/src/helperComponents/DeleteEntityTrigger.js +1 -1
  161. package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  162. package/dist/development/src/helperComponents/DimensionRenderer.cjs +4 -4
  163. package/dist/development/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  164. package/dist/development/src/helperComponents/DimensionRenderer.js +4 -4
  165. package/dist/development/src/helperComponents/DimensionRenderer.js.map +1 -1
  166. package/dist/development/src/helperComponents/EntityView.cjs +1 -1
  167. package/dist/development/src/helperComponents/EntityView.cjs.map +1 -1
  168. package/dist/development/src/helperComponents/EntityView.js +1 -1
  169. package/dist/development/src/helperComponents/EntityView.js.map +1 -1
  170. package/dist/development/src/helperComponents/FieldView.cjs +4 -4
  171. package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
  172. package/dist/development/src/helperComponents/FieldView.js +4 -4
  173. package/dist/development/src/helperComponents/FieldView.js.map +1 -1
  174. package/dist/development/src/helperComponents/If.cjs +20 -23
  175. package/dist/development/src/helperComponents/If.cjs.map +1 -1
  176. package/dist/development/src/helperComponents/If.js +20 -23
  177. package/dist/development/src/helperComponents/If.js.map +1 -1
  178. package/dist/development/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  179. package/dist/development/src/helperComponents/LabelMiddleware.js.map +1 -1
  180. package/dist/development/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  181. package/dist/development/src/helperComponents/RecursionTerminator.js.map +1 -1
  182. package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  183. package/dist/development/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  184. package/dist/development/src/helperComponents/StaticRender.cjs.map +1 -1
  185. package/dist/development/src/helperComponents/StaticRender.js.map +1 -1
  186. package/dist/development/src/helperComponents/SugaredField.cjs.map +1 -1
  187. package/dist/development/src/helperComponents/SugaredField.js.map +1 -1
  188. package/dist/development/src/helperComponents/Variable.cjs.map +1 -1
  189. package/dist/development/src/helperComponents/Variable.js.map +1 -1
  190. package/dist/development/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  191. package/dist/development/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  192. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
  193. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
  194. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
  195. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  196. package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  197. package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  198. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs +1 -1
  199. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  200. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js +1 -1
  201. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  202. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs +1 -1
  203. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  204. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js +1 -1
  205. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  206. package/dist/development/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  207. package/dist/development/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  208. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs +1 -1
  209. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  210. package/dist/development/src/helperComponents/persist/PersistTrigger.js +1 -1
  211. package/dist/development/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  212. package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  213. package/dist/development/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  214. package/dist/development/src/markers/IncrementalMarkerBuilder.cjs +47 -44
  215. package/dist/development/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
  216. package/dist/development/src/markers/IncrementalMarkerBuilder.js +47 -44
  217. package/dist/development/src/markers/IncrementalMarkerBuilder.js.map +1 -1
  218. package/dist/development/src/markers/MarkerStaticAnalyzer.cjs +19 -19
  219. package/dist/development/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  220. package/dist/development/src/markers/MarkerStaticAnalyzer.js +19 -19
  221. package/dist/development/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  222. package/dist/development/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  223. package/dist/development/src/markers/MarkerTreeGenerator.js.map +1 -1
  224. package/dist/production/index.cjs +99 -99
  225. package/dist/production/index.js +48 -48
  226. package/dist/production/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  227. package/dist/production/src/accessorPropagation/AccessorProvider.js.map +1 -1
  228. package/dist/production/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
  229. package/dist/production/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
  230. package/dist/production/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  231. package/dist/production/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  232. package/dist/production/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
  233. package/dist/production/src/accessorPropagation/EntityKeyContext.js.map +1 -1
  234. package/dist/production/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  235. package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  236. package/dist/production/src/accessorPropagation/EnvironmentContext.cjs +0 -1
  237. package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  238. package/dist/production/src/accessorPropagation/EnvironmentContext.js +1 -2
  239. package/dist/production/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  240. package/dist/production/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
  241. package/dist/production/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
  242. package/dist/production/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  243. package/dist/production/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  244. package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
  245. package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  246. package/dist/production/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  247. package/dist/production/src/accessorPropagation/useBindingOperations.js.map +1 -1
  248. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
  249. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  250. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
  251. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  252. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
  253. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  254. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
  255. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  256. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
  257. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  258. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
  259. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  260. package/dist/production/src/accessorPropagation/useEntity.cjs.map +1 -1
  261. package/dist/production/src/accessorPropagation/useEntity.js.map +1 -1
  262. package/dist/production/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  263. package/dist/production/src/accessorPropagation/useEntityKey.js.map +1 -1
  264. package/dist/production/src/accessorPropagation/useEntityList.cjs.map +1 -1
  265. package/dist/production/src/accessorPropagation/useEntityList.js.map +1 -1
  266. package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  267. package/dist/production/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  268. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
  269. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  270. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
  271. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  272. package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
  273. package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  274. package/dist/production/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  275. package/dist/production/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  276. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
  277. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  278. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
  279. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  280. package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
  281. package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  282. package/dist/production/src/accessorPropagation/useExtendTree.cjs +1 -4
  283. package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  284. package/dist/production/src/accessorPropagation/useExtendTree.js +1 -4
  285. package/dist/production/src/accessorPropagation/useExtendTree.js.map +1 -1
  286. package/dist/production/src/accessorPropagation/useField.cjs.map +1 -1
  287. package/dist/production/src/accessorPropagation/useField.js.map +1 -1
  288. package/dist/production/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  289. package/dist/production/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  290. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  291. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  292. package/dist/production/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  293. package/dist/production/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  294. package/dist/production/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  295. package/dist/production/src/accessorPropagation/useHasEntity.js.map +1 -1
  296. package/dist/production/src/accessorPropagation/usePersist.cjs.map +1 -1
  297. package/dist/production/src/accessorPropagation/usePersist.js.map +1 -1
  298. package/dist/production/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  299. package/dist/production/src/accessorPropagation/useTreeRootId.js.map +1 -1
  300. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs +1 -1
  301. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  302. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js +1 -1
  303. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  304. package/dist/production/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  305. package/dist/production/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  306. package/dist/production/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
  307. package/dist/production/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
  308. package/dist/production/src/accessorSorting/sortEntities.cjs.map +1 -1
  309. package/dist/production/src/accessorSorting/sortEntities.js.map +1 -1
  310. package/dist/production/src/accessorTree/AccessorTree.cjs.map +1 -1
  311. package/dist/production/src/accessorTree/AccessorTree.js.map +1 -1
  312. package/dist/production/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  313. package/dist/production/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  314. package/dist/production/src/accessorTree/DirtinessContext.cjs.map +1 -1
  315. package/dist/production/src/accessorTree/DirtinessContext.js.map +1 -1
  316. package/dist/production/src/accessorTree/MutationStateContext.cjs.map +1 -1
  317. package/dist/production/src/accessorTree/MutationStateContext.js.map +1 -1
  318. package/dist/production/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  319. package/dist/production/src/accessorTree/useAccessorTreeState.js.map +1 -1
  320. package/dist/production/src/accessorTree/useDataBinding.cjs +17 -13
  321. package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
  322. package/dist/production/src/accessorTree/useDataBinding.js +19 -15
  323. package/dist/production/src/accessorTree/useDataBinding.js.map +1 -1
  324. package/dist/production/src/accessorTree/useDirtinessState.cjs.map +1 -1
  325. package/dist/production/src/accessorTree/useDirtinessState.js.map +1 -1
  326. package/dist/production/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
  327. package/dist/production/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
  328. package/dist/production/src/accessorTree/useMutationState.cjs.map +1 -1
  329. package/dist/production/src/accessorTree/useMutationState.js.map +1 -1
  330. package/dist/production/src/coreComponents/Component.cjs.map +1 -1
  331. package/dist/production/src/coreComponents/Component.js.map +1 -1
  332. package/dist/production/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  333. package/dist/production/src/coreComponents/DataBindingProvider.js.map +1 -1
  334. package/dist/production/src/coreComponents/Entity.cjs.map +1 -1
  335. package/dist/production/src/coreComponents/Entity.js.map +1 -1
  336. package/dist/production/src/coreComponents/EntityList.cjs.map +1 -1
  337. package/dist/production/src/coreComponents/EntityList.js.map +1 -1
  338. package/dist/production/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  339. package/dist/production/src/coreComponents/EntityListSubTree.js +1 -1
  340. package/dist/production/src/coreComponents/EntityListSubTree.js.map +1 -1
  341. package/dist/production/src/coreComponents/EntitySubTree.cjs.map +1 -1
  342. package/dist/production/src/coreComponents/EntitySubTree.js +1 -1
  343. package/dist/production/src/coreComponents/EntitySubTree.js.map +1 -1
  344. package/dist/production/src/coreComponents/Field.cjs.map +1 -1
  345. package/dist/production/src/coreComponents/Field.js +1 -1
  346. package/dist/production/src/coreComponents/Field.js.map +1 -1
  347. package/dist/production/src/coreComponents/HasMany.cjs.map +1 -1
  348. package/dist/production/src/coreComponents/HasMany.js +1 -1
  349. package/dist/production/src/coreComponents/HasMany.js.map +1 -1
  350. package/dist/production/src/coreComponents/HasOne.cjs.map +1 -1
  351. package/dist/production/src/coreComponents/HasOne.js +1 -1
  352. package/dist/production/src/coreComponents/HasOne.js.map +1 -1
  353. package/dist/production/src/coreComponents/ParentEntity.cjs.map +1 -1
  354. package/dist/production/src/coreComponents/ParentEntity.js.map +1 -1
  355. package/dist/production/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  356. package/dist/production/src/entityEvents/useDataBindingEvent.js.map +1 -1
  357. package/dist/production/src/entityEvents/useDerivedField.cjs.map +1 -1
  358. package/dist/production/src/entityEvents/useDerivedField.js.map +1 -1
  359. package/dist/production/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  360. package/dist/production/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  361. package/dist/production/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  362. package/dist/production/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  363. package/dist/production/src/entityEvents/useEntityEvent.cjs.map +1 -1
  364. package/dist/production/src/entityEvents/useEntityEvent.js.map +1 -1
  365. package/dist/production/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  366. package/dist/production/src/entityEvents/useEntityPersistError.js.map +1 -1
  367. package/dist/production/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  368. package/dist/production/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  369. package/dist/production/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  370. package/dist/production/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  371. package/dist/production/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  372. package/dist/production/src/helperComponents/DeferredSubTrees.js.map +1 -1
  373. package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  374. package/dist/production/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  375. package/dist/production/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  376. package/dist/production/src/helperComponents/DimensionRenderer.js.map +1 -1
  377. package/dist/production/src/helperComponents/EntityView.cjs.map +1 -1
  378. package/dist/production/src/helperComponents/EntityView.js.map +1 -1
  379. package/dist/production/src/helperComponents/FieldView.cjs.map +1 -1
  380. package/dist/production/src/helperComponents/FieldView.js.map +1 -1
  381. package/dist/production/src/helperComponents/If.cjs +7 -10
  382. package/dist/production/src/helperComponents/If.cjs.map +1 -1
  383. package/dist/production/src/helperComponents/If.js +8 -11
  384. package/dist/production/src/helperComponents/If.js.map +1 -1
  385. package/dist/production/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  386. package/dist/production/src/helperComponents/LabelMiddleware.js.map +1 -1
  387. package/dist/production/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  388. package/dist/production/src/helperComponents/RecursionTerminator.js.map +1 -1
  389. package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  390. package/dist/production/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  391. package/dist/production/src/helperComponents/StaticRender.cjs.map +1 -1
  392. package/dist/production/src/helperComponents/StaticRender.js.map +1 -1
  393. package/dist/production/src/helperComponents/SugaredField.cjs.map +1 -1
  394. package/dist/production/src/helperComponents/SugaredField.js.map +1 -1
  395. package/dist/production/src/helperComponents/Variable.cjs.map +1 -1
  396. package/dist/production/src/helperComponents/Variable.js.map +1 -1
  397. package/dist/production/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  398. package/dist/production/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  399. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
  400. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
  401. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
  402. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  403. package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  404. package/dist/production/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  405. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  406. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  407. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  408. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  409. package/dist/production/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  410. package/dist/production/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  411. package/dist/production/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  412. package/dist/production/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  413. package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  414. package/dist/production/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  415. package/dist/production/src/markers/IncrementalMarkerBuilder.cjs +47 -44
  416. package/dist/production/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
  417. package/dist/production/src/markers/IncrementalMarkerBuilder.js +47 -44
  418. package/dist/production/src/markers/IncrementalMarkerBuilder.js.map +1 -1
  419. package/dist/production/src/markers/MarkerStaticAnalyzer.cjs +19 -19
  420. package/dist/production/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  421. package/dist/production/src/markers/MarkerStaticAnalyzer.js +19 -19
  422. package/dist/production/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  423. package/dist/production/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  424. package/dist/production/src/markers/MarkerTreeGenerator.js.map +1 -1
  425. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +1 -1
  426. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
  427. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +1 -1
  428. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
  429. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +1 -1
  430. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -1
  431. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +1 -1
  432. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
  433. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +1 -1
  434. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +1 -1
  435. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +1 -1
  436. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +1 -1
  437. package/dist/types/accessorPropagation/useEntity.d.ts.map +1 -1
  438. package/dist/types/accessorPropagation/useEntityList.d.ts.map +1 -1
  439. package/dist/types/accessorPropagation/useEntityListSubTreeLoader.d.ts.map +1 -1
  440. package/dist/types/accessorPropagation/useEntitySubTreeLoader.d.ts.map +1 -1
  441. package/dist/types/accessorPropagation/useExtendTree.d.ts.map +1 -1
  442. package/dist/types/accessorPropagation/useField.d.ts.map +1 -1
  443. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +1 -1
  444. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +1 -1
  445. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +1 -1
  446. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +1 -1
  447. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
  448. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
  449. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -1
  450. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +1 -1
  451. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -1
  452. package/dist/types/accessorTree/DirtinessContext.d.ts +1 -1
  453. package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
  454. package/dist/types/accessorTree/MutationStateContext.d.ts +1 -1
  455. package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
  456. package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
  457. package/dist/types/accessorTree/useEnvironmentWithSchema.d.ts.map +1 -1
  458. package/dist/types/coreComponents/Component.d.ts.map +1 -1
  459. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
  460. package/dist/types/coreComponents/Entity.d.ts +1 -1
  461. package/dist/types/coreComponents/Entity.d.ts.map +1 -1
  462. package/dist/types/coreComponents/EntityList.d.ts.map +1 -1
  463. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
  464. package/dist/types/coreComponents/Field.d.ts.map +1 -1
  465. package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
  466. package/dist/types/coreComponents/HasOne.d.ts.map +1 -1
  467. package/dist/types/coreComponents/ParentEntity.d.ts +1 -1
  468. package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
  469. package/dist/types/helperComponents/DeferredSubTrees.d.ts +1 -1
  470. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
  471. package/dist/types/helperComponents/DeleteEntityTrigger.d.ts.map +1 -1
  472. package/dist/types/helperComponents/DimensionRenderer.d.ts.map +1 -1
  473. package/dist/types/helperComponents/EntityView.d.ts.map +1 -1
  474. package/dist/types/helperComponents/FieldView.d.ts +13 -2
  475. package/dist/types/helperComponents/FieldView.d.ts.map +1 -1
  476. package/dist/types/helperComponents/If.d.ts +1 -1
  477. package/dist/types/helperComponents/If.d.ts.map +1 -1
  478. package/dist/types/helperComponents/LabelMiddleware.d.ts +1 -1
  479. package/dist/types/helperComponents/LabelMiddleware.d.ts.map +1 -1
  480. package/dist/types/helperComponents/RecursionTerminator.d.ts +1 -1
  481. package/dist/types/helperComponents/RecursionTerminator.d.ts.map +1 -1
  482. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts +1 -1
  483. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts.map +1 -1
  484. package/dist/types/helperComponents/StaticRender.d.ts +1 -1
  485. package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
  486. package/dist/types/helperComponents/Variable.d.ts +1 -1
  487. package/dist/types/helperComponents/Variable.d.ts.map +1 -1
  488. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +1 -1
  489. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +1 -1
  490. package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts +1 -1
  491. package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts.map +1 -1
  492. package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts +1 -1
  493. package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts.map +1 -1
  494. package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -1
  495. package/dist/types/markers/IncrementalMarkerBuilder.d.ts.map +1 -1
  496. package/dist/types/markers/MarkerProvider.d.ts.map +1 -1
  497. package/dist/types/markers/MarkerStaticAnalyzer.d.ts.map +1 -1
  498. package/dist/types/markers/MarkerTreeGenerator.d.ts.map +1 -1
  499. package/dist/types/tsconfig.tsbuildinfo +1 -1
  500. package/package.json +18 -13
  501. package/src/accessorPropagation/BindingOperationsContext.ts +3 -3
  502. package/src/accessorPropagation/EnvironmentContext.tsx +1 -1
  503. package/src/accessorPropagation/useAccessorUpdateSubscription.ts +5 -3
  504. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +2 -3
  505. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +2 -3
  506. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +2 -3
  507. package/src/accessorPropagation/useEntity.ts +0 -7
  508. package/src/accessorPropagation/useEntityKey.ts +2 -2
  509. package/src/accessorPropagation/useEntityList.ts +0 -3
  510. package/src/accessorPropagation/useEntityListSubTreeLoader.ts +12 -8
  511. package/src/accessorPropagation/useEntityListSubTreeParameters.ts +0 -6
  512. package/src/accessorPropagation/useEntitySubTreeLoader.ts +12 -9
  513. package/src/accessorPropagation/useEntitySubTreeParameters.ts +0 -6
  514. package/src/accessorPropagation/useExtendTree.ts +1 -3
  515. package/src/accessorPropagation/useField.ts +0 -3
  516. package/src/accessorPropagation/useGetEntityListSubTree.ts +3 -8
  517. package/src/accessorPropagation/useGetEntitySubTree.ts +3 -8
  518. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +2 -4
  519. package/src/accessorTree/AccessorTreeStateAction.ts +2 -2
  520. package/src/accessorTree/useDataBinding.ts +18 -21
  521. package/src/accessorTree/useEnvironmentWithSchema.ts +1 -2
  522. package/src/coreComponents/Component.tsx +4 -3
  523. package/src/coreComponents/DataBindingProvider.tsx +0 -1
  524. package/src/coreComponents/Entity.tsx +1 -1
  525. package/src/coreComponents/EntityList.tsx +9 -8
  526. package/src/coreComponents/EntityListSubTree.tsx +14 -12
  527. package/src/coreComponents/Field.tsx +3 -5
  528. package/src/coreComponents/HasMany.tsx +14 -12
  529. package/src/coreComponents/HasOne.tsx +1 -2
  530. package/src/coreComponents/ParentEntity.tsx +1 -2
  531. package/src/entityEvents/useDataBindingEvent.ts +1 -1
  532. package/src/entityEvents/useEntityEvent.ts +1 -1
  533. package/src/helperComponents/DeferredSubTrees.tsx +2 -2
  534. package/src/helperComponents/DeleteEntityTrigger.tsx +1 -3
  535. package/src/helperComponents/DimensionRenderer.tsx +12 -10
  536. package/src/helperComponents/EntityView.tsx +0 -1
  537. package/src/helperComponents/FieldView.tsx +33 -20
  538. package/src/helperComponents/If.tsx +16 -14
  539. package/src/helperComponents/RecursionTerminator.tsx +1 -7
  540. package/src/helperComponents/helpers/FilterEvaluator.ts +0 -3
  541. package/src/helperComponents/helpers/FilterFieldsCollector.ts +5 -6
  542. package/src/helperComponents/helpers/evaluateCondition.ts +1 -1
  543. package/src/helperComponents/persist/PersistOnFieldChange.tsx +0 -1
  544. package/src/helperComponents/persist/PersistOnHasOneChange.tsx +1 -2
  545. package/src/helperComponents/persist/PersistOnKey.tsx +2 -2
  546. package/src/helperComponents/persist/PersistTrigger.tsx +3 -1
  547. package/src/markers/IncrementalMarkerBuilder.ts +50 -45
  548. package/src/markers/MarkerProvider.ts +6 -6
  549. package/src/markers/MarkerStaticAnalyzer.ts +16 -14
  550. package/src/markers/MarkerTreeGenerator.ts +0 -2
  551. package/src/typings/react-fix.d.ts +2 -4
  552. package/tests/cases/unit/core/entityOperations.test.tsx +18 -17
  553. package/tests/cases/unit/core/eventManager.test.tsx +15 -7
  554. package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +0 -2
  555. package/tests/cases/unit/helperComponents/schema.ts +1 -2
  556. package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +103 -81
  557. package/tests/lib/bindingFactory.ts +11 -1
  558. package/tests/lib/convertModelToAdminSchema.ts +109 -107
@@ -1 +1 @@
1
- {"version":3,"file":"useAccessorTreeState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useAccessorTreeState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { BindingError } from '@contember/binding'\n\nexport const useAccessorTreeState = () => {\n\tconst state = useContext(AccessorTreeStateContext)\n\tif (!state) {\n\t\tthrow new BindingError()\n\t}\n\treturn state\n}\n"],"names":["useContext","AccessorTreeStateContext","BindingError"],"mappings":";;;;;AAIO,MAAM,uBAAuB,MAAM;AACnC,QAAA,QAAQA,iBAAWC,iDAAwB;AACjD,MAAI,CAAC,OAAO;AACX,UAAM,IAAIC,QAAAA,aAAa;AAAA,EAAA;AAEjB,SAAA;AACR;;"}
1
+ {"version":3,"file":"useAccessorTreeState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useAccessorTreeState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { BindingError } from '@contember/binding'\n\nexport const useAccessorTreeState = () => {\n\tconst state = useContext(AccessorTreeStateContext)\n\tif (!state) {\n\t\tthrow new BindingError()\n\t}\n\treturn state\n}\n"],"names":["useContext","AccessorTreeStateContext","BindingError"],"mappings":";;;;;AAIO,MAAM,uBAAuB,MAAM;AACzC,QAAM,QAAQA,MAAAA,WAAWC,iDAAwB;AACjD,MAAI,CAAC,OAAO;AACX,UAAM,IAAIC,QAAAA,aAAA;AAAA,EACX;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccessorTreeState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useAccessorTreeState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { BindingError } from '@contember/binding'\n\nexport const useAccessorTreeState = () => {\n\tconst state = useContext(AccessorTreeStateContext)\n\tif (!state) {\n\t\tthrow new BindingError()\n\t}\n\treturn state\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,uBAAuB,MAAM;AACnC,QAAA,QAAQ,WAAW,wBAAwB;AACjD,MAAI,CAAC,OAAO;AACX,UAAM,IAAI,aAAa;AAAA,EAAA;AAEjB,SAAA;AACR;"}
1
+ {"version":3,"file":"useAccessorTreeState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useAccessorTreeState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { BindingError } from '@contember/binding'\n\nexport const useAccessorTreeState = () => {\n\tconst state = useContext(AccessorTreeStateContext)\n\tif (!state) {\n\t\tthrow new BindingError()\n\t}\n\treturn state\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,uBAAuB,MAAM;AACzC,QAAM,QAAQ,WAAW,wBAAwB;AACjD,MAAI,CAAC,OAAO;AACX,UAAM,IAAI,aAAA;AAAA,EACX;AACA,SAAO;AACR;"}
@@ -18,7 +18,7 @@ const useDataBinding = ({
18
18
  const tenantClient = reactClient.useTenantGraphQlClient();
19
19
  const environment = useEnvironment.useEnvironment();
20
20
  const environmentWithSchema = useEnvironmentWithSchema.useEnvironmentWithSchema(environment);
21
- const currentTreeStore = React.useRef();
21
+ const currentTreeStore = React.useRef(void 0);
22
22
  const isMountedRef = reactUtils.useIsMounted();
23
23
  const [state, setState] = React.useState({
24
24
  name: "initializing",
@@ -27,22 +27,26 @@ const useDataBinding = ({
27
27
  const resetDataBinding = React.useCallback((environment2, newStore) => {
28
28
  const onUpdate = (data, binding2) => {
29
29
  if (isMountedRef.current) {
30
- setState((it) => it.name === "error" || it.binding !== binding2 ? it : {
31
- name: "initialized",
32
- environment: environment2,
33
- binding: binding2,
34
- data
35
- });
30
+ setState(
31
+ (it) => it.name === "error" || it.binding !== binding2 ? it : {
32
+ name: "initialized",
33
+ environment: environment2,
34
+ binding: binding2,
35
+ data
36
+ }
37
+ );
36
38
  }
37
39
  };
38
40
  const onError = (error, binding2) => {
39
41
  if (isMountedRef.current) {
40
- setState((it) => it.binding !== binding2 ? it : {
41
- name: "error",
42
- environment: environment2,
43
- binding: binding2,
44
- error
45
- });
42
+ setState(
43
+ (it) => it.binding !== binding2 ? it : {
44
+ name: "error",
45
+ environment: environment2,
46
+ binding: binding2,
47
+ error
48
+ }
49
+ );
46
50
  }
47
51
  };
48
52
  const onPersistSuccess = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"useDataBinding.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useDataBinding.ts"],"sourcesContent":["import {\n\tGraphQlClientError,\n\tuseCurrentContentGraphQlClient,\n\tuseCurrentSystemGraphQlClient,\n\tuseTenantGraphQlClient,\n} from '@contember/react-client'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport type { TreeRootAccessor } from '@contember/binding'\nimport { DataBinding, Environment, TreeStore } from '@contember/binding'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { useIsMounted } from '@contember/react-utils'\nimport { MarkerTreeGenerator } from '../markers'\nimport ReactDOM from 'react-dom'\nimport { useEnvironmentWithSchema } from './useEnvironmentWithSchema'\nimport { useEnvironment } from '../accessorPropagation'\n\nexport const useDataBinding = ({\n\tchildren,\n\trefreshOnPersist,\n\tskipStateUpdateAfterPersist,\n}: {\n\tchildren?: ReactNode\n\trefreshOnPersist?: boolean\n\tskipStateUpdateAfterPersist?: boolean\n}): AccessorTreeState => {\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tconst systemClient = useCurrentSystemGraphQlClient()\n\tconst tenantClient = useTenantGraphQlClient()\n\n\tconst environment = useEnvironment()\n\tconst environmentWithSchema = useEnvironmentWithSchema(environment)\n\n\tconst currentTreeStore = useRef<TreeStore>()\n\tconst isMountedRef = useIsMounted()\n\n\tconst [state, setState] = useState<AccessorTreeState & { binding?: DataBinding<ReactNode> }>({\n\t\tname: 'initializing',\n\t\tenvironment,\n\t})\n\n\tconst resetDataBinding = useCallback((environment: Environment, newStore: boolean) => {\n\t\tconst onUpdate = (data: TreeRootAccessor<ReactNode>, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it => it.name === 'error' || it.binding !== binding ? it : {\n\t\t\t\t\tname: 'initialized',\n\t\t\t\t\tenvironment,\n\t\t\t\t\tbinding,\n\t\t\t\t\tdata,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst onError = (error: GraphQlClientError, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it => it.binding !== binding ? it : {\n\t\t\t\t\tname: 'error',\n\t\t\t\t\tenvironment,\n\t\t\t\t\tbinding,\n\t\t\t\t\terror,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst onPersistSuccess = () => {\n\t\t\tif (isMountedRef.current && refreshOnPersist) {\n\t\t\t\tresetDataBinding(environment, true)\n\t\t\t}\n\t\t}\n\n\t\tif (currentTreeStore.current === undefined || newStore) {\n\t\t\tcurrentTreeStore.current = new TreeStore(environment.getSchema())\n\t\t}\n\n\t\tconst binding = new DataBinding(\n\t\t\tcontentClient,\n\t\t\tsystemClient,\n\t\t\ttenantClient,\n\t\t\tcurrentTreeStore.current,\n\t\t\tenvironment,\n\t\t\t(node, env) => {\n\t\t\t\tconst gen = new MarkerTreeGenerator(node, env)\n\t\t\t\treturn gen.generate()\n\t\t\t},\n\t\t\tReactDOM.unstable_batchedUpdates,\n\t\t\tonUpdate,\n\t\t\tonError,\n\t\t\tonPersistSuccess,\n\t\t\t{\n\t\t\t\tskipStateUpdateAfterPersist: skipStateUpdateAfterPersist ?? false,\n\t\t\t},\n\t\t)\n\t\tsetState({ binding, environment, name: 'initializing' })\n\n\t}, [contentClient, systemClient, tenantClient, isMountedRef, refreshOnPersist, skipStateUpdateAfterPersist])\n\n\n\tuseEffect(() => {\n\t\tif (environmentWithSchema) {\n\t\t\tresetDataBinding(environmentWithSchema, false)\n\t\t}\n\t}, [resetDataBinding, environmentWithSchema])\n\n\tuseEffect(() => {\n\t\tstate.binding?.extendTree(children)\n\t}, [children, state.binding])\n\n\treturn state\n}\n"],"names":["useCurrentContentGraphQlClient","useCurrentSystemGraphQlClient","useTenantGraphQlClient","useEnvironment","useEnvironmentWithSchema","useRef","useIsMounted","useState","useCallback","environment","binding","TreeStore","DataBinding","MarkerTreeGenerator","useEffect"],"mappings":";;;;;;;;;;AAgBO,MAAM,iBAAiB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,MAIyB;AACxB,QAAM,gBAAgBA,YAAAA,+BAA+B;AACrD,QAAM,eAAeC,YAAAA,8BAA8B;AACnD,QAAM,eAAeC,YAAAA,uBAAuB;AAE5C,QAAM,cAAcC,eAAAA,eAAe;AAC7B,QAAA,wBAAwBC,kDAAyB,WAAW;AAElE,QAAM,mBAAmBC,MAAAA,OAAkB;AAC3C,QAAM,eAAeC,WAAAA,aAAa;AAElC,QAAM,CAAC,OAAO,QAAQ,IAAIC,eAAmE;AAAA,IAC5F,MAAM;AAAA,IACN;AAAA,EAAA,CACA;AAED,QAAM,mBAAmBC,MAAAA,YAAY,CAACC,cAA0B,aAAsB;AAC/E,UAAA,WAAW,CAAC,MAAmCC,aAAoC;AACxF,UAAI,aAAa,SAAS;AACzB,iBAAS,QAAM,GAAG,SAAS,WAAW,GAAG,YAAYA,WAAU,KAAK;AAAA,UACnE,MAAM;AAAA,UACN,aAAAD;AAAAA,UACA,SAAAC;AAAAA,UACA;AAAA,QAAA,CACA;AAAA,MAAA;AAAA,IAEH;AAEM,UAAA,UAAU,CAAC,OAA2BA,aAAoC;AAC/E,UAAI,aAAa,SAAS;AACzB,iBAAS,CAAM,OAAA,GAAG,YAAYA,WAAU,KAAM;AAAA,UAC7C,MAAM;AAAA,UACN,aAAAD;AAAAA,UACA,SAAAC;AAAAA,UACA;AAAA,QAAA,CACA;AAAA,MAAA;AAAA,IAEH;AAEA,UAAM,mBAAmB,MAAM;AAC1B,UAAA,aAAa,WAAW,kBAAkB;AAC7C,yBAAiBD,cAAa,IAAI;AAAA,MAAA;AAAA,IAEpC;AAEI,QAAA,iBAAiB,YAAY,UAAa,UAAU;AACvD,uBAAiB,UAAU,IAAIE,QAAUF,UAAAA,aAAY,WAAW;AAAA,IAAA;AAGjE,UAAMC,YAAU,IAAIE,QAAA;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjBH;AAAAA,MACA,CAAC,MAAM,QAAQ;AACd,cAAM,MAAM,IAAII,wCAAoB,MAAM,GAAG;AAC7C,eAAO,IAAI,SAAS;AAAA,MACrB;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACC,6BAA6B,+BAA+B;AAAA,MAAA;AAAA,IAE9D;AACA,aAAS,EAAEH,SAAAA,WAAS,aAAAD,cAAa,MAAM,gBAAgB;AAAA,EAAA,GAErD,CAAC,eAAe,cAAc,cAAc,cAAc,kBAAkB,2BAA2B,CAAC;AAG3GK,QAAAA,UAAU,MAAM;AACf,QAAI,uBAAuB;AAC1B,uBAAiB,uBAAuB,KAAK;AAAA,IAAA;AAAA,EAC9C,GACE,CAAC,kBAAkB,qBAAqB,CAAC;AAE5CA,QAAAA,UAAU,MAAM;AACT,UAAA,SAAS,WAAW,QAAQ;AAAA,EAChC,GAAA,CAAC,UAAU,MAAM,OAAO,CAAC;AAErB,SAAA;AACR;;"}
1
+ {"version":3,"file":"useDataBinding.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useDataBinding.ts"],"sourcesContent":["import { GraphQlClientError, useCurrentContentGraphQlClient, useCurrentSystemGraphQlClient, useTenantGraphQlClient } from '@contember/react-client'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport type { TreeRootAccessor } from '@contember/binding'\nimport { DataBinding, Environment, TreeStore } from '@contember/binding'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { useIsMounted } from '@contember/react-utils'\nimport { MarkerTreeGenerator } from '../markers'\nimport ReactDOM from 'react-dom'\nimport { useEnvironmentWithSchema } from './useEnvironmentWithSchema'\nimport { useEnvironment } from '../accessorPropagation'\n\nexport const useDataBinding = ({\n\tchildren,\n\trefreshOnPersist,\n\tskipStateUpdateAfterPersist,\n}: {\n\tchildren?: ReactNode\n\trefreshOnPersist?: boolean\n\tskipStateUpdateAfterPersist?: boolean\n}): AccessorTreeState => {\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tconst systemClient = useCurrentSystemGraphQlClient()\n\tconst tenantClient = useTenantGraphQlClient()\n\n\tconst environment = useEnvironment()\n\tconst environmentWithSchema = useEnvironmentWithSchema(environment)\n\n\tconst currentTreeStore = useRef<TreeStore>(undefined)\n\tconst isMountedRef = useIsMounted()\n\n\tconst [state, setState] = useState<AccessorTreeState & { binding?: DataBinding<ReactNode> }>({\n\t\tname: 'initializing',\n\t\tenvironment,\n\t})\n\n\tconst resetDataBinding = useCallback((environment: Environment, newStore: boolean) => {\n\t\tconst onUpdate = (data: TreeRootAccessor<ReactNode>, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it =>\n\t\t\t\t\tit.name === 'error' || it.binding !== binding ? it : {\n\t\t\t\t\t\tname: 'initialized',\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tbinding,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tconst onError = (error: GraphQlClientError, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it =>\n\t\t\t\t\tit.binding !== binding ? it : {\n\t\t\t\t\t\tname: 'error',\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tbinding,\n\t\t\t\t\t\terror,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tconst onPersistSuccess = () => {\n\t\t\tif (isMountedRef.current && refreshOnPersist) {\n\t\t\t\tresetDataBinding(environment, true)\n\t\t\t}\n\t\t}\n\n\t\tif (currentTreeStore.current === undefined || newStore) {\n\t\t\tcurrentTreeStore.current = new TreeStore(environment.getSchema())\n\t\t}\n\n\t\tconst binding = new DataBinding(\n\t\t\tcontentClient,\n\t\t\tsystemClient,\n\t\t\ttenantClient,\n\t\t\tcurrentTreeStore.current,\n\t\t\tenvironment,\n\t\t\t(node, env) => {\n\t\t\t\tconst gen = new MarkerTreeGenerator(node, env)\n\t\t\t\treturn gen.generate()\n\t\t\t},\n\t\t\tReactDOM.unstable_batchedUpdates,\n\t\t\tonUpdate,\n\t\t\tonError,\n\t\t\tonPersistSuccess,\n\t\t\t{\n\t\t\t\tskipStateUpdateAfterPersist: skipStateUpdateAfterPersist ?? false,\n\t\t\t},\n\t\t)\n\t\tsetState({ binding, environment, name: 'initializing' })\n\t}, [contentClient, systemClient, tenantClient, isMountedRef, refreshOnPersist, skipStateUpdateAfterPersist])\n\n\tuseEffect(() => {\n\t\tif (environmentWithSchema) {\n\t\t\tresetDataBinding(environmentWithSchema, false)\n\t\t}\n\t}, [resetDataBinding, environmentWithSchema])\n\n\tuseEffect(() => {\n\t\tstate.binding?.extendTree(children)\n\t}, [children, state.binding])\n\n\treturn state\n}\n"],"names":["useCurrentContentGraphQlClient","useCurrentSystemGraphQlClient","useTenantGraphQlClient","useEnvironment","useEnvironmentWithSchema","useRef","useIsMounted","useState","useCallback","environment","binding","TreeStore","DataBinding","MarkerTreeGenerator","useEffect"],"mappings":";;;;;;;;;;AAWO,MAAM,iBAAiB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,MAIyB;AACxB,QAAM,gBAAgBA,YAAAA,+BAAA;AACtB,QAAM,eAAeC,YAAAA,8BAAA;AACrB,QAAM,eAAeC,YAAAA,uBAAA;AAErB,QAAM,cAAcC,eAAAA,eAAA;AACpB,QAAM,wBAAwBC,yBAAAA,yBAAyB,WAAW;AAElE,QAAM,mBAAmBC,MAAAA,OAAkB,MAAS;AACpD,QAAM,eAAeC,WAAAA,aAAA;AAErB,QAAM,CAAC,OAAO,QAAQ,IAAIC,eAAmE;AAAA,IAC5F,MAAM;AAAA,IACN;AAAA,EAAA,CACA;AAED,QAAM,mBAAmBC,MAAAA,YAAY,CAACC,cAA0B,aAAsB;AACrF,UAAM,WAAW,CAAC,MAAmCC,aAAoC;AACxF,UAAI,aAAa,SAAS;AACzB;AAAA,UAAS,QACR,GAAG,SAAS,WAAW,GAAG,YAAYA,WAAU,KAAK;AAAA,YACpD,MAAM;AAAA,YACN,aAAAD;AAAAA,YACA,SAAAC;AAAAA,YACA;AAAA,UAAA;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAEA,UAAM,UAAU,CAAC,OAA2BA,aAAoC;AAC/E,UAAI,aAAa,SAAS;AACzB;AAAA,UAAS,CAAA,OACR,GAAG,YAAYA,WAAU,KAAK;AAAA,YAC7B,MAAM;AAAA,YACN,aAAAD;AAAAA,YACA,SAAAC;AAAAA,YACA;AAAA,UAAA;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAEA,UAAM,mBAAmB,MAAM;AAC9B,UAAI,aAAa,WAAW,kBAAkB;AAC7C,yBAAiBD,cAAa,IAAI;AAAA,MACnC;AAAA,IACD;AAEA,QAAI,iBAAiB,YAAY,UAAa,UAAU;AACvD,uBAAiB,UAAU,IAAIE,QAAAA,UAAUF,aAAY,WAAW;AAAA,IACjE;AAEA,UAAMC,YAAU,IAAIE,QAAAA;AAAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjBH;AAAAA,MACA,CAAC,MAAM,QAAQ;AACd,cAAM,MAAM,IAAII,wCAAoB,MAAM,GAAG;AAC7C,eAAO,IAAI,SAAA;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACC,6BAA6B,+BAA+B;AAAA,MAAA;AAAA,IAC7D;AAED,aAAS,EAAA,SAAEH,WAAS,aAAAD,cAAa,MAAM,gBAAgB;AAAA,EACxD,GAAG,CAAC,eAAe,cAAc,cAAc,cAAc,kBAAkB,2BAA2B,CAAC;AAE3GK,QAAAA,UAAU,MAAM;AACf,QAAI,uBAAuB;AAC1B,uBAAiB,uBAAuB,KAAK;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,kBAAkB,qBAAqB,CAAC;AAE5CA,QAAAA,UAAU,MAAM;AACf,UAAM,SAAS,WAAW,QAAQ;AAAA,EACnC,GAAG,CAAC,UAAU,MAAM,OAAO,CAAC;AAE5B,SAAO;AACR;;"}
@@ -2,7 +2,7 @@ import { useCurrentContentGraphQlClient, useCurrentSystemGraphQlClient, useTenan
2
2
  import { useRef, useState, useCallback, useEffect } from "react";
3
3
  import { TreeStore, DataBinding } from "@contember/binding";
4
4
  import { useIsMounted } from "@contember/react-utils";
5
- import ReactDOM__default from "react-dom";
5
+ import ReactDOM from "react-dom";
6
6
  import { useEnvironmentWithSchema } from "./useEnvironmentWithSchema.js";
7
7
  import { MarkerTreeGenerator } from "../markers/MarkerTreeGenerator.js";
8
8
  import { useEnvironment } from "../accessorPropagation/useEnvironment.js";
@@ -16,7 +16,7 @@ const useDataBinding = ({
16
16
  const tenantClient = useTenantGraphQlClient();
17
17
  const environment = useEnvironment();
18
18
  const environmentWithSchema = useEnvironmentWithSchema(environment);
19
- const currentTreeStore = useRef();
19
+ const currentTreeStore = useRef(void 0);
20
20
  const isMountedRef = useIsMounted();
21
21
  const [state, setState] = useState({
22
22
  name: "initializing",
@@ -25,22 +25,26 @@ const useDataBinding = ({
25
25
  const resetDataBinding = useCallback((environment2, newStore) => {
26
26
  const onUpdate = (data, binding2) => {
27
27
  if (isMountedRef.current) {
28
- setState((it) => it.name === "error" || it.binding !== binding2 ? it : {
29
- name: "initialized",
30
- environment: environment2,
31
- binding: binding2,
32
- data
33
- });
28
+ setState(
29
+ (it) => it.name === "error" || it.binding !== binding2 ? it : {
30
+ name: "initialized",
31
+ environment: environment2,
32
+ binding: binding2,
33
+ data
34
+ }
35
+ );
34
36
  }
35
37
  };
36
38
  const onError = (error, binding2) => {
37
39
  if (isMountedRef.current) {
38
- setState((it) => it.binding !== binding2 ? it : {
39
- name: "error",
40
- environment: environment2,
41
- binding: binding2,
42
- error
43
- });
40
+ setState(
41
+ (it) => it.binding !== binding2 ? it : {
42
+ name: "error",
43
+ environment: environment2,
44
+ binding: binding2,
45
+ error
46
+ }
47
+ );
44
48
  }
45
49
  };
46
50
  const onPersistSuccess = () => {
@@ -61,7 +65,7 @@ const useDataBinding = ({
61
65
  const gen = new MarkerTreeGenerator(node, env);
62
66
  return gen.generate();
63
67
  },
64
- ReactDOM__default.unstable_batchedUpdates,
68
+ ReactDOM.unstable_batchedUpdates,
65
69
  onUpdate,
66
70
  onError,
67
71
  onPersistSuccess,
@@ -1 +1 @@
1
- {"version":3,"file":"useDataBinding.js","sources":["../../../../../packages/react-binding/src/accessorTree/useDataBinding.ts"],"sourcesContent":["import {\n\tGraphQlClientError,\n\tuseCurrentContentGraphQlClient,\n\tuseCurrentSystemGraphQlClient,\n\tuseTenantGraphQlClient,\n} from '@contember/react-client'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport type { TreeRootAccessor } from '@contember/binding'\nimport { DataBinding, Environment, TreeStore } from '@contember/binding'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { useIsMounted } from '@contember/react-utils'\nimport { MarkerTreeGenerator } from '../markers'\nimport ReactDOM from 'react-dom'\nimport { useEnvironmentWithSchema } from './useEnvironmentWithSchema'\nimport { useEnvironment } from '../accessorPropagation'\n\nexport const useDataBinding = ({\n\tchildren,\n\trefreshOnPersist,\n\tskipStateUpdateAfterPersist,\n}: {\n\tchildren?: ReactNode\n\trefreshOnPersist?: boolean\n\tskipStateUpdateAfterPersist?: boolean\n}): AccessorTreeState => {\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tconst systemClient = useCurrentSystemGraphQlClient()\n\tconst tenantClient = useTenantGraphQlClient()\n\n\tconst environment = useEnvironment()\n\tconst environmentWithSchema = useEnvironmentWithSchema(environment)\n\n\tconst currentTreeStore = useRef<TreeStore>()\n\tconst isMountedRef = useIsMounted()\n\n\tconst [state, setState] = useState<AccessorTreeState & { binding?: DataBinding<ReactNode> }>({\n\t\tname: 'initializing',\n\t\tenvironment,\n\t})\n\n\tconst resetDataBinding = useCallback((environment: Environment, newStore: boolean) => {\n\t\tconst onUpdate = (data: TreeRootAccessor<ReactNode>, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it => it.name === 'error' || it.binding !== binding ? it : {\n\t\t\t\t\tname: 'initialized',\n\t\t\t\t\tenvironment,\n\t\t\t\t\tbinding,\n\t\t\t\t\tdata,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst onError = (error: GraphQlClientError, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it => it.binding !== binding ? it : {\n\t\t\t\t\tname: 'error',\n\t\t\t\t\tenvironment,\n\t\t\t\t\tbinding,\n\t\t\t\t\terror,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst onPersistSuccess = () => {\n\t\t\tif (isMountedRef.current && refreshOnPersist) {\n\t\t\t\tresetDataBinding(environment, true)\n\t\t\t}\n\t\t}\n\n\t\tif (currentTreeStore.current === undefined || newStore) {\n\t\t\tcurrentTreeStore.current = new TreeStore(environment.getSchema())\n\t\t}\n\n\t\tconst binding = new DataBinding(\n\t\t\tcontentClient,\n\t\t\tsystemClient,\n\t\t\ttenantClient,\n\t\t\tcurrentTreeStore.current,\n\t\t\tenvironment,\n\t\t\t(node, env) => {\n\t\t\t\tconst gen = new MarkerTreeGenerator(node, env)\n\t\t\t\treturn gen.generate()\n\t\t\t},\n\t\t\tReactDOM.unstable_batchedUpdates,\n\t\t\tonUpdate,\n\t\t\tonError,\n\t\t\tonPersistSuccess,\n\t\t\t{\n\t\t\t\tskipStateUpdateAfterPersist: skipStateUpdateAfterPersist ?? false,\n\t\t\t},\n\t\t)\n\t\tsetState({ binding, environment, name: 'initializing' })\n\n\t}, [contentClient, systemClient, tenantClient, isMountedRef, refreshOnPersist, skipStateUpdateAfterPersist])\n\n\n\tuseEffect(() => {\n\t\tif (environmentWithSchema) {\n\t\t\tresetDataBinding(environmentWithSchema, false)\n\t\t}\n\t}, [resetDataBinding, environmentWithSchema])\n\n\tuseEffect(() => {\n\t\tstate.binding?.extendTree(children)\n\t}, [children, state.binding])\n\n\treturn state\n}\n"],"names":["environment","binding","ReactDOM"],"mappings":";;;;;;;;AAgBO,MAAM,iBAAiB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,MAIyB;AACxB,QAAM,gBAAgB,+BAA+B;AACrD,QAAM,eAAe,8BAA8B;AACnD,QAAM,eAAe,uBAAuB;AAE5C,QAAM,cAAc,eAAe;AAC7B,QAAA,wBAAwB,yBAAyB,WAAW;AAElE,QAAM,mBAAmB,OAAkB;AAC3C,QAAM,eAAe,aAAa;AAElC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAmE;AAAA,IAC5F,MAAM;AAAA,IACN;AAAA,EAAA,CACA;AAED,QAAM,mBAAmB,YAAY,CAACA,cAA0B,aAAsB;AAC/E,UAAA,WAAW,CAAC,MAAmCC,aAAoC;AACxF,UAAI,aAAa,SAAS;AACzB,iBAAS,QAAM,GAAG,SAAS,WAAW,GAAG,YAAYA,WAAU,KAAK;AAAA,UACnE,MAAM;AAAA,UACN,aAAAD;AAAAA,UACA,SAAAC;AAAAA,UACA;AAAA,QAAA,CACA;AAAA,MAAA;AAAA,IAEH;AAEM,UAAA,UAAU,CAAC,OAA2BA,aAAoC;AAC/E,UAAI,aAAa,SAAS;AACzB,iBAAS,CAAM,OAAA,GAAG,YAAYA,WAAU,KAAM;AAAA,UAC7C,MAAM;AAAA,UACN,aAAAD;AAAAA,UACA,SAAAC;AAAAA,UACA;AAAA,QAAA,CACA;AAAA,MAAA;AAAA,IAEH;AAEA,UAAM,mBAAmB,MAAM;AAC1B,UAAA,aAAa,WAAW,kBAAkB;AAC7C,yBAAiBD,cAAa,IAAI;AAAA,MAAA;AAAA,IAEpC;AAEI,QAAA,iBAAiB,YAAY,UAAa,UAAU;AACvD,uBAAiB,UAAU,IAAI,UAAUA,aAAY,WAAW;AAAA,IAAA;AAGjE,UAAM,UAAU,IAAI;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjBA;AAAAA,MACA,CAAC,MAAM,QAAQ;AACd,cAAM,MAAM,IAAI,oBAAoB,MAAM,GAAG;AAC7C,eAAO,IAAI,SAAS;AAAA,MACrB;AAAA,MACAE,kBAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACC,6BAA6B,+BAA+B;AAAA,MAAA;AAAA,IAE9D;AACA,aAAS,EAAE,SAAS,aAAAF,cAAa,MAAM,gBAAgB;AAAA,EAAA,GAErD,CAAC,eAAe,cAAc,cAAc,cAAc,kBAAkB,2BAA2B,CAAC;AAG3G,YAAU,MAAM;AACf,QAAI,uBAAuB;AAC1B,uBAAiB,uBAAuB,KAAK;AAAA,IAAA;AAAA,EAC9C,GACE,CAAC,kBAAkB,qBAAqB,CAAC;AAE5C,YAAU,MAAM;AACT,UAAA,SAAS,WAAW,QAAQ;AAAA,EAChC,GAAA,CAAC,UAAU,MAAM,OAAO,CAAC;AAErB,SAAA;AACR;"}
1
+ {"version":3,"file":"useDataBinding.js","sources":["../../../../../packages/react-binding/src/accessorTree/useDataBinding.ts"],"sourcesContent":["import { GraphQlClientError, useCurrentContentGraphQlClient, useCurrentSystemGraphQlClient, useTenantGraphQlClient } from '@contember/react-client'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport type { TreeRootAccessor } from '@contember/binding'\nimport { DataBinding, Environment, TreeStore } from '@contember/binding'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { useIsMounted } from '@contember/react-utils'\nimport { MarkerTreeGenerator } from '../markers'\nimport ReactDOM from 'react-dom'\nimport { useEnvironmentWithSchema } from './useEnvironmentWithSchema'\nimport { useEnvironment } from '../accessorPropagation'\n\nexport const useDataBinding = ({\n\tchildren,\n\trefreshOnPersist,\n\tskipStateUpdateAfterPersist,\n}: {\n\tchildren?: ReactNode\n\trefreshOnPersist?: boolean\n\tskipStateUpdateAfterPersist?: boolean\n}): AccessorTreeState => {\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tconst systemClient = useCurrentSystemGraphQlClient()\n\tconst tenantClient = useTenantGraphQlClient()\n\n\tconst environment = useEnvironment()\n\tconst environmentWithSchema = useEnvironmentWithSchema(environment)\n\n\tconst currentTreeStore = useRef<TreeStore>(undefined)\n\tconst isMountedRef = useIsMounted()\n\n\tconst [state, setState] = useState<AccessorTreeState & { binding?: DataBinding<ReactNode> }>({\n\t\tname: 'initializing',\n\t\tenvironment,\n\t})\n\n\tconst resetDataBinding = useCallback((environment: Environment, newStore: boolean) => {\n\t\tconst onUpdate = (data: TreeRootAccessor<ReactNode>, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it =>\n\t\t\t\t\tit.name === 'error' || it.binding !== binding ? it : {\n\t\t\t\t\t\tname: 'initialized',\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tbinding,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tconst onError = (error: GraphQlClientError, binding: DataBinding<ReactNode>) => {\n\t\t\tif (isMountedRef.current) {\n\t\t\t\tsetState(it =>\n\t\t\t\t\tit.binding !== binding ? it : {\n\t\t\t\t\t\tname: 'error',\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tbinding,\n\t\t\t\t\t\terror,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tconst onPersistSuccess = () => {\n\t\t\tif (isMountedRef.current && refreshOnPersist) {\n\t\t\t\tresetDataBinding(environment, true)\n\t\t\t}\n\t\t}\n\n\t\tif (currentTreeStore.current === undefined || newStore) {\n\t\t\tcurrentTreeStore.current = new TreeStore(environment.getSchema())\n\t\t}\n\n\t\tconst binding = new DataBinding(\n\t\t\tcontentClient,\n\t\t\tsystemClient,\n\t\t\ttenantClient,\n\t\t\tcurrentTreeStore.current,\n\t\t\tenvironment,\n\t\t\t(node, env) => {\n\t\t\t\tconst gen = new MarkerTreeGenerator(node, env)\n\t\t\t\treturn gen.generate()\n\t\t\t},\n\t\t\tReactDOM.unstable_batchedUpdates,\n\t\t\tonUpdate,\n\t\t\tonError,\n\t\t\tonPersistSuccess,\n\t\t\t{\n\t\t\t\tskipStateUpdateAfterPersist: skipStateUpdateAfterPersist ?? false,\n\t\t\t},\n\t\t)\n\t\tsetState({ binding, environment, name: 'initializing' })\n\t}, [contentClient, systemClient, tenantClient, isMountedRef, refreshOnPersist, skipStateUpdateAfterPersist])\n\n\tuseEffect(() => {\n\t\tif (environmentWithSchema) {\n\t\t\tresetDataBinding(environmentWithSchema, false)\n\t\t}\n\t}, [resetDataBinding, environmentWithSchema])\n\n\tuseEffect(() => {\n\t\tstate.binding?.extendTree(children)\n\t}, [children, state.binding])\n\n\treturn state\n}\n"],"names":["environment","binding"],"mappings":";;;;;;;;AAWO,MAAM,iBAAiB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,MAIyB;AACxB,QAAM,gBAAgB,+BAAA;AACtB,QAAM,eAAe,8BAAA;AACrB,QAAM,eAAe,uBAAA;AAErB,QAAM,cAAc,eAAA;AACpB,QAAM,wBAAwB,yBAAyB,WAAW;AAElE,QAAM,mBAAmB,OAAkB,MAAS;AACpD,QAAM,eAAe,aAAA;AAErB,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAmE;AAAA,IAC5F,MAAM;AAAA,IACN;AAAA,EAAA,CACA;AAED,QAAM,mBAAmB,YAAY,CAACA,cAA0B,aAAsB;AACrF,UAAM,WAAW,CAAC,MAAmCC,aAAoC;AACxF,UAAI,aAAa,SAAS;AACzB;AAAA,UAAS,QACR,GAAG,SAAS,WAAW,GAAG,YAAYA,WAAU,KAAK;AAAA,YACpD,MAAM;AAAA,YACN,aAAAD;AAAAA,YACA,SAAAC;AAAAA,YACA;AAAA,UAAA;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAEA,UAAM,UAAU,CAAC,OAA2BA,aAAoC;AAC/E,UAAI,aAAa,SAAS;AACzB;AAAA,UAAS,CAAA,OACR,GAAG,YAAYA,WAAU,KAAK;AAAA,YAC7B,MAAM;AAAA,YACN,aAAAD;AAAAA,YACA,SAAAC;AAAAA,YACA;AAAA,UAAA;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAEA,UAAM,mBAAmB,MAAM;AAC9B,UAAI,aAAa,WAAW,kBAAkB;AAC7C,yBAAiBD,cAAa,IAAI;AAAA,MACnC;AAAA,IACD;AAEA,QAAI,iBAAiB,YAAY,UAAa,UAAU;AACvD,uBAAiB,UAAU,IAAI,UAAUA,aAAY,WAAW;AAAA,IACjE;AAEA,UAAM,UAAU,IAAI;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjBA;AAAAA,MACA,CAAC,MAAM,QAAQ;AACd,cAAM,MAAM,IAAI,oBAAoB,MAAM,GAAG;AAC7C,eAAO,IAAI,SAAA;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACC,6BAA6B,+BAA+B;AAAA,MAAA;AAAA,IAC7D;AAED,aAAS,EAAE,SAAS,aAAAA,cAAa,MAAM,gBAAgB;AAAA,EACxD,GAAG,CAAC,eAAe,cAAc,cAAc,cAAc,kBAAkB,2BAA2B,CAAC;AAE3G,YAAU,MAAM;AACf,QAAI,uBAAuB;AAC1B,uBAAiB,uBAAuB,KAAK;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,kBAAkB,qBAAqB,CAAC;AAE5C,YAAU,MAAM;AACf,UAAM,SAAS,WAAW,QAAQ;AAAA,EACnC,GAAG,CAAC,UAAU,MAAM,OAAO,CAAC;AAE5B,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDirtinessState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useDirtinessState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { DirtinessContext } from './DirtinessContext'\n\nexport const useDirtinessState = () => useContext(DirtinessContext)\n"],"names":["useContext","DirtinessContext"],"mappings":";;;;AAGa,MAAA,oBAAoB,MAAMA,MAAAA,WAAWC,iBAAgB,gBAAA;;"}
1
+ {"version":3,"file":"useDirtinessState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useDirtinessState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { DirtinessContext } from './DirtinessContext'\n\nexport const useDirtinessState = () => useContext(DirtinessContext)\n"],"names":["useContext","DirtinessContext"],"mappings":";;;;AAGO,MAAM,oBAAoB,MAAMA,MAAAA,WAAWC,iBAAAA,gBAAgB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDirtinessState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useDirtinessState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { DirtinessContext } from './DirtinessContext'\n\nexport const useDirtinessState = () => useContext(DirtinessContext)\n"],"names":[],"mappings":";;AAGa,MAAA,oBAAoB,MAAM,WAAW,gBAAgB;"}
1
+ {"version":3,"file":"useDirtinessState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useDirtinessState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { DirtinessContext } from './DirtinessContext'\n\nexport const useDirtinessState = () => useContext(DirtinessContext)\n"],"names":[],"mappings":";;AAGO,MAAM,oBAAoB,MAAM,WAAW,gBAAgB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEnvironmentWithSchema.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useEnvironmentWithSchema.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { Environment, Schema, SchemaLoader } from '@contember/binding'\nimport { GraphQlClientError } from '@contember/graphql-client'\nimport { useCurrentContentGraphQlClient } from '@contember/react-client'\n\nexport const useEnvironmentWithSchema = (env: Environment): Environment | undefined => {\n\tconst [schema, setSchema] = useState<Schema | undefined>(() => env.hasSchema() ? env.getSchema() : undefined)\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tuseEffect(() => {\n\t\tif (schema !== undefined) {\n\t\t\treturn\n\t\t}\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tsetSchema(await SchemaLoader.loadSchema(contentClient))\n\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\t\t})()\n\t}, [contentClient, schema])\n\n\treturn useMemo(() => schema ? env.withSchema(schema) : undefined, [env, schema])\n}\n"],"names":["useState","useCurrentContentGraphQlClient","useEffect","SchemaLoader","GraphQlClientError","useMemo"],"mappings":";;;;;;AAKa,MAAA,2BAA2B,CAAC,QAA8C;AACtF,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAA6B,SAAA,MAAM,IAAI,UAAA,IAAc,IAAI,UAAU,IAAI,MAAS;AAC5G,QAAM,gBAAgBC,YAAAA,+BAA+B;AACrDC,QAAAA,UAAU,MAAM;AACf,QAAI,WAAW,QAAW;AACzB;AAAA,IAAA;AAGD,KAAC,YAAY;AACR,UAAA;AACH,kBAAU,MAAMC,QAAAA,aAAa,WAAW,aAAa,CAAC;AAAA,eAE9C,GAAG;AACX,YAAI,aAAaC,cAAAA,oBAAoB;AAChC,cAAA,EAAE,SAAS,WAAW;AACzB;AAAA,UAAA;AAAA,QACD,OACM;AACA,gBAAA;AAAA,QAAA;AAAA,MACP;AAAA,IACD,GACE;AAAA,EAAA,GACD,CAAC,eAAe,MAAM,CAAC;AAEnB,SAAAC,cAAQ,MAAM,SAAS,IAAI,WAAW,MAAM,IAAI,QAAW,CAAC,KAAK,MAAM,CAAC;AAChF;;"}
1
+ {"version":3,"file":"useEnvironmentWithSchema.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useEnvironmentWithSchema.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { Environment, Schema, SchemaLoader } from '@contember/binding'\nimport { GraphQlClientError } from '@contember/graphql-client'\nimport { useCurrentContentGraphQlClient } from '@contember/react-client'\n\nexport const useEnvironmentWithSchema = (env: Environment): Environment | undefined => {\n\tconst [schema, setSchema] = useState<Schema | undefined>(() => env.hasSchema() ? env.getSchema() : undefined)\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tuseEffect(() => {\n\t\tif (schema !== undefined) {\n\t\t\treturn\n\t\t}\n\n\t\t;(async () => {\n\t\t\ttry {\n\t\t\t\tsetSchema(await SchemaLoader.loadSchema(contentClient))\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\t\t})()\n\t}, [contentClient, schema])\n\n\treturn useMemo(() => schema ? env.withSchema(schema) : undefined, [env, schema])\n}\n"],"names":["useState","useCurrentContentGraphQlClient","useEffect","SchemaLoader","GraphQlClientError","useMemo"],"mappings":";;;;;;AAKO,MAAM,2BAA2B,CAAC,QAA8C;AACtF,QAAM,CAAC,QAAQ,SAAS,IAAIA,eAA6B,MAAM,IAAI,cAAc,IAAI,UAAA,IAAc,MAAS;AAC5G,QAAM,gBAAgBC,YAAAA,+BAAA;AACtBC,QAAAA,UAAU,MAAM;AACf,QAAI,WAAW,QAAW;AACzB;AAAA,IACD;AAEC,KAAC,YAAY;AACb,UAAI;AACH,kBAAU,MAAMC,QAAAA,aAAa,WAAW,aAAa,CAAC;AAAA,MACvD,SAAS,GAAG;AACX,YAAI,aAAaC,cAAAA,oBAAoB;AACpC,cAAI,EAAE,SAAS,WAAW;AACzB;AAAA,UACD;AAAA,QACD,OAAO;AACN,gBAAM;AAAA,QACP;AAAA,MACD;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,eAAe,MAAM,CAAC;AAE1B,SAAOC,cAAQ,MAAM,SAAS,IAAI,WAAW,MAAM,IAAI,QAAW,CAAC,KAAK,MAAM,CAAC;AAChF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEnvironmentWithSchema.js","sources":["../../../../../packages/react-binding/src/accessorTree/useEnvironmentWithSchema.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { Environment, Schema, SchemaLoader } from '@contember/binding'\nimport { GraphQlClientError } from '@contember/graphql-client'\nimport { useCurrentContentGraphQlClient } from '@contember/react-client'\n\nexport const useEnvironmentWithSchema = (env: Environment): Environment | undefined => {\n\tconst [schema, setSchema] = useState<Schema | undefined>(() => env.hasSchema() ? env.getSchema() : undefined)\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tuseEffect(() => {\n\t\tif (schema !== undefined) {\n\t\t\treturn\n\t\t}\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tsetSchema(await SchemaLoader.loadSchema(contentClient))\n\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\t\t})()\n\t}, [contentClient, schema])\n\n\treturn useMemo(() => schema ? env.withSchema(schema) : undefined, [env, schema])\n}\n"],"names":[],"mappings":";;;;AAKa,MAAA,2BAA2B,CAAC,QAA8C;AACtF,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B,MAAM,IAAI,UAAA,IAAc,IAAI,UAAU,IAAI,MAAS;AAC5G,QAAM,gBAAgB,+BAA+B;AACrD,YAAU,MAAM;AACf,QAAI,WAAW,QAAW;AACzB;AAAA,IAAA;AAGD,KAAC,YAAY;AACR,UAAA;AACH,kBAAU,MAAM,aAAa,WAAW,aAAa,CAAC;AAAA,eAE9C,GAAG;AACX,YAAI,aAAa,oBAAoB;AAChC,cAAA,EAAE,SAAS,WAAW;AACzB;AAAA,UAAA;AAAA,QACD,OACM;AACA,gBAAA;AAAA,QAAA;AAAA,MACP;AAAA,IACD,GACE;AAAA,EAAA,GACD,CAAC,eAAe,MAAM,CAAC;AAEnB,SAAA,QAAQ,MAAM,SAAS,IAAI,WAAW,MAAM,IAAI,QAAW,CAAC,KAAK,MAAM,CAAC;AAChF;"}
1
+ {"version":3,"file":"useEnvironmentWithSchema.js","sources":["../../../../../packages/react-binding/src/accessorTree/useEnvironmentWithSchema.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { Environment, Schema, SchemaLoader } from '@contember/binding'\nimport { GraphQlClientError } from '@contember/graphql-client'\nimport { useCurrentContentGraphQlClient } from '@contember/react-client'\n\nexport const useEnvironmentWithSchema = (env: Environment): Environment | undefined => {\n\tconst [schema, setSchema] = useState<Schema | undefined>(() => env.hasSchema() ? env.getSchema() : undefined)\n\tconst contentClient = useCurrentContentGraphQlClient()\n\tuseEffect(() => {\n\t\tif (schema !== undefined) {\n\t\t\treturn\n\t\t}\n\n\t\t;(async () => {\n\t\t\ttry {\n\t\t\t\tsetSchema(await SchemaLoader.loadSchema(contentClient))\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\t\t})()\n\t}, [contentClient, schema])\n\n\treturn useMemo(() => schema ? env.withSchema(schema) : undefined, [env, schema])\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,2BAA2B,CAAC,QAA8C;AACtF,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B,MAAM,IAAI,cAAc,IAAI,UAAA,IAAc,MAAS;AAC5G,QAAM,gBAAgB,+BAAA;AACtB,YAAU,MAAM;AACf,QAAI,WAAW,QAAW;AACzB;AAAA,IACD;AAEC,KAAC,YAAY;AACb,UAAI;AACH,kBAAU,MAAM,aAAa,WAAW,aAAa,CAAC;AAAA,MACvD,SAAS,GAAG;AACX,YAAI,aAAa,oBAAoB;AACpC,cAAI,EAAE,SAAS,WAAW;AACzB;AAAA,UACD;AAAA,QACD,OAAO;AACN,gBAAM;AAAA,QACP;AAAA,MACD;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,eAAe,MAAM,CAAC;AAE1B,SAAO,QAAQ,MAAM,SAAS,IAAI,WAAW,MAAM,IAAI,QAAW,CAAC,KAAK,MAAM,CAAC;AAChF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMutationState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useMutationState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport const useMutationState = () => useContext(MutationStateContext)\n"],"names":["useContext","MutationStateContext"],"mappings":";;;;AAGa,MAAA,mBAAmB,MAAMA,MAAAA,WAAWC,qBAAoB,oBAAA;;"}
1
+ {"version":3,"file":"useMutationState.cjs","sources":["../../../../../packages/react-binding/src/accessorTree/useMutationState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport const useMutationState = () => useContext(MutationStateContext)\n"],"names":["useContext","MutationStateContext"],"mappings":";;;;AAGO,MAAM,mBAAmB,MAAMA,MAAAA,WAAWC,qBAAAA,oBAAoB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMutationState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useMutationState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport const useMutationState = () => useContext(MutationStateContext)\n"],"names":[],"mappings":";;AAGa,MAAA,mBAAmB,MAAM,WAAW,oBAAoB;"}
1
+ {"version":3,"file":"useMutationState.js","sources":["../../../../../packages/react-binding/src/accessorTree/useMutationState.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport const useMutationState = () => useContext(MutationStateContext)\n"],"names":[],"mappings":";;AAGO,MAAM,mBAAmB,MAAM,WAAW,oBAAoB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Component.tsx"],"sourcesContent":["import { memo, NamedExoticComponent, PropsWithChildren, ReactNode } from 'react'\nimport { useEnvironment } from '../accessorPropagation'\nimport type { Environment } from '@contember/binding'\nimport type { MarkerProvider, StaticRenderProvider, StaticRenderProviderProps } from '../markers'\nimport { assertNever } from '@contember/utilities'\n\ninterface EnvironmentAwareFunctionComponent<P> {\n\t(props: PropsWithChildren<P>, environment: Environment): ReactNode\n\tdisplayName?: string | undefined\n}\n\nfunction Component<Props extends {}>(\n\tstatelessRender: EnvironmentAwareFunctionComponent<Props>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tstaticRender: (props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tmarkerProvisions: MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\trender: EnvironmentAwareFunctionComponent<Props>,\n\tdecider?:\n\t\t| string\n\t\t| ((props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode)\n\t\t| MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n) {\n\tconst RenderWithEnv = (props: Props) => render(props, useEnvironment())\n\tconst renderWithEnv = typeof render !== 'function' || render.length < 2 ? render : RenderWithEnv\n\n\tif (decider === undefined || typeof decider === 'string') {\n\t\trender.displayName = decider\n\t\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props> = memo<Props>(renderWithEnv)\n\t\taugmentedRender.staticRender = render as StaticRenderProvider<Props>['staticRender']\n\t\taugmentedRender.displayName = decider\n\n\t\treturn augmentedRender\n\t}\n\n\trender.displayName = displayName\n\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props, NonStaticPropNames> = memo<Props>(renderWithEnv)\n\taugmentedRender.displayName = displayName\n\n\tif (typeof decider === 'function') {\n\t\taugmentedRender.staticRender = decider\n\n\t\treturn augmentedRender\n\t}\n\tif (typeof decider === 'object') {\n\t\tfor (const provisionName in decider) {\n\t\t\tconst methodName = provisionName as keyof MarkerProvider<Props, NonStaticPropNames>\n\t\t\t;(augmentedRender[methodName] as MarkerProvider<Props, NonStaticPropNames>[typeof methodName]) =\n\t\t\t\tdecider[methodName]\n\t\t}\n\n\t\treturn augmentedRender\n\t}\n\tassertNever(decider)\n}\n\nexport type { EnvironmentAwareFunctionComponent }\nexport { Component }\n"],"names":["useEnvironment","augmentedRender","memo","assertNever"],"mappings":";;;;;AA4BA,SAAS,UACR,QACA,SAIA,aACC;AACD,QAAM,gBAAgB,CAAC,UAAiB,OAAO,OAAOA,+BAAgB;AACtE,QAAM,gBAAgB,OAAO,WAAW,cAAc,OAAO,SAAS,IAAI,SAAS;AAEnF,MAAI,YAAY,UAAa,OAAO,YAAY,UAAU;AACzD,WAAO,cAAc;AACfC,UAAAA,mBAAuEC,WAAY,aAAa;AACtGD,qBAAgB,eAAe;AAC/BA,qBAAgB,cAAc;AAEvBA,WAAAA;AAAAA,EAAA;AAGR,SAAO,cAAc;AACf,QAAA,kBAA2FC,WAAY,aAAa;AAC1H,kBAAgB,cAAc;AAE1B,MAAA,OAAO,YAAY,YAAY;AAClC,oBAAgB,eAAe;AAExB,WAAA;AAAA,EAAA;AAEJ,MAAA,OAAO,YAAY,UAAU;AAChC,eAAW,iBAAiB,SAAS;AACpC,YAAM,aAAa;AACjB,sBAAgB,UAAU,IAC3B,QAAQ,UAAU;AAAA,IAAA;AAGb,WAAA;AAAA,EAAA;AAERC,YAAAA,YAAY,OAAO;AACpB;;"}
1
+ {"version":3,"file":"Component.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Component.tsx"],"sourcesContent":["import { memo, NamedExoticComponent, PropsWithChildren, ReactNode } from 'react'\nimport { useEnvironment } from '../accessorPropagation'\nimport type { Environment } from '@contember/binding'\nimport type { MarkerProvider, StaticRenderProvider, StaticRenderProviderProps } from '../markers'\nimport { assertNever } from '@contember/utilities'\n\ninterface EnvironmentAwareFunctionComponent<P> {\n\t(props: PropsWithChildren<P>, environment: Environment): ReactNode\n\tdisplayName?: string | undefined\n}\n\nfunction Component<Props extends {}>(\n\tstatelessRender: EnvironmentAwareFunctionComponent<Props>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tstaticRender: (props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tmarkerProvisions: MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\trender: EnvironmentAwareFunctionComponent<Props>,\n\tdecider?:\n\t\t| string\n\t\t| ((props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode)\n\t\t| MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n) {\n\tconst RenderWithEnv = (props: Props) => render(props, useEnvironment())\n\tconst renderWithEnv: (props: Props) => ReactNode = (typeof render !== 'function' || render.length < 2 ? render : RenderWithEnv) as (\n\t\tprops: Props,\n\t) => ReactNode\n\n\tif (decider === undefined || typeof decider === 'string') {\n\t\trender.displayName = decider\n\t\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props> = memo<Props>(renderWithEnv)\n\t\taugmentedRender.staticRender = render as StaticRenderProvider<Props>['staticRender']\n\t\taugmentedRender.displayName = decider\n\n\t\treturn augmentedRender\n\t}\n\n\trender.displayName = displayName\n\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props, NonStaticPropNames> = memo<Props>(renderWithEnv)\n\taugmentedRender.displayName = displayName\n\n\tif (typeof decider === 'function') {\n\t\taugmentedRender.staticRender = decider\n\n\t\treturn augmentedRender\n\t}\n\tif (typeof decider === 'object') {\n\t\tfor (const provisionName in decider) {\n\t\t\tconst methodName = provisionName as keyof MarkerProvider<Props, NonStaticPropNames>\n\t\t\t;(augmentedRender[methodName] as MarkerProvider<Props, NonStaticPropNames>[typeof methodName]) = decider[methodName]\n\t\t}\n\n\t\treturn augmentedRender\n\t}\n\tassertNever(decider)\n}\n\nexport type { EnvironmentAwareFunctionComponent }\nexport { Component }\n"],"names":["useEnvironment","augmentedRender","memo","assertNever"],"mappings":";;;;;AA4BA,SAAS,UACR,QACA,SAIA,aACC;AACD,QAAM,gBAAgB,CAAC,UAAiB,OAAO,OAAOA,eAAAA,gBAAgB;AACtE,QAAM,gBAA8C,OAAO,WAAW,cAAc,OAAO,SAAS,IAAI,SAAS;AAIjH,MAAI,YAAY,UAAa,OAAO,YAAY,UAAU;AACzD,WAAO,cAAc;AACrB,UAAMC,mBAAuEC,MAAAA,KAAY,aAAa;AACtGD,qBAAgB,eAAe;AAC/BA,qBAAgB,cAAc;AAE9B,WAAOA;AAAAA,EACR;AAEA,SAAO,cAAc;AACrB,QAAM,kBAA2FC,MAAAA,KAAY,aAAa;AAC1H,kBAAgB,cAAc;AAE9B,MAAI,OAAO,YAAY,YAAY;AAClC,oBAAgB,eAAe;AAE/B,WAAO;AAAA,EACR;AACA,MAAI,OAAO,YAAY,UAAU;AAChC,eAAW,iBAAiB,SAAS;AACpC,YAAM,aAAa;AACjB,sBAAgB,UAAU,IAAqE,QAAQ,UAAU;AAAA,IACpH;AAEA,WAAO;AAAA,EACR;AACAC,YAAAA,YAAY,OAAO;AACpB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../../../packages/react-binding/src/coreComponents/Component.tsx"],"sourcesContent":["import { memo, NamedExoticComponent, PropsWithChildren, ReactNode } from 'react'\nimport { useEnvironment } from '../accessorPropagation'\nimport type { Environment } from '@contember/binding'\nimport type { MarkerProvider, StaticRenderProvider, StaticRenderProviderProps } from '../markers'\nimport { assertNever } from '@contember/utilities'\n\ninterface EnvironmentAwareFunctionComponent<P> {\n\t(props: PropsWithChildren<P>, environment: Environment): ReactNode\n\tdisplayName?: string | undefined\n}\n\nfunction Component<Props extends {}>(\n\tstatelessRender: EnvironmentAwareFunctionComponent<Props>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tstaticRender: (props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tmarkerProvisions: MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\trender: EnvironmentAwareFunctionComponent<Props>,\n\tdecider?:\n\t\t| string\n\t\t| ((props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode)\n\t\t| MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n) {\n\tconst RenderWithEnv = (props: Props) => render(props, useEnvironment())\n\tconst renderWithEnv = typeof render !== 'function' || render.length < 2 ? render : RenderWithEnv\n\n\tif (decider === undefined || typeof decider === 'string') {\n\t\trender.displayName = decider\n\t\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props> = memo<Props>(renderWithEnv)\n\t\taugmentedRender.staticRender = render as StaticRenderProvider<Props>['staticRender']\n\t\taugmentedRender.displayName = decider\n\n\t\treturn augmentedRender\n\t}\n\n\trender.displayName = displayName\n\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props, NonStaticPropNames> = memo<Props>(renderWithEnv)\n\taugmentedRender.displayName = displayName\n\n\tif (typeof decider === 'function') {\n\t\taugmentedRender.staticRender = decider\n\n\t\treturn augmentedRender\n\t}\n\tif (typeof decider === 'object') {\n\t\tfor (const provisionName in decider) {\n\t\t\tconst methodName = provisionName as keyof MarkerProvider<Props, NonStaticPropNames>\n\t\t\t;(augmentedRender[methodName] as MarkerProvider<Props, NonStaticPropNames>[typeof methodName]) =\n\t\t\t\tdecider[methodName]\n\t\t}\n\n\t\treturn augmentedRender\n\t}\n\tassertNever(decider)\n}\n\nexport type { EnvironmentAwareFunctionComponent }\nexport { Component }\n"],"names":["augmentedRender"],"mappings":";;;AA4BA,SAAS,UACR,QACA,SAIA,aACC;AACD,QAAM,gBAAgB,CAAC,UAAiB,OAAO,OAAO,gBAAgB;AACtE,QAAM,gBAAgB,OAAO,WAAW,cAAc,OAAO,SAAS,IAAI,SAAS;AAEnF,MAAI,YAAY,UAAa,OAAO,YAAY,UAAU;AACzD,WAAO,cAAc;AACfA,UAAAA,mBAAuE,KAAY,aAAa;AACtGA,qBAAgB,eAAe;AAC/BA,qBAAgB,cAAc;AAEvBA,WAAAA;AAAAA,EAAA;AAGR,SAAO,cAAc;AACf,QAAA,kBAA2F,KAAY,aAAa;AAC1H,kBAAgB,cAAc;AAE1B,MAAA,OAAO,YAAY,YAAY;AAClC,oBAAgB,eAAe;AAExB,WAAA;AAAA,EAAA;AAEJ,MAAA,OAAO,YAAY,UAAU;AAChC,eAAW,iBAAiB,SAAS;AACpC,YAAM,aAAa;AACjB,sBAAgB,UAAU,IAC3B,QAAQ,UAAU;AAAA,IAAA;AAGb,WAAA;AAAA,EAAA;AAER,cAAY,OAAO;AACpB;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../../../packages/react-binding/src/coreComponents/Component.tsx"],"sourcesContent":["import { memo, NamedExoticComponent, PropsWithChildren, ReactNode } from 'react'\nimport { useEnvironment } from '../accessorPropagation'\nimport type { Environment } from '@contember/binding'\nimport type { MarkerProvider, StaticRenderProvider, StaticRenderProviderProps } from '../markers'\nimport { assertNever } from '@contember/utilities'\n\ninterface EnvironmentAwareFunctionComponent<P> {\n\t(props: PropsWithChildren<P>, environment: Environment): ReactNode\n\tdisplayName?: string | undefined\n}\n\nfunction Component<Props extends {}>(\n\tstatelessRender: EnvironmentAwareFunctionComponent<Props>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tstaticRender: (props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\tstatefulRender: EnvironmentAwareFunctionComponent<Props>,\n\tmarkerProvisions: MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n): NamedExoticComponent<Props>\n\nfunction Component<Props extends {}, NonStaticPropNames extends keyof Props = never>(\n\trender: EnvironmentAwareFunctionComponent<Props>,\n\tdecider?:\n\t\t| string\n\t\t| ((props: StaticRenderProviderProps<Props, NonStaticPropNames>, environment: Environment) => ReactNode)\n\t\t| MarkerProvider<Props, NonStaticPropNames>,\n\tdisplayName?: string,\n) {\n\tconst RenderWithEnv = (props: Props) => render(props, useEnvironment())\n\tconst renderWithEnv: (props: Props) => ReactNode = (typeof render !== 'function' || render.length < 2 ? render : RenderWithEnv) as (\n\t\tprops: Props,\n\t) => ReactNode\n\n\tif (decider === undefined || typeof decider === 'string') {\n\t\trender.displayName = decider\n\t\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props> = memo<Props>(renderWithEnv)\n\t\taugmentedRender.staticRender = render as StaticRenderProvider<Props>['staticRender']\n\t\taugmentedRender.displayName = decider\n\n\t\treturn augmentedRender\n\t}\n\n\trender.displayName = displayName\n\tconst augmentedRender: NamedExoticComponent<Props> & MarkerProvider<Props, NonStaticPropNames> = memo<Props>(renderWithEnv)\n\taugmentedRender.displayName = displayName\n\n\tif (typeof decider === 'function') {\n\t\taugmentedRender.staticRender = decider\n\n\t\treturn augmentedRender\n\t}\n\tif (typeof decider === 'object') {\n\t\tfor (const provisionName in decider) {\n\t\t\tconst methodName = provisionName as keyof MarkerProvider<Props, NonStaticPropNames>\n\t\t\t;(augmentedRender[methodName] as MarkerProvider<Props, NonStaticPropNames>[typeof methodName]) = decider[methodName]\n\t\t}\n\n\t\treturn augmentedRender\n\t}\n\tassertNever(decider)\n}\n\nexport type { EnvironmentAwareFunctionComponent }\nexport { Component }\n"],"names":["augmentedRender"],"mappings":";;;AA4BA,SAAS,UACR,QACA,SAIA,aACC;AACD,QAAM,gBAAgB,CAAC,UAAiB,OAAO,OAAO,gBAAgB;AACtE,QAAM,gBAA8C,OAAO,WAAW,cAAc,OAAO,SAAS,IAAI,SAAS;AAIjH,MAAI,YAAY,UAAa,OAAO,YAAY,UAAU;AACzD,WAAO,cAAc;AACrB,UAAMA,mBAAuE,KAAY,aAAa;AACtGA,qBAAgB,eAAe;AAC/BA,qBAAgB,cAAc;AAE9B,WAAOA;AAAAA,EACR;AAEA,SAAO,cAAc;AACrB,QAAM,kBAA2F,KAAY,aAAa;AAC1H,kBAAgB,cAAc;AAE9B,MAAI,OAAO,YAAY,YAAY;AAClC,oBAAgB,eAAe;AAE/B,WAAO;AAAA,EACR;AACA,MAAI,OAAO,YAAY,UAAU;AAChC,eAAW,iBAAiB,SAAS;AACpC,YAAM,aAAa;AACjB,sBAAgB,UAAU,IAAqE,QAAQ,UAAU;AAAA,IACpH;AAEA,WAAO;AAAA,EACR;AACA,cAAY,OAAO;AACpB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataBindingProvider.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/DataBindingProvider.tsx"],"sourcesContent":["import { ComponentType, createElement, memo, ReactElement, ReactNode } from 'react'\nimport { AccessorTree, AccessorTreeState, useDataBinding } from '../accessorTree'\n\nexport type DataBindingProviderStateComponent<StateProps> = {\n\tstateComponent: ComponentType<StateProps & DataBindingStateComponentProps>\n\tstateProps?: StateProps\n}\n\nexport interface DataBindingStateComponentProps {\n\taccessorTreeState: AccessorTreeState\n\tchildren?: ReactNode\n}\n\nexport type DataBindingProviderProps<StateProps> =\n\t& {\n\t\trefreshOnPersist?: boolean\n\t\tskipStateUpdateAfterPersist?: boolean\n\t\tchildren?: ReactNode\n\t}\n\t& DataBindingProviderStateComponent<StateProps>\n\n\n/**\n * The `DataBindingProvider` is a root component for all other data binding related components.\n *\n * @example\n * ```\n * <DataBindingProvider stateComponent={FeedbackRenderer} />\n * ```\n *\n * @group Data binding\n */\nexport const DataBindingProvider = memo(function DataBindingProvider<StateProps extends DataBindingStateComponentProps>(\n\tprops: DataBindingProviderProps<StateProps>,\n) {\n\tconst accessorTreeState = useDataBinding(props)\n\n\tconst children = createElement(\n\t\tprops.stateComponent,\n\t\t{\n\t\t\t...props.stateProps!,\n\t\t\taccessorTreeState: accessorTreeState,\n\t\t},\n\t\tprops.children,\n\t)\n\treturn (\n\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t{children}\n\t\t</AccessorTree>\n\t)\n}) as <StateProps>(props: DataBindingProviderProps<StateProps>) => ReactElement\n"],"names":["memo","DataBindingProvider","useDataBinding","createElement","jsx","AccessorTree"],"mappings":";;;;;;AAgCO,MAAM,sBAAsBA,MAAA,KAAK,SAASC,qBAChD,OACC;AACK,QAAA,oBAAoBC,8BAAe,KAAK;AAE9C,QAAM,WAAWC,MAAA;AAAA,IAChB,MAAM;AAAA,IACN;AAAA,MACC,GAAG,MAAM;AAAA,MACT;AAAA,IACD;AAAA,IACA,MAAM;AAAA,EACP;AACA,SACEC,2BAAAA,IAAAC,aAAAA,cAAA,EAAa,OAAO,mBACnB,SACF,CAAA;AAEF,CAAC;;"}
1
+ {"version":3,"file":"DataBindingProvider.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/DataBindingProvider.tsx"],"sourcesContent":["import { ComponentType, createElement, memo, ReactElement, ReactNode } from 'react'\nimport { AccessorTree, AccessorTreeState, useDataBinding } from '../accessorTree'\n\nexport type DataBindingProviderStateComponent<StateProps> = {\n\tstateComponent: ComponentType<StateProps & DataBindingStateComponentProps>\n\tstateProps?: StateProps\n}\n\nexport interface DataBindingStateComponentProps {\n\taccessorTreeState: AccessorTreeState\n\tchildren?: ReactNode\n}\n\nexport type DataBindingProviderProps<StateProps> =\n\t& {\n\t\trefreshOnPersist?: boolean\n\t\tskipStateUpdateAfterPersist?: boolean\n\t\tchildren?: ReactNode\n\t}\n\t& DataBindingProviderStateComponent<StateProps>\n\n/**\n * The `DataBindingProvider` is a root component for all other data binding related components.\n *\n * @example\n * ```\n * <DataBindingProvider stateComponent={FeedbackRenderer} />\n * ```\n *\n * @group Data binding\n */\nexport const DataBindingProvider = memo(function DataBindingProvider<StateProps extends DataBindingStateComponentProps>(\n\tprops: DataBindingProviderProps<StateProps>,\n) {\n\tconst accessorTreeState = useDataBinding(props)\n\n\tconst children = createElement(\n\t\tprops.stateComponent,\n\t\t{\n\t\t\t...props.stateProps!,\n\t\t\taccessorTreeState: accessorTreeState,\n\t\t},\n\t\tprops.children,\n\t)\n\treturn (\n\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t{children}\n\t\t</AccessorTree>\n\t)\n}) as <StateProps>(props: DataBindingProviderProps<StateProps>) => ReactElement\n"],"names":["memo","DataBindingProvider","useDataBinding","createElement","jsx","AccessorTree"],"mappings":";;;;;;AA+BO,MAAM,sBAAsBA,MAAAA,KAAK,SAASC,qBAChD,OACC;AACD,QAAM,oBAAoBC,eAAAA,eAAe,KAAK;AAE9C,QAAM,WAAWC,MAAAA;AAAAA,IAChB,MAAM;AAAA,IACN;AAAA,MACC,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,IAED,MAAM;AAAA,EAAA;AAEP,SACCC,2BAAAA,IAACC,aAAAA,cAAA,EAAa,OAAO,mBACnB,SAAA,CACF;AAEF,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataBindingProvider.js","sources":["../../../../../packages/react-binding/src/coreComponents/DataBindingProvider.tsx"],"sourcesContent":["import { ComponentType, createElement, memo, ReactElement, ReactNode } from 'react'\nimport { AccessorTree, AccessorTreeState, useDataBinding } from '../accessorTree'\n\nexport type DataBindingProviderStateComponent<StateProps> = {\n\tstateComponent: ComponentType<StateProps & DataBindingStateComponentProps>\n\tstateProps?: StateProps\n}\n\nexport interface DataBindingStateComponentProps {\n\taccessorTreeState: AccessorTreeState\n\tchildren?: ReactNode\n}\n\nexport type DataBindingProviderProps<StateProps> =\n\t& {\n\t\trefreshOnPersist?: boolean\n\t\tskipStateUpdateAfterPersist?: boolean\n\t\tchildren?: ReactNode\n\t}\n\t& DataBindingProviderStateComponent<StateProps>\n\n\n/**\n * The `DataBindingProvider` is a root component for all other data binding related components.\n *\n * @example\n * ```\n * <DataBindingProvider stateComponent={FeedbackRenderer} />\n * ```\n *\n * @group Data binding\n */\nexport const DataBindingProvider = memo(function DataBindingProvider<StateProps extends DataBindingStateComponentProps>(\n\tprops: DataBindingProviderProps<StateProps>,\n) {\n\tconst accessorTreeState = useDataBinding(props)\n\n\tconst children = createElement(\n\t\tprops.stateComponent,\n\t\t{\n\t\t\t...props.stateProps!,\n\t\t\taccessorTreeState: accessorTreeState,\n\t\t},\n\t\tprops.children,\n\t)\n\treturn (\n\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t{children}\n\t\t</AccessorTree>\n\t)\n}) as <StateProps>(props: DataBindingProviderProps<StateProps>) => ReactElement\n"],"names":["DataBindingProvider"],"mappings":";;;;AAgCO,MAAM,sBAAsB,KAAK,SAASA,qBAChD,OACC;AACK,QAAA,oBAAoB,eAAe,KAAK;AAE9C,QAAM,WAAW;AAAA,IAChB,MAAM;AAAA,IACN;AAAA,MACC,GAAG,MAAM;AAAA,MACT;AAAA,IACD;AAAA,IACA,MAAM;AAAA,EACP;AACA,SACE,oBAAA,cAAA,EAAa,OAAO,mBACnB,SACF,CAAA;AAEF,CAAC;"}
1
+ {"version":3,"file":"DataBindingProvider.js","sources":["../../../../../packages/react-binding/src/coreComponents/DataBindingProvider.tsx"],"sourcesContent":["import { ComponentType, createElement, memo, ReactElement, ReactNode } from 'react'\nimport { AccessorTree, AccessorTreeState, useDataBinding } from '../accessorTree'\n\nexport type DataBindingProviderStateComponent<StateProps> = {\n\tstateComponent: ComponentType<StateProps & DataBindingStateComponentProps>\n\tstateProps?: StateProps\n}\n\nexport interface DataBindingStateComponentProps {\n\taccessorTreeState: AccessorTreeState\n\tchildren?: ReactNode\n}\n\nexport type DataBindingProviderProps<StateProps> =\n\t& {\n\t\trefreshOnPersist?: boolean\n\t\tskipStateUpdateAfterPersist?: boolean\n\t\tchildren?: ReactNode\n\t}\n\t& DataBindingProviderStateComponent<StateProps>\n\n/**\n * The `DataBindingProvider` is a root component for all other data binding related components.\n *\n * @example\n * ```\n * <DataBindingProvider stateComponent={FeedbackRenderer} />\n * ```\n *\n * @group Data binding\n */\nexport const DataBindingProvider = memo(function DataBindingProvider<StateProps extends DataBindingStateComponentProps>(\n\tprops: DataBindingProviderProps<StateProps>,\n) {\n\tconst accessorTreeState = useDataBinding(props)\n\n\tconst children = createElement(\n\t\tprops.stateComponent,\n\t\t{\n\t\t\t...props.stateProps!,\n\t\t\taccessorTreeState: accessorTreeState,\n\t\t},\n\t\tprops.children,\n\t)\n\treturn (\n\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t{children}\n\t\t</AccessorTree>\n\t)\n}) as <StateProps>(props: DataBindingProviderProps<StateProps>) => ReactElement\n"],"names":["DataBindingProvider"],"mappings":";;;;AA+BO,MAAM,sBAAsB,KAAK,SAASA,qBAChD,OACC;AACD,QAAM,oBAAoB,eAAe,KAAK;AAE9C,QAAM,WAAW;AAAA,IAChB,MAAM;AAAA,IACN;AAAA,MACC,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,IAED,MAAM;AAAA,EAAA;AAEP,SACC,oBAAC,cAAA,EAAa,OAAO,mBACnB,SAAA,CACF;AAEF,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Entity.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { AccessorProvider } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport { Component } from './Component'\n\nexport interface EntityBaseProps {\n\taccessor: EntityAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityProps = EntityBaseProps\n\n/**\n * @group Data binding\n */\nexport const Entity = Component(\n\t({ children, accessor }: EntityProps) => {\n\t\treturn (\n\t\t// HACK: the ?. is actually important, despite the typings.\n\t\t\t<AccessorProvider accessor={accessor} key={accessor?.key}>\n\t\t\t\t{children}\n\t\t\t</AccessorProvider>\n\t\t)\n\t},\n\t'Entity',\n)\n"],"names":["Component","jsx","AccessorProvider"],"mappings":";;;;;AAeO,MAAM,SAASA,UAAA;AAAA,EACrB,CAAC,EAAE,UAAU,eAA4B;AACxC;AAAA;AAAA,MAEEC,2BAAA,IAAAC,iBAAA,kBAAA,EAAiB,UAChB,SAAA,GADyC,UAAU,GAErD;AAAA;AAAA,EAEF;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"Entity.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Entity.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { AccessorProvider } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport { Component } from './Component'\n\nexport interface EntityBaseProps {\n\taccessor: EntityAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityProps = EntityBaseProps\n\n/**\n * @group Data binding\n */\nexport const Entity = Component(\n\t({ children, accessor }: EntityProps) => {\n\t\treturn (\n\t\t\t// HACK: the ?. is actually important, despite the typings.\n\t\t\t<AccessorProvider accessor={accessor} key={accessor?.key}>\n\t\t\t\t{children}\n\t\t\t</AccessorProvider>\n\t\t)\n\t},\n\t'Entity',\n)\n"],"names":["Component","jsx","AccessorProvider"],"mappings":";;;;;AAeO,MAAM,SAASA,UAAAA;AAAAA,EACrB,CAAC,EAAE,UAAU,eAA4B;AACxC;AAAA;AAAA,MAECC,2BAAAA,IAACC,iBAAAA,kBAAA,EAAiB,UAChB,SAAA,GADyC,UAAU,GAErD;AAAA;AAAA,EAEF;AAAA,EACA;AACD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.js","sources":["../../../../../packages/react-binding/src/coreComponents/Entity.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { AccessorProvider } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport { Component } from './Component'\n\nexport interface EntityBaseProps {\n\taccessor: EntityAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityProps = EntityBaseProps\n\n/**\n * @group Data binding\n */\nexport const Entity = Component(\n\t({ children, accessor }: EntityProps) => {\n\t\treturn (\n\t\t// HACK: the ?. is actually important, despite the typings.\n\t\t\t<AccessorProvider accessor={accessor} key={accessor?.key}>\n\t\t\t\t{children}\n\t\t\t</AccessorProvider>\n\t\t)\n\t},\n\t'Entity',\n)\n"],"names":[],"mappings":";;;AAeO,MAAM,SAAS;AAAA,EACrB,CAAC,EAAE,UAAU,eAA4B;AACxC;AAAA;AAAA,MAEE,oBAAA,kBAAA,EAAiB,UAChB,SAAA,GADyC,UAAU,GAErD;AAAA;AAAA,EAEF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"Entity.js","sources":["../../../../../packages/react-binding/src/coreComponents/Entity.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { AccessorProvider } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport { Component } from './Component'\n\nexport interface EntityBaseProps {\n\taccessor: EntityAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityProps = EntityBaseProps\n\n/**\n * @group Data binding\n */\nexport const Entity = Component(\n\t({ children, accessor }: EntityProps) => {\n\t\treturn (\n\t\t\t// HACK: the ?. is actually important, despite the typings.\n\t\t\t<AccessorProvider accessor={accessor} key={accessor?.key}>\n\t\t\t\t{children}\n\t\t\t</AccessorProvider>\n\t\t)\n\t},\n\t'Entity',\n)\n"],"names":[],"mappings":";;;AAeO,MAAM,SAAS;AAAA,EACrB,CAAC,EAAE,UAAU,eAA4B;AACxC;AAAA;AAAA,MAEC,oBAAC,kBAAA,EAAiB,UAChB,SAAA,GADyC,UAAU,GAErD;AAAA;AAAA,EAEF;AAAA,EACA;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityList.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntityList.tsx"],"sourcesContent":["import { ComponentType, createElement, ReactElement, ReactNode } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\n\nexport interface EntityListBaseProps {\n\taccessor: EntityListAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityListProps<ListProps> = EntityListBaseProps &\n(\n\t| {}\n\t| {\n\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\tlistProps?: ListProps\n\t\t }\n)\n\n/**\n * @group Data binding\n */\nexport const EntityList = Component(\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: props.accessor,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{Array.from(props.accessor, entity => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Entity key={entity.key} accessor={entity}>\n\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</>\n\t\t)\n\t},\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: undefined as any,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn <>{props.children}</>\n\t},\n\t'EntityList',\n) as <ListProps>(props: EntityListProps<ListProps>) => ReactElement\n"],"names":["Component","createElement","jsx","Fragment","Entity"],"mappings":";;;;;;AAsBO,MAAM,aAAaA,UAAA;AAAA,EACzB,CAAuB,UAAsC;AACxD,QAAA,mBAAmB,SAAS,MAAM,eAAe;AAC7C,aAAAC,MAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU,MAAM;AAAA,QAChB,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IAAA;AAEF,WAEGC,2BAAA,IAAAC,qBAAA,EAAA,UAAA,MAAM,KAAK,MAAM,UAAU,CAAU,WAAA;AACrC,4CACEC,OAAAA,QAAwB,EAAA,UAAU,QACjC,UAAM,MAAA,SAAA,GADK,OAAO,GAEpB;AAAA,IAED,CAAA,GACF;AAAA,EAEF;AAAA,EACA,CAAuB,UAAsC;AACxD,QAAA,mBAAmB,SAAS,MAAM,eAAe;AAC7C,aAAAH,MAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU;AAAA,QACV,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IAAA;AAEK,WAAAC,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,gBAAM,SAAS,CAAA;AAAA,EAC1B;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"EntityList.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntityList.tsx"],"sourcesContent":["import { ComponentType, createElement, ReactElement, ReactNode } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\n\nexport interface EntityListBaseProps {\n\taccessor: EntityListAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityListProps<ListProps> =\n\t& EntityListBaseProps\n\t& (\n\t\t| {}\n\t\t| {\n\t\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\t\tlistProps?: ListProps\n\t\t}\n\t)\n\n/**\n * @group Data binding\n */\nexport const EntityList = Component(\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: props.accessor,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{Array.from(props.accessor, entity => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Entity key={entity.key} accessor={entity}>\n\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</>\n\t\t)\n\t},\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: undefined as any,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn <>{props.children}</>\n\t},\n\t'EntityList',\n) as <ListProps>(props: EntityListProps<ListProps>) => ReactElement\n"],"names":["Component","createElement","jsx","Fragment","Entity"],"mappings":";;;;;;AAuBO,MAAM,aAAaA,UAAAA;AAAAA,EACzB,CAAuB,UAAsC;AAC5D,QAAI,mBAAmB,SAAS,MAAM,eAAe;AACpD,aAAOC,MAAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU,MAAM;AAAA,QAChB,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IACF;AACA,WACCC,2BAAAA,IAAAC,qBAAA,EACE,UAAA,MAAM,KAAK,MAAM,UAAU,CAAA,WAAU;AACrC,4CACEC,OAAAA,QAAA,EAAwB,UAAU,QACjC,UAAA,MAAM,SAAA,GADK,OAAO,GAEpB;AAAA,IAEF,CAAC,EAAA,CACF;AAAA,EAEF;AAAA,EACA,CAAuB,UAAsC;AAC5D,QAAI,mBAAmB,SAAS,MAAM,eAAe;AACpD,aAAOH,MAAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU;AAAA,QACV,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IACF;AACA,WAAOC,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,gBAAM,SAAA,CAAS;AAAA,EAC1B;AAAA,EACA;AACD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityList.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntityList.tsx"],"sourcesContent":["import { ComponentType, createElement, ReactElement, ReactNode } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\n\nexport interface EntityListBaseProps {\n\taccessor: EntityListAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityListProps<ListProps> = EntityListBaseProps &\n(\n\t| {}\n\t| {\n\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\tlistProps?: ListProps\n\t\t }\n)\n\n/**\n * @group Data binding\n */\nexport const EntityList = Component(\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: props.accessor,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{Array.from(props.accessor, entity => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Entity key={entity.key} accessor={entity}>\n\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</>\n\t\t)\n\t},\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: undefined as any,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn <>{props.children}</>\n\t},\n\t'EntityList',\n) as <ListProps>(props: EntityListProps<ListProps>) => ReactElement\n"],"names":[],"mappings":";;;;AAsBO,MAAM,aAAa;AAAA,EACzB,CAAuB,UAAsC;AACxD,QAAA,mBAAmB,SAAS,MAAM,eAAe;AAC7C,aAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU,MAAM;AAAA,QAChB,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IAAA;AAEF,WAEG,oBAAA,UAAA,EAAA,UAAA,MAAM,KAAK,MAAM,UAAU,CAAU,WAAA;AACrC,iCACE,QAAwB,EAAA,UAAU,QACjC,UAAM,MAAA,SAAA,GADK,OAAO,GAEpB;AAAA,IAED,CAAA,GACF;AAAA,EAEF;AAAA,EACA,CAAuB,UAAsC;AACxD,QAAA,mBAAmB,SAAS,MAAM,eAAe;AAC7C,aAAA,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU;AAAA,QACV,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IAAA;AAEK,WAAA,oBAAA,UAAA,EAAG,gBAAM,SAAS,CAAA;AAAA,EAC1B;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"EntityList.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntityList.tsx"],"sourcesContent":["import { ComponentType, createElement, ReactElement, ReactNode } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\n\nexport interface EntityListBaseProps {\n\taccessor: EntityListAccessor\n\tchildren?: ReactNode\n}\n\nexport type EntityListProps<ListProps> =\n\t& EntityListBaseProps\n\t& (\n\t\t| {}\n\t\t| {\n\t\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\t\tlistProps?: ListProps\n\t\t}\n\t)\n\n/**\n * @group Data binding\n */\nexport const EntityList = Component(\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: props.accessor,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{Array.from(props.accessor, entity => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Entity key={entity.key} accessor={entity}>\n\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</>\n\t\t)\n\t},\n\t<ListProps extends {}>(props: EntityListProps<ListProps>) => {\n\t\tif ('listComponent' in props && props.listComponent) {\n\t\t\treturn createElement(props.listComponent, {\n\t\t\t\t...props.listProps!,\n\t\t\t\taccessor: undefined as any,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\t\t}\n\t\treturn <>{props.children}</>\n\t},\n\t'EntityList',\n) as <ListProps>(props: EntityListProps<ListProps>) => ReactElement\n"],"names":[],"mappings":";;;;AAuBO,MAAM,aAAa;AAAA,EACzB,CAAuB,UAAsC;AAC5D,QAAI,mBAAmB,SAAS,MAAM,eAAe;AACpD,aAAO,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU,MAAM;AAAA,QAChB,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IACF;AACA,WACC,oBAAA,UAAA,EACE,UAAA,MAAM,KAAK,MAAM,UAAU,CAAA,WAAU;AACrC,iCACE,QAAA,EAAwB,UAAU,QACjC,UAAA,MAAM,SAAA,GADK,OAAO,GAEpB;AAAA,IAEF,CAAC,EAAA,CACF;AAAA,EAEF;AAAA,EACA,CAAuB,UAAsC;AAC5D,QAAI,mBAAmB,SAAS,MAAM,eAAe;AACpD,aAAO,cAAc,MAAM,eAAe;AAAA,QACzC,GAAG,MAAM;AAAA,QACT,UAAU;AAAA,QACV,UAAU,MAAM;AAAA,MAAA,CAChB;AAAA,IACF;AACA,WAAO,oBAAA,UAAA,EAAG,gBAAM,SAAA,CAAS;AAAA,EAC1B;AAAA,EACA;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntityListSubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityListSubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\n\nexport interface EntityListSubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntityListSubTreeProps<ListProps, EntityProps> = {\n\ttreeRootId?: TreeRootId\n\tchildren?: ReactNode\n} & EntityListSubTreeAdditionalProps &\n(SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList) &\n(\n\t| {}\n\t| {\n\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\tlistProps?: ListProps\n\t\t }\n)\n\n/**\n * Creates a subtree with list of entities in current data binding context.\n *\n * @example\n * ```\n * <EntityListSubTree entities=\"Post\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntityListSubTree = Component(\n\t<ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntityListSubTree: cannot update isCreating')\n\t\tconst accessor = useEntityListSubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\n\t\t// TODO revive top level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ?\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne\n\t\t// ) :\n\t\t// \tprops.children\n\t\t// )\n\t\treturn <EntityList {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntityListSubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntityListSubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={0 as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityListSubtree(environment, props)\n\t\t},\n\t},\n\t'EntityListSubTree',\n) as <ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => ReactElement\n"],"names":["Component","useConstantValueInvariant","useEntityListSubTree","jsx","EntityList","MarkerFactory","jsxs","Field","PRIMARY_KEY_NAME","TreeNodeEnvironmentFactory"],"mappings":";;;;;;;;;AAoCO,MAAM,oBAAoBA,UAAA;AAAA,EAChC,CAAyB,UAA0D;AACxDC,yCAAA,MAAM,YAAY,6CAA6C;AACnF,UAAA,WAAWC,0CAAqB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAQ1F,WAAQC,2BAAA,IAAAC,WAAA,YAAA,EAAY,GAAG,OAAO,SAAoB,CAAA;AAAA,EACnD;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACjD,UAAA,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAOC,QAAc,cAAA,2CAA2C,OAAO,QAAQ,WAAW;AAAA,MAAA;AAE3F,aAAOA,QAAc,cAAA,8BAA8B,OAAO,QAAQ,WAAW;AAAA,IAC9E;AAAA,IACA,cAAc,CACb,UAAAC,2BAAAA,KAACF,yBAAY,GAAG,OAAO,UAAU,GAChC,UAAA;AAAA,MAACD,2BAAAA,IAAAI,MAAA,OAAA,EAAM,OAAOC,QAAkB,iBAAA,CAAA;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AACzD,aAAAC,mCAA2B,sCAAsC,aAAa,KAAK;AAAA,IAAA;AAAA,EAE5F;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"EntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntityListSubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityListSubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\n\nexport interface EntityListSubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntityListSubTreeProps<ListProps, EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntityListSubTreeAdditionalProps\n\t& (SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList)\n\t& (\n\t\t| {}\n\t\t| {\n\t\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\t\tlistProps?: ListProps\n\t\t}\n\t)\n\n/**\n * Creates a subtree with list of entities in current data binding context.\n *\n * @example\n * ```\n * <EntityListSubTree entities=\"Post\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntityListSubTree = Component(\n\t<ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntityListSubTree: cannot update isCreating')\n\t\tconst accessor = useEntityListSubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\n\t\t// TODO revive top level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ?\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne\n\t\t// ) :\n\t\t// \tprops.children\n\t\t// )\n\t\treturn <EntityList {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntityListSubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntityListSubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={0 as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityListSubtree(environment, props)\n\t\t},\n\t},\n\t'EntityListSubTree',\n) as <ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => ReactElement\n"],"names":["Component","useConstantValueInvariant","useEntityListSubTree","jsx","EntityList","MarkerFactory","jsxs","Field","PRIMARY_KEY_NAME","TreeNodeEnvironmentFactory"],"mappings":";;;;;;;;;AAsCO,MAAM,oBAAoBA,UAAAA;AAAAA,EAChC,CAAyB,UAA0D;AAClFC,yCAA0B,MAAM,YAAY,6CAA6C;AACzF,UAAM,WAAWC,0CAAqB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAQ1F,WAAOC,2BAAAA,IAACC,WAAAA,YAAA,EAAY,GAAG,OAAO,SAAA,CAAoB;AAAA,EACnD;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,UAAI,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAOC,QAAAA,cAAc,2CAA2C,OAAO,QAAQ,WAAW;AAAA,MAC3F;AACA,aAAOA,QAAAA,cAAc,8BAA8B,OAAO,QAAQ,WAAW;AAAA,IAC9E;AAAA,IACA,cAAc,CAAA,UACbC,2BAAAA,KAACF,WAAAA,cAAY,GAAG,OAAO,UAAU,GAChC,UAAA;AAAA,MAAAD,2BAAAA,IAACI,MAAAA,OAAA,EAAM,OAAOC,QAAAA,iBAAA,CAAkB;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AAChE,aAAOC,mCAA2B,sCAAsC,aAAa,KAAK;AAAA,IAC3F;AAAA,EAAA;AAAA,EAED;AACD;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useConstantValueInvariant } from "@contember/react-utils";
3
- import { MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from "@contember/binding";
3
+ import { TreeNodeEnvironmentFactory, PRIMARY_KEY_NAME, MarkerFactory } from "@contember/binding";
4
4
  import { Component } from "./Component.js";
5
5
  import { EntityList } from "./EntityList.js";
6
6
  import { Field } from "./Field.js";
@@ -1 +1 @@
1
- {"version":3,"file":"EntityListSubTree.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntityListSubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityListSubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\n\nexport interface EntityListSubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntityListSubTreeProps<ListProps, EntityProps> = {\n\ttreeRootId?: TreeRootId\n\tchildren?: ReactNode\n} & EntityListSubTreeAdditionalProps &\n(SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList) &\n(\n\t| {}\n\t| {\n\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\tlistProps?: ListProps\n\t\t }\n)\n\n/**\n * Creates a subtree with list of entities in current data binding context.\n *\n * @example\n * ```\n * <EntityListSubTree entities=\"Post\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntityListSubTree = Component(\n\t<ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntityListSubTree: cannot update isCreating')\n\t\tconst accessor = useEntityListSubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\n\t\t// TODO revive top level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ?\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne\n\t\t// ) :\n\t\t// \tprops.children\n\t\t// )\n\t\treturn <EntityList {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntityListSubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntityListSubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={0 as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityListSubtree(environment, props)\n\t\t},\n\t},\n\t'EntityListSubTree',\n) as <ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => ReactElement\n"],"names":[],"mappings":";;;;;;;AAoCO,MAAM,oBAAoB;AAAA,EAChC,CAAyB,UAA0D;AACxD,8BAAA,MAAM,YAAY,6CAA6C;AACnF,UAAA,WAAW,qBAAqB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAQ1F,WAAQ,oBAAA,YAAA,EAAY,GAAG,OAAO,SAAoB,CAAA;AAAA,EACnD;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACjD,UAAA,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAO,cAAc,2CAA2C,OAAO,QAAQ,WAAW;AAAA,MAAA;AAE3F,aAAO,cAAc,8BAA8B,OAAO,QAAQ,WAAW;AAAA,IAC9E;AAAA,IACA,cAAc,CACb,UAAA,qBAAC,cAAY,GAAG,OAAO,UAAU,GAChC,UAAA;AAAA,MAAC,oBAAA,OAAA,EAAM,OAAO,iBAAkB,CAAA;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AACzD,aAAA,2BAA2B,sCAAsC,aAAa,KAAK;AAAA,IAAA;AAAA,EAE5F;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"EntityListSubTree.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntityListSubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityListSubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\n\nexport interface EntityListSubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntityListSubTreeProps<ListProps, EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntityListSubTreeAdditionalProps\n\t& (SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList)\n\t& (\n\t\t| {}\n\t\t| {\n\t\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\t\tlistProps?: ListProps\n\t\t}\n\t)\n\n/**\n * Creates a subtree with list of entities in current data binding context.\n *\n * @example\n * ```\n * <EntityListSubTree entities=\"Post\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntityListSubTree = Component(\n\t<ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntityListSubTree: cannot update isCreating')\n\t\tconst accessor = useEntityListSubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\n\t\t// TODO revive top level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ?\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne\n\t\t// ) :\n\t\t// \tprops.children\n\t\t// )\n\t\treturn <EntityList {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntityListSubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntityListSubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={0 as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityListSubtree(environment, props)\n\t\t},\n\t},\n\t'EntityListSubTree',\n) as <ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => ReactElement\n"],"names":[],"mappings":";;;;;;;AAsCO,MAAM,oBAAoB;AAAA,EAChC,CAAyB,UAA0D;AAClF,8BAA0B,MAAM,YAAY,6CAA6C;AACzF,UAAM,WAAW,qBAAqB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAQ1F,WAAO,oBAAC,YAAA,EAAY,GAAG,OAAO,SAAA,CAAoB;AAAA,EACnD;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,UAAI,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAO,cAAc,2CAA2C,OAAO,QAAQ,WAAW;AAAA,MAC3F;AACA,aAAO,cAAc,8BAA8B,OAAO,QAAQ,WAAW;AAAA,IAC9E;AAAA,IACA,cAAc,CAAA,UACb,qBAAC,cAAY,GAAG,OAAO,UAAU,GAChC,UAAA;AAAA,MAAA,oBAAC,OAAA,EAAM,OAAO,iBAAA,CAAkB;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AAChE,aAAO,2BAA2B,sCAAsC,aAAa,KAAK;AAAA,IAC3F;AAAA,EAAA;AAAA,EAED;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntitySubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode } from 'react'\nimport { useEntitySubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\nimport { Field } from './Field'\nimport { SetOrderFieldOnCreate, SetOrderFieldOnCreateOwnProps } from '../accessorSorting'\n\nexport interface EntitySubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntitySubTreeAdditionalCreationProps = {} | SetOrderFieldOnCreateOwnProps\n\nexport type EntitySubTreeProps<EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntitySubTreeAdditionalProps\n\t& (\n\t\t| SugaredQualifiedSingleEntity\n\t\t| (SugaredUnconstrainedQualifiedSingleEntity & EntitySubTreeAdditionalCreationProps)\n\t)\n\n/**\n * Creates a single entity subtree in current data binding context.\n *\n * @example\n * ```\n * <EntitySubTree entity=\"Post(id = $id)\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntitySubTree = Component(\n\t<EntityProps extends {}>(props: EntitySubTreeProps<EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntitySubTree: cannot update isCreating')\n\t\tconst accessor = useEntitySubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\t\t// TODO revive top-level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ? (\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne>\n\t\t// ) : (\n\t\t// \tprops.children\n\t\t// )}\n\t\treturn <Entity {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntitySubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntitySubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t<Entity {...props} accessor={0 as any}>\n\t\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t\t{props.children}\n\t\t\t\t</Entity>\n\t\t\t\t{props.isCreating && 'orderField' in props && (\n\t\t\t\t\t<SetOrderFieldOnCreate\n\t\t\t\t\t\torderField={props.orderField}\n\t\t\t\t\t\tnewOrderFieldValue={props.newOrderFieldValue}\n\t\t\t\t\t\tentity={props.entity}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntitySubtree(environment, props)\n\t\t},\n\t},\n\t'EntitySubTree',\n) as <EntityProps>(pros: EntitySubTreeProps<EntityProps>) => ReactElement\n"],"names":["Component","useConstantValueInvariant","useEntitySubTree","jsx","Entity","MarkerFactory","jsxs","Fragment","Field","PRIMARY_KEY_NAME","SetOrderFieldOnCreate","TreeNodeEnvironmentFactory"],"mappings":";;;;;;;;;;AAqCO,MAAM,gBAAgBA,UAAA;AAAA,EAC5B,CAAyB,UAA2C;AACzCC,yCAAA,MAAM,YAAY,yCAAyC;AAC/E,UAAA,WAAWC,kCAAiB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAOtF,WAAQC,2BAAA,IAAAC,OAAA,QAAA,EAAQ,GAAG,OAAO,SAAoB,CAAA;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACjD,UAAA,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAOC,QAAc,cAAA,uCAAuC,OAAO,QAAQ,WAAW;AAAA,MAAA;AAEvF,aAAOA,QAAc,cAAA,0BAA0B,OAAO,QAAQ,WAAW;AAAA,IAC1E;AAAA,IACA,cAAc,WAEZC,2BAAA,KAAAC,WAAA,UAAA,EAAA,UAAA;AAAA,MAAAD,2BAAA,KAACF,OAAQ,QAAA,EAAA,GAAG,OAAO,UAAU,GAC5B,UAAA;AAAA,QAACD,2BAAAA,IAAAK,MAAA,OAAA,EAAM,OAAOC,QAAkB,iBAAA,CAAA;AAAA,QAC/B,MAAM;AAAA,MAAA,GACR;AAAA,MACC,MAAM,cAAc,gBAAgB,SACpCN,2BAAA;AAAA,QAACO,sBAAA;AAAA,QAAA;AAAA,UACA,YAAY,MAAM;AAAA,UAClB,oBAAoB,MAAM;AAAA,UAC1B,QAAQ,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACf,GAEF;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AACzD,aAAAC,mCAA2B,kCAAkC,aAAa,KAAK;AAAA,IAAA;AAAA,EAExF;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"EntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/EntitySubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode } from 'react'\nimport { useEntitySubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\nimport { Field } from './Field'\nimport { SetOrderFieldOnCreate, SetOrderFieldOnCreateOwnProps } from '../accessorSorting'\n\nexport interface EntitySubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntitySubTreeAdditionalCreationProps = {} | SetOrderFieldOnCreateOwnProps\n\nexport type EntitySubTreeProps<EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntitySubTreeAdditionalProps\n\t& (\n\t\t| SugaredQualifiedSingleEntity\n\t\t| (SugaredUnconstrainedQualifiedSingleEntity & EntitySubTreeAdditionalCreationProps)\n\t)\n\n/**\n * Creates a single entity subtree in current data binding context.\n *\n * @example\n * ```\n * <EntitySubTree entity=\"Post(id = $id)\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntitySubTree = Component(\n\t<EntityProps extends {}>(props: EntitySubTreeProps<EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntitySubTree: cannot update isCreating')\n\t\tconst accessor = useEntitySubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\t\t// TODO revive top-level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ? (\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne>\n\t\t// ) : (\n\t\t// \tprops.children\n\t\t// )}\n\t\treturn <Entity {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntitySubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntitySubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t<Entity {...props} accessor={0 as any}>\n\t\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t\t{props.children}\n\t\t\t\t</Entity>\n\t\t\t\t{props.isCreating && 'orderField' in props && (\n\t\t\t\t\t<SetOrderFieldOnCreate\n\t\t\t\t\t\torderField={props.orderField}\n\t\t\t\t\t\tnewOrderFieldValue={props.newOrderFieldValue}\n\t\t\t\t\t\tentity={props.entity}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntitySubtree(environment, props)\n\t\t},\n\t},\n\t'EntitySubTree',\n) as <EntityProps>(pros: EntitySubTreeProps<EntityProps>) => ReactElement\n"],"names":["Component","useConstantValueInvariant","useEntitySubTree","jsx","Entity","MarkerFactory","jsxs","Fragment","Field","PRIMARY_KEY_NAME","SetOrderFieldOnCreate","TreeNodeEnvironmentFactory"],"mappings":";;;;;;;;;;AAqCO,MAAM,gBAAgBA,UAAAA;AAAAA,EAC5B,CAAyB,UAA2C;AACnEC,yCAA0B,MAAM,YAAY,yCAAyC;AACrF,UAAM,WAAWC,kCAAiB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAOtF,WAAOC,2BAAAA,IAACC,OAAAA,QAAA,EAAQ,GAAG,OAAO,SAAA,CAAoB;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,UAAI,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAOC,QAAAA,cAAc,uCAAuC,OAAO,QAAQ,WAAW;AAAA,MACvF;AACA,aAAOA,QAAAA,cAAc,0BAA0B,OAAO,QAAQ,WAAW;AAAA,IAC1E;AAAA,IACA,cAAc,WACbC,2BAAAA,KAAAC,WAAAA,UAAA,EACC,UAAA;AAAA,MAAAD,2BAAAA,KAACF,OAAAA,QAAA,EAAQ,GAAG,OAAO,UAAU,GAC5B,UAAA;AAAA,QAAAD,2BAAAA,IAACK,MAAAA,OAAA,EAAM,OAAOC,QAAAA,iBAAA,CAAkB;AAAA,QAC/B,MAAM;AAAA,MAAA,GACR;AAAA,MACC,MAAM,cAAc,gBAAgB,SACpCN,2BAAAA;AAAAA,QAACO,sBAAAA;AAAAA,QAAA;AAAA,UACA,YAAY,MAAM;AAAA,UAClB,oBAAoB,MAAM;AAAA,UAC1B,QAAQ,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACf,GAEF;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AAChE,aAAOC,mCAA2B,kCAAkC,aAAa,KAAK;AAAA,IACvF;AAAA,EAAA;AAAA,EAED;AACD;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useConstantValueInvariant } from "@contember/react-utils";
3
- import { MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from "@contember/binding";
3
+ import { TreeNodeEnvironmentFactory, PRIMARY_KEY_NAME, MarkerFactory } from "@contember/binding";
4
4
  import { Component } from "./Component.js";
5
5
  import { Entity } from "./Entity.js";
6
6
  import { Field } from "./Field.js";
@@ -1 +1 @@
1
- {"version":3,"file":"EntitySubTree.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntitySubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode } from 'react'\nimport { useEntitySubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\nimport { Field } from './Field'\nimport { SetOrderFieldOnCreate, SetOrderFieldOnCreateOwnProps } from '../accessorSorting'\n\nexport interface EntitySubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntitySubTreeAdditionalCreationProps = {} | SetOrderFieldOnCreateOwnProps\n\nexport type EntitySubTreeProps<EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntitySubTreeAdditionalProps\n\t& (\n\t\t| SugaredQualifiedSingleEntity\n\t\t| (SugaredUnconstrainedQualifiedSingleEntity & EntitySubTreeAdditionalCreationProps)\n\t)\n\n/**\n * Creates a single entity subtree in current data binding context.\n *\n * @example\n * ```\n * <EntitySubTree entity=\"Post(id = $id)\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntitySubTree = Component(\n\t<EntityProps extends {}>(props: EntitySubTreeProps<EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntitySubTree: cannot update isCreating')\n\t\tconst accessor = useEntitySubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\t\t// TODO revive top-level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ? (\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne>\n\t\t// ) : (\n\t\t// \tprops.children\n\t\t// )}\n\t\treturn <Entity {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntitySubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntitySubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t<Entity {...props} accessor={0 as any}>\n\t\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t\t{props.children}\n\t\t\t\t</Entity>\n\t\t\t\t{props.isCreating && 'orderField' in props && (\n\t\t\t\t\t<SetOrderFieldOnCreate\n\t\t\t\t\t\torderField={props.orderField}\n\t\t\t\t\t\tnewOrderFieldValue={props.newOrderFieldValue}\n\t\t\t\t\t\tentity={props.entity}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntitySubtree(environment, props)\n\t\t},\n\t},\n\t'EntitySubTree',\n) as <EntityProps>(pros: EntitySubTreeProps<EntityProps>) => ReactElement\n"],"names":[],"mappings":";;;;;;;;AAqCO,MAAM,gBAAgB;AAAA,EAC5B,CAAyB,UAA2C;AACzC,8BAAA,MAAM,YAAY,yCAAyC;AAC/E,UAAA,WAAW,iBAAiB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAOtF,WAAQ,oBAAA,QAAA,EAAQ,GAAG,OAAO,SAAoB,CAAA;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACjD,UAAA,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAO,cAAc,uCAAuC,OAAO,QAAQ,WAAW;AAAA,MAAA;AAEvF,aAAO,cAAc,0BAA0B,OAAO,QAAQ,WAAW;AAAA,IAC1E;AAAA,IACA,cAAc,WAEZ,qBAAA,UAAA,EAAA,UAAA;AAAA,MAAA,qBAAC,QAAQ,EAAA,GAAG,OAAO,UAAU,GAC5B,UAAA;AAAA,QAAC,oBAAA,OAAA,EAAM,OAAO,iBAAkB,CAAA;AAAA,QAC/B,MAAM;AAAA,MAAA,GACR;AAAA,MACC,MAAM,cAAc,gBAAgB,SACpC;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,YAAY,MAAM;AAAA,UAClB,oBAAoB,MAAM;AAAA,UAC1B,QAAQ,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACf,GAEF;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AACzD,aAAA,2BAA2B,kCAAkC,aAAa,KAAK;AAAA,IAAA;AAAA,EAExF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"EntitySubTree.js","sources":["../../../../../packages/react-binding/src/coreComponents/EntitySubTree.tsx"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode } from 'react'\nimport { useEntitySubTree } from '../accessorPropagation'\nimport type { SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { Environment, MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from '@contember/binding'\nimport { Component } from './Component'\nimport { Entity } from './Entity'\nimport { Field } from './Field'\nimport { SetOrderFieldOnCreate, SetOrderFieldOnCreateOwnProps } from '../accessorSorting'\n\nexport interface EntitySubTreeAdditionalProps {\n\tvariables?: Environment.ValuesMapWithFactory\n}\n\nexport type EntitySubTreeAdditionalCreationProps = {} | SetOrderFieldOnCreateOwnProps\n\nexport type EntitySubTreeProps<EntityProps> =\n\t& {\n\t\ttreeRootId?: TreeRootId\n\t\tchildren?: ReactNode\n\t}\n\t& EntitySubTreeAdditionalProps\n\t& (\n\t\t| SugaredQualifiedSingleEntity\n\t\t| (SugaredUnconstrainedQualifiedSingleEntity & EntitySubTreeAdditionalCreationProps)\n\t)\n\n/**\n * Creates a single entity subtree in current data binding context.\n *\n * @example\n * ```\n * <EntitySubTree entity=\"Post(id = $id)\" />\n * ```\n *\n * @group Data binding\n */\nexport const EntitySubTree = Component(\n\t<EntityProps extends {}>(props: EntitySubTreeProps<EntityProps>) => {\n\t\tuseConstantValueInvariant(props.isCreating, 'EntitySubTree: cannot update isCreating')\n\t\tconst accessor = useEntitySubTree(props, ...props.treeRootId ? [props.treeRootId] : [])\n\t\t// TODO revive top-level hasOneRelationPath\n\t\t// {parameters.value.hasOneRelationPath.length ? (\n\t\t// \t<HasOne field={parameters.value.hasOneRelationPath}>{props.children}</HasOne>\n\t\t// ) : (\n\t\t// \tprops.children\n\t\t// )}\n\t\treturn <Entity {...props} accessor={accessor} />\n\t},\n\t{\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tif ('isCreating' in props && props.isCreating) {\n\t\t\t\treturn MarkerFactory.createUnconstrainedEntitySubTreeMarker(props, fields, environment)\n\t\t\t}\n\t\t\treturn MarkerFactory.createEntitySubTreeMarker(props, fields, environment)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t<Entity {...props} accessor={0 as any}>\n\t\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t\t{props.children}\n\t\t\t\t</Entity>\n\t\t\t\t{props.isCreating && 'orderField' in props && (\n\t\t\t\t\t<SetOrderFieldOnCreate\n\t\t\t\t\t\torderField={props.orderField}\n\t\t\t\t\t\tnewOrderFieldValue={props.newOrderFieldValue}\n\t\t\t\t\t\tentity={props.entity}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t),\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntitySubtree(environment, props)\n\t\t},\n\t},\n\t'EntitySubTree',\n) as <EntityProps>(pros: EntitySubTreeProps<EntityProps>) => ReactElement\n"],"names":[],"mappings":";;;;;;;;AAqCO,MAAM,gBAAgB;AAAA,EAC5B,CAAyB,UAA2C;AACnE,8BAA0B,MAAM,YAAY,yCAAyC;AACrF,UAAM,WAAW,iBAAiB,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,UAAU,IAAI,EAAE;AAOtF,WAAO,oBAAC,QAAA,EAAQ,GAAG,OAAO,SAAA,CAAoB;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,UAAI,gBAAgB,SAAS,MAAM,YAAY;AAC9C,eAAO,cAAc,uCAAuC,OAAO,QAAQ,WAAW;AAAA,MACvF;AACA,aAAO,cAAc,0BAA0B,OAAO,QAAQ,WAAW;AAAA,IAC1E;AAAA,IACA,cAAc,WACb,qBAAA,UAAA,EACC,UAAA;AAAA,MAAA,qBAAC,QAAA,EAAQ,GAAG,OAAO,UAAU,GAC5B,UAAA;AAAA,QAAA,oBAAC,OAAA,EAAM,OAAO,iBAAA,CAAkB;AAAA,QAC/B,MAAM;AAAA,MAAA,GACR;AAAA,MACC,MAAM,cAAc,gBAAgB,SACpC;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,YAAY,MAAM;AAAA,UAClB,oBAAoB,MAAM;AAAA,UAC1B,QAAQ,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACf,GAEF;AAAA,IAED,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AAChE,aAAO,2BAA2B,kCAAkC,aAAa,KAAK;AAAA,IACvF;AAAA,EAAA;AAAA,EAED;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Field.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Field.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react'\nimport { useField } from '../accessorPropagation'\nimport { MarkerFactory } from '@contember/binding'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { Component } from './Component'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport interface FieldBasicProps extends SugaredRelativeSingleField {}\n\nexport interface FieldRuntimeProps<Persisted extends FieldValue = FieldValue> {\n\tformat?: (value: Persisted | null) => ReactNode\n}\n\nexport interface FieldProps<Persisted extends FieldValue = FieldValue>\n\textends FieldBasicProps,\n\tFieldRuntimeProps<Persisted> {}\n\n/**\n * @group Data binding\n */\nexport const Field = Component(\n\t<Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => {\n\t\tconst field = useField<Persisted>(props)\n\n\t\tif (props.format !== undefined) {\n\t\t\treturn <>{props.format(field.value)}</>\n\t\t}\n\n\t\tif (\n\t\t\tfield.value === null ||\n\t\t\ttypeof field.value === 'boolean'\n\t\t) {\n\t\t\treturn null\n\t\t}\n\t\treturn <>{field.value}</>\n\t},\n\t{\n\t\tgenerateLeafMarker: (props, environment) => MarkerFactory.createFieldMarker(props, environment),\n\t\tgenerateEnvironment: (props, environment) => {\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForField(environment, props)\n\t\t},\n\t},\n\t'Field',\n) as <Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => ReactElement\n"],"names":["Component","useField","jsx","Fragment","MarkerFactory","TreeNodeEnvironmentFactory"],"mappings":";;;;;;AAoBO,MAAM,QAAQA,UAAA;AAAA,EACpB,CAA4C,UAAiC;AACtE,UAAA,QAAQC,kBAAoB,KAAK;AAEnC,QAAA,MAAM,WAAW,QAAW;AAC/B,aAAUC,2BAAA,IAAAC,WAAA,UAAA,EAAA,UAAA,MAAM,OAAO,MAAM,KAAK,GAAE;AAAA,IAAA;AAGrC,QACC,MAAM,UAAU,QAChB,OAAO,MAAM,UAAU,WACtB;AACM,aAAA;AAAA,IAAA;AAED,WAAAD,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,gBAAM,MAAM,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,IACC,oBAAoB,CAAC,OAAO,gBAAgBC,QAAc,cAAA,kBAAkB,OAAO,WAAW;AAAA,IAC9F,qBAAqB,CAAC,OAAO,gBAAgB;AACrC,aAAAC,mCAA2B,0BAA0B,aAAa,KAAK;AAAA,IAAA;AAAA,EAEhF;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"Field.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/Field.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react'\nimport { useField } from '../accessorPropagation'\nimport { MarkerFactory } from '@contember/binding'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { Component } from './Component'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport interface FieldBasicProps extends SugaredRelativeSingleField {}\n\nexport interface FieldRuntimeProps<Persisted extends FieldValue = FieldValue> {\n\tformat?: (value: Persisted | null) => ReactNode\n}\n\nexport interface FieldProps<Persisted extends FieldValue = FieldValue> extends FieldBasicProps, FieldRuntimeProps<Persisted> {}\n\n/**\n * @group Data binding\n */\nexport const Field = Component(\n\t<Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => {\n\t\tconst field = useField<Persisted>(props)\n\n\t\tif (props.format !== undefined) {\n\t\t\treturn <>{props.format(field.value)}</>\n\t\t}\n\n\t\tif (\n\t\t\tfield.value === null\n\t\t\t|| typeof field.value === 'boolean'\n\t\t) {\n\t\t\treturn null\n\t\t}\n\t\treturn <>{field.value}</>\n\t},\n\t{\n\t\tgenerateLeafMarker: (props, environment) => MarkerFactory.createFieldMarker(props, environment),\n\t\tgenerateEnvironment: (props, environment) => {\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForField(environment, props)\n\t\t},\n\t},\n\t'Field',\n) as <Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => ReactElement\n"],"names":["Component","useField","jsx","Fragment","MarkerFactory","TreeNodeEnvironmentFactory"],"mappings":";;;;;;AAkBO,MAAM,QAAQA,UAAAA;AAAAA,EACpB,CAA4C,UAAiC;AAC5E,UAAM,QAAQC,SAAAA,SAAoB,KAAK;AAEvC,QAAI,MAAM,WAAW,QAAW;AAC/B,aAAOC,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,UAAA,MAAM,OAAO,MAAM,KAAK,GAAE;AAAA,IACrC;AAEA,QACC,MAAM,UAAU,QACb,OAAO,MAAM,UAAU,WACzB;AACD,aAAO;AAAA,IACR;AACA,WAAOD,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,gBAAM,MAAA,CAAM;AAAA,EACvB;AAAA,EACA;AAAA,IACC,oBAAoB,CAAC,OAAO,gBAAgBC,QAAAA,cAAc,kBAAkB,OAAO,WAAW;AAAA,IAC9F,qBAAqB,CAAC,OAAO,gBAAgB;AAC5C,aAAOC,mCAA2B,0BAA0B,aAAa,KAAK;AAAA,IAC/E;AAAA,EAAA;AAAA,EAED;AACD;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment } from "react/jsx-runtime";
2
- import { MarkerFactory, TreeNodeEnvironmentFactory } from "@contember/binding";
2
+ import { TreeNodeEnvironmentFactory, MarkerFactory } from "@contember/binding";
3
3
  import { Component } from "./Component.js";
4
4
  import { useField } from "../accessorPropagation/useField.js";
5
5
  const Field = Component(
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sources":["../../../../../packages/react-binding/src/coreComponents/Field.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react'\nimport { useField } from '../accessorPropagation'\nimport { MarkerFactory } from '@contember/binding'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { Component } from './Component'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport interface FieldBasicProps extends SugaredRelativeSingleField {}\n\nexport interface FieldRuntimeProps<Persisted extends FieldValue = FieldValue> {\n\tformat?: (value: Persisted | null) => ReactNode\n}\n\nexport interface FieldProps<Persisted extends FieldValue = FieldValue>\n\textends FieldBasicProps,\n\tFieldRuntimeProps<Persisted> {}\n\n/**\n * @group Data binding\n */\nexport const Field = Component(\n\t<Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => {\n\t\tconst field = useField<Persisted>(props)\n\n\t\tif (props.format !== undefined) {\n\t\t\treturn <>{props.format(field.value)}</>\n\t\t}\n\n\t\tif (\n\t\t\tfield.value === null ||\n\t\t\ttypeof field.value === 'boolean'\n\t\t) {\n\t\t\treturn null\n\t\t}\n\t\treturn <>{field.value}</>\n\t},\n\t{\n\t\tgenerateLeafMarker: (props, environment) => MarkerFactory.createFieldMarker(props, environment),\n\t\tgenerateEnvironment: (props, environment) => {\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForField(environment, props)\n\t\t},\n\t},\n\t'Field',\n) as <Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => ReactElement\n"],"names":[],"mappings":";;;;AAoBO,MAAM,QAAQ;AAAA,EACpB,CAA4C,UAAiC;AACtE,UAAA,QAAQ,SAAoB,KAAK;AAEnC,QAAA,MAAM,WAAW,QAAW;AAC/B,aAAU,oBAAA,UAAA,EAAA,UAAA,MAAM,OAAO,MAAM,KAAK,GAAE;AAAA,IAAA;AAGrC,QACC,MAAM,UAAU,QAChB,OAAO,MAAM,UAAU,WACtB;AACM,aAAA;AAAA,IAAA;AAED,WAAA,oBAAA,UAAA,EAAG,gBAAM,MAAM,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,IACC,oBAAoB,CAAC,OAAO,gBAAgB,cAAc,kBAAkB,OAAO,WAAW;AAAA,IAC9F,qBAAqB,CAAC,OAAO,gBAAgB;AACrC,aAAA,2BAA2B,0BAA0B,aAAa,KAAK;AAAA,IAAA;AAAA,EAEhF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"Field.js","sources":["../../../../../packages/react-binding/src/coreComponents/Field.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react'\nimport { useField } from '../accessorPropagation'\nimport { MarkerFactory } from '@contember/binding'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { Component } from './Component'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport interface FieldBasicProps extends SugaredRelativeSingleField {}\n\nexport interface FieldRuntimeProps<Persisted extends FieldValue = FieldValue> {\n\tformat?: (value: Persisted | null) => ReactNode\n}\n\nexport interface FieldProps<Persisted extends FieldValue = FieldValue> extends FieldBasicProps, FieldRuntimeProps<Persisted> {}\n\n/**\n * @group Data binding\n */\nexport const Field = Component(\n\t<Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => {\n\t\tconst field = useField<Persisted>(props)\n\n\t\tif (props.format !== undefined) {\n\t\t\treturn <>{props.format(field.value)}</>\n\t\t}\n\n\t\tif (\n\t\t\tfield.value === null\n\t\t\t|| typeof field.value === 'boolean'\n\t\t) {\n\t\t\treturn null\n\t\t}\n\t\treturn <>{field.value}</>\n\t},\n\t{\n\t\tgenerateLeafMarker: (props, environment) => MarkerFactory.createFieldMarker(props, environment),\n\t\tgenerateEnvironment: (props, environment) => {\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForField(environment, props)\n\t\t},\n\t},\n\t'Field',\n) as <Persisted extends FieldValue = FieldValue>(props: FieldProps<Persisted>) => ReactElement\n"],"names":[],"mappings":";;;;AAkBO,MAAM,QAAQ;AAAA,EACpB,CAA4C,UAAiC;AAC5E,UAAM,QAAQ,SAAoB,KAAK;AAEvC,QAAI,MAAM,WAAW,QAAW;AAC/B,aAAO,oBAAA,UAAA,EAAG,UAAA,MAAM,OAAO,MAAM,KAAK,GAAE;AAAA,IACrC;AAEA,QACC,MAAM,UAAU,QACb,OAAO,MAAM,UAAU,WACzB;AACD,aAAO;AAAA,IACR;AACA,WAAO,oBAAA,UAAA,EAAG,gBAAM,MAAA,CAAM;AAAA,EACvB;AAAA,EACA;AAAA,IACC,oBAAoB,CAAC,OAAO,gBAAgB,cAAc,kBAAkB,OAAO,WAAW;AAAA,IAC9F,qBAAqB,CAAC,OAAO,gBAAgB;AAC5C,aAAO,2BAA2B,0BAA0B,aAAa,KAAK;AAAA,IAC/E;AAAA,EAAA;AAAA,EAED;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HasMany.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/HasMany.tsx"],"sourcesContent":["import type { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityList } from '../accessorPropagation'\nimport { PRIMARY_KEY_NAME } from '@contember/binding'\nimport { Environment } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport type HasManyProps<ListProps = never, EntityProps = never> = SugaredRelativeEntityList & {\n\tchildren?: ReactNode\n\tvariables?: Environment.ValuesMapWithFactory\n} & (\n\t| {}\n\t| {\n\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\tlistProps?: ListProps\n\t\t }\n)\n\n/**\n * @group Data binding\n */\nexport const HasMany = Component(\n\t<ListProps, EntityProps>(props: HasManyProps<ListProps, EntityProps>) => {\n\t\tconst entityList = useEntityList(props)\n\n\t\treturn <EntityList {...props} accessor={entityList} />\n\t},\n\t{\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityList(environment, props)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={undefined as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) =>\n\t\t\tMarkerFactory.createRelativeEntityListFields(props, environment, fields),\n\t},\n\t'HasMany',\n) as <ListProps, EntityProps>(props: HasManyProps<ListProps, EntityProps>) => ReactElement\n"],"names":["Component","useEntityList","jsx","EntityList","TreeNodeEnvironmentFactory","jsxs","Field","PRIMARY_KEY_NAME","MarkerFactory"],"mappings":";;;;;;;;AAyBO,MAAM,UAAUA,UAAA;AAAA,EACtB,CAAyB,UAAgD;AAClE,UAAA,aAAaC,4BAAc,KAAK;AAEtC,WAAQC,2BAAAA,IAAAC,WAAAA,YAAA,EAAY,GAAG,OAAO,UAAU,YAAY;AAAA,EACrD;AAAA,EACA;AAAA,IACC,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AACzD,aAAAC,mCAA2B,+BAA+B,aAAa,KAAK;AAAA,IACpF;AAAA,IACA,cAAc,CACb,UAAAC,2BAAAA,KAACF,yBAAY,GAAG,OAAO,UAAU,QAChC,UAAA;AAAA,MAACD,2BAAAA,IAAAI,MAAA,OAAA,EAAM,OAAOC,QAAkB,iBAAA,CAAA;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,sBAAsB,CAAC,OAAO,QAAQ,gBACrCC,QAAAA,cAAc,+BAA+B,OAAO,aAAa,MAAM;AAAA,EACzE;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"HasMany.cjs","sources":["../../../../../packages/react-binding/src/coreComponents/HasMany.tsx"],"sourcesContent":["import type { ComponentType, ReactElement, ReactNode } from 'react'\nimport { useEntityList } from '../accessorPropagation'\nimport { PRIMARY_KEY_NAME } from '@contember/binding'\nimport { Environment } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { Component } from './Component'\nimport { EntityList, EntityListBaseProps } from './EntityList'\nimport { Field } from './Field'\nimport { TreeNodeEnvironmentFactory } from '@contember/binding'\n\nexport type HasManyProps<ListProps = never, EntityProps = never> =\n\t& SugaredRelativeEntityList\n\t& {\n\t\tchildren?: ReactNode\n\t\tvariables?: Environment.ValuesMapWithFactory\n\t}\n\t& (\n\t\t| {}\n\t\t| {\n\t\t\tlistComponent: ComponentType<ListProps & EntityListBaseProps>\n\t\t\tlistProps?: ListProps\n\t\t}\n\t)\n\n/**\n * @group Data binding\n */\nexport const HasMany = Component(\n\t<ListProps, EntityProps>(props: HasManyProps<ListProps, EntityProps>) => {\n\t\tconst entityList = useEntityList(props)\n\n\t\treturn <EntityList {...props} accessor={entityList} />\n\t},\n\t{\n\t\tgenerateEnvironment: (props, oldEnvironment) => {\n\t\t\tconst environment = oldEnvironment.withVariables(props.variables)\n\t\t\treturn TreeNodeEnvironmentFactory.createEnvironmentForEntityList(environment, props)\n\t\t},\n\t\tstaticRender: props => (\n\t\t\t<EntityList {...props} accessor={undefined as any}>\n\t\t\t\t<Field field={PRIMARY_KEY_NAME} />\n\t\t\t\t{props.children}\n\t\t\t</EntityList>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) => MarkerFactory.createRelativeEntityListFields(props, environment, fields),\n\t},\n\t'HasMany',\n) as <ListProps, EntityProps>(props: HasManyProps<ListProps, EntityProps>) => ReactElement\n"],"names":["Component","useEntityList","jsx","EntityList","TreeNodeEnvironmentFactory","jsxs","Field","PRIMARY_KEY_NAME","MarkerFactory"],"mappings":";;;;;;;;AA4BO,MAAM,UAAUA,UAAAA;AAAAA,EACtB,CAAyB,UAAgD;AACxE,UAAM,aAAaC,cAAAA,cAAc,KAAK;AAEtC,WAAOC,2BAAAA,IAACC,WAAAA,YAAA,EAAY,GAAG,OAAO,UAAU,YAAY;AAAA,EACrD;AAAA,EACA;AAAA,IACC,qBAAqB,CAAC,OAAO,mBAAmB;AAC/C,YAAM,cAAc,eAAe,cAAc,MAAM,SAAS;AAChE,aAAOC,mCAA2B,+BAA+B,aAAa,KAAK;AAAA,IACpF;AAAA,IACA,cAAc,CAAA,UACbC,2BAAAA,KAACF,WAAAA,cAAY,GAAG,OAAO,UAAU,QAChC,UAAA;AAAA,MAAAD,2BAAAA,IAACI,MAAAA,OAAA,EAAM,OAAOC,QAAAA,iBAAA,CAAkB;AAAA,MAC/B,MAAM;AAAA,IAAA,GACR;AAAA,IAED,sBAAsB,CAAC,OAAO,QAAQ,gBAAgBC,QAAAA,cAAc,+BAA+B,OAAO,aAAa,MAAM;AAAA,EAAA;AAAA,EAE9H;AACD;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { TreeNodeEnvironmentFactory, PRIMARY_KEY_NAME, MarkerFactory } from "@contember/binding";
2
+ import { MarkerFactory, PRIMARY_KEY_NAME, TreeNodeEnvironmentFactory } from "@contember/binding";
3
3
  import { Component } from "./Component.js";
4
4
  import { EntityList } from "./EntityList.js";
5
5
  import { Field } from "./Field.js";