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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (558) hide show
  1. package/CLAUDE.md +57 -0
  2. package/dist/development/index.cjs +99 -99
  3. package/dist/development/index.js +48 -48
  4. package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  5. package/dist/development/src/accessorPropagation/AccessorProvider.js.map +1 -1
  6. package/dist/development/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
  7. package/dist/development/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
  8. package/dist/development/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  9. package/dist/development/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  10. package/dist/development/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
  11. package/dist/development/src/accessorPropagation/EntityKeyContext.js.map +1 -1
  12. package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  13. package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  14. package/dist/development/src/accessorPropagation/EnvironmentContext.cjs +0 -1
  15. package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  16. package/dist/development/src/accessorPropagation/EnvironmentContext.js +1 -2
  17. package/dist/development/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  18. package/dist/development/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
  19. package/dist/development/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
  20. package/dist/development/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  21. package/dist/development/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  22. package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
  23. package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  24. package/dist/development/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  25. package/dist/development/src/accessorPropagation/useBindingOperations.js.map +1 -1
  26. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
  27. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  28. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
  29. package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  30. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
  31. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  32. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
  33. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  34. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
  35. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  36. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
  37. package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  38. package/dist/development/src/accessorPropagation/useEntity.cjs.map +1 -1
  39. package/dist/development/src/accessorPropagation/useEntity.js.map +1 -1
  40. package/dist/development/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  41. package/dist/development/src/accessorPropagation/useEntityKey.js.map +1 -1
  42. package/dist/development/src/accessorPropagation/useEntityList.cjs.map +1 -1
  43. package/dist/development/src/accessorPropagation/useEntityList.js.map +1 -1
  44. package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  45. package/dist/development/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  46. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
  47. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  48. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
  49. package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  50. package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
  51. package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  52. package/dist/development/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  53. package/dist/development/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  54. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
  55. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  56. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
  57. package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  58. package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
  59. package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  60. package/dist/development/src/accessorPropagation/useExtendTree.cjs +1 -4
  61. package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  62. package/dist/development/src/accessorPropagation/useExtendTree.js +1 -4
  63. package/dist/development/src/accessorPropagation/useExtendTree.js.map +1 -1
  64. package/dist/development/src/accessorPropagation/useField.cjs.map +1 -1
  65. package/dist/development/src/accessorPropagation/useField.js.map +1 -1
  66. package/dist/development/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  67. package/dist/development/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  68. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  69. package/dist/development/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  70. package/dist/development/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  71. package/dist/development/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  72. package/dist/development/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  73. package/dist/development/src/accessorPropagation/useHasEntity.js.map +1 -1
  74. package/dist/development/src/accessorPropagation/usePersist.cjs.map +1 -1
  75. package/dist/development/src/accessorPropagation/usePersist.js.map +1 -1
  76. package/dist/development/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  77. package/dist/development/src/accessorPropagation/useTreeRootId.js.map +1 -1
  78. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs +10 -10
  79. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  80. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js +10 -10
  81. package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  82. package/dist/development/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  83. package/dist/development/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  84. package/dist/development/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
  85. package/dist/development/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
  86. package/dist/development/src/accessorSorting/sortEntities.cjs.map +1 -1
  87. package/dist/development/src/accessorSorting/sortEntities.js.map +1 -1
  88. package/dist/development/src/accessorTree/AccessorTree.cjs.map +1 -1
  89. package/dist/development/src/accessorTree/AccessorTree.js.map +1 -1
  90. package/dist/development/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  91. package/dist/development/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  92. package/dist/development/src/accessorTree/DirtinessContext.cjs.map +1 -1
  93. package/dist/development/src/accessorTree/DirtinessContext.js.map +1 -1
  94. package/dist/development/src/accessorTree/MutationStateContext.cjs.map +1 -1
  95. package/dist/development/src/accessorTree/MutationStateContext.js.map +1 -1
  96. package/dist/development/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  97. package/dist/development/src/accessorTree/useAccessorTreeState.js.map +1 -1
  98. package/dist/development/src/accessorTree/useDataBinding.cjs +17 -13
  99. package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
  100. package/dist/development/src/accessorTree/useDataBinding.js +19 -15
  101. package/dist/development/src/accessorTree/useDataBinding.js.map +1 -1
  102. package/dist/development/src/accessorTree/useDirtinessState.cjs.map +1 -1
  103. package/dist/development/src/accessorTree/useDirtinessState.js.map +1 -1
  104. package/dist/development/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
  105. package/dist/development/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
  106. package/dist/development/src/accessorTree/useMutationState.cjs.map +1 -1
  107. package/dist/development/src/accessorTree/useMutationState.js.map +1 -1
  108. package/dist/development/src/coreComponents/Component.cjs.map +1 -1
  109. package/dist/development/src/coreComponents/Component.js.map +1 -1
  110. package/dist/development/src/coreComponents/DataBindingProvider.cjs +1 -1
  111. package/dist/development/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  112. package/dist/development/src/coreComponents/DataBindingProvider.js +1 -1
  113. package/dist/development/src/coreComponents/DataBindingProvider.js.map +1 -1
  114. package/dist/development/src/coreComponents/Entity.cjs.map +1 -1
  115. package/dist/development/src/coreComponents/Entity.js.map +1 -1
  116. package/dist/development/src/coreComponents/EntityList.cjs +3 -3
  117. package/dist/development/src/coreComponents/EntityList.cjs.map +1 -1
  118. package/dist/development/src/coreComponents/EntityList.js +3 -3
  119. package/dist/development/src/coreComponents/EntityList.js.map +1 -1
  120. package/dist/development/src/coreComponents/EntityListSubTree.cjs +3 -3
  121. package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  122. package/dist/development/src/coreComponents/EntityListSubTree.js +4 -4
  123. package/dist/development/src/coreComponents/EntityListSubTree.js.map +1 -1
  124. package/dist/development/src/coreComponents/EntitySubTree.cjs.map +1 -1
  125. package/dist/development/src/coreComponents/EntitySubTree.js +1 -1
  126. package/dist/development/src/coreComponents/EntitySubTree.js.map +1 -1
  127. package/dist/development/src/coreComponents/Field.cjs +2 -2
  128. package/dist/development/src/coreComponents/Field.cjs.map +1 -1
  129. package/dist/development/src/coreComponents/Field.js +3 -3
  130. package/dist/development/src/coreComponents/Field.js.map +1 -1
  131. package/dist/development/src/coreComponents/HasMany.cjs +3 -3
  132. package/dist/development/src/coreComponents/HasMany.cjs.map +1 -1
  133. package/dist/development/src/coreComponents/HasMany.js +4 -4
  134. package/dist/development/src/coreComponents/HasMany.js.map +1 -1
  135. package/dist/development/src/coreComponents/HasOne.cjs.map +1 -1
  136. package/dist/development/src/coreComponents/HasOne.js +1 -1
  137. package/dist/development/src/coreComponents/HasOne.js.map +1 -1
  138. package/dist/development/src/coreComponents/ParentEntity.cjs.map +1 -1
  139. package/dist/development/src/coreComponents/ParentEntity.js.map +1 -1
  140. package/dist/development/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  141. package/dist/development/src/entityEvents/useDataBindingEvent.js.map +1 -1
  142. package/dist/development/src/entityEvents/useDerivedField.cjs.map +1 -1
  143. package/dist/development/src/entityEvents/useDerivedField.js.map +1 -1
  144. package/dist/development/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  145. package/dist/development/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  146. package/dist/development/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  147. package/dist/development/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  148. package/dist/development/src/entityEvents/useEntityEvent.cjs.map +1 -1
  149. package/dist/development/src/entityEvents/useEntityEvent.js.map +1 -1
  150. package/dist/development/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  151. package/dist/development/src/entityEvents/useEntityPersistError.js.map +1 -1
  152. package/dist/development/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  153. package/dist/development/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  154. package/dist/development/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  155. package/dist/development/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  156. package/dist/development/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  157. package/dist/development/src/helperComponents/DeferredSubTrees.js.map +1 -1
  158. package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs +1 -1
  159. package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  160. package/dist/development/src/helperComponents/DeleteEntityTrigger.js +1 -1
  161. package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  162. package/dist/development/src/helperComponents/DimensionRenderer.cjs +4 -4
  163. package/dist/development/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  164. package/dist/development/src/helperComponents/DimensionRenderer.js +4 -4
  165. package/dist/development/src/helperComponents/DimensionRenderer.js.map +1 -1
  166. package/dist/development/src/helperComponents/EntityView.cjs +1 -1
  167. package/dist/development/src/helperComponents/EntityView.cjs.map +1 -1
  168. package/dist/development/src/helperComponents/EntityView.js +1 -1
  169. package/dist/development/src/helperComponents/EntityView.js.map +1 -1
  170. package/dist/development/src/helperComponents/FieldView.cjs +4 -4
  171. package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
  172. package/dist/development/src/helperComponents/FieldView.js +4 -4
  173. package/dist/development/src/helperComponents/FieldView.js.map +1 -1
  174. package/dist/development/src/helperComponents/If.cjs +20 -23
  175. package/dist/development/src/helperComponents/If.cjs.map +1 -1
  176. package/dist/development/src/helperComponents/If.js +20 -23
  177. package/dist/development/src/helperComponents/If.js.map +1 -1
  178. package/dist/development/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  179. package/dist/development/src/helperComponents/LabelMiddleware.js.map +1 -1
  180. package/dist/development/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  181. package/dist/development/src/helperComponents/RecursionTerminator.js.map +1 -1
  182. package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  183. package/dist/development/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  184. package/dist/development/src/helperComponents/StaticRender.cjs.map +1 -1
  185. package/dist/development/src/helperComponents/StaticRender.js.map +1 -1
  186. package/dist/development/src/helperComponents/SugaredField.cjs.map +1 -1
  187. package/dist/development/src/helperComponents/SugaredField.js.map +1 -1
  188. package/dist/development/src/helperComponents/Variable.cjs.map +1 -1
  189. package/dist/development/src/helperComponents/Variable.js.map +1 -1
  190. package/dist/development/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  191. package/dist/development/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  192. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
  193. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
  194. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
  195. package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  196. package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  197. package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  198. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs +1 -1
  199. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  200. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js +1 -1
  201. package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  202. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs +1 -1
  203. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  204. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js +1 -1
  205. package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  206. package/dist/development/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  207. package/dist/development/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  208. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs +1 -1
  209. package/dist/development/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  210. package/dist/development/src/helperComponents/persist/PersistTrigger.js +1 -1
  211. package/dist/development/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  212. package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  213. package/dist/development/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  214. package/dist/development/src/markers/IncrementalMarkerBuilder.cjs +47 -44
  215. package/dist/development/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
  216. package/dist/development/src/markers/IncrementalMarkerBuilder.js +47 -44
  217. package/dist/development/src/markers/IncrementalMarkerBuilder.js.map +1 -1
  218. package/dist/development/src/markers/MarkerStaticAnalyzer.cjs +19 -19
  219. package/dist/development/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  220. package/dist/development/src/markers/MarkerStaticAnalyzer.js +19 -19
  221. package/dist/development/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  222. package/dist/development/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  223. package/dist/development/src/markers/MarkerTreeGenerator.js.map +1 -1
  224. package/dist/production/index.cjs +99 -99
  225. package/dist/production/index.js +48 -48
  226. package/dist/production/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
  227. package/dist/production/src/accessorPropagation/AccessorProvider.js.map +1 -1
  228. package/dist/production/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
  229. package/dist/production/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
  230. package/dist/production/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
  231. package/dist/production/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  232. package/dist/production/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
  233. package/dist/production/src/accessorPropagation/EntityKeyContext.js.map +1 -1
  234. package/dist/production/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
  235. package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
  236. package/dist/production/src/accessorPropagation/EnvironmentContext.cjs +0 -1
  237. package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
  238. package/dist/production/src/accessorPropagation/EnvironmentContext.js +1 -2
  239. package/dist/production/src/accessorPropagation/EnvironmentContext.js.map +1 -1
  240. package/dist/production/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
  241. package/dist/production/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
  242. package/dist/production/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
  243. package/dist/production/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  244. package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
  245. package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  246. package/dist/production/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
  247. package/dist/production/src/accessorPropagation/useBindingOperations.js.map +1 -1
  248. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
  249. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
  250. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
  251. package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  252. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
  253. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
  254. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
  255. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  256. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
  257. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
  258. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
  259. package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  260. package/dist/production/src/accessorPropagation/useEntity.cjs.map +1 -1
  261. package/dist/production/src/accessorPropagation/useEntity.js.map +1 -1
  262. package/dist/production/src/accessorPropagation/useEntityKey.cjs.map +1 -1
  263. package/dist/production/src/accessorPropagation/useEntityKey.js.map +1 -1
  264. package/dist/production/src/accessorPropagation/useEntityList.cjs.map +1 -1
  265. package/dist/production/src/accessorPropagation/useEntityList.js.map +1 -1
  266. package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
  267. package/dist/production/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
  268. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
  269. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
  270. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
  271. package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
  272. package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
  273. package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  274. package/dist/production/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
  275. package/dist/production/src/accessorPropagation/useEntitySubTree.js.map +1 -1
  276. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
  277. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
  278. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
  279. package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
  280. package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
  281. package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  282. package/dist/production/src/accessorPropagation/useExtendTree.cjs +1 -4
  283. package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
  284. package/dist/production/src/accessorPropagation/useExtendTree.js +1 -4
  285. package/dist/production/src/accessorPropagation/useExtendTree.js.map +1 -1
  286. package/dist/production/src/accessorPropagation/useField.cjs.map +1 -1
  287. package/dist/production/src/accessorPropagation/useField.js.map +1 -1
  288. package/dist/production/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
  289. package/dist/production/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
  290. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
  291. package/dist/production/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  292. package/dist/production/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
  293. package/dist/production/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  294. package/dist/production/src/accessorPropagation/useHasEntity.cjs.map +1 -1
  295. package/dist/production/src/accessorPropagation/useHasEntity.js.map +1 -1
  296. package/dist/production/src/accessorPropagation/usePersist.cjs.map +1 -1
  297. package/dist/production/src/accessorPropagation/usePersist.js.map +1 -1
  298. package/dist/production/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
  299. package/dist/production/src/accessorPropagation/useTreeRootId.js.map +1 -1
  300. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs +1 -1
  301. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
  302. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js +1 -1
  303. package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  304. package/dist/production/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
  305. package/dist/production/src/accessorSorting/addEntityAtIndex.js.map +1 -1
  306. package/dist/production/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
  307. package/dist/production/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
  308. package/dist/production/src/accessorSorting/sortEntities.cjs.map +1 -1
  309. package/dist/production/src/accessorSorting/sortEntities.js.map +1 -1
  310. package/dist/production/src/accessorTree/AccessorTree.cjs.map +1 -1
  311. package/dist/production/src/accessorTree/AccessorTree.js.map +1 -1
  312. package/dist/production/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
  313. package/dist/production/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
  314. package/dist/production/src/accessorTree/DirtinessContext.cjs.map +1 -1
  315. package/dist/production/src/accessorTree/DirtinessContext.js.map +1 -1
  316. package/dist/production/src/accessorTree/MutationStateContext.cjs.map +1 -1
  317. package/dist/production/src/accessorTree/MutationStateContext.js.map +1 -1
  318. package/dist/production/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
  319. package/dist/production/src/accessorTree/useAccessorTreeState.js.map +1 -1
  320. package/dist/production/src/accessorTree/useDataBinding.cjs +17 -13
  321. package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
  322. package/dist/production/src/accessorTree/useDataBinding.js +19 -15
  323. package/dist/production/src/accessorTree/useDataBinding.js.map +1 -1
  324. package/dist/production/src/accessorTree/useDirtinessState.cjs.map +1 -1
  325. package/dist/production/src/accessorTree/useDirtinessState.js.map +1 -1
  326. package/dist/production/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
  327. package/dist/production/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
  328. package/dist/production/src/accessorTree/useMutationState.cjs.map +1 -1
  329. package/dist/production/src/accessorTree/useMutationState.js.map +1 -1
  330. package/dist/production/src/coreComponents/Component.cjs.map +1 -1
  331. package/dist/production/src/coreComponents/Component.js.map +1 -1
  332. package/dist/production/src/coreComponents/DataBindingProvider.cjs.map +1 -1
  333. package/dist/production/src/coreComponents/DataBindingProvider.js.map +1 -1
  334. package/dist/production/src/coreComponents/Entity.cjs.map +1 -1
  335. package/dist/production/src/coreComponents/Entity.js.map +1 -1
  336. package/dist/production/src/coreComponents/EntityList.cjs.map +1 -1
  337. package/dist/production/src/coreComponents/EntityList.js.map +1 -1
  338. package/dist/production/src/coreComponents/EntityListSubTree.cjs.map +1 -1
  339. package/dist/production/src/coreComponents/EntityListSubTree.js +1 -1
  340. package/dist/production/src/coreComponents/EntityListSubTree.js.map +1 -1
  341. package/dist/production/src/coreComponents/EntitySubTree.cjs.map +1 -1
  342. package/dist/production/src/coreComponents/EntitySubTree.js +1 -1
  343. package/dist/production/src/coreComponents/EntitySubTree.js.map +1 -1
  344. package/dist/production/src/coreComponents/Field.cjs.map +1 -1
  345. package/dist/production/src/coreComponents/Field.js +1 -1
  346. package/dist/production/src/coreComponents/Field.js.map +1 -1
  347. package/dist/production/src/coreComponents/HasMany.cjs.map +1 -1
  348. package/dist/production/src/coreComponents/HasMany.js +1 -1
  349. package/dist/production/src/coreComponents/HasMany.js.map +1 -1
  350. package/dist/production/src/coreComponents/HasOne.cjs.map +1 -1
  351. package/dist/production/src/coreComponents/HasOne.js +1 -1
  352. package/dist/production/src/coreComponents/HasOne.js.map +1 -1
  353. package/dist/production/src/coreComponents/ParentEntity.cjs.map +1 -1
  354. package/dist/production/src/coreComponents/ParentEntity.js.map +1 -1
  355. package/dist/production/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
  356. package/dist/production/src/entityEvents/useDataBindingEvent.js.map +1 -1
  357. package/dist/production/src/entityEvents/useDerivedField.cjs.map +1 -1
  358. package/dist/production/src/entityEvents/useDerivedField.js.map +1 -1
  359. package/dist/production/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
  360. package/dist/production/src/entityEvents/useEntityBeforePersist.js.map +1 -1
  361. package/dist/production/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
  362. package/dist/production/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  363. package/dist/production/src/entityEvents/useEntityEvent.cjs.map +1 -1
  364. package/dist/production/src/entityEvents/useEntityEvent.js.map +1 -1
  365. package/dist/production/src/entityEvents/useEntityPersistError.cjs.map +1 -1
  366. package/dist/production/src/entityEvents/useEntityPersistError.js.map +1 -1
  367. package/dist/production/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
  368. package/dist/production/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
  369. package/dist/production/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
  370. package/dist/production/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
  371. package/dist/production/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
  372. package/dist/production/src/helperComponents/DeferredSubTrees.js.map +1 -1
  373. package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
  374. package/dist/production/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
  375. package/dist/production/src/helperComponents/DimensionRenderer.cjs.map +1 -1
  376. package/dist/production/src/helperComponents/DimensionRenderer.js.map +1 -1
  377. package/dist/production/src/helperComponents/EntityView.cjs.map +1 -1
  378. package/dist/production/src/helperComponents/EntityView.js.map +1 -1
  379. package/dist/production/src/helperComponents/FieldView.cjs.map +1 -1
  380. package/dist/production/src/helperComponents/FieldView.js.map +1 -1
  381. package/dist/production/src/helperComponents/If.cjs +7 -10
  382. package/dist/production/src/helperComponents/If.cjs.map +1 -1
  383. package/dist/production/src/helperComponents/If.js +8 -11
  384. package/dist/production/src/helperComponents/If.js.map +1 -1
  385. package/dist/production/src/helperComponents/LabelMiddleware.cjs.map +1 -1
  386. package/dist/production/src/helperComponents/LabelMiddleware.js.map +1 -1
  387. package/dist/production/src/helperComponents/RecursionTerminator.cjs.map +1 -1
  388. package/dist/production/src/helperComponents/RecursionTerminator.js.map +1 -1
  389. package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
  390. package/dist/production/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
  391. package/dist/production/src/helperComponents/StaticRender.cjs.map +1 -1
  392. package/dist/production/src/helperComponents/StaticRender.js.map +1 -1
  393. package/dist/production/src/helperComponents/SugaredField.cjs.map +1 -1
  394. package/dist/production/src/helperComponents/SugaredField.js.map +1 -1
  395. package/dist/production/src/helperComponents/Variable.cjs.map +1 -1
  396. package/dist/production/src/helperComponents/Variable.js.map +1 -1
  397. package/dist/production/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
  398. package/dist/production/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  399. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
  400. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
  401. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
  402. package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  403. package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
  404. package/dist/production/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
  405. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
  406. package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
  407. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
  408. package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
  409. package/dist/production/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
  410. package/dist/production/src/helperComponents/persist/PersistOnKey.js.map +1 -1
  411. package/dist/production/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
  412. package/dist/production/src/helperComponents/persist/PersistTrigger.js.map +1 -1
  413. package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
  414. package/dist/production/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
  415. package/dist/production/src/markers/IncrementalMarkerBuilder.cjs +47 -44
  416. package/dist/production/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
  417. package/dist/production/src/markers/IncrementalMarkerBuilder.js +47 -44
  418. package/dist/production/src/markers/IncrementalMarkerBuilder.js.map +1 -1
  419. package/dist/production/src/markers/MarkerStaticAnalyzer.cjs +19 -19
  420. package/dist/production/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
  421. package/dist/production/src/markers/MarkerStaticAnalyzer.js +19 -19
  422. package/dist/production/src/markers/MarkerStaticAnalyzer.js.map +1 -1
  423. package/dist/production/src/markers/MarkerTreeGenerator.cjs.map +1 -1
  424. package/dist/production/src/markers/MarkerTreeGenerator.js.map +1 -1
  425. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +1 -1
  426. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
  427. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +1 -1
  428. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
  429. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +1 -1
  430. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -1
  431. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +1 -1
  432. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
  433. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +1 -1
  434. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +1 -1
  435. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +1 -1
  436. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +1 -1
  437. package/dist/types/accessorPropagation/useEntity.d.ts.map +1 -1
  438. package/dist/types/accessorPropagation/useEntityList.d.ts.map +1 -1
  439. package/dist/types/accessorPropagation/useEntityListSubTreeLoader.d.ts.map +1 -1
  440. package/dist/types/accessorPropagation/useEntitySubTreeLoader.d.ts.map +1 -1
  441. package/dist/types/accessorPropagation/useExtendTree.d.ts.map +1 -1
  442. package/dist/types/accessorPropagation/useField.d.ts.map +1 -1
  443. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +1 -1
  444. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +1 -1
  445. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +1 -1
  446. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +1 -1
  447. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
  448. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
  449. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -1
  450. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +1 -1
  451. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -1
  452. package/dist/types/accessorTree/DirtinessContext.d.ts +1 -1
  453. package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
  454. package/dist/types/accessorTree/MutationStateContext.d.ts +1 -1
  455. package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
  456. package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
  457. package/dist/types/accessorTree/useEnvironmentWithSchema.d.ts.map +1 -1
  458. package/dist/types/coreComponents/Component.d.ts.map +1 -1
  459. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
  460. package/dist/types/coreComponents/Entity.d.ts +1 -1
  461. package/dist/types/coreComponents/Entity.d.ts.map +1 -1
  462. package/dist/types/coreComponents/EntityList.d.ts.map +1 -1
  463. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
  464. package/dist/types/coreComponents/Field.d.ts.map +1 -1
  465. package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
  466. package/dist/types/coreComponents/HasOne.d.ts.map +1 -1
  467. package/dist/types/coreComponents/ParentEntity.d.ts +1 -1
  468. package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
  469. package/dist/types/helperComponents/DeferredSubTrees.d.ts +1 -1
  470. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
  471. package/dist/types/helperComponents/DeleteEntityTrigger.d.ts.map +1 -1
  472. package/dist/types/helperComponents/DimensionRenderer.d.ts.map +1 -1
  473. package/dist/types/helperComponents/EntityView.d.ts.map +1 -1
  474. package/dist/types/helperComponents/FieldView.d.ts +13 -2
  475. package/dist/types/helperComponents/FieldView.d.ts.map +1 -1
  476. package/dist/types/helperComponents/If.d.ts +1 -1
  477. package/dist/types/helperComponents/If.d.ts.map +1 -1
  478. package/dist/types/helperComponents/LabelMiddleware.d.ts +1 -1
  479. package/dist/types/helperComponents/LabelMiddleware.d.ts.map +1 -1
  480. package/dist/types/helperComponents/RecursionTerminator.d.ts +1 -1
  481. package/dist/types/helperComponents/RecursionTerminator.d.ts.map +1 -1
  482. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts +1 -1
  483. package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts.map +1 -1
  484. package/dist/types/helperComponents/StaticRender.d.ts +1 -1
  485. package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
  486. package/dist/types/helperComponents/Variable.d.ts +1 -1
  487. package/dist/types/helperComponents/Variable.d.ts.map +1 -1
  488. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +1 -1
  489. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +1 -1
  490. package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts +1 -1
  491. package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts.map +1 -1
  492. package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts +1 -1
  493. package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts.map +1 -1
  494. package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -1
  495. package/dist/types/markers/IncrementalMarkerBuilder.d.ts.map +1 -1
  496. package/dist/types/markers/MarkerProvider.d.ts.map +1 -1
  497. package/dist/types/markers/MarkerStaticAnalyzer.d.ts.map +1 -1
  498. package/dist/types/markers/MarkerTreeGenerator.d.ts.map +1 -1
  499. package/dist/types/tsconfig.tsbuildinfo +1 -1
  500. package/package.json +18 -13
  501. package/src/accessorPropagation/BindingOperationsContext.ts +3 -3
  502. package/src/accessorPropagation/EnvironmentContext.tsx +1 -1
  503. package/src/accessorPropagation/useAccessorUpdateSubscription.ts +5 -3
  504. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +2 -3
  505. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +2 -3
  506. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +2 -3
  507. package/src/accessorPropagation/useEntity.ts +0 -7
  508. package/src/accessorPropagation/useEntityKey.ts +2 -2
  509. package/src/accessorPropagation/useEntityList.ts +0 -3
  510. package/src/accessorPropagation/useEntityListSubTreeLoader.ts +12 -8
  511. package/src/accessorPropagation/useEntityListSubTreeParameters.ts +0 -6
  512. package/src/accessorPropagation/useEntitySubTreeLoader.ts +12 -9
  513. package/src/accessorPropagation/useEntitySubTreeParameters.ts +0 -6
  514. package/src/accessorPropagation/useExtendTree.ts +1 -3
  515. package/src/accessorPropagation/useField.ts +0 -3
  516. package/src/accessorPropagation/useGetEntityListSubTree.ts +3 -8
  517. package/src/accessorPropagation/useGetEntitySubTree.ts +3 -8
  518. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +2 -4
  519. package/src/accessorTree/AccessorTreeStateAction.ts +2 -2
  520. package/src/accessorTree/useDataBinding.ts +18 -21
  521. package/src/accessorTree/useEnvironmentWithSchema.ts +1 -2
  522. package/src/coreComponents/Component.tsx +4 -3
  523. package/src/coreComponents/DataBindingProvider.tsx +0 -1
  524. package/src/coreComponents/Entity.tsx +1 -1
  525. package/src/coreComponents/EntityList.tsx +9 -8
  526. package/src/coreComponents/EntityListSubTree.tsx +14 -12
  527. package/src/coreComponents/Field.tsx +3 -5
  528. package/src/coreComponents/HasMany.tsx +14 -12
  529. package/src/coreComponents/HasOne.tsx +1 -2
  530. package/src/coreComponents/ParentEntity.tsx +1 -2
  531. package/src/entityEvents/useDataBindingEvent.ts +1 -1
  532. package/src/entityEvents/useEntityEvent.ts +1 -1
  533. package/src/helperComponents/DeferredSubTrees.tsx +2 -2
  534. package/src/helperComponents/DeleteEntityTrigger.tsx +1 -3
  535. package/src/helperComponents/DimensionRenderer.tsx +12 -10
  536. package/src/helperComponents/EntityView.tsx +0 -1
  537. package/src/helperComponents/FieldView.tsx +33 -20
  538. package/src/helperComponents/If.tsx +16 -14
  539. package/src/helperComponents/RecursionTerminator.tsx +1 -7
  540. package/src/helperComponents/helpers/FilterEvaluator.ts +0 -3
  541. package/src/helperComponents/helpers/FilterFieldsCollector.ts +5 -6
  542. package/src/helperComponents/helpers/evaluateCondition.ts +1 -1
  543. package/src/helperComponents/persist/PersistOnFieldChange.tsx +0 -1
  544. package/src/helperComponents/persist/PersistOnHasOneChange.tsx +1 -2
  545. package/src/helperComponents/persist/PersistOnKey.tsx +2 -2
  546. package/src/helperComponents/persist/PersistTrigger.tsx +3 -1
  547. package/src/markers/IncrementalMarkerBuilder.ts +50 -45
  548. package/src/markers/MarkerProvider.ts +6 -6
  549. package/src/markers/MarkerStaticAnalyzer.ts +16 -14
  550. package/src/markers/MarkerTreeGenerator.ts +0 -2
  551. package/src/typings/react-fix.d.ts +2 -4
  552. package/tests/cases/unit/core/entityOperations.test.tsx +18 -17
  553. package/tests/cases/unit/core/eventManager.test.tsx +15 -7
  554. package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +0 -2
  555. package/tests/cases/unit/helperComponents/schema.ts +1 -2
  556. package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +103 -81
  557. package/tests/lib/bindingFactory.ts +11 -1
  558. package/tests/lib/convertModelToAdminSchema.ts +109 -107
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["this"],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,OAAQ,CAAA;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAM,eAAe;AAC3B,UAAM,mBAAmB;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA;AAAA,MAE5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAG,CAAA;AAAA,IAC9B;AAEA,kCAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAvD,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAgE,GAAAA,MAAA;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,gDAAU,SAAH,GAAA,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAY,GAAAA,MAAA;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAAA;AAAA,EAC9B;AAEF;AAQO,MAAM,+BAAgG;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACjG,WAAA,uBAAC,uBAAsB,EAAA,QAAiB,YAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAiD,GAAAA,MAAA;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AAChE,WAAA,uBAAC,uBAAsB,EAAA,QAAiB,YAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAiD,GAAAA,MAAA;AAAA,EAAA;AAE1D;"}
1
+ {"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: intentional\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["this"],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,OAAA,CAAQ;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAM,eAAA;AAEZ,UAAM,mBAAmB;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA,MAC5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAA,CAAG;AAAA,IAAA;AAG9B,kCAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,SAAA,GAAvD,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAgE;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,gDAAU,SAAA,GAAH,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAAY;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAC9B;AAAA,EAAA;AAEF;AAQO,MAAM,+BAAgG;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACxG,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AACvE,WAAO,uBAAC,uBAAA,EAAsB,QAAiB,SAAA,GAAxC,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAAiD;AAAA,EACzD;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":["createContext"],"mappings":";;;AAGa,MAAA,oBAAoBA,oBAAsC,MAAS;AAChF,kBAAkB,cAAc;;"}
1
+ {"version":3,"file":"TreeRootIdContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":["createContext"],"mappings":";;;AAGO,MAAM,oBAAoBA,MAAAA,cAAsC,MAAS;AAChF,kBAAkB,cAAc;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":[],"mappings":";AAGa,MAAA,oBAAoB,cAAsC,MAAS;AAChF,kBAAkB,cAAc;"}
1
+ {"version":3,"file":"TreeRootIdContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":[],"mappings":";AAGO,MAAM,oBAAoB,cAAsC,MAAS;AAChF,kBAAkB,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsxDEV","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAAA,8BAAA,OAACC,oCAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,SAA5D,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAqE,GAAA,IAAA;AAC7E;;"}
1
+ {"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsxDEV","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAOA,8BAAAA,OAACC,kBAAAA,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAA,uBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,SAA5D,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAqE,GAAA,IAAA;AAC7E;"}
1
+ {"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAClE,SAAO,uBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,YAA5D,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAqE;AAC7E;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccessorUpdateSubscription.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <Accessor extends {\n\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n}>(getAccessor: () => Accessor): [Accessor, {update: () => void}] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":["useState","useRef","useEffect","useCallback"],"mappings":";;;AAKa,MAAA,gCAAgC,CAE1C,gBAAkE;AACpE,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAmB,MAAM,aAAa;AAC1D,QAAA,YAAYC,aAAO,WAAW;AAEpC,MAAI,WAAW;AACX,MAAA,UAAU,YAAY,aAAa;AACtC,eAAW,YAAY;AACvB,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EAAA;AAGrBC,QAAAA,UAAU,MAAM;AACf,QAAI,oBAAoB;AAClB,UAAA,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAe,gBAAA;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MAAA;AAED,eAAS,WAAW;AAAA,IAAA,CACpB;AAED,WAAO,MAAM;AACQ,0BAAA;AACR,kBAAA;AAAA,IACb;AAAA,EAAA,GACE,CAAC,WAAW,CAAC;AAEV,QAAA,SAASC,MAAAA,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EAAA,GACpB,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;;"}
1
+ {"version":3,"file":"useAccessorUpdateSubscription.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <\n\tAccessor extends {\n\t\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n\t},\n>(getAccessor: () => Accessor): [Accessor, { update: () => void }] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":["useState","useRef","useEffect","useCallback"],"mappings":";;;AAKO,MAAM,gCAAgC,CAI3C,gBAAoE;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAmB,MAAM,aAAa;AAChE,QAAM,YAAYC,MAAAA,OAAO,WAAW;AAEpC,MAAI,WAAW;AACf,MAAI,UAAU,YAAY,aAAa;AACtC,eAAW,YAAA;AACX,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EACrB;AAEAC,QAAAA,UAAU,MAAM;AACf,QAAI,oBAAoB;AACxB,UAAM,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAA,gBAAe;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MACD;AACA,eAAS,WAAW;AAAA,IACrB,CAAC;AAED,WAAO,MAAM;AACZ,0BAAoB;AACpB,kBAAA;AAAA,IACD;AAAA,EACD,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,SAASC,MAAAA,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EACvB,GAAG,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccessorUpdateSubscription.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <Accessor extends {\n\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n}>(getAccessor: () => Accessor): [Accessor, {update: () => void}] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":[],"mappings":";AAKa,MAAA,gCAAgC,CAE1C,gBAAkE;AACpE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAmB,MAAM,aAAa;AAC1D,QAAA,YAAY,OAAO,WAAW;AAEpC,MAAI,WAAW;AACX,MAAA,UAAU,YAAY,aAAa;AACtC,eAAW,YAAY;AACvB,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EAAA;AAGrB,YAAU,MAAM;AACf,QAAI,oBAAoB;AAClB,UAAA,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAe,gBAAA;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MAAA;AAED,eAAS,WAAW;AAAA,IAAA,CACpB;AAED,WAAO,MAAM;AACQ,0BAAA;AACR,kBAAA;AAAA,IACb;AAAA,EAAA,GACE,CAAC,WAAW,CAAC;AAEV,QAAA,SAAS,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EAAA,GACpB,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;"}
1
+ {"version":3,"file":"useAccessorUpdateSubscription.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <\n\tAccessor extends {\n\t\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n\t},\n>(getAccessor: () => Accessor): [Accessor, { update: () => void }] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":[],"mappings":";AAKO,MAAM,gCAAgC,CAI3C,gBAAoE;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAmB,MAAM,aAAa;AAChE,QAAM,YAAY,OAAO,WAAW;AAEpC,MAAI,WAAW;AACf,MAAI,UAAU,YAAY,aAAa;AACtC,eAAW,YAAA;AACX,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EACrB;AAEA,YAAU,MAAM;AACf,QAAI,oBAAoB;AACxB,UAAM,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAA,gBAAe;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MACD;AACA,eAAS,WAAW;AAAA,IACrB,CAAC;AAED,WAAO,MAAM;AACZ,0BAAoB;AACpB,kBAAA;AAAA,IACD;AAAA,EACD,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,SAAS,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EACvB,GAAG,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBindingOperations.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":["useContext","BindingOperationsContext"],"mappings":";;;;AAIa,MAAA,uBAAuB,MAAoCA,MAAAA,WAAWC,yBAAwB,wBAAA;;"}
1
+ {"version":3,"file":"useBindingOperations.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":["useContext","BindingOperationsContext"],"mappings":";;;;AAIO,MAAM,uBAAuB,MAAoCA,MAAAA,WAAWC,yBAAAA,wBAAwB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBindingOperations.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":[],"mappings":";;AAIa,MAAA,uBAAuB,MAAoC,WAAW,wBAAwB;"}
1
+ {"version":3,"file":"useBindingOperations.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useBindingOperations.ts"],"sourcesContent":["import { ReactNode, useContext } from 'react'\nimport type { BindingOperations } from '@contember/binding'\nimport { BindingOperationsContext } from './BindingOperationsContext'\n\nexport const useBindingOperations = (): BindingOperations<ReactNode> => useContext(BindingOperationsContext)\n"],"names":[],"mappings":";;AAIO,MAAM,uBAAuB,MAAoC,WAAW,wBAAwB;"}
@@ -5,7 +5,7 @@ const binding = require("@contember/binding");
5
5
  const useEnvironment = require("./useEnvironment.cjs");
6
6
  function useDesugaredRelativeEntityList(sugaredRelativeEntityList) {
7
7
  const environment = useEnvironment.useEnvironment();
8
- let normalizedSugared = void 0;
8
+ let normalizedSugared;
9
9
  let hasList;
10
10
  if (sugaredRelativeEntityList === void 0) {
11
11
  hasList = false;
@@ -30,7 +30,6 @@ function useDesugaredRelativeEntityList(sugaredRelativeEntityList) {
30
30
  },
31
31
  environment
32
32
  ) : void 0,
33
- // eslint-disable-next-line react-hooks/exhaustive-deps
34
33
  [
35
34
  normalizedSugared?.field,
36
35
  normalizedSugared?.setOnCreate,
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA2D;AAC3D,MAAA;AAEJ,MAAI,8BAA8B,QAAW;AAClC,cAAA;AAAA,EAAA,WACA,OAAO,8BAA8B,UAAU;AAC/C,cAAA;AACU,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,UACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAC7B;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EAEF;AACD;;"}
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,UACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
@@ -3,7 +3,7 @@ import { QueryLanguage } from "@contember/binding";
3
3
  import { useEnvironment } from "./useEnvironment.js";
4
4
  function useDesugaredRelativeEntityList(sugaredRelativeEntityList) {
5
5
  const environment = useEnvironment();
6
- let normalizedSugared = void 0;
6
+ let normalizedSugared;
7
7
  let hasList;
8
8
  if (sugaredRelativeEntityList === void 0) {
9
9
  hasList = false;
@@ -28,7 +28,6 @@ function useDesugaredRelativeEntityList(sugaredRelativeEntityList) {
28
28
  },
29
29
  environment
30
30
  ) : void 0,
31
- // eslint-disable-next-line react-hooks/exhaustive-deps
32
31
  [
33
32
  normalizedSugared?.field,
34
33
  normalizedSugared?.setOnCreate,
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA2D;AAC3D,MAAA;AAEJ,MAAI,8BAA8B,QAAW;AAClC,cAAA;AAAA,EAAA,WACA,OAAO,8BAA8B,UAAU;AAC/C,cAAA;AACU,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAC7B;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EAEF;AACD;"}
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,8BAA8B,QAAW;AAC5C,cAAU;AAAA,EACX,WAAW,OAAO,8BAA8B,UAAU;AACzD,cAAU;AACV,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,cAAU;AACV,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAAA;AAAA,MAE7B;AAAA,IAAA,IAEC;AAAA,IACJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EACD;AAEF;"}
@@ -5,7 +5,7 @@ const binding = require("@contember/binding");
5
5
  const useEnvironment = require("./useEnvironment.cjs");
6
6
  function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity) {
7
7
  const environment = useEnvironment.useEnvironment();
8
- let normalizedSugared = void 0;
8
+ let normalizedSugared;
9
9
  let hasEntity;
10
10
  if (sugaredRelativeSingleEntity === void 0) {
11
11
  hasEntity = false;
@@ -27,7 +27,6 @@ function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity) {
27
27
  },
28
28
  environment
29
29
  ) : void 0,
30
- // eslint-disable-next-line react-hooks/exhaustive-deps
31
30
  [normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity]
32
31
  );
33
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA6D;AAC7D,MAAA;AAEJ,MAAI,gCAAgC,QAAW;AAClC,gBAAA;AAAA,EAAA,WACF,OAAO,gCAAgC,UAAU;AAC/C,gBAAA;AACQ,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,YACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EACnH;AACD;;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,YACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;;"}
@@ -3,7 +3,7 @@ import { QueryLanguage } from "@contember/binding";
3
3
  import { useEnvironment } from "./useEnvironment.js";
4
4
  function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity) {
5
5
  const environment = useEnvironment();
6
- let normalizedSugared = void 0;
6
+ let normalizedSugared;
7
7
  let hasEntity;
8
8
  if (sugaredRelativeSingleEntity === void 0) {
9
9
  hasEntity = false;
@@ -25,7 +25,6 @@ function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity) {
25
25
  },
26
26
  environment
27
27
  ) : void 0,
28
- // eslint-disable-next-line react-hooks/exhaustive-deps
29
28
  [normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity]
30
29
  );
31
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA6D;AAC7D,MAAA;AAEJ,MAAI,gCAAgC,QAAW;AAClC,gBAAA;AAAA,EAAA,WACF,OAAO,gCAAgC,UAAU;AAC/C,gBAAA;AACQ,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EACnH;AACD;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,gCAAgC,QAAW;AAC9C,gBAAY;AAAA,EACb,WAAW,OAAO,gCAAgC,UAAU;AAC3D,gBAAY;AACZ,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,gBAAY;AACZ,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MAAA;AAAA,MAEjC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;"}
@@ -5,7 +5,7 @@ const binding = require("@contember/binding");
5
5
  const useEnvironment = require("./useEnvironment.cjs");
6
6
  function useDesugaredRelativeSingleField(sugaredRelativeSingleField) {
7
7
  const environment = useEnvironment.useEnvironment();
8
- let normalizedSugared = void 0;
8
+ let normalizedSugared;
9
9
  let hasField;
10
10
  if (sugaredRelativeSingleField === void 0) {
11
11
  hasField = false;
@@ -27,7 +27,6 @@ function useDesugaredRelativeSingleField(sugaredRelativeSingleField) {
27
27
  },
28
28
  environment
29
29
  ) : void 0,
30
- // eslint-disable-next-line react-hooks/exhaustive-deps
31
30
  [normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField]
32
31
  );
33
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA4D;AAC5D,MAAA;AAEJ,MAAI,+BAA+B,QAAW;AAClC,eAAA;AAAA,EAAA,WACD,OAAO,+BAA+B,UAAU;AAC/C,eAAA;AACS,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,WACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EACnH;AACD;;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAOC,MAAAA;AAAAA,IACN,MACC,WACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;;"}
@@ -3,7 +3,7 @@ import { QueryLanguage } from "@contember/binding";
3
3
  import { useEnvironment } from "./useEnvironment.js";
4
4
  function useDesugaredRelativeSingleField(sugaredRelativeSingleField) {
5
5
  const environment = useEnvironment();
6
- let normalizedSugared = void 0;
6
+ let normalizedSugared;
7
7
  let hasField;
8
8
  if (sugaredRelativeSingleField === void 0) {
9
9
  hasField = false;
@@ -25,7 +25,6 @@ function useDesugaredRelativeSingleField(sugaredRelativeSingleField) {
25
25
  },
26
26
  environment
27
27
  ) : void 0,
28
- // eslint-disable-next-line react-hooks/exhaustive-deps
29
28
  [normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField]
30
29
  );
31
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA4D;AAC5D,MAAA;AAEJ,MAAI,+BAA+B,QAAW;AAClC,eAAA;AAAA,EAAA,WACD,OAAO,+BAA+B,UAAU;AAC/C,eAAA;AACS,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EACnH;AACD;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc,eAAA;AAEpB,MAAI;AACJ,MAAI;AAEJ,MAAI,+BAA+B,QAAW;AAC7C,eAAW;AAAA,EACZ,WAAW,OAAO,+BAA+B,UAAU;AAC1D,eAAW;AACX,wBAAoB;AAAA,MACnB,OAAO;AAAA,IAAA;AAAA,EAET,OAAO;AACN,eAAW;AACX,wBAAoB;AAAA,EACrB;AAEA,SAAO;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAAA;AAAA,MAElC;AAAA,IAAA,IAEC;AAAA,IACJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useAccessorUpdateSubscription","useDesugaredRelativeSingleEntity","useConstantLengthInvariant","entity","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAcA,SAAS,aAAa,QAA6F;AACxFA,uCAAA,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAYC,aAAAA,aAAa;AAC/B,QAAM,iBAAiBC,kBAAAA,kBAAkB;AAErC,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoBC,kBAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAE3F,WAAAC,8BAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAAA;AAEpD,QAAA,8BAA8B,OAAO,CAAC;AAGtC,QAAA,uBAAuBC,kEAAiC,2BAA2B;AAEnF,QAAA,YAAYF,MAAAA,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,UAAU,oBAAqB;AAAA,EAC3C,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzBG,eAAA;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IACD;AAEA,UAAM,CAACC,SAAQ,EAAE,OAAQ,CAAA,IAAIH,8BAAAA,8BAA8B,SAAS;AAEhE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnDI,4BAAA,sBAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGxED,WAAAA;AAAAA,EAAA;AAED,SAAA;AACR;;"}
1
+ {"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useAccessorUpdateSubscription","useDesugaredRelativeSingleEntity","useConstantLengthInvariant","entity","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClHA,uCAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoBC,MAAAA,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAOC,8BAAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuBC,iCAAAA,iCAAiC,2BAA2B;AACzF,QAAM,YAAYF,MAAAA,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzBG,eAAAA;AAAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACC,SAAQ,EAAE,QAAQ,IAAIH,8BAAAA,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnDI,4BAAAA,sBAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOD;AAAAA,EACR;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["entity"],"mappings":";;;;;;;AAcA,SAAS,aAAa,QAA6F;AACxF,4BAAA,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAY,aAAa;AAC/B,QAAM,iBAAiB,kBAAkB;AAErC,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAE3F,WAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAAA;AAEpD,QAAA,8BAA8B,OAAO,CAAC;AAGtC,QAAA,uBAAuB,iCAAiC,2BAA2B;AAEnF,QAAA,YAAY,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,UAAU,oBAAqB;AAAA,EAC3C,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IACD;AAEA,UAAM,CAACA,SAAQ,EAAE,OAAQ,CAAA,IAAI,8BAA8B,SAAS;AAEhE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGxEA,WAAAA;AAAAA,EAAA;AAED,SAAA;AACR;"}
1
+ {"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["entity"],"mappings":";;;;;;;AAcA,SAAS,aAAa,QAA6F;AAClH,4BAA0B,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AAEvB,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAClG,WAAO,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAC1D;AACA,QAAM,8BAA8B,OAAO,CAAC;AAE5C,QAAM,uBAAuB,iCAAiC,2BAA2B;AACzF,QAAM,YAAY,YAAY,MAAM;AACnC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,UAAU,oBAAqB;AAAA,EAC9C,GAAG,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AACzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAED,UAAM,CAACA,SAAQ,EAAE,QAAQ,IAAI,8BAA8B,SAAS;AAEpE,QAAI,qBAAqB,mBAAmB,QAAQ;AACnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC/E;AAEA,WAAOA;AAAAA,EACR;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,MAAuC;AAC5D,QAAA,YAAYA,iBAAWC,iCAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAIC,QAAA;AAAA,MACT;AAAA,IAED;AAAA,EAAA;AAEM,SAAA;AACR;;"}
1
+ {"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAYA,MAAAA,WAAWC,iCAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAIC,QAAAA;AAAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,MAAuC;AAC5D,QAAA,YAAY,WAAW,gBAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAI;AAAA,MACT;AAAA,IAED;AAAA,EAAA;AAEM,SAAA;AACR;"}
1
+ {"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> `\n\t\t\t\t+ `or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,MAAuC;AAClE,QAAM,YAAY,WAAW,gBAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAAA,EAGF;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":["useDesugaredRelativeEntityList","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAaA,SAAS,cACR,2BACiC;AAC3B,QAAA,qBAAqBA,8DAA+B,yBAAyB;AACnFC,aAAA;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EACD;AAEA,QAAM,YAAYC,aAAAA,aAAa;AAC/B,QAAM,iBAAiBC,kBAAAA,kBAAkB;AACnC,QAAA,gBAAgBC,MAAAA,YAAY,MAAM;AACjC,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,cAAc,kBAAmB;AAAA,EAC7C,GAAA,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AAEvBC,eAAA;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IACD;AAEA,UAAM,CAAC,YAAY,EAAE,OAAQ,CAAA,IAAIC,8BAAAA,8BAA8B,aAAa;AAExE,QAAA,mBAAmB,mBAAmB,QAAQ;AAEjDC,4BAAA,sBAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGtE,WAAA;AAAA,EAAA;AAED,SAAA;AACR;;"}
1
+ {"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":["useDesugaredRelativeEntityList","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqBA,+BAAAA,+BAA+B,yBAAyB;AACnFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,gBAAgBC,MAAAA,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvBC,eAAAA;AAAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjDC,4BAAAA,sBAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":[],"mappings":";;;;;;;AAaA,SAAS,cACR,2BACiC;AAC3B,QAAA,qBAAqB,+BAA+B,yBAAyB;AACnF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EACD;AAEA,QAAM,YAAY,aAAa;AAC/B,QAAM,iBAAiB,kBAAkB;AACnC,QAAA,gBAAgB,YAAY,MAAM;AACjC,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,cAAc,kBAAmB;AAAA,EAC7C,GAAA,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AAEvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IACD;AAEA,UAAM,CAAC,YAAY,EAAE,OAAQ,CAAA,IAAI,8BAA8B,aAAa;AAExE,QAAA,mBAAmB,mBAAmB,QAAQ;AAEjD,4BAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGtE,WAAA;AAAA,EAAA;AAED,SAAA;AACR;"}
1
+ {"version":3,"file":"useEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":[],"mappings":";;;;;;;AAaA,SAAS,cACR,2BACiC;AACjC,QAAM,qBAAqB,+BAA+B,yBAAyB;AACnF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AACvB,QAAM,gBAAgB,YAAY,MAAM;AACvC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,cAAc,kBAAmB;AAAA,EAChD,GAAG,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AACvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAED,UAAM,CAAC,YAAY,EAAE,QAAQ,IAAI,8BAA8B,aAAa;AAE5E,QAAI,mBAAmB,mBAAmB,QAAQ;AACjD,4BAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC7E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntityListSubTree","useEntityListSubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAQa,MAAA,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAaA,wBAAAA,wBAAwB;AACrC,QAAA,aAAaC,8DAA+B,mBAAmB;AAC/D,QAAA,YAAY,OAAO,SAAS;AAC5B,QAAA,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAA;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAC9C;AAMO,SAAAC,8BAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
1
+ {"version":3,"file":"useEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntityListSubTree","useEntityListSubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAaA,wBAAAA,wBAAA;AACnB,QAAM,aAAaC,+BAAAA,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAQa,MAAA,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa,wBAAwB;AACrC,QAAA,aAAa,+BAA+B,mBAAmB;AAC/D,QAAA,YAAY,OAAO,SAAS;AAC5B,QAAA,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAC9C;AAMO,SAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
1
+ {"version":3,"file":"useEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '@contember/binding'\n\nexport const useEntityListSubTree = (\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityListAccessor => {\n\tconst getSubTree = useGetEntityListSubTree()\n\tconst parameters = useEntityListSubTreeParameters(qualifiedEntityList)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.value.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntityListSubTree: cannot use hasOneRelationPath!`)\n\t// }\n\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa,wBAAA;AACnB,QAAM,aAAa,+BAA+B,mBAAmB;AACrE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAO9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
@@ -13,7 +13,7 @@ const useEntityListSubTreeLoader = (entities, children, state) => {
13
13
  treeRootId: void 0,
14
14
  customState: void 0
15
15
  });
16
- const currentlyLoading = React.useRef();
16
+ const currentlyLoading = React.useRef(void 0);
17
17
  const extendTree = useExtendTree.useExtendTree();
18
18
  const [reloadTrigger, setReloadTrigger] = React.useState(null);
19
19
  const memoizedEntities = reactUtils.useObjectMemo(entities ?? emptyObject);
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(entities: SugaredQualifiedEntityList | undefined, children: ReactNode, state?: State): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<{\n\t\tentities: SugaredQualifiedEntityList\n\t\tstate?: State\n\t}>()\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntityListSubTree","useCallback"],"mappings":";;;;;;AA6DA,MAAM,cAAc,CAAC;AAEd,MAAM,6BAA6B,CAAQ,UAAkD,UAAqB,UAAoG;AAC5N,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAGtB;AAEH,QAAM,aAAaC,cAAAA,cAAc;AACjC,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AAChE,QAAA,mBAAmBG,WAAAA,cAAc,YAAY,WAAW;AACxD,QAAA,mBAAmB,WAAW,mBAAmB;AAEvDC,QAAAA,UAAU,MAAM;AACf,KAAC,YAAY;AACZ,UAAI,CAAC,kBAAkB;AACtB;AAAA,MAAA;AAGD,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MACD;AAEA,wBAAkB,CAAM,OAAA;AACnB,YAAA,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AACvE,iBAAA;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QAAA,OACM;AACC,iBAAA;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QAAA;AAAA,MACD,CACA;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,kBAAAA,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAK,MAAA;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAET,8BAAA;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UAAA;AAAA,QACF;AAAA,MAEF;AAEA,UAAI,eAAe;AAClB,yBAAiB,UAAU;AACT,0BAAA;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MAAA;AAAA,IACF,GACE;AAAA,EAAA,GACD,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAE1D,SAAA;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAE,CAAA;AAAA,IAAA;AAAA,EAEpD;AACD;;"}
1
+ {"version":3,"file":"useEntityListSubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntityListSubTree","useCallback"],"mappings":";;;;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,mBAAmBG,WAAAA,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,kBAAAA,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
@@ -11,7 +11,7 @@ const useEntityListSubTreeLoader = (entities, children, state) => {
11
11
  treeRootId: void 0,
12
12
  customState: void 0
13
13
  });
14
- const currentlyLoading = useRef();
14
+ const currentlyLoading = useRef(void 0);
15
15
  const extendTree = useExtendTree();
16
16
  const [reloadTrigger, setReloadTrigger] = useState(null);
17
17
  const memoizedEntities = useObjectMemo(entities ?? emptyObject);
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(entities: SugaredQualifiedEntityList | undefined, children: ReactNode, state?: State): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<{\n\t\tentities: SugaredQualifiedEntityList\n\t\tstate?: State\n\t}>()\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA6DA,MAAM,cAAc,CAAC;AAEd,MAAM,6BAA6B,CAAQ,UAAkD,UAAqB,UAAoG;AAC5N,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAGtB;AAEH,QAAM,aAAa,cAAc;AACjC,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AAChE,QAAA,mBAAmB,cAAc,YAAY,WAAW;AACxD,QAAA,mBAAmB,WAAW,mBAAmB;AAEvD,YAAU,MAAM;AACf,KAAC,YAAY;AACZ,UAAI,CAAC,kBAAkB;AACtB;AAAA,MAAA;AAGD,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MACD;AAEA,wBAAkB,CAAM,OAAA;AACnB,YAAA,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AACvE,iBAAA;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QAAA,OACM;AACC,iBAAA;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QAAA;AAAA,MACD,CACA;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAK,MAAA;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAET,8BAAA;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UAAA;AAAA,QACF;AAAA,MAEF;AAEA,UAAI,eAAe;AAClB,yBAAiB,UAAU;AACT,0BAAA;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MAAA;AAAA,IACF,GACE;AAAA,EAAA,GACD,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAE1D,SAAA;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAE,CAAA;AAAA,IAAA;AAAA,EAEpD;AACD;"}
1
+ {"version":3,"file":"useEntityListSubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntityListSubTree } from '../coreComponents'\nimport { useEnvironment } from './useEnvironment'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntityListSubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntityListSubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentities: SugaredQualifiedEntityList\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentities: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntityListSubTreeLoaderState<State> =\n\t| UseEntityListSubTreeLoaderStateInitial\n\t| UseEntityListSubTreeLoaderStateLoading\n\t| UseEntityListSubTreeLoaderStateRefreshing<State>\n\t| UseEntityListSubTreeLoaderStateLoaded<State>\n\t| UseEntityListSubTreeLoaderStateFailed\n\nexport type UseEntityListSubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedEntityList\n\nexport const useEntityListSubTreeLoader = <State>(\n\tentities: SugaredQualifiedEntityList | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntityListSubTreeLoaderState<State>, UseEntityListSubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntityListSubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentities: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentities: SugaredQualifiedEntityList\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntities = useObjectMemo(entities ?? emptyObject)\n\tconst resolvedEntities = entities ? memoizedEntities : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntities) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentities: resolvedEntities,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntityListSubTree, {\n\t\t\t\t\t...resolvedEntities,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentities: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentities: resolvedEntities,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntities, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA2DA,MAAM,cAAc,CAAA;AAEb,MAAM,6BAA6B,CACzC,UACA,UACA,UACsF;AACtF,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAiD;AAAA,IAC5F,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,mBAAmB,cAAc,YAAY,WAAW;AAC9D,QAAM,mBAAmB,WAAW,mBAAmB;AAEvD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,kBAAkB;AACtB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,UAAU;AAAA,QACV;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,mBAAmB;AAAA,UAChC,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,kBAAkB,UAAU,OAAO,aAAa,CAAC;AAEjE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTreeParameters.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\n\nexport function useEntityListSubTreeParameters(alias: Alias): Alias\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityListOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList {\n\tuseConstantValueInvariant(typeof qualifiedEntityList)\n\n\tif (typeof qualifiedEntityList === 'string') {\n\t\treturn qualifiedEntityList\n\t}\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tuseConstantValueInvariant(\n\t\tqualifiedEntityList.isCreating,\n\t\t`EntityListSubTree: cannot alternate the 'isCreating' value.`,\n\t)\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tuseConstantValueInvariant(\n\t\ttypeof qualifiedEntityList.entities,\n\t\t`EntityListSubTree: cannot alternate the 'entities' value.`,\n\t)\n\n\tif (qualifiedEntityList.isCreating) {\n\t\tconst entities = qualifiedEntityList.entities\n\n\t\tif (typeof entities === 'string') {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\treturn useMemo(\n\t\t\t\t() => ({\n\t\t\t\t\tisCreating: true,\n\t\t\t\t\tentities,\n\t\t\t\t}),\n\t\t\t\t[entities],\n\t\t\t)\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tisCreating: true,\n\t\t\t\tentities: { entityName: entities.entityName },\n\t\t\t}),\n\t\t\t[entities.entityName],\n\t\t)\n\t}\n\tconst entities = qualifiedEntityList.entities\n\n\tif (typeof entities === 'string') {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tentities: entities,\n\t\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\t\toffset: qualifiedEntityList.offset,\n\t\t\t\tlimit: qualifiedEntityList.limit,\n\t\t\t}),\n\t\t\t[entities, qualifiedEntityList.limit, qualifiedEntityList.offset, qualifiedEntityList.orderBy],\n\t\t)\n\t}\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\treturn useMemo(\n\t\t() => ({\n\t\t\tentities: {\n\t\t\t\tentityName: entities.entityName,\n\t\t\t\tfilter: entities.filter,\n\t\t\t},\n\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\toffset: qualifiedEntityList.offset,\n\t\t\tlimit: qualifiedEntityList.limit,\n\t\t}),\n\t\t[\n\t\t\tentities.entityName,\n\t\t\tentities.filter,\n\t\t\tqualifiedEntityList.limit,\n\t\t\tqualifiedEntityList.offset,\n\t\t\tqualifiedEntityList.orderBy,\n\t\t],\n\t)\n}\n"],"names":["useConstantValueInvariant","entities","useMemo"],"mappings":";;;;AAWO,SAAS,+BACf,qBAC+E;AAC/EA,aAAA,0BAA0B,OAAO,mBAAmB;AAEhD,MAAA,OAAO,wBAAwB,UAAU;AACrC,WAAA;AAAA,EAAA;AAIRA,aAAA;AAAA,IACC,oBAAoB;AAAA,IACpB;AAAA,EACD;AAGAA,aAAA;AAAA,IACC,OAAO,oBAAoB;AAAA,IAC3B;AAAA,EACD;AAEA,MAAI,oBAAoB,YAAY;AACnC,UAAMC,YAAW,oBAAoB;AAEjC,QAAA,OAAOA,cAAa,UAAU;AAE1B,aAAAC,MAAA;AAAA,QACN,OAAO;AAAA,UACN,YAAY;AAAA,UACZ,UAAAD;AAAAA,QAAA;AAAA,QAED,CAACA,SAAQ;AAAA,MACV;AAAA,IAAA;AAGM,WAAAC,MAAA;AAAA,MACN,OAAO;AAAA,QACN,YAAY;AAAA,QACZ,UAAU,EAAE,YAAYD,UAAS,WAAW;AAAA,MAAA;AAAA,MAE7C,CAACA,UAAS,UAAU;AAAA,IACrB;AAAA,EAAA;AAED,QAAM,WAAW,oBAAoB;AAEjC,MAAA,OAAO,aAAa,UAAU;AAE1B,WAAAC,MAAA;AAAA,MACN,OAAO;AAAA,QACN;AAAA,QACA,SAAS,oBAAoB;AAAA,QAC7B,QAAQ,oBAAoB;AAAA,QAC5B,OAAO,oBAAoB;AAAA,MAAA;AAAA,MAE5B,CAAC,UAAU,oBAAoB,OAAO,oBAAoB,QAAQ,oBAAoB,OAAO;AAAA,IAC9F;AAAA,EAAA;AAGM,SAAAA,MAAA;AAAA,IACN,OAAO;AAAA,MACN,UAAU;AAAA,QACT,YAAY,SAAS;AAAA,QACrB,QAAQ,SAAS;AAAA,MAClB;AAAA,MACA,SAAS,oBAAoB;AAAA,MAC7B,QAAQ,oBAAoB;AAAA,MAC5B,OAAO,oBAAoB;AAAA,IAAA;AAAA,IAE5B;AAAA,MACC,SAAS;AAAA,MACT,SAAS;AAAA,MACT,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,IAAA;AAAA,EAEtB;AACD;;"}
1
+ {"version":3,"file":"useEntityListSubTreeParameters.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\n\nexport function useEntityListSubTreeParameters(alias: Alias): Alias\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityListOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList {\n\tuseConstantValueInvariant(typeof qualifiedEntityList)\n\n\tif (typeof qualifiedEntityList === 'string') {\n\t\treturn qualifiedEntityList\n\t}\n\n\tuseConstantValueInvariant(\n\t\tqualifiedEntityList.isCreating,\n\t\t`EntityListSubTree: cannot alternate the 'isCreating' value.`,\n\t)\n\n\tuseConstantValueInvariant(\n\t\ttypeof qualifiedEntityList.entities,\n\t\t`EntityListSubTree: cannot alternate the 'entities' value.`,\n\t)\n\n\tif (qualifiedEntityList.isCreating) {\n\t\tconst entities = qualifiedEntityList.entities\n\n\t\tif (typeof entities === 'string') {\n\t\t\treturn useMemo(\n\t\t\t\t() => ({\n\t\t\t\t\tisCreating: true,\n\t\t\t\t\tentities,\n\t\t\t\t}),\n\t\t\t\t[entities],\n\t\t\t)\n\t\t}\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tisCreating: true,\n\t\t\t\tentities: { entityName: entities.entityName },\n\t\t\t}),\n\t\t\t[entities.entityName],\n\t\t)\n\t}\n\tconst entities = qualifiedEntityList.entities\n\n\tif (typeof entities === 'string') {\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tentities: entities,\n\t\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\t\toffset: qualifiedEntityList.offset,\n\t\t\t\tlimit: qualifiedEntityList.limit,\n\t\t\t}),\n\t\t\t[entities, qualifiedEntityList.limit, qualifiedEntityList.offset, qualifiedEntityList.orderBy],\n\t\t)\n\t}\n\treturn useMemo(\n\t\t() => ({\n\t\t\tentities: {\n\t\t\t\tentityName: entities.entityName,\n\t\t\t\tfilter: entities.filter,\n\t\t\t},\n\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\toffset: qualifiedEntityList.offset,\n\t\t\tlimit: qualifiedEntityList.limit,\n\t\t}),\n\t\t[\n\t\t\tentities.entityName,\n\t\t\tentities.filter,\n\t\t\tqualifiedEntityList.limit,\n\t\t\tqualifiedEntityList.offset,\n\t\t\tqualifiedEntityList.orderBy,\n\t\t],\n\t)\n}\n"],"names":["useConstantValueInvariant","entities","useMemo"],"mappings":";;;;AAWO,SAAS,+BACf,qBAC+E;AAC/EA,aAAAA,0BAA0B,OAAO,mBAAmB;AAEpD,MAAI,OAAO,wBAAwB,UAAU;AAC5C,WAAO;AAAA,EACR;AAEAA,aAAAA;AAAAA,IACC,oBAAoB;AAAA,IACpB;AAAA,EAAA;AAGDA,aAAAA;AAAAA,IACC,OAAO,oBAAoB;AAAA,IAC3B;AAAA,EAAA;AAGD,MAAI,oBAAoB,YAAY;AACnC,UAAMC,YAAW,oBAAoB;AAErC,QAAI,OAAOA,cAAa,UAAU;AACjC,aAAOC,MAAAA;AAAAA,QACN,OAAO;AAAA,UACN,YAAY;AAAA,UACZ,UAAAD;AAAAA,QAAA;AAAA,QAED,CAACA,SAAQ;AAAA,MAAA;AAAA,IAEX;AACA,WAAOC,MAAAA;AAAAA,MACN,OAAO;AAAA,QACN,YAAY;AAAA,QACZ,UAAU,EAAE,YAAYD,UAAS,WAAA;AAAA,MAAW;AAAA,MAE7C,CAACA,UAAS,UAAU;AAAA,IAAA;AAAA,EAEtB;AACA,QAAM,WAAW,oBAAoB;AAErC,MAAI,OAAO,aAAa,UAAU;AACjC,WAAOC,MAAAA;AAAAA,MACN,OAAO;AAAA,QACN;AAAA,QACA,SAAS,oBAAoB;AAAA,QAC7B,QAAQ,oBAAoB;AAAA,QAC5B,OAAO,oBAAoB;AAAA,MAAA;AAAA,MAE5B,CAAC,UAAU,oBAAoB,OAAO,oBAAoB,QAAQ,oBAAoB,OAAO;AAAA,IAAA;AAAA,EAE/F;AACA,SAAOA,MAAAA;AAAAA,IACN,OAAO;AAAA,MACN,UAAU;AAAA,QACT,YAAY,SAAS;AAAA,QACrB,QAAQ,SAAS;AAAA,MAAA;AAAA,MAElB,SAAS,oBAAoB;AAAA,MAC7B,QAAQ,oBAAoB;AAAA,MAC5B,OAAO,oBAAoB;AAAA,IAAA;AAAA,IAE5B;AAAA,MACC,SAAS;AAAA,MACT,SAAS;AAAA,MACT,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,IAAA;AAAA,EACrB;AAEF;;"}