@contember/react-binding 2.1.0-alpha.9 → 2.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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":"useEntityEvent.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityEvent.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport function useEntityEvent(\n\ttype: 'beforePersist',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforePersist'],\n): void\nexport function useEntityEvent(\n\ttype: 'beforeUpdate',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforeUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'connectionUpdate',\n\thasOneField: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistError',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistError'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistSuccess',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistSuccess'],\n): void\nexport function useEntityEvent(\n\ttype: 'update',\n\tlistener: EntityAccessor.EntityEventListenerMap['update']\n): void\n\nexport function useEntityEvent(type: keyof EntityAccessor.RuntimeEntityEventListenerMap, fieldOrListenerIn: unknown, listenerIn?: unknown): void {\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst potentiallyStaleParent = getEntityByKey(entityKey)\n\t// The identity of this function is guaranteed to be stable\n\tconst stableGetEntityReference = potentiallyStaleParent.getAccessor\n\n\tconst fieldName = typeof fieldOrListenerIn === 'string' ? fieldOrListenerIn : undefined\n\tconst listener = useReferentiallyStableCallback(\n\t\t(typeof fieldOrListenerIn === 'function' ? fieldOrListenerIn : listenerIn) as any,\n\t)\n\n\tuseEffect(() => {\n\t\t// addEventListener returns an unsubscribe function, which we're deliberately re-returning from here.\n\t\tconst entityAccessor = stableGetEntityReference()\n\t\tif (type === 'connectionUpdate') {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type, key: fieldName },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t} else {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t}\n\t}, [fieldName, listener, stableGetEntityReference, type])\n}\n"],"names":["useEntityKey","useGetEntityByKey","useReferentiallyStableCallback","useEffect"],"mappings":";;;;;;AAgCgB,SAAA,eAAe,MAA0D,mBAA4B,YAA4B;AAChJ,QAAM,YAAYA,aAAAA,aAAa;AAC/B,QAAM,iBAAiBC,kBAAAA,kBAAkB;AACnC,QAAA,yBAAyB,eAAe,SAAS;AAEvD,QAAM,2BAA2B,uBAAuB;AAExD,QAAM,YAAY,OAAO,sBAAsB,WAAW,oBAAoB;AAC9E,QAAM,WAAWC,WAAA;AAAA,IACf,OAAO,sBAAsB,aAAa,oBAAoB;AAAA,EAChE;AAEAC,QAAAA,UAAU,MAAM;AAEf,UAAM,iBAAiB,yBAAyB;AAChD,QAAI,SAAS,oBAAoB;AAChC,aAAO,eAAe;AAAA,QACrB,EAAE,MAAM,KAAK,UAAU;AAAA,QACvB;AAAA,MACD;AAAA,IAAA,OACM;AACN,aAAO,eAAe;AAAA,QACrB,EAAE,KAAK;AAAA,QACP;AAAA,MACD;AAAA,IAAA;AAAA,KAEC,CAAC,WAAW,UAAU,0BAA0B,IAAI,CAAC;AACzD;;"}
1
+ {"version":3,"file":"useEntityEvent.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityEvent.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport function useEntityEvent(\n\ttype: 'beforePersist',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforePersist'],\n): void\nexport function useEntityEvent(\n\ttype: 'beforeUpdate',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforeUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'connectionUpdate',\n\thasOneField: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistError',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistError'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistSuccess',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistSuccess'],\n): void\nexport function useEntityEvent(\n\ttype: 'update',\n\tlistener: EntityAccessor.EntityEventListenerMap['update'],\n): void\n\nexport function useEntityEvent(type: keyof EntityAccessor.RuntimeEntityEventListenerMap, fieldOrListenerIn: unknown, listenerIn?: unknown): void {\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst potentiallyStaleParent = getEntityByKey(entityKey)\n\t// The identity of this function is guaranteed to be stable\n\tconst stableGetEntityReference = potentiallyStaleParent.getAccessor\n\n\tconst fieldName = typeof fieldOrListenerIn === 'string' ? fieldOrListenerIn : undefined\n\tconst listener = useReferentiallyStableCallback(\n\t\t(typeof fieldOrListenerIn === 'function' ? fieldOrListenerIn : listenerIn) as any,\n\t)\n\n\tuseEffect(() => {\n\t\t// addEventListener returns an unsubscribe function, which we're deliberately re-returning from here.\n\t\tconst entityAccessor = stableGetEntityReference()\n\t\tif (type === 'connectionUpdate') {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type, key: fieldName },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t} else {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t}\n\t}, [fieldName, listener, stableGetEntityReference, type])\n}\n"],"names":["useEntityKey","useGetEntityByKey","useReferentiallyStableCallback","useEffect"],"mappings":";;;;;;AAgCO,SAAS,eAAe,MAA0D,mBAA4B,YAA4B;AAChJ,QAAM,YAAYA,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,yBAAyB,eAAe,SAAS;AAEvD,QAAM,2BAA2B,uBAAuB;AAExD,QAAM,YAAY,OAAO,sBAAsB,WAAW,oBAAoB;AAC9E,QAAM,WAAWC,WAAAA;AAAAA,IACf,OAAO,sBAAsB,aAAa,oBAAoB;AAAA,EAAA;AAGhEC,QAAAA,UAAU,MAAM;AAEf,UAAM,iBAAiB,yBAAA;AACvB,QAAI,SAAS,oBAAoB;AAChC,aAAO,eAAe;AAAA,QACrB,EAAE,MAAM,KAAK,UAAA;AAAA,QACb;AAAA,MAAA;AAAA,IAEF,OAAO;AACN,aAAO,eAAe;AAAA,QACrB,EAAE,KAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEF;AAAA,EACD,GAAG,CAAC,WAAW,UAAU,0BAA0B,IAAI,CAAC;AACzD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityEvent.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityEvent.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport function useEntityEvent(\n\ttype: 'beforePersist',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforePersist'],\n): void\nexport function useEntityEvent(\n\ttype: 'beforeUpdate',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforeUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'connectionUpdate',\n\thasOneField: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistError',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistError'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistSuccess',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistSuccess'],\n): void\nexport function useEntityEvent(\n\ttype: 'update',\n\tlistener: EntityAccessor.EntityEventListenerMap['update']\n): void\n\nexport function useEntityEvent(type: keyof EntityAccessor.RuntimeEntityEventListenerMap, fieldOrListenerIn: unknown, listenerIn?: unknown): void {\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst potentiallyStaleParent = getEntityByKey(entityKey)\n\t// The identity of this function is guaranteed to be stable\n\tconst stableGetEntityReference = potentiallyStaleParent.getAccessor\n\n\tconst fieldName = typeof fieldOrListenerIn === 'string' ? fieldOrListenerIn : undefined\n\tconst listener = useReferentiallyStableCallback(\n\t\t(typeof fieldOrListenerIn === 'function' ? fieldOrListenerIn : listenerIn) as any,\n\t)\n\n\tuseEffect(() => {\n\t\t// addEventListener returns an unsubscribe function, which we're deliberately re-returning from here.\n\t\tconst entityAccessor = stableGetEntityReference()\n\t\tif (type === 'connectionUpdate') {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type, key: fieldName },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t} else {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t}\n\t}, [fieldName, listener, stableGetEntityReference, type])\n}\n"],"names":[],"mappings":";;;;AAgCgB,SAAA,eAAe,MAA0D,mBAA4B,YAA4B;AAChJ,QAAM,YAAY,aAAa;AAC/B,QAAM,iBAAiB,kBAAkB;AACnC,QAAA,yBAAyB,eAAe,SAAS;AAEvD,QAAM,2BAA2B,uBAAuB;AAExD,QAAM,YAAY,OAAO,sBAAsB,WAAW,oBAAoB;AAC9E,QAAM,WAAW;AAAA,IACf,OAAO,sBAAsB,aAAa,oBAAoB;AAAA,EAChE;AAEA,YAAU,MAAM;AAEf,UAAM,iBAAiB,yBAAyB;AAChD,QAAI,SAAS,oBAAoB;AAChC,aAAO,eAAe;AAAA,QACrB,EAAE,MAAM,KAAK,UAAU;AAAA,QACvB;AAAA,MACD;AAAA,IAAA,OACM;AACN,aAAO,eAAe;AAAA,QACrB,EAAE,KAAK;AAAA,QACP;AAAA,MACD;AAAA,IAAA;AAAA,KAEC,CAAC,WAAW,UAAU,0BAA0B,IAAI,CAAC;AACzD;"}
1
+ {"version":3,"file":"useEntityEvent.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityEvent.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport function useEntityEvent(\n\ttype: 'beforePersist',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforePersist'],\n): void\nexport function useEntityEvent(\n\ttype: 'beforeUpdate',\n\tlistener: EntityAccessor.EntityEventListenerMap['beforeUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'connectionUpdate',\n\thasOneField: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistError',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistError'],\n): void\nexport function useEntityEvent(\n\ttype: 'persistSuccess',\n\tlistener: EntityAccessor.EntityEventListenerMap['persistSuccess'],\n): void\nexport function useEntityEvent(\n\ttype: 'update',\n\tlistener: EntityAccessor.EntityEventListenerMap['update'],\n): void\n\nexport function useEntityEvent(type: keyof EntityAccessor.RuntimeEntityEventListenerMap, fieldOrListenerIn: unknown, listenerIn?: unknown): void {\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst potentiallyStaleParent = getEntityByKey(entityKey)\n\t// The identity of this function is guaranteed to be stable\n\tconst stableGetEntityReference = potentiallyStaleParent.getAccessor\n\n\tconst fieldName = typeof fieldOrListenerIn === 'string' ? fieldOrListenerIn : undefined\n\tconst listener = useReferentiallyStableCallback(\n\t\t(typeof fieldOrListenerIn === 'function' ? fieldOrListenerIn : listenerIn) as any,\n\t)\n\n\tuseEffect(() => {\n\t\t// addEventListener returns an unsubscribe function, which we're deliberately re-returning from here.\n\t\tconst entityAccessor = stableGetEntityReference()\n\t\tif (type === 'connectionUpdate') {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type, key: fieldName },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t} else {\n\t\t\treturn entityAccessor.addEventListener(\n\t\t\t\t{ type },\n\t\t\t\tlistener,\n\t\t\t)\n\t\t}\n\t}, [fieldName, listener, stableGetEntityReference, type])\n}\n"],"names":[],"mappings":";;;;AAgCO,SAAS,eAAe,MAA0D,mBAA4B,YAA4B;AAChJ,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AACvB,QAAM,yBAAyB,eAAe,SAAS;AAEvD,QAAM,2BAA2B,uBAAuB;AAExD,QAAM,YAAY,OAAO,sBAAsB,WAAW,oBAAoB;AAC9E,QAAM,WAAW;AAAA,IACf,OAAO,sBAAsB,aAAa,oBAAoB;AAAA,EAAA;AAGhE,YAAU,MAAM;AAEf,UAAM,iBAAiB,yBAAA;AACvB,QAAI,SAAS,oBAAoB;AAChC,aAAO,eAAe;AAAA,QACrB,EAAE,MAAM,KAAK,UAAA;AAAA,QACb;AAAA,MAAA;AAAA,IAEF,OAAO;AACN,aAAO,eAAe;AAAA,QACrB,EAAE,KAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEF;AAAA,EACD,GAAG,CAAC,WAAW,UAAU,0BAA0B,IAAI,CAAC;AACzD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPersistError.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistError.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistError = (listener: EntityAccessor.EntityEventListenerMap['persistError']) => {\n\tuseEntityEvent('persistError', listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAGa,MAAA,wBAAwB,CAAC,aAAoE;AACzGA,iBAAA,eAAe,gBAAgB,QAAQ;AACxC;;"}
1
+ {"version":3,"file":"useEntityPersistError.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistError.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistError = (listener: EntityAccessor.EntityEventListenerMap['persistError']) => {\n\tuseEntityEvent('persistError', listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAGO,MAAM,wBAAwB,CAAC,aAAoE;AACzGA,iBAAAA,eAAe,gBAAgB,QAAQ;AACxC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPersistError.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistError.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistError = (listener: EntityAccessor.EntityEventListenerMap['persistError']) => {\n\tuseEntityEvent('persistError', listener)\n}\n"],"names":[],"mappings":";AAGa,MAAA,wBAAwB,CAAC,aAAoE;AACzG,iBAAe,gBAAgB,QAAQ;AACxC;"}
1
+ {"version":3,"file":"useEntityPersistError.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistError.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistError = (listener: EntityAccessor.EntityEventListenerMap['persistError']) => {\n\tuseEntityEvent('persistError', listener)\n}\n"],"names":[],"mappings":";AAGO,MAAM,wBAAwB,CAAC,aAAoE;AACzG,iBAAe,gBAAgB,QAAQ;AACxC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPersistSuccess.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistSuccess.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistSuccess = (listener: EntityAccessor.EntityEventListenerMap['persistSuccess']) => {\n\tuseEntityEvent('persistSuccess', listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAGa,MAAA,0BAA0B,CAAC,aAAsE;AAC7GA,iBAAA,eAAe,kBAAkB,QAAQ;AAC1C;;"}
1
+ {"version":3,"file":"useEntityPersistSuccess.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistSuccess.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistSuccess = (listener: EntityAccessor.EntityEventListenerMap['persistSuccess']) => {\n\tuseEntityEvent('persistSuccess', listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAGO,MAAM,0BAA0B,CAAC,aAAsE;AAC7GA,iBAAAA,eAAe,kBAAkB,QAAQ;AAC1C;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPersistSuccess.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistSuccess.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistSuccess = (listener: EntityAccessor.EntityEventListenerMap['persistSuccess']) => {\n\tuseEntityEvent('persistSuccess', listener)\n}\n"],"names":[],"mappings":";AAGa,MAAA,0BAA0B,CAAC,aAAsE;AAC7G,iBAAe,kBAAkB,QAAQ;AAC1C;"}
1
+ {"version":3,"file":"useEntityPersistSuccess.js","sources":["../../../../../packages/react-binding/src/entityEvents/useEntityPersistSuccess.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useEntityPersistSuccess = (listener: EntityAccessor.EntityEventListenerMap['persistSuccess']) => {\n\tuseEntityEvent('persistSuccess', listener)\n}\n"],"names":[],"mappings":";AAGO,MAAM,0BAA0B,CAAC,aAAsE;AAC7G,iBAAe,kBAAkB,QAAQ;AAC1C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useOnConnectionUpdate.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useOnConnectionUpdate.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useOnConnectionUpdate = (\n\tfieldName: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n) => {\n\tuseEntityEvent('connectionUpdate', fieldName, listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAIa,MAAA,wBAAwB,CACpC,WACA,aACI;AACWA,gCAAA,oBAAoB,WAAW,QAAQ;AACvD;;"}
1
+ {"version":3,"file":"useOnConnectionUpdate.cjs","sources":["../../../../../packages/react-binding/src/entityEvents/useOnConnectionUpdate.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useOnConnectionUpdate = (\n\tfieldName: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n) => {\n\tuseEntityEvent('connectionUpdate', fieldName, listener)\n}\n"],"names":["useEntityEvent"],"mappings":";;;AAIO,MAAM,wBAAwB,CACpC,WACA,aACI;AACJA,gCAAe,oBAAoB,WAAW,QAAQ;AACvD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useOnConnectionUpdate.js","sources":["../../../../../packages/react-binding/src/entityEvents/useOnConnectionUpdate.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useOnConnectionUpdate = (\n\tfieldName: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n) => {\n\tuseEntityEvent('connectionUpdate', fieldName, listener)\n}\n"],"names":[],"mappings":";AAIa,MAAA,wBAAwB,CACpC,WACA,aACI;AACW,iBAAA,oBAAoB,WAAW,QAAQ;AACvD;"}
1
+ {"version":3,"file":"useOnConnectionUpdate.js","sources":["../../../../../packages/react-binding/src/entityEvents/useOnConnectionUpdate.ts"],"sourcesContent":["import type { EntityAccessor } from '@contember/binding'\nimport type { FieldName } from '@contember/binding'\nimport { useEntityEvent } from './useEntityEvent'\n\nexport const useOnConnectionUpdate = (\n\tfieldName: FieldName,\n\tlistener: EntityAccessor.EntityEventListenerMap['connectionUpdate'],\n) => {\n\tuseEntityEvent('connectionUpdate', fieldName, listener)\n}\n"],"names":[],"mappings":";AAIO,MAAM,wBAAwB,CACpC,WACA,aACI;AACJ,iBAAe,oBAAoB,WAAW,QAAQ;AACvD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeferredSubTrees.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DeferredSubTrees.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect, useState } from 'react'\nimport { TreeRootIdProvider, useBindingOperations, useHasEntity, useEnvironment } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\nimport { useEntityBeforePersist } from '../entityEvents'\nimport { EntityFieldMarkersContainer, EntityFieldsWithHoistablesMarker } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { TreeRootId } from '@contember/binding'\nimport { useConstantValueInvariant } from '@contember/react-utils'\nimport { EntityAccessor } from '@contember/binding'\nimport { useMutationState } from '../accessorTree'\n\nexport interface DeferredSubTreesProps {\n\tfallback: ReactNode\n\tchildren: ReactNode\n}\n\ntype LoadState =\n\t| { name: 'initial' }\n\t| { name: 'loading' }\n\t| {\n\t\tname: 'success'\n\t\ttreeRootId: TreeRootId | undefined\n\t }\n\n/**\n * @group Data binding\n */\nexport const DeferredSubTrees = Component<DeferredSubTreesProps>(\n\tprops => {\n\t\tconst { extendTree } = useBindingOperations()\n\t\tconst isMutating = useMutationState()\n\n\t\tconst [loadState, setLoadState] = useState<LoadState>({ name: 'initial' })\n\n\t\tconst [abortController] = useState(() => new AbortController())\n\t\tconst signal = abortController.signal\n\n\t\tconst hasEntity = useHasEntity()\n\t\tuseConstantValueInvariant(hasEntity)\n\t\tif (hasEntity) {\n\t\t\tuseEntityBeforePersist(\n\t\t\t\tuseCallback((getAccessor: EntityAccessor.GetEntityAccessor) => {\n\t\t\t\t\t// This is a hack. We're really just circumventing the change of ids after a creation so that nested\n\t\t\t\t\t// components don't error.\n\t\t\t\t\tif (getAccessor().existsOnServer) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tsetLoadState({ name: 'initial' })\n\t\t\t\t}, []),\n\t\t\t)\n\t\t}\n\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tabortController.abort()\n\t\t\t}\n\t\t}, [abortController])\n\n\t\tconst environment = useEnvironment()\n\t\tuseEffect(() => {\n\t\t\tif (isMutating || loadState.name !== 'initial' || signal.aborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetLoadState({ name: 'loading' })\n\n\t\t\tconst newFragment = <OnlyKeepSubTrees>{props.children}</OnlyKeepSubTrees>\n\n\t\t\textendTree(newFragment, { signal, environment })\n\t\t\t\t.then(treeRootId => !signal.aborted && setLoadState({ name: 'success', treeRootId }))\n\t\t\t\t.catch(error => {\n\t\t\t\t\tif (signal.aborted) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthrow error\n\t\t\t\t})\n\t\t}, [environment, extendTree, isMutating, loadState.name, props.children, signal])\n\n\t\tswitch (loadState.name) {\n\t\t\tcase 'initial':\n\t\t\tcase 'loading':\n\t\t\t\treturn <>{props.fallback}</>\n\t\t\tcase 'success':\n\t\t\t\t// This is tricky. The relations & fields within children will just render normally as if this\n\t\t\t\t// component didn't exist. The sub trees, however, will read the new treeRootId and draw their data\n\t\t\t\t// from the newly loaded batch provided by this component. That way the sub trees (and only the sub trees!)\n\t\t\t\t// effectively get lazy loaded.\n\t\t\t\treturn <TreeRootIdProvider treeRootId={loadState.treeRootId}>{props.children}</TreeRootIdProvider>\n\t\t}\n\t},\n\t{\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t{props.children}\n\t\t\t\t{props.fallback}\n\t\t\t</>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tconst fieldsWithHoistablesMarker = MarkerFactory.createEntityFieldsWithHoistablesMarker(fields, environment)\n\n\t\t\t// We want to get rid of the subTrees but leave whatever relations and fields are present.\n\n\t\t\treturn new EntityFieldsWithHoistablesMarker(fieldsWithHoistablesMarker.fields, undefined, fieldsWithHoistablesMarker.parentReference)\n\t\t},\n\t},\n\t'DeferredSubTree',\n)\n\nconst OnlyKeepSubTrees = Component<{ children: ReactNode }>(\n\t() => null,\n\t{\n\t\tgenerateBranchMarker: (props, fields) => {\n\t\t\t// This is the complement of the equivalent method above: this time we're only keeping the sub trees.\n\t\t\tconst emptyFields = MarkerFactory.createEntityFieldMarkersContainer(undefined)\n\n\t\t\tif (fields instanceof EntityFieldMarkersContainer) {\n\t\t\t\treturn emptyFields\n\t\t\t}\n\t\t\treturn new EntityFieldsWithHoistablesMarker(emptyFields, fields.subTrees, undefined)\n\t\t},\n\t},\n\t'OnlyKeepSubTrees',\n)\n"],"names":["Component","useBindingOperations","useMutationState","useState","useHasEntity","useConstantValueInvariant","useEntityBeforePersist","useCallback","useEffect","useEnvironment","jsxDEV","this","Fragment","TreeRootIdProvider","MarkerFactory","EntityFieldsWithHoistablesMarker","EntityFieldMarkersContainer"],"mappings":"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"}
1
+ {"version":3,"file":"DeferredSubTrees.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DeferredSubTrees.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect, useState } from 'react'\nimport { TreeRootIdProvider, useBindingOperations, useEnvironment, useHasEntity } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\nimport { useEntityBeforePersist } from '../entityEvents'\nimport { EntityFieldMarkersContainer, EntityFieldsWithHoistablesMarker } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { TreeRootId } from '@contember/binding'\nimport { useConstantValueInvariant } from '@contember/react-utils'\nimport { EntityAccessor } from '@contember/binding'\nimport { useMutationState } from '../accessorTree'\n\nexport interface DeferredSubTreesProps {\n\tfallback: ReactNode\n\tchildren: ReactNode\n}\n\ntype LoadState =\n\t| { name: 'initial' }\n\t| { name: 'loading' }\n\t| {\n\t\tname: 'success'\n\t\ttreeRootId: TreeRootId | undefined\n\t}\n\n/**\n * @group Data binding\n */\nexport const DeferredSubTrees = Component<DeferredSubTreesProps>(\n\tprops => {\n\t\tconst { extendTree } = useBindingOperations()\n\t\tconst isMutating = useMutationState()\n\n\t\tconst [loadState, setLoadState] = useState<LoadState>({ name: 'initial' })\n\n\t\tconst [abortController] = useState(() => new AbortController())\n\t\tconst signal = abortController.signal\n\n\t\tconst hasEntity = useHasEntity()\n\t\tuseConstantValueInvariant(hasEntity)\n\t\tif (hasEntity) {\n\t\t\tuseEntityBeforePersist(\n\t\t\t\tuseCallback((getAccessor: EntityAccessor.GetEntityAccessor) => {\n\t\t\t\t\t// This is a hack. We're really just circumventing the change of ids after a creation so that nested\n\t\t\t\t\t// components don't error.\n\t\t\t\t\tif (getAccessor().existsOnServer) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tsetLoadState({ name: 'initial' })\n\t\t\t\t}, []),\n\t\t\t)\n\t\t}\n\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tabortController.abort()\n\t\t\t}\n\t\t}, [abortController])\n\n\t\tconst environment = useEnvironment()\n\t\tuseEffect(() => {\n\t\t\tif (isMutating || loadState.name !== 'initial' || signal.aborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetLoadState({ name: 'loading' })\n\n\t\t\tconst newFragment = <OnlyKeepSubTrees>{props.children}</OnlyKeepSubTrees>\n\n\t\t\textendTree(newFragment, { signal, environment })\n\t\t\t\t.then(treeRootId => !signal.aborted && setLoadState({ name: 'success', treeRootId }))\n\t\t\t\t.catch(error => {\n\t\t\t\t\tif (signal.aborted) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthrow error\n\t\t\t\t})\n\t\t}, [environment, extendTree, isMutating, loadState.name, props.children, signal])\n\n\t\tswitch (loadState.name) {\n\t\t\tcase 'initial':\n\t\t\tcase 'loading':\n\t\t\t\treturn <>{props.fallback}</>\n\t\t\tcase 'success':\n\t\t\t\t// This is tricky. The relations & fields within children will just render normally as if this\n\t\t\t\t// component didn't exist. The sub trees, however, will read the new treeRootId and draw their data\n\t\t\t\t// from the newly loaded batch provided by this component. That way the sub trees (and only the sub trees!)\n\t\t\t\t// effectively get lazy loaded.\n\t\t\t\treturn <TreeRootIdProvider treeRootId={loadState.treeRootId}>{props.children}</TreeRootIdProvider>\n\t\t}\n\t},\n\t{\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t{props.children}\n\t\t\t\t{props.fallback}\n\t\t\t</>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tconst fieldsWithHoistablesMarker = MarkerFactory.createEntityFieldsWithHoistablesMarker(fields, environment)\n\n\t\t\t// We want to get rid of the subTrees but leave whatever relations and fields are present.\n\n\t\t\treturn new EntityFieldsWithHoistablesMarker(fieldsWithHoistablesMarker.fields, undefined, fieldsWithHoistablesMarker.parentReference)\n\t\t},\n\t},\n\t'DeferredSubTree',\n)\n\nconst OnlyKeepSubTrees = Component<{ children: ReactNode }>(\n\t() => null,\n\t{\n\t\tgenerateBranchMarker: (props, fields) => {\n\t\t\t// This is the complement of the equivalent method above: this time we're only keeping the sub trees.\n\t\t\tconst emptyFields = MarkerFactory.createEntityFieldMarkersContainer(undefined)\n\n\t\t\tif (fields instanceof EntityFieldMarkersContainer) {\n\t\t\t\treturn emptyFields\n\t\t\t}\n\t\t\treturn new EntityFieldsWithHoistablesMarker(emptyFields, fields.subTrees, undefined)\n\t\t},\n\t},\n\t'OnlyKeepSubTrees',\n)\n"],"names":["Component","useBindingOperations","useMutationState","useState","useHasEntity","useConstantValueInvariant","useEntityBeforePersist","useCallback","useEffect","useEnvironment","jsxDEV","this","Fragment","TreeRootIdProvider","MarkerFactory","EntityFieldsWithHoistablesMarker","EntityFieldMarkersContainer"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeferredSubTrees.js","sources":["../../../../../packages/react-binding/src/helperComponents/DeferredSubTrees.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect, useState } from 'react'\nimport { TreeRootIdProvider, useBindingOperations, useHasEntity, useEnvironment } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\nimport { useEntityBeforePersist } from '../entityEvents'\nimport { EntityFieldMarkersContainer, EntityFieldsWithHoistablesMarker } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { TreeRootId } from '@contember/binding'\nimport { useConstantValueInvariant } from '@contember/react-utils'\nimport { EntityAccessor } from '@contember/binding'\nimport { useMutationState } from '../accessorTree'\n\nexport interface DeferredSubTreesProps {\n\tfallback: ReactNode\n\tchildren: ReactNode\n}\n\ntype LoadState =\n\t| { name: 'initial' }\n\t| { name: 'loading' }\n\t| {\n\t\tname: 'success'\n\t\ttreeRootId: TreeRootId | undefined\n\t }\n\n/**\n * @group Data binding\n */\nexport const DeferredSubTrees = Component<DeferredSubTreesProps>(\n\tprops => {\n\t\tconst { extendTree } = useBindingOperations()\n\t\tconst isMutating = useMutationState()\n\n\t\tconst [loadState, setLoadState] = useState<LoadState>({ name: 'initial' })\n\n\t\tconst [abortController] = useState(() => new AbortController())\n\t\tconst signal = abortController.signal\n\n\t\tconst hasEntity = useHasEntity()\n\t\tuseConstantValueInvariant(hasEntity)\n\t\tif (hasEntity) {\n\t\t\tuseEntityBeforePersist(\n\t\t\t\tuseCallback((getAccessor: EntityAccessor.GetEntityAccessor) => {\n\t\t\t\t\t// This is a hack. We're really just circumventing the change of ids after a creation so that nested\n\t\t\t\t\t// components don't error.\n\t\t\t\t\tif (getAccessor().existsOnServer) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tsetLoadState({ name: 'initial' })\n\t\t\t\t}, []),\n\t\t\t)\n\t\t}\n\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tabortController.abort()\n\t\t\t}\n\t\t}, [abortController])\n\n\t\tconst environment = useEnvironment()\n\t\tuseEffect(() => {\n\t\t\tif (isMutating || loadState.name !== 'initial' || signal.aborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetLoadState({ name: 'loading' })\n\n\t\t\tconst newFragment = <OnlyKeepSubTrees>{props.children}</OnlyKeepSubTrees>\n\n\t\t\textendTree(newFragment, { signal, environment })\n\t\t\t\t.then(treeRootId => !signal.aborted && setLoadState({ name: 'success', treeRootId }))\n\t\t\t\t.catch(error => {\n\t\t\t\t\tif (signal.aborted) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthrow error\n\t\t\t\t})\n\t\t}, [environment, extendTree, isMutating, loadState.name, props.children, signal])\n\n\t\tswitch (loadState.name) {\n\t\t\tcase 'initial':\n\t\t\tcase 'loading':\n\t\t\t\treturn <>{props.fallback}</>\n\t\t\tcase 'success':\n\t\t\t\t// This is tricky. The relations & fields within children will just render normally as if this\n\t\t\t\t// component didn't exist. The sub trees, however, will read the new treeRootId and draw their data\n\t\t\t\t// from the newly loaded batch provided by this component. That way the sub trees (and only the sub trees!)\n\t\t\t\t// effectively get lazy loaded.\n\t\t\t\treturn <TreeRootIdProvider treeRootId={loadState.treeRootId}>{props.children}</TreeRootIdProvider>\n\t\t}\n\t},\n\t{\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t{props.children}\n\t\t\t\t{props.fallback}\n\t\t\t</>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tconst fieldsWithHoistablesMarker = MarkerFactory.createEntityFieldsWithHoistablesMarker(fields, environment)\n\n\t\t\t// We want to get rid of the subTrees but leave whatever relations and fields are present.\n\n\t\t\treturn new EntityFieldsWithHoistablesMarker(fieldsWithHoistablesMarker.fields, undefined, fieldsWithHoistablesMarker.parentReference)\n\t\t},\n\t},\n\t'DeferredSubTree',\n)\n\nconst OnlyKeepSubTrees = Component<{ children: ReactNode }>(\n\t() => null,\n\t{\n\t\tgenerateBranchMarker: (props, fields) => {\n\t\t\t// This is the complement of the equivalent method above: this time we're only keeping the sub trees.\n\t\t\tconst emptyFields = MarkerFactory.createEntityFieldMarkersContainer(undefined)\n\n\t\t\tif (fields instanceof EntityFieldMarkersContainer) {\n\t\t\t\treturn emptyFields\n\t\t\t}\n\t\t\treturn new EntityFieldsWithHoistablesMarker(emptyFields, fields.subTrees, undefined)\n\t\t},\n\t},\n\t'OnlyKeepSubTrees',\n)\n"],"names":["this"],"mappings":";;;;;;;;;;;AA2BO,MAAM,mBAAmB;AAAA,EAC/B,CAAS,UAAA;AACF,UAAA,EAAE,WAAW,IAAI,qBAAqB;AAC5C,UAAM,aAAa,iBAAiB;AAE9B,UAAA,CAAC,WAAW,YAAY,IAAI,SAAoB,EAAE,MAAM,WAAW;AAEzE,UAAM,CAAC,eAAe,IAAI,SAAS,MAAM,IAAI,iBAAiB;AAC9D,UAAM,SAAS,gBAAgB;AAE/B,UAAM,YAAY,aAAa;AAC/B,8BAA0B,SAAS;AACnC,QAAI,WAAW;AACd;AAAA,QACC,YAAY,CAAC,gBAAkD;AAG1D,cAAA,cAAc,gBAAgB;AACjC;AAAA,UAAA;AAEY,uBAAA,EAAE,MAAM,WAAW;AAAA,QAAA,GAC9B,CAAE,CAAA;AAAA,MACN;AAAA,IAAA;AAGD,cAAU,MAAM;AACf,aAAO,MAAM;AACZ,wBAAgB,MAAM;AAAA,MACvB;AAAA,IAAA,GACE,CAAC,eAAe,CAAC;AAEpB,UAAM,cAAc,eAAe;AACnC,cAAU,MAAM;AACf,UAAI,cAAc,UAAU,SAAS,aAAa,OAAO,SAAS;AACjE;AAAA,MAAA;AAEY,mBAAA,EAAE,MAAM,WAAW;AAEhC,YAAM,cAAc,uBAAC,kBAAkB,EAAA,UAAA,MAAM,SAAzB,GAAA,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAkC,GAAAA,MAAA;AAE3C,iBAAA,aAAa,EAAE,QAAQ,YAAa,CAAA,EAC7C,KAAK,gBAAc,CAAC,OAAO,WAAW,aAAa,EAAE,MAAM,WAAW,WAAA,CAAY,CAAC,EACnF,MAAM,CAAS,UAAA;AACf,YAAI,OAAO,SAAS;AACnB;AAAA,QAAA;AAEK,cAAA;AAAA,MAAA,CACN;AAAA,IAAA,GACA,CAAC,aAAa,YAAY,YAAY,UAAU,MAAM,MAAM,UAAU,MAAM,CAAC;AAEhF,YAAQ,UAAU,MAAM;AAAA,MACvB,KAAK;AAAA,MACL,KAAK;AACG,eAAA,uBAAA,UAAA,EAAG,gBAAM,SAAT,GAAA,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAkB,GAAAA,MAAA;AAAA,MAC1B,KAAK;AAKJ,sCAAQ,oBAAmB,EAAA,YAAY,UAAU,YAAa,gBAAM,SAA7D,GAAA,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAsE,GAAAA,MAAA;AAAA,IAAA;AAAA,EAEhF;AAAA,EACA;AAAA,IACC,cAAc,WAEX,uBAAA,UAAA,EAAA,UAAA;AAAA,MAAM,MAAA;AAAA,MACN,MAAM;AAAA,IAAA,KAFR,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAGA,GAAAA,MAAA;AAAA,IAED,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,YAAM,6BAA6B,cAAc,uCAAuC,QAAQ,WAAW;AAI3G,aAAO,IAAI,iCAAiC,2BAA2B,QAAQ,QAAW,2BAA2B,eAAe;AAAA,IAAA;AAAA,EAEtI;AAAA,EACA;AACD;AAEA,MAAM,mBAAmB;AAAA,EACxB,MAAM;AAAA,EACN;AAAA,IACC,sBAAsB,CAAC,OAAO,WAAW;AAElC,YAAA,cAAc,cAAc,kCAAkC,MAAS;AAE7E,UAAI,kBAAkB,6BAA6B;AAC3C,eAAA;AAAA,MAAA;AAER,aAAO,IAAI,iCAAiC,aAAa,OAAO,UAAU,MAAS;AAAA,IAAA;AAAA,EAErF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"DeferredSubTrees.js","sources":["../../../../../packages/react-binding/src/helperComponents/DeferredSubTrees.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect, useState } from 'react'\nimport { TreeRootIdProvider, useBindingOperations, useEnvironment, useHasEntity } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\nimport { useEntityBeforePersist } from '../entityEvents'\nimport { EntityFieldMarkersContainer, EntityFieldsWithHoistablesMarker } from '@contember/binding'\nimport { MarkerFactory } from '@contember/binding'\nimport type { TreeRootId } from '@contember/binding'\nimport { useConstantValueInvariant } from '@contember/react-utils'\nimport { EntityAccessor } from '@contember/binding'\nimport { useMutationState } from '../accessorTree'\n\nexport interface DeferredSubTreesProps {\n\tfallback: ReactNode\n\tchildren: ReactNode\n}\n\ntype LoadState =\n\t| { name: 'initial' }\n\t| { name: 'loading' }\n\t| {\n\t\tname: 'success'\n\t\ttreeRootId: TreeRootId | undefined\n\t}\n\n/**\n * @group Data binding\n */\nexport const DeferredSubTrees = Component<DeferredSubTreesProps>(\n\tprops => {\n\t\tconst { extendTree } = useBindingOperations()\n\t\tconst isMutating = useMutationState()\n\n\t\tconst [loadState, setLoadState] = useState<LoadState>({ name: 'initial' })\n\n\t\tconst [abortController] = useState(() => new AbortController())\n\t\tconst signal = abortController.signal\n\n\t\tconst hasEntity = useHasEntity()\n\t\tuseConstantValueInvariant(hasEntity)\n\t\tif (hasEntity) {\n\t\t\tuseEntityBeforePersist(\n\t\t\t\tuseCallback((getAccessor: EntityAccessor.GetEntityAccessor) => {\n\t\t\t\t\t// This is a hack. We're really just circumventing the change of ids after a creation so that nested\n\t\t\t\t\t// components don't error.\n\t\t\t\t\tif (getAccessor().existsOnServer) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tsetLoadState({ name: 'initial' })\n\t\t\t\t}, []),\n\t\t\t)\n\t\t}\n\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tabortController.abort()\n\t\t\t}\n\t\t}, [abortController])\n\n\t\tconst environment = useEnvironment()\n\t\tuseEffect(() => {\n\t\t\tif (isMutating || loadState.name !== 'initial' || signal.aborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetLoadState({ name: 'loading' })\n\n\t\t\tconst newFragment = <OnlyKeepSubTrees>{props.children}</OnlyKeepSubTrees>\n\n\t\t\textendTree(newFragment, { signal, environment })\n\t\t\t\t.then(treeRootId => !signal.aborted && setLoadState({ name: 'success', treeRootId }))\n\t\t\t\t.catch(error => {\n\t\t\t\t\tif (signal.aborted) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthrow error\n\t\t\t\t})\n\t\t}, [environment, extendTree, isMutating, loadState.name, props.children, signal])\n\n\t\tswitch (loadState.name) {\n\t\t\tcase 'initial':\n\t\t\tcase 'loading':\n\t\t\t\treturn <>{props.fallback}</>\n\t\t\tcase 'success':\n\t\t\t\t// This is tricky. The relations & fields within children will just render normally as if this\n\t\t\t\t// component didn't exist. The sub trees, however, will read the new treeRootId and draw their data\n\t\t\t\t// from the newly loaded batch provided by this component. That way the sub trees (and only the sub trees!)\n\t\t\t\t// effectively get lazy loaded.\n\t\t\t\treturn <TreeRootIdProvider treeRootId={loadState.treeRootId}>{props.children}</TreeRootIdProvider>\n\t\t}\n\t},\n\t{\n\t\tstaticRender: props => (\n\t\t\t<>\n\t\t\t\t{props.children}\n\t\t\t\t{props.fallback}\n\t\t\t</>\n\t\t),\n\t\tgenerateBranchMarker: (props, fields, environment) => {\n\t\t\tconst fieldsWithHoistablesMarker = MarkerFactory.createEntityFieldsWithHoistablesMarker(fields, environment)\n\n\t\t\t// We want to get rid of the subTrees but leave whatever relations and fields are present.\n\n\t\t\treturn new EntityFieldsWithHoistablesMarker(fieldsWithHoistablesMarker.fields, undefined, fieldsWithHoistablesMarker.parentReference)\n\t\t},\n\t},\n\t'DeferredSubTree',\n)\n\nconst OnlyKeepSubTrees = Component<{ children: ReactNode }>(\n\t() => null,\n\t{\n\t\tgenerateBranchMarker: (props, fields) => {\n\t\t\t// This is the complement of the equivalent method above: this time we're only keeping the sub trees.\n\t\t\tconst emptyFields = MarkerFactory.createEntityFieldMarkersContainer(undefined)\n\n\t\t\tif (fields instanceof EntityFieldMarkersContainer) {\n\t\t\t\treturn emptyFields\n\t\t\t}\n\t\t\treturn new EntityFieldsWithHoistablesMarker(emptyFields, fields.subTrees, undefined)\n\t\t},\n\t},\n\t'OnlyKeepSubTrees',\n)\n"],"names":["this"],"mappings":";;;;;;;;;;;AA2BO,MAAM,mBAAmB;AAAA,EAC/B,CAAA,UAAS;AACR,UAAM,EAAE,WAAA,IAAe,qBAAA;AACvB,UAAM,aAAa,iBAAA;AAEnB,UAAM,CAAC,WAAW,YAAY,IAAI,SAAoB,EAAE,MAAM,WAAW;AAEzE,UAAM,CAAC,eAAe,IAAI,SAAS,MAAM,IAAI,iBAAiB;AAC9D,UAAM,SAAS,gBAAgB;AAE/B,UAAM,YAAY,aAAA;AAClB,8BAA0B,SAAS;AACnC,QAAI,WAAW;AACd;AAAA,QACC,YAAY,CAAC,gBAAkD;AAG9D,cAAI,YAAA,EAAc,gBAAgB;AACjC;AAAA,UACD;AACA,uBAAa,EAAE,MAAM,WAAW;AAAA,QACjC,GAAG,CAAA,CAAE;AAAA,MAAA;AAAA,IAEP;AAEA,cAAU,MAAM;AACf,aAAO,MAAM;AACZ,wBAAgB,MAAA;AAAA,MACjB;AAAA,IACD,GAAG,CAAC,eAAe,CAAC;AAEpB,UAAM,cAAc,eAAA;AACpB,cAAU,MAAM;AACf,UAAI,cAAc,UAAU,SAAS,aAAa,OAAO,SAAS;AACjE;AAAA,MACD;AACA,mBAAa,EAAE,MAAM,WAAW;AAEhC,YAAM,cAAc,uBAAC,kBAAA,EAAkB,UAAA,MAAM,SAAA,GAAzB,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAkC;AAEtD,iBAAW,aAAa,EAAE,QAAQ,YAAA,CAAa,EAC7C,KAAK,gBAAc,CAAC,OAAO,WAAW,aAAa,EAAE,MAAM,WAAW,WAAA,CAAY,CAAC,EACnF,MAAM,CAAA,UAAS;AACf,YAAI,OAAO,SAAS;AACnB;AAAA,QACD;AACA,cAAM;AAAA,MACP,CAAC;AAAA,IACH,GAAG,CAAC,aAAa,YAAY,YAAY,UAAU,MAAM,MAAM,UAAU,MAAM,CAAC;AAEhF,YAAQ,UAAU,MAAA;AAAA,MACjB,KAAK;AAAA,MACL,KAAK;AACJ,eAAO,uBAAA,UAAA,EAAG,gBAAM,SAAA,GAAT,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,MAAkB;AAAA,MAC1B,KAAK;AAKJ,sCAAQ,oBAAA,EAAmB,YAAY,UAAU,YAAa,gBAAM,YAA7D,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,MAAsE;AAAA,IAAA;AAAA,EAEhF;AAAA,EACA;AAAA,IACC,cAAc,WACb,uBAAA,UAAA,EACE,UAAA;AAAA,MAAA,MAAM;AAAA,MACN,MAAM;AAAA,IAAA,EAAA,GAFR,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAGA;AAAA,IAED,sBAAsB,CAAC,OAAO,QAAQ,gBAAgB;AACrD,YAAM,6BAA6B,cAAc,uCAAuC,QAAQ,WAAW;AAI3G,aAAO,IAAI,iCAAiC,2BAA2B,QAAQ,QAAW,2BAA2B,eAAe;AAAA,IACrI;AAAA,EAAA;AAAA,EAED;AACD;AAEA,MAAM,mBAAmB;AAAA,EACxB,MAAM;AAAA,EACN;AAAA,IACC,sBAAsB,CAAC,OAAO,WAAW;AAExC,YAAM,cAAc,cAAc,kCAAkC,MAAS;AAE7E,UAAI,kBAAkB,6BAA6B;AAClD,eAAO;AAAA,MACR;AACA,aAAO,IAAI,iCAAiC,aAAa,OAAO,UAAU,MAAS;AAAA,IACpF;AAAA,EAAA;AAAA,EAED;AACD;"}
@@ -35,7 +35,7 @@ const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSucces
35
35
  false,
36
36
  {
37
37
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx",
38
- lineNumber: 74,
38
+ lineNumber: 72,
39
39
  columnNumber: 3
40
40
  },
41
41
  void 0
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteEntityTrigger.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx"],"sourcesContent":["import { ReactElement, useCallback, useEffect } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { useDecoratedPersist } from './persist/useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEntity } from '../accessorPropagation'\nimport { useMutationState } from '../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>\n\nexport interface DeleteEntityTriggerProps {\n\n\t/**\n\t * If true, binding will trigger persist immediately after the entity is deleted.\n\t */\n\timmediatePersist?: boolean\n\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\n\t/**\n\t * Callback that is called when the entity is successfully deleted.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during the deletion.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that deletes the current entity when clicked.\n *\n * If immediatePersist is true, the binding will trigger persist immediately after the entity is deleted.\n *\n * ## Props {@link DeleteEntityTriggerProps}\n * - children, ?immediatePersist, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <DeleteEntityTrigger immediatePersist>\n * <button>Delete</button>\n * </DeleteEntityTrigger>\n * ```\n */\nexport const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSuccess, ...props }: DeleteEntityTriggerProps) => {\n\tconst parentEntity = useEntity()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst isMutating = useMutationState()\n\tconst deleteEntity = useCallback(() => {\n\t\tparentEntity.deleteEntity()\n\n\t\tif (immediatePersist) {\n\t\t\ttriggerPersist()\n\t\t}\n\t}, [parentEntity, immediatePersist, triggerPersist])\n\n\tuseEffect(() => {\n\t\tif (!immediatePersist && (onPersistError || onPersistSuccess)) {\n\t\t\tconsole.warn('DeleteEntityTrigger: onPersistError and onPersistSuccess are ignored when immediatePersist is not true.')\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [])\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isMutating ? true : undefined}\n\t\t\tonClick={composeEventHandlers(deleteEntity, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["Slot","useEntity","useDecoratedPersist","useMutationState","useCallback","useEffect","jsxDEV","composeEventHandlers","this"],"mappings":";;;;;;;;;AASA,MAAM,WAAWA,UAAA;AA0CJ,MAAA,sBAAsB,CAAC,EAAE,kBAAkB,gBAAgB,kBAAkB,GAAG,YAAsC;AAClI,QAAM,eAAeC,UAAAA,UAAU;AAC/B,QAAM,iBAAiBC,oBAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC/E,QAAM,aAAaC,iBAAAA,iBAAiB;AAC9B,QAAA,eAAeC,MAAAA,YAAY,MAAM;AACtC,iBAAa,aAAa;AAE1B,QAAI,kBAAkB;AACN,qBAAA;AAAA,IAAA;AAAA,EAEd,GAAA,CAAC,cAAc,kBAAkB,cAAc,CAAC;AAEnDC,QAAAA,UAAU,MAAM;AACX,QAAA,CAAC,qBAAqB,kBAAkB,mBAAmB;AAC9D,cAAQ,KAAK,yGAAyG;AAAA,IAAA;AAAA,EAGxH,GAAG,EAAE;AAEL,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAGlC,SAAAC,8BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU,aAAa,OAAO;AAAA,MAC9B,SAASC,UAAAA,qBAAqB,cAAc,OAAO;AAAA,MAClD,GAAG;AAAA,IAAA;AAAA,IAHL;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAIA;AAEF;;"}
1
+ {"version":3,"file":"DeleteEntityTrigger.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx"],"sourcesContent":["import { ReactElement, useCallback, useEffect } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { useDecoratedPersist } from './persist/useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEntity } from '../accessorPropagation'\nimport { useMutationState } from '../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>\n\nexport interface DeleteEntityTriggerProps {\n\t/**\n\t * If true, binding will trigger persist immediately after the entity is deleted.\n\t */\n\timmediatePersist?: boolean\n\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\n\t/**\n\t * Callback that is called when the entity is successfully deleted.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during the deletion.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that deletes the current entity when clicked.\n *\n * If immediatePersist is true, the binding will trigger persist immediately after the entity is deleted.\n *\n * ## Props {@link DeleteEntityTriggerProps}\n * - children, ?immediatePersist, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <DeleteEntityTrigger immediatePersist>\n * <button>Delete</button>\n * </DeleteEntityTrigger>\n * ```\n */\nexport const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSuccess, ...props }: DeleteEntityTriggerProps) => {\n\tconst parentEntity = useEntity()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst isMutating = useMutationState()\n\tconst deleteEntity = useCallback(() => {\n\t\tparentEntity.deleteEntity()\n\n\t\tif (immediatePersist) {\n\t\t\ttriggerPersist()\n\t\t}\n\t}, [parentEntity, immediatePersist, triggerPersist])\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\tuseEffect(() => {\n\t\tif (!immediatePersist && (onPersistError || onPersistSuccess)) {\n\t\t\tconsole.warn('DeleteEntityTrigger: onPersistError and onPersistSuccess are ignored when immediatePersist is not true.')\n\t\t}\n\t}, [])\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isMutating ? true : undefined}\n\t\t\tonClick={composeEventHandlers(deleteEntity, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["Slot","useEntity","useDecoratedPersist","useMutationState","useCallback","useEffect","jsxDEV","composeEventHandlers","this"],"mappings":";;;;;;;;;AAQA,MAAM,WAAWA,UAAAA;AAyCV,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,gBAAgB,kBAAkB,GAAG,YAAsC;AAClI,QAAM,eAAeC,UAAAA,UAAA;AACrB,QAAM,iBAAiBC,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC/E,QAAM,aAAaC,iBAAAA,iBAAA;AACnB,QAAM,eAAeC,MAAAA,YAAY,MAAM;AACtC,iBAAa,aAAA;AAEb,QAAI,kBAAkB;AACrB,qBAAA;AAAA,IACD;AAAA,EACD,GAAG,CAAC,cAAc,kBAAkB,cAAc,CAAC;AAGnDC,QAAAA,UAAU,MAAM;AACf,QAAI,CAAC,qBAAqB,kBAAkB,mBAAmB;AAC9D,cAAQ,KAAK,yGAAyG;AAAA,IACvH;AAAA,EACD,GAAG,CAAA,CAAE;AAEL,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAEnC,SACCC,8BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU,aAAa,OAAO;AAAA,MAC9B,SAASC,UAAAA,qBAAqB,cAAc,OAAO;AAAA,MAClD,GAAG;AAAA,IAAA;AAAA,IAHL;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA;AAMF;;"}
@@ -33,7 +33,7 @@ const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSucces
33
33
  false,
34
34
  {
35
35
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx",
36
- lineNumber: 74,
36
+ lineNumber: 72,
37
37
  columnNumber: 3
38
38
  },
39
39
  void 0
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteEntityTrigger.js","sources":["../../../../../packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx"],"sourcesContent":["import { ReactElement, useCallback, useEffect } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { useDecoratedPersist } from './persist/useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEntity } from '../accessorPropagation'\nimport { useMutationState } from '../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>\n\nexport interface DeleteEntityTriggerProps {\n\n\t/**\n\t * If true, binding will trigger persist immediately after the entity is deleted.\n\t */\n\timmediatePersist?: boolean\n\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\n\t/**\n\t * Callback that is called when the entity is successfully deleted.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during the deletion.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that deletes the current entity when clicked.\n *\n * If immediatePersist is true, the binding will trigger persist immediately after the entity is deleted.\n *\n * ## Props {@link DeleteEntityTriggerProps}\n * - children, ?immediatePersist, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <DeleteEntityTrigger immediatePersist>\n * <button>Delete</button>\n * </DeleteEntityTrigger>\n * ```\n */\nexport const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSuccess, ...props }: DeleteEntityTriggerProps) => {\n\tconst parentEntity = useEntity()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst isMutating = useMutationState()\n\tconst deleteEntity = useCallback(() => {\n\t\tparentEntity.deleteEntity()\n\n\t\tif (immediatePersist) {\n\t\t\ttriggerPersist()\n\t\t}\n\t}, [parentEntity, immediatePersist, triggerPersist])\n\n\tuseEffect(() => {\n\t\tif (!immediatePersist && (onPersistError || onPersistSuccess)) {\n\t\t\tconsole.warn('DeleteEntityTrigger: onPersistError and onPersistSuccess are ignored when immediatePersist is not true.')\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [])\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isMutating ? true : undefined}\n\t\t\tonClick={composeEventHandlers(deleteEntity, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["this"],"mappings":";;;;;;;AASA,MAAM,WAAW;AA0CJ,MAAA,sBAAsB,CAAC,EAAE,kBAAkB,gBAAgB,kBAAkB,GAAG,YAAsC;AAClI,QAAM,eAAe,UAAU;AAC/B,QAAM,iBAAiB,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC/E,QAAM,aAAa,iBAAiB;AAC9B,QAAA,eAAe,YAAY,MAAM;AACtC,iBAAa,aAAa;AAE1B,QAAI,kBAAkB;AACN,qBAAA;AAAA,IAAA;AAAA,EAEd,GAAA,CAAC,cAAc,kBAAkB,cAAc,CAAC;AAEnD,YAAU,MAAM;AACX,QAAA,CAAC,qBAAqB,kBAAkB,mBAAmB;AAC9D,cAAQ,KAAK,yGAAyG;AAAA,IAAA;AAAA,EAGxH,GAAG,EAAE;AAEL,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAGlC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU,aAAa,OAAO;AAAA,MAC9B,SAAS,qBAAqB,cAAc,OAAO;AAAA,MAClD,GAAG;AAAA,IAAA;AAAA,IAHL;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAIA;AAEF;"}
1
+ {"version":3,"file":"DeleteEntityTrigger.js","sources":["../../../../../packages/react-binding/src/helperComponents/DeleteEntityTrigger.tsx"],"sourcesContent":["import { ReactElement, useCallback, useEffect } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { useDecoratedPersist } from './persist/useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEntity } from '../accessorPropagation'\nimport { useMutationState } from '../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>\n\nexport interface DeleteEntityTriggerProps {\n\t/**\n\t * If true, binding will trigger persist immediately after the entity is deleted.\n\t */\n\timmediatePersist?: boolean\n\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\n\t/**\n\t * Callback that is called when the entity is successfully deleted.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during the deletion.\n\t * Ignored if immediatePersist is not true.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that deletes the current entity when clicked.\n *\n * If immediatePersist is true, the binding will trigger persist immediately after the entity is deleted.\n *\n * ## Props {@link DeleteEntityTriggerProps}\n * - children, ?immediatePersist, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <DeleteEntityTrigger immediatePersist>\n * <button>Delete</button>\n * </DeleteEntityTrigger>\n * ```\n */\nexport const DeleteEntityTrigger = ({ immediatePersist, onPersistError, onPersistSuccess, ...props }: DeleteEntityTriggerProps) => {\n\tconst parentEntity = useEntity()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst isMutating = useMutationState()\n\tconst deleteEntity = useCallback(() => {\n\t\tparentEntity.deleteEntity()\n\n\t\tif (immediatePersist) {\n\t\t\ttriggerPersist()\n\t\t}\n\t}, [parentEntity, immediatePersist, triggerPersist])\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\tuseEffect(() => {\n\t\tif (!immediatePersist && (onPersistError || onPersistSuccess)) {\n\t\t\tconsole.warn('DeleteEntityTrigger: onPersistError and onPersistSuccess are ignored when immediatePersist is not true.')\n\t\t}\n\t}, [])\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isMutating ? true : undefined}\n\t\t\tonClick={composeEventHandlers(deleteEntity, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["this"],"mappings":";;;;;;;AAQA,MAAM,WAAW;AAyCV,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,gBAAgB,kBAAkB,GAAG,YAAsC;AAClI,QAAM,eAAe,UAAA;AACrB,QAAM,iBAAiB,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC/E,QAAM,aAAa,iBAAA;AACnB,QAAM,eAAe,YAAY,MAAM;AACtC,iBAAa,aAAA;AAEb,QAAI,kBAAkB;AACrB,qBAAA;AAAA,IACD;AAAA,EACD,GAAG,CAAC,cAAc,kBAAkB,cAAc,CAAC;AAGnD,YAAU,MAAM;AACf,QAAI,CAAC,qBAAqB,kBAAkB,mBAAmB;AAC9D,cAAQ,KAAK,yGAAyG;AAAA,IACvH;AAAA,EACD,GAAG,CAAA,CAAE;AAEL,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAEnC,SACC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU,aAAa,OAAO;AAAA,MAC9B,SAAS,qBAAqB,cAAc,OAAO;AAAA,MAClD,GAAG;AAAA,IAAA;AAAA,IAHL;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA;AAMF;"}
@@ -15,14 +15,14 @@ const DimensionRenderer = Component.Component(({ dimension, as, children }, env)
15
15
  false,
16
16
  {
17
17
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DimensionRenderer.tsx",
18
- lineNumber: 17,
19
- columnNumber: 4
18
+ lineNumber: 18,
19
+ columnNumber: 5
20
20
  },
21
21
  void 0
22
22
  )) }, void 0, false, {
23
23
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DimensionRenderer.tsx",
24
- lineNumber: 15,
25
- columnNumber: 9
24
+ lineNumber: 16,
25
+ columnNumber: 3
26
26
  }, void 0);
27
27
  });
28
28
  exports.DimensionRenderer = DimensionRenderer;
@@ -1 +1 @@
1
- {"version":3,"file":"DimensionRenderer.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DimensionRenderer.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactNode } from 'react'\nimport { EnvironmentMiddleware } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\n\nexport type DimensionRendererProps = {\n\tdimension: string\n\tas: string\n\tchildren: ReactNode\n}\n\nexport const DimensionRenderer = Component<DimensionRendererProps>(({ dimension, as, children }, env) => {\n\tconst dimensions = env.getDimensionOrElse(dimension, [])\n\n\treturn <>\n\t\t{dimensions.map(value => (\n\t\t\t<EnvironmentMiddleware\n\t\t\t\tcreate={it => it.withVariables({ [as]: value })}\n\t\t\t\tkey={value}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</EnvironmentMiddleware>\n\t\t))}\n\t</>\n})\n"],"names":["Component","jsxDEV","Fragment","EnvironmentMiddleware","this"],"mappings":";;;;;AAWa,MAAA,oBAAoBA,oBAAkC,CAAC,EAAE,WAAW,IAAI,YAAY,QAAQ;AACxG,QAAM,aAAa,IAAI,mBAAmB,WAAW,CAAA,CAAE;AAEhD,SAAAC,8BAAAA,OAAAC,cAAAA,UAAA,EACL,UAAW,WAAA,IAAI,CACf,UAAAD,8BAAA;AAAA,IAACE,mBAAA;AAAA,IAAA;AAAA,MACA,QAAQ,QAAM,GAAG,cAAc,EAAE,CAAC,EAAE,GAAG,OAAO;AAAA,MAG7C;AAAA,IAAA;AAAA,IAFI;AAAA,IAFN;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA,CAMA,EARK,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EASP,GAAAA,MAAA;AACD,CAAC;;"}
1
+ {"version":3,"file":"DimensionRenderer.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DimensionRenderer.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactNode } from 'react'\nimport { EnvironmentMiddleware } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\n\nexport type DimensionRendererProps = {\n\tdimension: string\n\tas: string\n\tchildren: ReactNode\n}\n\nexport const DimensionRenderer = Component<DimensionRendererProps>(({ dimension, as, children }, env) => {\n\tconst dimensions = env.getDimensionOrElse(dimension, [])\n\n\treturn (\n\t\t<>\n\t\t\t{dimensions.map(value => (\n\t\t\t\t<EnvironmentMiddleware\n\t\t\t\t\tcreate={it => it.withVariables({ [as]: value })}\n\t\t\t\t\tkey={value}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</EnvironmentMiddleware>\n\t\t\t))}\n\t\t</>\n\t)\n})\n"],"names":["Component","jsxDEV","Fragment","EnvironmentMiddleware","this"],"mappings":";;;;;AAWO,MAAM,oBAAoBA,UAAAA,UAAkC,CAAC,EAAE,WAAW,IAAI,SAAA,GAAY,QAAQ;AACxG,QAAM,aAAa,IAAI,mBAAmB,WAAW,CAAA,CAAE;AAEvD,SACCC,8BAAAA,OAAAC,cAAAA,UAAA,EACE,UAAA,WAAW,IAAI,CAAA,UACfD,8BAAAA;AAAAA,IAACE,mBAAAA;AAAAA,IAAA;AAAA,MACA,QAAQ,QAAM,GAAG,cAAc,EAAE,CAAC,EAAE,GAAG,OAAO;AAAA,MAG7C;AAAA,IAAA;AAAA,IAFI;AAAA,IAFN;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA,CAMA,EAAA,GARF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MASA;AAEF,CAAC;;"}
@@ -13,14 +13,14 @@ const DimensionRenderer = Component(({ dimension, as, children }, env) => {
13
13
  false,
14
14
  {
15
15
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DimensionRenderer.tsx",
16
- lineNumber: 17,
17
- columnNumber: 4
16
+ lineNumber: 18,
17
+ columnNumber: 5
18
18
  },
19
19
  void 0
20
20
  )) }, void 0, false, {
21
21
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/DimensionRenderer.tsx",
22
- lineNumber: 15,
23
- columnNumber: 9
22
+ lineNumber: 16,
23
+ columnNumber: 3
24
24
  }, void 0);
25
25
  });
26
26
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"DimensionRenderer.js","sources":["../../../../../packages/react-binding/src/helperComponents/DimensionRenderer.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactNode } from 'react'\nimport { EnvironmentMiddleware } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\n\nexport type DimensionRendererProps = {\n\tdimension: string\n\tas: string\n\tchildren: ReactNode\n}\n\nexport const DimensionRenderer = Component<DimensionRendererProps>(({ dimension, as, children }, env) => {\n\tconst dimensions = env.getDimensionOrElse(dimension, [])\n\n\treturn <>\n\t\t{dimensions.map(value => (\n\t\t\t<EnvironmentMiddleware\n\t\t\t\tcreate={it => it.withVariables({ [as]: value })}\n\t\t\t\tkey={value}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</EnvironmentMiddleware>\n\t\t))}\n\t</>\n})\n"],"names":["this"],"mappings":";;;AAWa,MAAA,oBAAoB,UAAkC,CAAC,EAAE,WAAW,IAAI,YAAY,QAAQ;AACxG,QAAM,aAAa,IAAI,mBAAmB,WAAW,CAAA,CAAE;AAEhD,SAAA,uBAAA,UAAA,EACL,UAAW,WAAA,IAAI,CACf,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,QAAQ,QAAM,GAAG,cAAc,EAAE,CAAC,EAAE,GAAG,OAAO;AAAA,MAG7C;AAAA,IAAA;AAAA,IAFI;AAAA,IAFN;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA,CAMA,EARK,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EASP,GAAAA,MAAA;AACD,CAAC;"}
1
+ {"version":3,"file":"DimensionRenderer.js","sources":["../../../../../packages/react-binding/src/helperComponents/DimensionRenderer.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactNode } from 'react'\nimport { EnvironmentMiddleware } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\n\nexport type DimensionRendererProps = {\n\tdimension: string\n\tas: string\n\tchildren: ReactNode\n}\n\nexport const DimensionRenderer = Component<DimensionRendererProps>(({ dimension, as, children }, env) => {\n\tconst dimensions = env.getDimensionOrElse(dimension, [])\n\n\treturn (\n\t\t<>\n\t\t\t{dimensions.map(value => (\n\t\t\t\t<EnvironmentMiddleware\n\t\t\t\t\tcreate={it => it.withVariables({ [as]: value })}\n\t\t\t\t\tkey={value}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</EnvironmentMiddleware>\n\t\t\t))}\n\t\t</>\n\t)\n})\n"],"names":["this"],"mappings":";;;AAWO,MAAM,oBAAoB,UAAkC,CAAC,EAAE,WAAW,IAAI,SAAA,GAAY,QAAQ;AACxG,QAAM,aAAa,IAAI,mBAAmB,WAAW,CAAA,CAAE;AAEvD,SACC,uBAAA,UAAA,EACE,UAAA,WAAW,IAAI,CAAA,UACf;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,QAAQ,QAAM,GAAG,cAAc,EAAE,CAAC,EAAE,GAAG,OAAO;AAAA,MAG7C;AAAA,IAAA;AAAA,IAFI;AAAA,IAFN;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA,CAMA,EAAA,GARF,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MASA;AAEF,CAAC;"}
@@ -6,7 +6,7 @@ function EntityView(props) {
6
6
  const entity = "field" in props ? useEntity.useEntity(props.field) : useEntity.useEntity();
7
7
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: props.render(entity) }, void 0, false, {
8
8
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/EntityView.tsx",
9
- lineNumber: 18,
9
+ lineNumber: 17,
10
10
  columnNumber: 9
11
11
  }, this);
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityView.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/EntityView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\n\nexport interface EntityViewProps {\n\trender: (entity: EntityAccessor) => ReactNode\n\tfield?: string | SugaredRelativeSingleEntity\n}\n\n/**\n * @group Data binding\n */\nexport function EntityView(props: EntityViewProps) {\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst entity = 'field' in props ? useEntity(props.field)! : useEntity()\n\n\treturn <>{props.render(entity)}</>\n}\n"],"names":["useEntity","jsxDEV","Fragment"],"mappings":";;;;AAaO,SAAS,WAAW,OAAwB;AAElD,QAAM,SAAS,WAAW,QAAQA,oBAAU,MAAM,KAAK,IAAKA,oBAAU;AAEtE,SAAUC,qCAAAC,cAAAA,UAAA,EAAA,UAAA,MAAM,OAAO,MAAM,EAAtB,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAwB,GAAA,IAAA;AAChC;;"}
1
+ {"version":3,"file":"EntityView.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/EntityView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\n\nexport interface EntityViewProps {\n\trender: (entity: EntityAccessor) => ReactNode\n\tfield?: string | SugaredRelativeSingleEntity\n}\n\n/**\n * @group Data binding\n */\nexport function EntityView(props: EntityViewProps) {\n\tconst entity = 'field' in props ? useEntity(props.field)! : useEntity()\n\n\treturn <>{props.render(entity)}</>\n}\n"],"names":["useEntity","jsxDEV","Fragment"],"mappings":";;;;AAaO,SAAS,WAAW,OAAwB;AAClD,QAAM,SAAS,WAAW,QAAQA,UAAAA,UAAU,MAAM,KAAK,IAAKA,oBAAA;AAE5D,SAAOC,8BAAAA,OAAAC,wBAAA,EAAG,UAAA,MAAM,OAAO,MAAM,EAAA,GAAtB,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAwB;AAChC;;"}
@@ -4,7 +4,7 @@ function EntityView(props) {
4
4
  const entity = "field" in props ? useEntity(props.field) : useEntity();
5
5
  return /* @__PURE__ */ jsxDEV(Fragment, { children: props.render(entity) }, void 0, false, {
6
6
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/EntityView.tsx",
7
- lineNumber: 18,
7
+ lineNumber: 17,
8
8
  columnNumber: 9
9
9
  }, this);
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityView.js","sources":["../../../../../packages/react-binding/src/helperComponents/EntityView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\n\nexport interface EntityViewProps {\n\trender: (entity: EntityAccessor) => ReactNode\n\tfield?: string | SugaredRelativeSingleEntity\n}\n\n/**\n * @group Data binding\n */\nexport function EntityView(props: EntityViewProps) {\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst entity = 'field' in props ? useEntity(props.field)! : useEntity()\n\n\treturn <>{props.render(entity)}</>\n}\n"],"names":[],"mappings":";;AAaO,SAAS,WAAW,OAAwB;AAElD,QAAM,SAAS,WAAW,QAAQ,UAAU,MAAM,KAAK,IAAK,UAAU;AAEtE,SAAU,uBAAA,UAAA,EAAA,UAAA,MAAM,OAAO,MAAM,EAAtB,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAwB,GAAA,IAAA;AAChC;"}
1
+ {"version":3,"file":"EntityView.js","sources":["../../../../../packages/react-binding/src/helperComponents/EntityView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\n\nexport interface EntityViewProps {\n\trender: (entity: EntityAccessor) => ReactNode\n\tfield?: string | SugaredRelativeSingleEntity\n}\n\n/**\n * @group Data binding\n */\nexport function EntityView(props: EntityViewProps) {\n\tconst entity = 'field' in props ? useEntity(props.field)! : useEntity()\n\n\treturn <>{props.render(entity)}</>\n}\n"],"names":[],"mappings":";;AAaO,SAAS,WAAW,OAAwB;AAClD,QAAM,SAAS,WAAW,QAAQ,UAAU,MAAM,KAAK,IAAK,UAAA;AAE5D,SAAO,uBAAA,UAAA,EAAG,UAAA,MAAM,OAAO,MAAM,EAAA,GAAtB,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAwB;AAChC;"}
@@ -35,7 +35,7 @@ const FieldView = Component.Component(
35
35
  }, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render]);
36
36
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: output }, void 0, false, {
37
37
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
38
- lineNumber: 79,
38
+ lineNumber: 78,
39
39
  columnNumber: 10
40
40
  }, void 0);
41
41
  },
@@ -45,12 +45,12 @@ const FieldView = Component.Component(
45
45
  props.fallbackIfUnpersisted,
46
46
  fields.map((field, i) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(SugaredField.SugaredField, { field }, i, false, {
47
47
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
48
- lineNumber: 92,
49
- columnNumber: 6
48
+ lineNumber: 89,
49
+ columnNumber: 31
50
50
  }, void 0))
51
51
  ] }, void 0, true, {
52
52
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
53
- lineNumber: 89,
53
+ lineNumber: 87,
54
54
  columnNumber: 4
55
55
  }, void 0);
56
56
  },
@@ -1 +1 @@
1
- {"version":3,"file":"FieldView.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/FieldView.tsx"],"sourcesContent":["import { useArrayMapMemo, useConstantLengthInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode, useCallback, useMemo } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { FieldAccessor, FieldValue, RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { QueryLanguage, throwBindingError } from '@contember/binding'\nimport { Component } from '../coreComponents'\nimport { SugaredField } from './SugaredField'\n\nexport interface FieldViewCommonProps {\n\tfallbackIfUnpersisted?: ReactNode\n}\n\nexport type FieldViewProps =\n\t& FieldViewCommonProps\n\t& (\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfield: string | SugaredRelativeSingleField\n\t\t }\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfields: Array<string | SugaredRelativeSingleField>\n\t\t }\n\t)\n\n/**\n * Base field view component with no default formatting.\n *\n * @example\n * ```\n * <FieldView\n * field=\"startsAt\"\n * render={(accessor) => <>{accessor.value}</>}\n * />\n * ```\n *\n * @group Field Views\n */\nexport const FieldView = Component<FieldViewProps>(\n\tprops => {\n\t\tconst { fallbackIfUnpersisted, render } = props\n\t\tconst fields =\n\t\t\t'fields' in props && Array.isArray(props.fields)\n\t\t\t\t? props.fields\n\t\t\t\t: 'field' in props && props.field\n\t\t\t\t\t? [props.field]\n\t\t\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\n\t\tuseConstantLengthInvariant(\n\t\t\tfields,\n\t\t\t`The number of fields in the 'fields' prop of the 'FieldView' must remain constant between renders!`,\n\t\t)\n\n\t\t// TODO over-subscribe less\n\t\tconst entityAccessor = useEntity()\n\t\tconst environment = entityAccessor.environment\n\n\t\tconst desugarField = useCallback(\n\t\t\t(rsf: string | SugaredRelativeSingleField) => QueryLanguage.desugarRelativeSingleField(rsf, environment),\n\t\t\t[environment],\n\t\t)\n\t\tconst desugaredFields = useArrayMapMemo(fields, desugarField)\n\n\t\tconst retrieveField = useCallback(\n\t\t\t(desugaredRsf: RelativeSingleField) => entityAccessor.getField(desugaredRsf),\n\t\t\t[entityAccessor],\n\t\t)\n\t\tconst accessors = useArrayMapMemo(desugaredFields, retrieveField)\n\n\t\t// TODO we probably want something like useDeferredValue from here.\n\t\t// Will probably just wait for Concurrent React though.\n\t\tconst output = useMemo(() => {\n\t\t\tif (!entityAccessor.existsOnServer && fallbackIfUnpersisted !== undefined) {\n\t\t\t\treturn fallbackIfUnpersisted\n\t\t\t}\n\t\t\treturn render(...accessors)\n\t\t}, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render])\n\n\t\treturn <>{output}</>\n\t},\n\tprops => {\n\t\tconst fields =\n\t\t\t'fields' in props && Array.isArray(props.fields)\n\t\t\t\t? props.fields\n\t\t\t\t: 'field' in props && props.field\n\t\t\t\t\t? [props.field]\n\t\t\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.fallbackIfUnpersisted}\n\t\t\t\t{fields.map((field, i) => (\n\t\t\t\t\t<SugaredField key={i} field={field} />\n\t\t\t\t))}\n\t\t\t</>\n\t\t)\n\t},\n\t'FieldView',\n) as FieldViewComponentSignature\n\nexport type FieldViewComponentSignature = {\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfield: string | SugaredRelativeSingleField\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue, FV5 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>, field5: FieldAccessor<FV5>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t(props: FieldViewProps): ReactElement | null\n}\n"],"names":["Component","throwBindingError","useConstantLengthInvariant","useEntity","useCallback","QueryLanguage","useArrayMapMemo","useMemo","this","jsxDEV","Fragment","SugaredField"],"mappings":";;;;;;;;;AAsCO,MAAM,YAAYA,UAAA;AAAA,EACxB,CAAS,UAAA;AACF,UAAA,EAAE,uBAAuB,OAAA,IAAW;AAC1C,UAAM,SACL,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC5C,MAAM,SACN,WAAW,SAAS,MAAM,QACzB,CAAC,MAAM,KAAK,IACZC,QAAAA,kBAAkB,sEAAsE;AAE7FC,eAAA;AAAA,MACC;AAAA,MACA;AAAA,IACD;AAGA,UAAM,iBAAiBC,UAAAA,UAAU;AACjC,UAAM,cAAc,eAAe;AAEnC,UAAM,eAAeC,MAAA;AAAA,MACpB,CAAC,QAA6CC,QAAc,cAAA,2BAA2B,KAAK,WAAW;AAAA,MACvG,CAAC,WAAW;AAAA,IACb;AACM,UAAA,kBAAkBC,WAAAA,gBAAgB,QAAQ,YAAY;AAE5D,UAAM,gBAAgBF,MAAA;AAAA,MACrB,CAAC,iBAAsC,eAAe,SAAS,YAAY;AAAA,MAC3E,CAAC,cAAc;AAAA,IAChB;AACM,UAAA,YAAYE,WAAAA,gBAAgB,iBAAiB,aAAa;AAI1D,UAAA,SAASC,MAAAA,QAAQ,MAAM;AAC5B,UAAI,CAAC,eAAe,kBAAkB,0BAA0B,QAAW;AACnE,eAAA;AAAA,MAAA;AAED,aAAA,OAAO,GAAG,SAAS;AAAA,IAAA,GACxB,CAAC,WAAW,eAAe,gBAAgB,uBAAuB,MAAM,CAAC;AAE5E,0EAAU,UAAH,UAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAU,GAAAC,MAAA;AAAA,EAClB;AAAA,EACA,CAAS,UAAA;AACR,UAAM,SACL,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC5C,MAAM,SACN,WAAW,SAAS,MAAM,QACzB,CAAC,MAAM,KAAK,IACZP,QAAAA,kBAAkB,sEAAsE;AAC7F,WAEGQ,8BAAA,OAAAC,wBAAA,EAAA,UAAA;AAAA,MAAM,MAAA;AAAA,MACN,OAAO,IAAI,CAAC,OAAO,MAClBD,8BAAAA,OAAAE,aAAA,cAAA,EAAqB,SAAH,GAAnB,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAH,MAAoC,CACpC;AAAA,IAAA,KAJF,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAKA,GAAAA,MAAA;AAAA,EAEF;AAAA,EACA;AACD;;"}
1
+ {"version":3,"file":"FieldView.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/FieldView.tsx"],"sourcesContent":["import { useArrayMapMemo, useConstantLengthInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode, useCallback, useMemo } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { FieldAccessor, FieldValue, RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { QueryLanguage, throwBindingError } from '@contember/binding'\nimport { Component } from '../coreComponents'\nimport { SugaredField } from './SugaredField'\n\nexport interface FieldViewCommonProps {\n\tfallbackIfUnpersisted?: ReactNode\n}\n\nexport type FieldViewProps =\n\t& FieldViewCommonProps\n\t& (\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfield: string | SugaredRelativeSingleField\n\t\t}\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfields: Array<string | SugaredRelativeSingleField>\n\t\t}\n\t)\n\n/**\n * Base field view component with no default formatting.\n *\n * @example\n * ```\n * <FieldView\n * field=\"startsAt\"\n * render={(accessor) => <>{accessor.value}</>}\n * />\n * ```\n *\n * @group Field Views\n */\nexport const FieldView = Component<FieldViewProps>(\n\tprops => {\n\t\tconst { fallbackIfUnpersisted, render } = props\n\t\tconst fields = 'fields' in props && Array.isArray(props.fields)\n\t\t\t? props.fields\n\t\t\t: 'field' in props && props.field\n\t\t\t? [props.field]\n\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\n\t\tuseConstantLengthInvariant(\n\t\t\tfields,\n\t\t\t`The number of fields in the 'fields' prop of the 'FieldView' must remain constant between renders!`,\n\t\t)\n\n\t\t// TODO over-subscribe less\n\t\tconst entityAccessor = useEntity()\n\t\tconst environment = entityAccessor.environment\n\n\t\tconst desugarField = useCallback(\n\t\t\t(rsf: string | SugaredRelativeSingleField) => QueryLanguage.desugarRelativeSingleField(rsf, environment),\n\t\t\t[environment],\n\t\t)\n\t\tconst desugaredFields = useArrayMapMemo(fields, desugarField)\n\n\t\tconst retrieveField = useCallback(\n\t\t\t(desugaredRsf: RelativeSingleField) => entityAccessor.getField(desugaredRsf),\n\t\t\t[entityAccessor],\n\t\t)\n\t\tconst accessors = useArrayMapMemo(desugaredFields, retrieveField)\n\n\t\t// TODO we probably want something like useDeferredValue from here.\n\t\t// Will probably just wait for Concurrent React though.\n\t\tconst output = useMemo(() => {\n\t\t\tif (!entityAccessor.existsOnServer && fallbackIfUnpersisted !== undefined) {\n\t\t\t\treturn fallbackIfUnpersisted\n\t\t\t}\n\t\t\treturn render(...accessors)\n\t\t}, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render])\n\n\t\treturn <>{output}</>\n\t},\n\tprops => {\n\t\tconst fields = 'fields' in props && Array.isArray(props.fields)\n\t\t\t? props.fields\n\t\t\t: 'field' in props && props.field\n\t\t\t? [props.field]\n\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.fallbackIfUnpersisted}\n\t\t\t\t{fields.map((field, i) => <SugaredField key={i} field={field} />)}\n\t\t\t</>\n\t\t)\n\t},\n\t'FieldView',\n) as FieldViewComponentSignature\n\nexport type FieldViewComponentSignature = {\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfield: string | SugaredRelativeSingleField\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue, FV5 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t]\n\t\t\t\trender: (\n\t\t\t\t\tfield1: FieldAccessor<FV1>,\n\t\t\t\t\tfield2: FieldAccessor<FV2>,\n\t\t\t\t\tfield3: FieldAccessor<FV3>,\n\t\t\t\t\tfield4: FieldAccessor<FV4>,\n\t\t\t\t\tfield5: FieldAccessor<FV5>,\n\t\t\t\t) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t(props: FieldViewProps): ReactElement | null\n}\n"],"names":["Component","throwBindingError","useConstantLengthInvariant","useEntity","useCallback","QueryLanguage","useArrayMapMemo","useMemo","this","jsxDEV","Fragment","SugaredField"],"mappings":";;;;;;;;;AAsCO,MAAM,YAAYA,UAAAA;AAAAA,EACxB,CAAA,UAAS;AACR,UAAM,EAAE,uBAAuB,OAAA,IAAW;AAC1C,UAAM,SAAS,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC3D,MAAM,SACN,WAAW,SAAS,MAAM,QAC1B,CAAC,MAAM,KAAK,IACZC,QAAAA,kBAAkB,sEAAsE;AAE3FC,eAAAA;AAAAA,MACC;AAAA,MACA;AAAA,IAAA;AAID,UAAM,iBAAiBC,UAAAA,UAAA;AACvB,UAAM,cAAc,eAAe;AAEnC,UAAM,eAAeC,MAAAA;AAAAA,MACpB,CAAC,QAA6CC,QAAAA,cAAc,2BAA2B,KAAK,WAAW;AAAA,MACvG,CAAC,WAAW;AAAA,IAAA;AAEb,UAAM,kBAAkBC,WAAAA,gBAAgB,QAAQ,YAAY;AAE5D,UAAM,gBAAgBF,MAAAA;AAAAA,MACrB,CAAC,iBAAsC,eAAe,SAAS,YAAY;AAAA,MAC3E,CAAC,cAAc;AAAA,IAAA;AAEhB,UAAM,YAAYE,WAAAA,gBAAgB,iBAAiB,aAAa;AAIhE,UAAM,SAASC,MAAAA,QAAQ,MAAM;AAC5B,UAAI,CAAC,eAAe,kBAAkB,0BAA0B,QAAW;AAC1E,eAAO;AAAA,MACR;AACA,aAAO,OAAO,GAAG,SAAS;AAAA,IAC3B,GAAG,CAAC,WAAW,eAAe,gBAAgB,uBAAuB,MAAM,CAAC;AAE5E,0EAAU,UAAA,OAAA,GAAH,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAC,MAAU;AAAA,EAClB;AAAA,EACA,CAAA,UAAS;AACR,UAAM,SAAS,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC3D,MAAM,SACN,WAAW,SAAS,MAAM,QAC1B,CAAC,MAAM,KAAK,IACZP,QAAAA,kBAAkB,sEAAsE;AAC3F,WACCQ,8BAAAA,OAAAC,wBAAA,EACE,UAAA;AAAA,MAAA,MAAM;AAAA,MACN,OAAO,IAAI,CAAC,OAAO,MAAMD,8BAAAA,OAACE,aAAAA,cAAA,EAAqB,SAAH,GAAnB,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAH,MAAoC,CAAE;AAAA,IAAA,EAAA,GAFjE,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAGA;AAAA,EAEF;AAAA,EACA;AACD;;"}
@@ -33,7 +33,7 @@ const FieldView = Component(
33
33
  }, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render]);
34
34
  return /* @__PURE__ */ jsxDEV(Fragment, { children: output }, void 0, false, {
35
35
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
36
- lineNumber: 79,
36
+ lineNumber: 78,
37
37
  columnNumber: 10
38
38
  }, void 0);
39
39
  },
@@ -43,12 +43,12 @@ const FieldView = Component(
43
43
  props.fallbackIfUnpersisted,
44
44
  fields.map((field, i) => /* @__PURE__ */ jsxDEV(SugaredField, { field }, i, false, {
45
45
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
46
- lineNumber: 92,
47
- columnNumber: 6
46
+ lineNumber: 89,
47
+ columnNumber: 31
48
48
  }, void 0))
49
49
  ] }, void 0, true, {
50
50
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/FieldView.tsx",
51
- lineNumber: 89,
51
+ lineNumber: 87,
52
52
  columnNumber: 4
53
53
  }, void 0);
54
54
  },
@@ -1 +1 @@
1
- {"version":3,"file":"FieldView.js","sources":["../../../../../packages/react-binding/src/helperComponents/FieldView.tsx"],"sourcesContent":["import { useArrayMapMemo, useConstantLengthInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode, useCallback, useMemo } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { FieldAccessor, FieldValue, RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { QueryLanguage, throwBindingError } from '@contember/binding'\nimport { Component } from '../coreComponents'\nimport { SugaredField } from './SugaredField'\n\nexport interface FieldViewCommonProps {\n\tfallbackIfUnpersisted?: ReactNode\n}\n\nexport type FieldViewProps =\n\t& FieldViewCommonProps\n\t& (\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfield: string | SugaredRelativeSingleField\n\t\t }\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfields: Array<string | SugaredRelativeSingleField>\n\t\t }\n\t)\n\n/**\n * Base field view component with no default formatting.\n *\n * @example\n * ```\n * <FieldView\n * field=\"startsAt\"\n * render={(accessor) => <>{accessor.value}</>}\n * />\n * ```\n *\n * @group Field Views\n */\nexport const FieldView = Component<FieldViewProps>(\n\tprops => {\n\t\tconst { fallbackIfUnpersisted, render } = props\n\t\tconst fields =\n\t\t\t'fields' in props && Array.isArray(props.fields)\n\t\t\t\t? props.fields\n\t\t\t\t: 'field' in props && props.field\n\t\t\t\t\t? [props.field]\n\t\t\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\n\t\tuseConstantLengthInvariant(\n\t\t\tfields,\n\t\t\t`The number of fields in the 'fields' prop of the 'FieldView' must remain constant between renders!`,\n\t\t)\n\n\t\t// TODO over-subscribe less\n\t\tconst entityAccessor = useEntity()\n\t\tconst environment = entityAccessor.environment\n\n\t\tconst desugarField = useCallback(\n\t\t\t(rsf: string | SugaredRelativeSingleField) => QueryLanguage.desugarRelativeSingleField(rsf, environment),\n\t\t\t[environment],\n\t\t)\n\t\tconst desugaredFields = useArrayMapMemo(fields, desugarField)\n\n\t\tconst retrieveField = useCallback(\n\t\t\t(desugaredRsf: RelativeSingleField) => entityAccessor.getField(desugaredRsf),\n\t\t\t[entityAccessor],\n\t\t)\n\t\tconst accessors = useArrayMapMemo(desugaredFields, retrieveField)\n\n\t\t// TODO we probably want something like useDeferredValue from here.\n\t\t// Will probably just wait for Concurrent React though.\n\t\tconst output = useMemo(() => {\n\t\t\tif (!entityAccessor.existsOnServer && fallbackIfUnpersisted !== undefined) {\n\t\t\t\treturn fallbackIfUnpersisted\n\t\t\t}\n\t\t\treturn render(...accessors)\n\t\t}, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render])\n\n\t\treturn <>{output}</>\n\t},\n\tprops => {\n\t\tconst fields =\n\t\t\t'fields' in props && Array.isArray(props.fields)\n\t\t\t\t? props.fields\n\t\t\t\t: 'field' in props && props.field\n\t\t\t\t\t? [props.field]\n\t\t\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.fallbackIfUnpersisted}\n\t\t\t\t{fields.map((field, i) => (\n\t\t\t\t\t<SugaredField key={i} field={field} />\n\t\t\t\t))}\n\t\t\t</>\n\t\t)\n\t},\n\t'FieldView',\n) as FieldViewComponentSignature\n\nexport type FieldViewComponentSignature = {\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfield: string | SugaredRelativeSingleField\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue, FV5 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>, field5: FieldAccessor<FV5>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t(props: FieldViewProps): ReactElement | null\n}\n"],"names":["this"],"mappings":";;;;;;;AAsCO,MAAM,YAAY;AAAA,EACxB,CAAS,UAAA;AACF,UAAA,EAAE,uBAAuB,OAAA,IAAW;AAC1C,UAAM,SACL,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC5C,MAAM,SACN,WAAW,SAAS,MAAM,QACzB,CAAC,MAAM,KAAK,IACZ,kBAAkB,sEAAsE;AAE7F;AAAA,MACC;AAAA,MACA;AAAA,IACD;AAGA,UAAM,iBAAiB,UAAU;AACjC,UAAM,cAAc,eAAe;AAEnC,UAAM,eAAe;AAAA,MACpB,CAAC,QAA6C,cAAc,2BAA2B,KAAK,WAAW;AAAA,MACvG,CAAC,WAAW;AAAA,IACb;AACM,UAAA,kBAAkB,gBAAgB,QAAQ,YAAY;AAE5D,UAAM,gBAAgB;AAAA,MACrB,CAAC,iBAAsC,eAAe,SAAS,YAAY;AAAA,MAC3E,CAAC,cAAc;AAAA,IAChB;AACM,UAAA,YAAY,gBAAgB,iBAAiB,aAAa;AAI1D,UAAA,SAAS,QAAQ,MAAM;AAC5B,UAAI,CAAC,eAAe,kBAAkB,0BAA0B,QAAW;AACnE,eAAA;AAAA,MAAA;AAED,aAAA,OAAO,GAAG,SAAS;AAAA,IAAA,GACxB,CAAC,WAAW,eAAe,gBAAgB,uBAAuB,MAAM,CAAC;AAE5E,8CAAU,UAAH,UAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAU,GAAAA,MAAA;AAAA,EAClB;AAAA,EACA,CAAS,UAAA;AACR,UAAM,SACL,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC5C,MAAM,SACN,WAAW,SAAS,MAAM,QACzB,CAAC,MAAM,KAAK,IACZ,kBAAkB,sEAAsE;AAC7F,WAEG,uBAAA,UAAA,EAAA,UAAA;AAAA,MAAM,MAAA;AAAA,MACN,OAAO,IAAI,CAAC,OAAO,MAClB,uBAAA,cAAA,EAAqB,SAAH,GAAnB,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAoC,CACpC;AAAA,IAAA,KAJF,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAKA,GAAAA,MAAA;AAAA,EAEF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"FieldView.js","sources":["../../../../../packages/react-binding/src/helperComponents/FieldView.tsx"],"sourcesContent":["import { useArrayMapMemo, useConstantLengthInvariant } from '@contember/react-utils'\nimport { ReactElement, ReactNode, useCallback, useMemo } from 'react'\nimport { useEntity } from '../accessorPropagation'\nimport type { FieldAccessor, FieldValue, RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { QueryLanguage, throwBindingError } from '@contember/binding'\nimport { Component } from '../coreComponents'\nimport { SugaredField } from './SugaredField'\n\nexport interface FieldViewCommonProps {\n\tfallbackIfUnpersisted?: ReactNode\n}\n\nexport type FieldViewProps =\n\t& FieldViewCommonProps\n\t& (\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfield: string | SugaredRelativeSingleField\n\t\t}\n\t\t| {\n\t\t\trender: (...accessors: FieldAccessor[]) => ReactNode\n\t\t\tfields: Array<string | SugaredRelativeSingleField>\n\t\t}\n\t)\n\n/**\n * Base field view component with no default formatting.\n *\n * @example\n * ```\n * <FieldView\n * field=\"startsAt\"\n * render={(accessor) => <>{accessor.value}</>}\n * />\n * ```\n *\n * @group Field Views\n */\nexport const FieldView = Component<FieldViewProps>(\n\tprops => {\n\t\tconst { fallbackIfUnpersisted, render } = props\n\t\tconst fields = 'fields' in props && Array.isArray(props.fields)\n\t\t\t? props.fields\n\t\t\t: 'field' in props && props.field\n\t\t\t? [props.field]\n\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\n\t\tuseConstantLengthInvariant(\n\t\t\tfields,\n\t\t\t`The number of fields in the 'fields' prop of the 'FieldView' must remain constant between renders!`,\n\t\t)\n\n\t\t// TODO over-subscribe less\n\t\tconst entityAccessor = useEntity()\n\t\tconst environment = entityAccessor.environment\n\n\t\tconst desugarField = useCallback(\n\t\t\t(rsf: string | SugaredRelativeSingleField) => QueryLanguage.desugarRelativeSingleField(rsf, environment),\n\t\t\t[environment],\n\t\t)\n\t\tconst desugaredFields = useArrayMapMemo(fields, desugarField)\n\n\t\tconst retrieveField = useCallback(\n\t\t\t(desugaredRsf: RelativeSingleField) => entityAccessor.getField(desugaredRsf),\n\t\t\t[entityAccessor],\n\t\t)\n\t\tconst accessors = useArrayMapMemo(desugaredFields, retrieveField)\n\n\t\t// TODO we probably want something like useDeferredValue from here.\n\t\t// Will probably just wait for Concurrent React though.\n\t\tconst output = useMemo(() => {\n\t\t\tif (!entityAccessor.existsOnServer && fallbackIfUnpersisted !== undefined) {\n\t\t\t\treturn fallbackIfUnpersisted\n\t\t\t}\n\t\t\treturn render(...accessors)\n\t\t}, [accessors, entityAccessor.existsOnServer, fallbackIfUnpersisted, render])\n\n\t\treturn <>{output}</>\n\t},\n\tprops => {\n\t\tconst fields = 'fields' in props && Array.isArray(props.fields)\n\t\t\t? props.fields\n\t\t\t: 'field' in props && props.field\n\t\t\t? [props.field]\n\t\t\t: throwBindingError(`FieldView: failed to supply either the 'field' or the 'fields' prop.`)\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.fallbackIfUnpersisted}\n\t\t\t\t{fields.map((field, i) => <SugaredField key={i} field={field} />)}\n\t\t\t</>\n\t\t)\n\t},\n\t'FieldView',\n) as FieldViewComponentSignature\n\nexport type FieldViewComponentSignature = {\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfield: string | SugaredRelativeSingleField\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [string | SugaredRelativeSingleField, string | SugaredRelativeSingleField, string | SugaredRelativeSingleField]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t]\n\t\t\t\trender: (field1: FieldAccessor<FV1>, field2: FieldAccessor<FV2>, field3: FieldAccessor<FV3>, field4: FieldAccessor<FV4>) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t<FV1 extends FieldValue, FV2 extends FieldValue, FV3 extends FieldValue, FV4 extends FieldValue, FV5 extends FieldValue>(\n\t\tprops:\n\t\t\t& FieldViewCommonProps\n\t\t\t& {\n\t\t\t\tfields: [\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t\tstring | SugaredRelativeSingleField,\n\t\t\t\t]\n\t\t\t\trender: (\n\t\t\t\t\tfield1: FieldAccessor<FV1>,\n\t\t\t\t\tfield2: FieldAccessor<FV2>,\n\t\t\t\t\tfield3: FieldAccessor<FV3>,\n\t\t\t\t\tfield4: FieldAccessor<FV4>,\n\t\t\t\t\tfield5: FieldAccessor<FV5>,\n\t\t\t\t) => ReactNode\n\t\t\t},\n\t): ReactElement | null\n\n\t(props: FieldViewProps): ReactElement | null\n}\n"],"names":["this"],"mappings":";;;;;;;AAsCO,MAAM,YAAY;AAAA,EACxB,CAAA,UAAS;AACR,UAAM,EAAE,uBAAuB,OAAA,IAAW;AAC1C,UAAM,SAAS,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC3D,MAAM,SACN,WAAW,SAAS,MAAM,QAC1B,CAAC,MAAM,KAAK,IACZ,kBAAkB,sEAAsE;AAE3F;AAAA,MACC;AAAA,MACA;AAAA,IAAA;AAID,UAAM,iBAAiB,UAAA;AACvB,UAAM,cAAc,eAAe;AAEnC,UAAM,eAAe;AAAA,MACpB,CAAC,QAA6C,cAAc,2BAA2B,KAAK,WAAW;AAAA,MACvG,CAAC,WAAW;AAAA,IAAA;AAEb,UAAM,kBAAkB,gBAAgB,QAAQ,YAAY;AAE5D,UAAM,gBAAgB;AAAA,MACrB,CAAC,iBAAsC,eAAe,SAAS,YAAY;AAAA,MAC3E,CAAC,cAAc;AAAA,IAAA;AAEhB,UAAM,YAAY,gBAAgB,iBAAiB,aAAa;AAIhE,UAAM,SAAS,QAAQ,MAAM;AAC5B,UAAI,CAAC,eAAe,kBAAkB,0BAA0B,QAAW;AAC1E,eAAO;AAAA,MACR;AACA,aAAO,OAAO,GAAG,SAAS;AAAA,IAC3B,GAAG,CAAC,WAAW,eAAe,gBAAgB,uBAAuB,MAAM,CAAC;AAE5E,8CAAU,UAAA,OAAA,GAAH,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAU;AAAA,EAClB;AAAA,EACA,CAAA,UAAS;AACR,UAAM,SAAS,YAAY,SAAS,MAAM,QAAQ,MAAM,MAAM,IAC3D,MAAM,SACN,WAAW,SAAS,MAAM,QAC1B,CAAC,MAAM,KAAK,IACZ,kBAAkB,sEAAsE;AAC3F,WACC,uBAAA,UAAA,EACE,UAAA;AAAA,MAAA,MAAM;AAAA,MACN,OAAO,IAAI,CAAC,OAAO,MAAM,uBAAC,cAAA,EAAqB,SAAH,GAAnB,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAoC,CAAE;AAAA,IAAA,EAAA,GAFjE,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAGA;AAAA,EAEF;AAAA,EACA;AACD;"}
@@ -7,32 +7,29 @@ const FilterFieldsCollector = require("./helpers/FilterFieldsCollector.cjs");
7
7
  const FilterEvaluator = require("./helpers/FilterEvaluator.cjs");
8
8
  const Field = require("../coreComponents/Field.cjs");
9
9
  const Component = require("../coreComponents/Component.cjs");
10
- const useEntity = require("../accessorPropagation/useEntity.cjs");
11
10
  const useEnvironment = require("../accessorPropagation/useEnvironment.cjs");
12
- const If = Component.Component(
13
- ({ condition, ...props }) => {
14
- if (props.children && props.then) {
15
- throw new Error("If component cannot have both children and then prop");
16
- }
17
- return typeof condition !== "function" ? /* @__PURE__ */ jsxDevRuntime.jsxDEV(IfFilter, { condition, ...props }, void 0, false, {
18
- fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
19
- lineNumber: 37,
20
- columnNumber: 5
21
- }, void 0) : /* @__PURE__ */ jsxDevRuntime.jsxDEV(IfCallback, { condition, ...props }, void 0, false, {
22
- fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
23
- lineNumber: 38,
24
- columnNumber: 5
25
- }, void 0);
26
- },
27
- "If"
28
- );
11
+ const useEntity = require("../accessorPropagation/useEntity.cjs");
12
+ const If = Component.Component(({ condition, ...props }) => {
13
+ if (props.children && props.then) {
14
+ throw new Error("If component cannot have both children and then prop");
15
+ }
16
+ return typeof condition !== "function" ? /* @__PURE__ */ jsxDevRuntime.jsxDEV(IfFilter, { condition, ...props }, void 0, false, {
17
+ fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
18
+ lineNumber: 37,
19
+ columnNumber: 5
20
+ }, void 0) : /* @__PURE__ */ jsxDevRuntime.jsxDEV(IfCallback, { condition, ...props }, void 0, false, {
21
+ fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
22
+ lineNumber: 38,
23
+ columnNumber: 5
24
+ }, void 0);
25
+ }, "If");
29
26
  const IfCallback = Component.Component(
30
27
  ({ children, condition, then, else: elseIn }) => {
31
28
  const entity = useEntity.useEntity();
32
29
  const evaluated = React.useMemo(() => condition(entity), [condition, entity]);
33
30
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: evaluated ? children ?? then : elseIn }, void 0, false, {
34
31
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
35
- lineNumber: 48,
32
+ lineNumber: 46,
36
33
  columnNumber: 10
37
34
  }, void 0);
38
35
  },
@@ -43,8 +40,8 @@ const IfCallback = Component.Component(
43
40
  elseIn
44
41
  ] }, void 0, true, {
45
42
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
46
- lineNumber: 51,
47
- columnNumber: 10
43
+ lineNumber: 50,
44
+ columnNumber: 4
48
45
  }, void 0);
49
46
  },
50
47
  "IfCallback"
@@ -83,8 +80,8 @@ const IfFilter = Component.Component(
83
80
  elseIn
84
81
  ] }, void 0, true, {
85
82
  fileName: "/home/runner/work/contember/contember/packages/react-binding/src/helperComponents/If.tsx",
86
- lineNumber: 77,
87
- columnNumber: 10
83
+ lineNumber: 78,
84
+ columnNumber: 4
88
85
  }, void 0);
89
86
  },
90
87
  "IfFilter"
@@ -1 +1 @@
1
- {"version":3,"file":"If.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/If.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useMemo } from 'react'\nimport { Component, Field } from '../coreComponents'\nimport { EntityAccessor } from '@contember/binding'\nimport { QueryLanguage } from '@contember/binding'\nimport { useEntity, useEnvironment } from '../accessorPropagation'\nimport { Filter } from '@contember/binding'\nimport { FilterFieldsCollector } from './helpers/FilterFieldsCollector'\nimport { FilterEvaluator } from './helpers/FilterEvaluator'\n\nexport type IfProps =\n\t| IfFilterProps\n\t| IfCallbackProps\n\nexport interface IfFilterProps {\n\tcondition: string | Filter\n\tchildren?: ReactNode\n\tthen?: ReactNode\n\telse?: ReactNode\n}\n\nexport interface IfCallbackProps {\n\tcondition: (accessor: EntityAccessor) => boolean\n\tchildren?: ReactNode\n\tthen?: ReactNode\n\telse?: ReactNode\n}\n\n/**\n * @group Logic Components\n */\nexport const If = Component<IfProps>(({ condition, ...props }) => {\n\tif (props.children && props.then) {\n\t\tthrow new Error('If component cannot have both children and then prop')\n\t}\n\treturn typeof condition !== 'function'\n\t\t? <IfFilter condition={condition} {...props} />\n\t\t: <IfCallback condition={condition} {...props} />\n},\n'If',\n)\n\nconst IfCallback = Component<IfCallbackProps>(\n\t({ children, condition, then, else: elseIn }) => {\n\t\tconst entity = useEntity()\n\t\tconst evaluated = useMemo(() => condition(entity), [condition, entity])\n\n\t\treturn <>{evaluated ? (children ?? then) : elseIn}</>\n\t},\n\t({ children, then, else: elseIn }) => {\n\t\treturn <>\n\t\t\t{children}\n\t\t\t{then}\n\t\t\t{elseIn}\n\t\t</>\n\t},\n\t'IfCallback',\n)\n\nconst IfFilter = Component<IfFilterProps>(\n\t({ children, condition, then, else: elseIn }) => {\n\t\tconst env = useEnvironment()\n\t\tconst entity = useEntity()\n\n\t\tconst schema = env.getSchema()\n\t\tconst evaluated = useMemo(\n\t\t\t() => new FilterEvaluator(schema).evaluateFilter(entity, QueryLanguage.desugarFilter(condition, env)),\n\t\t\t[condition, entity, env, schema],\n\t\t)\n\t\treturn <>{evaluated ? (children ?? then) : elseIn}</>\n\t},\n\t({ children, condition, then, else: elseIn }, env) => {\n\t\tconst desugaredFilter = QueryLanguage.desugarFilter(condition, env)\n\t\tconst collectedFields = new FilterFieldsCollector(env.getSchema(), desugaredFilter).collectFields(env.getSubTreeNode().entity)\n\t\tconst additionalFields = <>{Array.from(collectedFields).map(it => <Field field={it} key={it} />)}</>\n\n\t\treturn <>\n\t\t\t{additionalFields}\n\t\t\t{children}\n\t\t\t{then}\n\t\t\t{elseIn}\n\t\t</>\n\t},\n\t'IfFilter',\n)\n"],"names":["Component","this","jsxDEV","useEntity","useMemo","Fragment","useEnvironment","FilterEvaluator","QueryLanguage","FilterFieldsCollector","Field"],"mappings":"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"}
1
+ {"version":3,"file":"If.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/If.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useMemo } from 'react'\nimport { Component, Field } from '../coreComponents'\nimport { EntityAccessor } from '@contember/binding'\nimport { QueryLanguage } from '@contember/binding'\nimport { useEntity, useEnvironment } from '../accessorPropagation'\nimport { Filter } from '@contember/binding'\nimport { FilterFieldsCollector } from './helpers/FilterFieldsCollector'\nimport { FilterEvaluator } from './helpers/FilterEvaluator'\n\nexport type IfProps =\n\t| IfFilterProps\n\t| IfCallbackProps\n\nexport interface IfFilterProps {\n\tcondition: string | Filter\n\tchildren?: ReactNode\n\tthen?: ReactNode\n\telse?: ReactNode\n}\n\nexport interface IfCallbackProps {\n\tcondition: (accessor: EntityAccessor) => boolean\n\tchildren?: ReactNode\n\tthen?: ReactNode\n\telse?: ReactNode\n}\n\n/**\n * @group Logic Components\n */\nexport const If = Component<IfProps>(({ condition, ...props }) => {\n\tif (props.children && props.then) {\n\t\tthrow new Error('If component cannot have both children and then prop')\n\t}\n\treturn typeof condition !== 'function'\n\t\t? <IfFilter condition={condition} {...props} />\n\t\t: <IfCallback condition={condition} {...props} />\n}, 'If')\n\nconst IfCallback = Component<IfCallbackProps>(\n\t({ children, condition, then, else: elseIn }) => {\n\t\tconst entity = useEntity()\n\t\tconst evaluated = useMemo(() => condition(entity), [condition, entity])\n\n\t\treturn <>{evaluated ? (children ?? then) : elseIn}</>\n\t},\n\t({ children, then, else: elseIn }) => {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{children}\n\t\t\t\t{then}\n\t\t\t\t{elseIn}\n\t\t\t</>\n\t\t)\n\t},\n\t'IfCallback',\n)\n\nconst IfFilter = Component<IfFilterProps>(\n\t({ children, condition, then, else: elseIn }) => {\n\t\tconst env = useEnvironment()\n\t\tconst entity = useEntity()\n\n\t\tconst schema = env.getSchema()\n\t\tconst evaluated = useMemo(\n\t\t\t() => new FilterEvaluator(schema).evaluateFilter(entity, QueryLanguage.desugarFilter(condition, env)),\n\t\t\t[condition, entity, env, schema],\n\t\t)\n\t\treturn <>{evaluated ? (children ?? then) : elseIn}</>\n\t},\n\t({ children, condition, then, else: elseIn }, env) => {\n\t\tconst desugaredFilter = QueryLanguage.desugarFilter(condition, env)\n\t\tconst collectedFields = new FilterFieldsCollector(env.getSchema(), desugaredFilter).collectFields(env.getSubTreeNode().entity)\n\t\tconst additionalFields = <>{Array.from(collectedFields).map(it => <Field field={it} key={it} />)}</>\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{additionalFields}\n\t\t\t\t{children}\n\t\t\t\t{then}\n\t\t\t\t{elseIn}\n\t\t\t</>\n\t\t)\n\t},\n\t'IfFilter',\n)\n"],"names":["Component","this","jsxDEV","useEntity","useMemo","Fragment","useEnvironment","FilterEvaluator","QueryLanguage","FilterFieldsCollector","Field"],"mappings":"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"}