@contember/binding 1.1.0 → 1.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/development/accessorPropagation/AccessorProvider.js +2 -10
  2. package/dist/development/accessorPropagation/AccessorProvider.js.map +1 -1
  3. package/dist/development/accessorPropagation/BindingOperationsProvider.js +2 -6
  4. package/dist/development/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  5. package/dist/development/accessorPropagation/EntityKeyProvider.js +2 -6
  6. package/dist/development/accessorPropagation/EntityKeyProvider.js.map +1 -1
  7. package/dist/development/accessorPropagation/EnvironmentContext.js +5 -21
  8. package/dist/development/accessorPropagation/EnvironmentContext.js.map +1 -1
  9. package/dist/development/accessorPropagation/TreeRootIdProvider.js +2 -6
  10. package/dist/development/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  11. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js +1 -0
  12. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  13. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -0
  14. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  15. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js +1 -0
  16. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  17. package/dist/development/accessorPropagation/useEntity.js.map +1 -1
  18. package/dist/development/accessorPropagation/useEntityList.js.map +1 -1
  19. package/dist/development/accessorPropagation/useEntityListSubTree.js.map +1 -1
  20. package/dist/development/accessorPropagation/useEntitySubTree.js.map +1 -1
  21. package/dist/development/accessorPropagation/useField.js.map +1 -1
  22. package/dist/development/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  23. package/dist/development/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  24. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js +13 -57
  25. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  26. package/dist/development/accessorSorting/moveEntity.js.map +1 -1
  27. package/dist/development/accessorSorting/repairEntitiesOrder.js.map +1 -1
  28. package/dist/development/accessorTree/AccessorTree.js +4 -24
  29. package/dist/development/accessorTree/AccessorTree.js.map +1 -1
  30. package/dist/development/accessorTree/RuntimeId.js +1 -1
  31. package/dist/development/accessorTree/RuntimeId.js.map +1 -1
  32. package/dist/development/accessors/EntityAccessor.js +15 -2
  33. package/dist/development/accessors/EntityAccessor.js.map +1 -1
  34. package/dist/development/accessors/EntityListAccessor.js +9 -0
  35. package/dist/development/accessors/EntityListAccessor.js.map +1 -1
  36. package/dist/development/accessors/FieldAccessor.js +1 -0
  37. package/dist/development/accessors/FieldAccessor.js.map +1 -1
  38. package/dist/development/accessors/TreeRootAccessor.js +3 -0
  39. package/dist/development/accessors/TreeRootAccessor.js.map +1 -1
  40. package/dist/development/core/AccessorErrorManager.js +6 -6
  41. package/dist/development/core/AccessorErrorManager.js.map +1 -1
  42. package/dist/development/core/Config.js.map +1 -1
  43. package/dist/development/core/DataBinding.js +25 -16
  44. package/dist/development/core/DataBinding.js.map +1 -1
  45. package/dist/development/core/DirtinessTracker.js.map +1 -1
  46. package/dist/development/core/ErrorsPreprocessor.js.map +1 -1
  47. package/dist/development/core/EventManager.js +14 -38
  48. package/dist/development/core/EventManager.js.map +1 -1
  49. package/dist/development/core/IncrementalMarkerBuilder.js +5 -5
  50. package/dist/development/core/IncrementalMarkerBuilder.js.map +1 -1
  51. package/dist/development/core/MarkerComparator.js +1 -0
  52. package/dist/development/core/MarkerComparator.js.map +1 -1
  53. package/dist/development/core/MarkerMerger.js +1 -0
  54. package/dist/development/core/MarkerMerger.js.map +1 -1
  55. package/dist/development/core/MarkerTreeGenerator.js +6 -6
  56. package/dist/development/core/MarkerTreeGenerator.js.map +1 -1
  57. package/dist/development/core/MutationGenerator.js +7 -7
  58. package/dist/development/core/MutationGenerator.js.map +1 -1
  59. package/dist/development/core/QueryGenerator.js +1 -0
  60. package/dist/development/core/QueryGenerator.js.map +1 -1
  61. package/dist/development/core/RealmKeyGenerator.js +4 -2
  62. package/dist/development/core/RealmKeyGenerator.js.map +1 -1
  63. package/dist/development/core/RequestResponseNormalizer.js.map +1 -1
  64. package/dist/development/core/StateInitializer.js +11 -8
  65. package/dist/development/core/StateInitializer.js.map +1 -1
  66. package/dist/development/core/TreeAugmenter.js +6 -1
  67. package/dist/development/core/TreeAugmenter.js.map +1 -1
  68. package/dist/development/core/TreeParameterMerger.js +26 -0
  69. package/dist/development/core/TreeParameterMerger.js.map +1 -1
  70. package/dist/development/core/TreeStore.js +9 -7
  71. package/dist/development/core/TreeStore.js.map +1 -1
  72. package/dist/development/core/exceptions/ErrorLocator.js +3 -3
  73. package/dist/development/core/exceptions/ErrorLocator.js.map +1 -1
  74. package/dist/development/core/exceptions/TreeParameterSugarer.js +2 -2
  75. package/dist/development/core/operations/EntityOperations.js +3 -1
  76. package/dist/development/core/operations/EntityOperations.js.map +1 -1
  77. package/dist/development/core/operations/FieldOperations.js +1 -21
  78. package/dist/development/core/operations/FieldOperations.js.map +1 -1
  79. package/dist/development/core/schema/SchemaLoader.js +2 -2
  80. package/dist/development/core/schema/SchemaLoader.js.map +1 -1
  81. package/dist/development/core/state/StateIterator.js +1 -0
  82. package/dist/development/core/state/StateIterator.js.map +1 -1
  83. package/dist/development/coreComponents/Component.js.map +1 -1
  84. package/dist/development/coreComponents/DataBindingProvider.js +2 -6
  85. package/dist/development/coreComponents/DataBindingProvider.js.map +1 -1
  86. package/dist/development/coreComponents/Entity.js +5 -6
  87. package/dist/development/coreComponents/Entity.js.map +1 -1
  88. package/dist/development/coreComponents/EntityList.js +5 -17
  89. package/dist/development/coreComponents/EntityList.js.map +1 -1
  90. package/dist/development/coreComponents/EntityListSubTree.js +5 -17
  91. package/dist/development/coreComponents/EntityListSubTree.js.map +1 -1
  92. package/dist/development/coreComponents/EntitySubTree.js +9 -33
  93. package/dist/development/coreComponents/EntitySubTree.js.map +1 -1
  94. package/dist/development/coreComponents/Field.js +3 -11
  95. package/dist/development/coreComponents/Field.js.map +1 -1
  96. package/dist/development/coreComponents/HasMany.js +5 -17
  97. package/dist/development/coreComponents/HasMany.js.map +1 -1
  98. package/dist/development/coreComponents/HasOne.js +5 -17
  99. package/dist/development/coreComponents/HasOne.js.map +1 -1
  100. package/dist/development/coreComponents/ParentEntity.js +2 -6
  101. package/dist/development/coreComponents/ParentEntity.js.map +1 -1
  102. package/dist/development/dao/Environment.js +3 -0
  103. package/dist/development/dao/Environment.js.map +1 -1
  104. package/dist/development/entityEvents/useEntityEvent.js.map +1 -1
  105. package/dist/development/fieldHelpers/helpers/FieldHelper.js +1 -1
  106. package/dist/development/fieldHelpers/helpers/FieldHelper.js.map +1 -1
  107. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js +4 -1
  108. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -1
  109. package/dist/development/helperComponents/DeferredSubTrees.js +6 -22
  110. package/dist/development/helperComponents/DeferredSubTrees.js.map +1 -1
  111. package/dist/development/helperComponents/EntityView.js +2 -6
  112. package/dist/development/helperComponents/EntityView.js.map +1 -1
  113. package/dist/development/helperComponents/FieldView.js +5 -17
  114. package/dist/development/helperComponents/FieldView.js.map +1 -1
  115. package/dist/development/helperComponents/If.js +8 -40
  116. package/dist/development/helperComponents/If.js.map +1 -1
  117. package/dist/development/helperComponents/StaticRender.js +2 -6
  118. package/dist/development/helperComponents/StaticRender.js.map +1 -1
  119. package/dist/development/helperComponents/SugaredField.js +3 -11
  120. package/dist/development/helperComponents/SugaredField.js.map +1 -1
  121. package/dist/development/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  122. package/dist/development/helperComponents/helpers/evaluateCondition.js +1 -0
  123. package/dist/development/helperComponents/helpers/evaluateCondition.js.map +1 -1
  124. package/dist/development/markers/EntityFieldMarkersContainer.js +1 -0
  125. package/dist/development/markers/EntityFieldMarkersContainer.js.map +1 -1
  126. package/dist/development/markers/EntityListSubTreeMarker.js +2 -2
  127. package/dist/development/markers/EntityListSubTreeMarker.js.map +1 -1
  128. package/dist/development/markers/EntitySubTreeMarker.js +2 -2
  129. package/dist/development/markers/EntitySubTreeMarker.js.map +1 -1
  130. package/dist/development/markers/FieldMarker.js +2 -2
  131. package/dist/development/markers/FieldMarker.js.map +1 -1
  132. package/dist/development/markers/HasManyRelationMarker.js +2 -8
  133. package/dist/development/markers/HasManyRelationMarker.js.map +1 -1
  134. package/dist/development/markers/HasOneRelationMarker.js +2 -2
  135. package/dist/development/markers/HasOneRelationMarker.js.map +1 -1
  136. package/dist/development/queryLanguage/CacheStore.js +1 -1
  137. package/dist/development/queryLanguage/CacheStore.js.map +1 -1
  138. package/dist/development/queryLanguage/MarkerFactory.js.map +1 -1
  139. package/dist/development/queryLanguage/Parser.js +9 -10
  140. package/dist/development/queryLanguage/Parser.js.map +1 -1
  141. package/dist/development/queryLanguage/QueryLanguage.js +19 -11
  142. package/dist/development/queryLanguage/QueryLanguage.js.map +1 -1
  143. package/dist/development/structures/BijectiveIndexedMap.js +3 -1
  144. package/dist/development/structures/BijectiveIndexedMap.js.map +1 -1
  145. package/dist/development/structures/LRUCache.js +1 -1
  146. package/dist/development/structures/LRUCache.js.map +1 -1
  147. package/dist/development/structures/WeakIdCache.js.map +1 -1
  148. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -1
  149. package/dist/development/treeParameters/EntityCreationParameters.js +1 -0
  150. package/dist/development/treeParameters/EntityCreationParameters.js.map +1 -1
  151. package/dist/development/treeParameters/LeafField.js.map +1 -1
  152. package/dist/development/utils/Hashing.js +1 -0
  153. package/dist/development/utils/Hashing.js.map +1 -1
  154. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js +1 -0
  155. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  156. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -0
  157. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  158. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js +1 -0
  159. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  160. package/dist/production/accessorPropagation/useEntity.js.map +1 -1
  161. package/dist/production/accessorPropagation/useEntityList.js.map +1 -1
  162. package/dist/production/accessorPropagation/useEntityListSubTree.js.map +1 -1
  163. package/dist/production/accessorPropagation/useEntitySubTree.js.map +1 -1
  164. package/dist/production/accessorPropagation/useField.js.map +1 -1
  165. package/dist/production/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  166. package/dist/production/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  167. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  168. package/dist/production/accessorSorting/moveEntity.js.map +1 -1
  169. package/dist/production/accessorSorting/repairEntitiesOrder.js.map +1 -1
  170. package/dist/production/accessorTree/AccessorTree.js +2 -2
  171. package/dist/production/accessorTree/AccessorTree.js.map +1 -1
  172. package/dist/production/accessorTree/RuntimeId.js +1 -1
  173. package/dist/production/accessorTree/RuntimeId.js.map +1 -1
  174. package/dist/production/accessors/EntityAccessor.js +15 -2
  175. package/dist/production/accessors/EntityAccessor.js.map +1 -1
  176. package/dist/production/accessors/EntityListAccessor.js +9 -0
  177. package/dist/production/accessors/EntityListAccessor.js.map +1 -1
  178. package/dist/production/accessors/FieldAccessor.js +1 -0
  179. package/dist/production/accessors/FieldAccessor.js.map +1 -1
  180. package/dist/production/accessors/TreeRootAccessor.js +3 -0
  181. package/dist/production/accessors/TreeRootAccessor.js.map +1 -1
  182. package/dist/production/core/AccessorErrorManager.js +6 -6
  183. package/dist/production/core/AccessorErrorManager.js.map +1 -1
  184. package/dist/production/core/Config.js.map +1 -1
  185. package/dist/production/core/DataBinding.js +25 -16
  186. package/dist/production/core/DataBinding.js.map +1 -1
  187. package/dist/production/core/DirtinessTracker.js.map +1 -1
  188. package/dist/production/core/ErrorsPreprocessor.js.map +1 -1
  189. package/dist/production/core/EventManager.js +13 -11
  190. package/dist/production/core/EventManager.js.map +1 -1
  191. package/dist/production/core/IncrementalMarkerBuilder.js +5 -5
  192. package/dist/production/core/IncrementalMarkerBuilder.js.map +1 -1
  193. package/dist/production/core/MarkerComparator.js +1 -0
  194. package/dist/production/core/MarkerComparator.js.map +1 -1
  195. package/dist/production/core/MarkerMerger.js +1 -0
  196. package/dist/production/core/MarkerMerger.js.map +1 -1
  197. package/dist/production/core/MarkerTreeGenerator.js +6 -6
  198. package/dist/production/core/MarkerTreeGenerator.js.map +1 -1
  199. package/dist/production/core/MutationGenerator.js +7 -7
  200. package/dist/production/core/MutationGenerator.js.map +1 -1
  201. package/dist/production/core/QueryGenerator.js +1 -0
  202. package/dist/production/core/QueryGenerator.js.map +1 -1
  203. package/dist/production/core/RealmKeyGenerator.js +4 -2
  204. package/dist/production/core/RealmKeyGenerator.js.map +1 -1
  205. package/dist/production/core/RequestResponseNormalizer.js.map +1 -1
  206. package/dist/production/core/StateInitializer.js +11 -8
  207. package/dist/production/core/StateInitializer.js.map +1 -1
  208. package/dist/production/core/TreeAugmenter.js +6 -1
  209. package/dist/production/core/TreeAugmenter.js.map +1 -1
  210. package/dist/production/core/TreeParameterMerger.js +26 -0
  211. package/dist/production/core/TreeParameterMerger.js.map +1 -1
  212. package/dist/production/core/TreeStore.js +9 -7
  213. package/dist/production/core/TreeStore.js.map +1 -1
  214. package/dist/production/core/exceptions/ErrorLocator.js +3 -3
  215. package/dist/production/core/exceptions/ErrorLocator.js.map +1 -1
  216. package/dist/production/core/exceptions/TreeParameterSugarer.js +2 -2
  217. package/dist/production/core/operations/EntityOperations.js +3 -1
  218. package/dist/production/core/operations/EntityOperations.js.map +1 -1
  219. package/dist/production/core/schema/SchemaLoader.js +2 -2
  220. package/dist/production/core/schema/SchemaLoader.js.map +1 -1
  221. package/dist/production/core/state/StateIterator.js +1 -0
  222. package/dist/production/core/state/StateIterator.js.map +1 -1
  223. package/dist/production/coreComponents/Component.js.map +1 -1
  224. package/dist/production/coreComponents/DataBindingProvider.js.map +1 -1
  225. package/dist/production/coreComponents/Entity.js +4 -1
  226. package/dist/production/coreComponents/Entity.js.map +1 -1
  227. package/dist/production/coreComponents/EntityList.js.map +1 -1
  228. package/dist/production/coreComponents/EntityListSubTree.js.map +1 -1
  229. package/dist/production/coreComponents/EntitySubTree.js.map +1 -1
  230. package/dist/production/coreComponents/Field.js.map +1 -1
  231. package/dist/production/coreComponents/HasMany.js.map +1 -1
  232. package/dist/production/coreComponents/HasOne.js.map +1 -1
  233. package/dist/production/coreComponents/ParentEntity.js.map +1 -1
  234. package/dist/production/dao/Environment.js +3 -0
  235. package/dist/production/dao/Environment.js.map +1 -1
  236. package/dist/production/entityEvents/useEntityEvent.js.map +1 -1
  237. package/dist/production/fieldHelpers/helpers/FieldHelper.js +1 -1
  238. package/dist/production/fieldHelpers/helpers/FieldHelper.js.map +1 -1
  239. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js +4 -1
  240. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -1
  241. package/dist/production/helperComponents/DeferredSubTrees.js.map +1 -1
  242. package/dist/production/helperComponents/EntityView.js.map +1 -1
  243. package/dist/production/helperComponents/FieldView.js.map +1 -1
  244. package/dist/production/helperComponents/If.js.map +1 -1
  245. package/dist/production/helperComponents/StaticRender.js.map +1 -1
  246. package/dist/production/helperComponents/SugaredField.js.map +1 -1
  247. package/dist/production/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  248. package/dist/production/helperComponents/helpers/evaluateCondition.js +1 -0
  249. package/dist/production/helperComponents/helpers/evaluateCondition.js.map +1 -1
  250. package/dist/production/markers/EntityFieldMarkersContainer.js +1 -0
  251. package/dist/production/markers/EntityFieldMarkersContainer.js.map +1 -1
  252. package/dist/production/markers/EntityListSubTreeMarker.js +2 -2
  253. package/dist/production/markers/EntityListSubTreeMarker.js.map +1 -1
  254. package/dist/production/markers/EntitySubTreeMarker.js +2 -2
  255. package/dist/production/markers/EntitySubTreeMarker.js.map +1 -1
  256. package/dist/production/markers/FieldMarker.js +2 -2
  257. package/dist/production/markers/FieldMarker.js.map +1 -1
  258. package/dist/production/markers/HasManyRelationMarker.js +2 -2
  259. package/dist/production/markers/HasManyRelationMarker.js.map +1 -1
  260. package/dist/production/markers/HasOneRelationMarker.js +2 -2
  261. package/dist/production/markers/HasOneRelationMarker.js.map +1 -1
  262. package/dist/production/queryLanguage/CacheStore.js +1 -1
  263. package/dist/production/queryLanguage/CacheStore.js.map +1 -1
  264. package/dist/production/queryLanguage/MarkerFactory.js.map +1 -1
  265. package/dist/production/queryLanguage/Parser.js +9 -7
  266. package/dist/production/queryLanguage/Parser.js.map +1 -1
  267. package/dist/production/queryLanguage/QueryLanguage.js +19 -8
  268. package/dist/production/queryLanguage/QueryLanguage.js.map +1 -1
  269. package/dist/production/structures/BijectiveIndexedMap.js +3 -1
  270. package/dist/production/structures/BijectiveIndexedMap.js.map +1 -1
  271. package/dist/production/structures/LRUCache.js +1 -1
  272. package/dist/production/structures/LRUCache.js.map +1 -1
  273. package/dist/production/structures/WeakIdCache.js.map +1 -1
  274. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -1
  275. package/dist/production/treeParameters/EntityCreationParameters.js +1 -0
  276. package/dist/production/treeParameters/EntityCreationParameters.js.map +1 -1
  277. package/dist/production/treeParameters/LeafField.js.map +1 -1
  278. package/dist/production/utils/Hashing.js +1 -0
  279. package/dist/production/utils/Hashing.js.map +1 -1
  280. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +0 -1
  281. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
  282. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +0 -1
  283. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
  284. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +0 -1
  285. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
  286. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +0 -1
  287. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
  288. package/dist/types/accessorTree/AccessorTree.d.ts +7 -4
  289. package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -1
  290. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +0 -1
  291. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -1
  292. package/dist/types/accessorTree/DirtinessContext.d.ts +0 -1
  293. package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
  294. package/dist/types/accessorTree/MutationStateContext.d.ts +0 -1
  295. package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
  296. package/dist/types/coreComponents/DataBindingProvider.d.ts +10 -0
  297. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
  298. package/dist/types/coreComponents/Entity.d.ts +3 -0
  299. package/dist/types/coreComponents/Entity.d.ts.map +1 -1
  300. package/dist/types/coreComponents/EntityList.d.ts +3 -0
  301. package/dist/types/coreComponents/EntityList.d.ts.map +1 -1
  302. package/dist/types/coreComponents/EntityListSubTree.d.ts +10 -0
  303. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
  304. package/dist/types/coreComponents/EntitySubTree.d.ts +10 -0
  305. package/dist/types/coreComponents/EntitySubTree.d.ts.map +1 -1
  306. package/dist/types/coreComponents/Field.d.ts +3 -0
  307. package/dist/types/coreComponents/Field.d.ts.map +1 -1
  308. package/dist/types/coreComponents/HasMany.d.ts +3 -0
  309. package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
  310. package/dist/types/coreComponents/HasOne.d.ts +3 -0
  311. package/dist/types/coreComponents/HasOne.d.ts.map +1 -1
  312. package/dist/types/coreComponents/ParentEntity.d.ts +3 -0
  313. package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
  314. package/dist/types/helperComponents/DeferredSubTrees.d.ts +3 -0
  315. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
  316. package/dist/types/helperComponents/EntityView.d.ts +3 -0
  317. package/dist/types/helperComponents/EntityView.d.ts.map +1 -1
  318. package/dist/types/helperComponents/FieldView.d.ts +13 -0
  319. package/dist/types/helperComponents/FieldView.d.ts.map +1 -1
  320. package/dist/types/helperComponents/If.d.ts +3 -0
  321. package/dist/types/helperComponents/If.d.ts.map +1 -1
  322. package/dist/types/helperComponents/StaticRender.d.ts +3 -0
  323. package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
  324. package/dist/types/helperComponents/SugaredField.d.ts +3 -0
  325. package/dist/types/helperComponents/SugaredField.d.ts.map +1 -1
  326. package/dist/types/treeParameters/FieldEventListeners.d.ts +5 -2
  327. package/dist/types/treeParameters/FieldEventListeners.d.ts.map +1 -1
  328. package/dist/types/treeParameters/LeafField.d.ts +2 -2
  329. package/dist/types/treeParameters/LeafField.d.ts.map +1 -1
  330. package/dist/types/treeParameters/QualifiedFieldList.d.ts +7 -8
  331. package/dist/types/treeParameters/QualifiedFieldList.d.ts.map +1 -1
  332. package/dist/types/treeParameters/RelativeSingleField.d.ts +8 -8
  333. package/dist/types/treeParameters/RelativeSingleField.d.ts.map +1 -1
  334. package/dist/types/tsconfig.tsbuildinfo +1 -1
  335. package/package.json +7 -6
  336. package/src/accessorTree/AccessorTree.tsx +4 -1
  337. package/src/coreComponents/DataBindingProvider.tsx +10 -0
  338. package/src/coreComponents/Entity.tsx +3 -0
  339. package/src/coreComponents/EntityList.tsx +3 -0
  340. package/src/coreComponents/EntityListSubTree.tsx +10 -0
  341. package/src/coreComponents/EntitySubTree.tsx +10 -0
  342. package/src/coreComponents/Field.tsx +3 -0
  343. package/src/coreComponents/HasMany.tsx +3 -0
  344. package/src/coreComponents/HasOne.tsx +3 -0
  345. package/src/coreComponents/ParentEntity.tsx +3 -0
  346. package/src/helperComponents/DeferredSubTrees.tsx +3 -0
  347. package/src/helperComponents/EntityView.tsx +3 -0
  348. package/src/helperComponents/FieldView.tsx +13 -0
  349. package/src/helperComponents/If.tsx +3 -0
  350. package/src/helperComponents/StaticRender.tsx +3 -0
  351. package/src/helperComponents/SugaredField.tsx +3 -0
  352. package/src/helperComponents/helpers/evaluateCondition.ts +1 -1
  353. package/src/treeParameters/FieldEventListeners.ts +15 -5
  354. package/src/treeParameters/LeafField.ts +6 -4
  355. package/src/treeParameters/QualifiedFieldList.ts +24 -17
  356. package/src/treeParameters/RelativeSingleField.ts +19 -12
  357. package/src/ambient.d.ts +0 -1
@@ -1,16 +1,8 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { EntityKeyContext } from "./EntityKeyContext.js";
3
3
  import { EnvironmentContext } from "./EnvironmentContext.js";
4
4
  function AccessorProvider(props) {
5
- return /* @__PURE__ */ jsxDEV(EntityKeyContext.Provider, { value: props.accessor.key, children: /* @__PURE__ */ jsxDEV(EnvironmentContext.Provider, { value: props.accessor.environment, children: props.children }, void 0, false, {
6
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/AccessorProvider.tsx",
7
- lineNumber: 14,
8
- columnNumber: 4
9
- }, this) }, void 0, false, {
10
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/AccessorProvider.tsx",
11
- lineNumber: 13,
12
- columnNumber: 3
13
- }, this);
5
+ return /* @__PURE__ */ jsx(EntityKeyContext.Provider, { value: props.accessor.key, children: /* @__PURE__ */ jsx(EnvironmentContext.Provider, { value: props.accessor.environment, children: props.children }) });
14
6
  }
15
7
  export {
16
8
  AccessorProvider
@@ -1 +1 @@
1
- {"version":3,"file":"AccessorProvider.js","sources":["../../../src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,gCACE,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,KAChD,UAAC,uBAAA,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,gBAAM,SAAvE,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAAgF,EADjF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAA,IAAA;AAEF;"}
1
+ {"version":3,"file":"AccessorProvider.js","sources":["../../../src/accessorPropagation/AccessorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EnvironmentContext } from './EnvironmentContext'\n\nexport interface EntityProviderProps {\n\taccessor: EntityAccessor\n\tchildren: ReactNode\n}\n\nexport function AccessorProvider(props: EntityProviderProps) {\n\treturn (\n\t\t<EntityKeyContext.Provider value={props.accessor.key}>\n\t\t\t<EnvironmentContext.Provider value={props.accessor.environment}>{props.children}</EnvironmentContext.Provider>\n\t\t</EntityKeyContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;AAUO,SAAS,iBAAiB,OAA4B;AAC5D,6BACE,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,SAAS,KAChD,UAAA,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,SAAS,aAAc,UAAA,MAAM,UAAS,EACjF,CAAA;AAEF;"}
@@ -1,11 +1,7 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { BindingOperationsContext, defaultBindingOperations } from "./BindingOperationsContext.js";
3
3
  function BindingOperationsProvider(props) {
4
- return /* @__PURE__ */ jsxDEV(BindingOperationsContext.Provider, { value: props.bindingOperations || defaultBindingOperations, children: props.children }, void 0, false, {
5
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/BindingOperationsProvider.tsx",
6
- lineNumber: 12,
7
- columnNumber: 3
8
- }, this);
4
+ return /* @__PURE__ */ jsx(BindingOperationsContext.Provider, { value: props.bindingOperations || defaultBindingOperations, children: props.children });
9
5
  }
10
6
  export {
11
7
  BindingOperationsProvider
@@ -1 +1 @@
1
- {"version":3,"file":"BindingOperationsProvider.js","sources":["../../../src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '../accessors'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;AASO,SAAS,0BAA0B,OAAuC;AAE/E,SAAA,uBAAC,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqB,0BACnE,UAAA,MAAM,SADR,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAA,IAAA;AAEF;"}
1
+ {"version":3,"file":"BindingOperationsProvider.js","sources":["../../../src/accessorPropagation/BindingOperationsProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { BindingOperations } from '../accessors'\nimport { BindingOperationsContext, defaultBindingOperations } from './BindingOperationsContext'\n\nexport interface BindingOperationsProviderProps {\n\tbindingOperations: BindingOperations | undefined\n\tchildren: ReactNode\n}\n\nexport function BindingOperationsProvider(props: BindingOperationsProviderProps) {\n\treturn (\n\t\t<BindingOperationsContext.Provider value={props.bindingOperations || defaultBindingOperations}>\n\t\t\t{props.children}\n\t\t</BindingOperationsContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;AASO,SAAS,0BAA0B,OAAuC;AAE/E,SAAA,oBAAC,yBAAyB,UAAzB,EAAkC,OAAO,MAAM,qBAAqB,0BACnE,UAAA,MAAM,SACR,CAAA;AAEF;"}
@@ -1,11 +1,7 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { EntityKeyContext } from "./EntityKeyContext.js";
3
3
  function EntityKeyProvider(props) {
4
- return /* @__PURE__ */ jsxDEV(EntityKeyContext.Provider, { value: props.entityKey, children: props.children }, void 0, false, {
5
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/EntityKeyProvider.tsx",
6
- lineNumber: 10,
7
- columnNumber: 9
8
- }, this);
4
+ return /* @__PURE__ */ jsx(EntityKeyContext.Provider, { value: props.entityKey, children: props.children });
9
5
  }
10
6
  export {
11
7
  EntityKeyProvider
@@ -1 +1 @@
1
- {"version":3,"file":"EntityKeyProvider.js","sources":["../../../src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;AAQO,SAAS,kBAAkB,OAA+B;AACzD,SAAA,uBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,SAA1D,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAmE,GAAA,IAAA;AAC3E;"}
1
+ {"version":3,"file":"EntityKeyProvider.js","sources":["../../../src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;AAQO,SAAS,kBAAkB,OAA+B;AACzD,SAAA,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,SAAS,CAAA;AAC3E;"}
@@ -1,4 +1,4 @@
1
- import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import { createContext, useCallback } from "react";
3
3
  import { useEnvironment } from "./useEnvironment.js";
4
4
  import { Environment } from "../dao/Environment.js";
@@ -8,19 +8,11 @@ EnvironmentContext.displayName = "EnvironmentContext";
8
8
  const EnvironmentMiddleware = Component(
9
9
  ({ children, create }) => {
10
10
  const env = useEnvironment();
11
- return /* @__PURE__ */ jsxDEV(EnvironmentContext.Provider, { value: create(env), children }, void 0, false, {
12
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/EnvironmentContext.tsx",
13
- lineNumber: 17,
14
- columnNumber: 10
15
- }, globalThis);
11
+ return /* @__PURE__ */ jsx(EnvironmentContext.Provider, { value: create(env), children });
16
12
  },
17
13
  {
18
14
  staticRender: ({ children }) => {
19
- return /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
20
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/EnvironmentContext.tsx",
21
- lineNumber: 21,
22
- columnNumber: 11
23
- }, globalThis);
15
+ return /* @__PURE__ */ jsx(Fragment, { children });
24
16
  },
25
17
  generateEnvironment: ({ create }, env) => {
26
18
  return create(env);
@@ -30,19 +22,11 @@ const EnvironmentMiddleware = Component(
30
22
  const EnvironmentExtensionProvider = Component(
31
23
  ({ children, extension, state }) => {
32
24
  const create = useCallback((env) => env.withExtension(extension, state), [extension, state]);
33
- return /* @__PURE__ */ jsxDEV(EnvironmentMiddleware, { create, children }, void 0, false, {
34
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/EnvironmentContext.tsx",
35
- lineNumber: 38,
36
- columnNumber: 10
37
- }, globalThis);
25
+ return /* @__PURE__ */ jsx(EnvironmentMiddleware, { create, children });
38
26
  },
39
27
  ({ children, extension, state }) => {
40
28
  const create = (env) => env.withExtension(extension, state);
41
- return /* @__PURE__ */ jsxDEV(EnvironmentMiddleware, { create, children }, void 0, false, {
42
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/EnvironmentContext.tsx",
43
- lineNumber: 42,
44
- columnNumber: 10
45
- }, globalThis);
29
+ return /* @__PURE__ */ jsx(EnvironmentMiddleware, { create, children });
46
30
  }
47
31
  );
48
32
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentContext.js","sources":["../../../src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { createContext, ReactElement, ReactNode, useCallback } from 'react'\nimport { Environment } from '../dao'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps {\n\tchildren: ReactNode\n\tcreate: (env: Environment) => Environment\n}\n\nexport const EnvironmentMiddleware = Component(\n\t({ children, create }: EnvironmentMiddlewareProps) => {\n\t\tconst env = useEnvironment()\n\t\treturn <EnvironmentContext.Provider value={create(env)}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create }, env) => {\n\t\t\treturn create(env)\n\t\t},\n\t},\n)\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>) => ReactElement | null = 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,QAAQ;AACjF,mBAAmB,cAAc;AAO1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,aAAyC;AACrD,UAAM,MAAM;AACL,WAAA,uBAAC,mBAAmB,UAAnB,EAA4B,OAAO,OAAO,GAAG,GAAI,SAAlD,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAA2D,GAAAA,UAAA;AAAA,EACnE;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,UAAA;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,UAAU,QAAQ;AACzC,aAAO,OAAO,GAAG;AAAA,IAClB;AAAA,EACD;AACD;AAQO,MAAM,+BAA0G;AAAA,EACtH,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,UAAA;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,UAAA;AAAA,EACzD;AACD;"}
1
+ {"version":3,"file":"EnvironmentContext.js","sources":["../../../src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { createContext, ReactElement, ReactNode, useCallback } from 'react'\nimport { Environment } from '../dao'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps {\n\tchildren: ReactNode\n\tcreate: (env: Environment) => Environment\n}\n\nexport const EnvironmentMiddleware = Component(\n\t({ children, create }: EnvironmentMiddlewareProps) => {\n\t\tconst env = useEnvironment()\n\t\treturn <EnvironmentContext.Provider value={create(env)}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create }, env) => {\n\t\t\treturn create(env)\n\t\t},\n\t},\n)\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>) => ReactElement | null = 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":[],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,QAAQ;AACjF,mBAAmB,cAAc;AAO1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,aAAyC;AACrD,UAAM,MAAM;AACL,WAAA,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,OAAO,GAAG,GAAI,SAAS,CAAA;AAAA,EACnE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,6CAAU,SAAS,CAAA;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,UAAU,QAAQ;AACzC,aAAO,OAAO,GAAG;AAAA,IAClB;AAAA,EACD;AACD;AAQO,MAAM,+BAA0G;AAAA,EACtH,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACjG,WAAA,oBAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AAChE,WAAA,oBAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EACzD;AACD;"}
@@ -1,11 +1,7 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { TreeRootIdContext } from "./TreeRootIdContext.js";
3
3
  function TreeRootIdProvider(props) {
4
- return /* @__PURE__ */ jsxDEV(TreeRootIdContext.Provider, { value: props.treeRootId, children: props.children }, void 0, false, {
5
- fileName: "/__w/interface/interface/packages/binding/src/accessorPropagation/TreeRootIdProvider.tsx",
6
- lineNumber: 11,
7
- columnNumber: 9
8
- }, this);
4
+ return /* @__PURE__ */ jsx(TreeRootIdContext.Provider, { value: props.treeRootId, children: props.children });
9
5
  }
10
6
  export {
11
7
  TreeRootIdProvider
@@ -1 +1 @@
1
- {"version":3,"file":"TreeRootIdProvider.js","sources":["../../../src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '../treeParameters'\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":["../../../src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '../treeParameters'\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,oBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,SAAS,CAAA;AAC7E;"}
@@ -28,6 +28,7 @@ function useDesugaredRelativeEntityList(sugaredRelativeEntityList) {
28
28
  },
29
29
  environment
30
30
  ) : void 0,
31
+ // eslint-disable-next-line react-hooks/exhaustive-deps
31
32
  [
32
33
  normalizedSugared?.field,
33
34
  normalizedSugared?.setOnCreate,
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACd;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,IAEA,IAAA;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,IACD;AAAA,EAAA;AAEF;"}
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACd;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,IAEA,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,IACD;AAAA,EAAA;AAEF;"}
@@ -25,6 +25,7 @@ function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity) {
25
25
  },
26
26
  environment
27
27
  ) : void 0,
28
+ // eslint-disable-next-line react-hooks/exhaustive-deps
28
29
  [normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity]
29
30
  );
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACd;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEA,IAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACd;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEA,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EAAA;AAEpH;"}
@@ -25,6 +25,7 @@ function useDesugaredRelativeSingleField(sugaredRelativeSingleField) {
25
25
  },
26
26
  environment
27
27
  ) : void 0,
28
+ // eslint-disable-next-line react-hooks/exhaustive-deps
28
29
  [normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField]
29
30
  );
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACd;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEA,IAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;"}
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '../queryLanguage'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '../treeParameters'\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\t{\n\t\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\t},\n\t\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;AAEpB,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,IAAA;AAAA,EACR,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EACrB;AAEO,SAAA;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACd;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEA,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EAAA;AAEpH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntity.js","sources":["../../../src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '../treeParameters'\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)\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.getRelativeSingleEntity(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, forceUpdate] = useAccessorUpdateSubscription(getEntity, true)\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, forceUpdate)\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;AAClB,QAAM,iBAAiB;AAEnB,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAElG,WAAO,8BAA8B,iBAAiB;AAAA,EACvD;AACA,QAAM,8BAA8B,OAAO;AAGrC,QAAA,uBAAuB,iCAAiC,2BAA2B;AAEnF,QAAA,YAAY,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,wBAAwB,oBAAqB;AAAA,EACzD,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAGD,UAAM,CAACA,SAAQ,WAAW,IAAI,8BAA8B,WAAW,IAAI;AAEvE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnD,4BAAsB,qBAAqB,mBAAmB,GAAG,OAAO,WAAW;AAAA,IACpF;AAEOA,WAAAA;AAAAA,EACR;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"useEntity.js","sources":["../../../src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '../treeParameters'\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)\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.getRelativeSingleEntity(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, forceUpdate] = useAccessorUpdateSubscription(getEntity, true)\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, forceUpdate)\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;AAClB,QAAM,iBAAiB;AAEnB,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAElG,WAAO,8BAA8B,iBAAiB;AAAA,EACvD;AACM,QAAA,8BAA8B,OAAO,CAAC;AAGtC,QAAA,uBAAuB,iCAAiC,2BAA2B;AAEnF,QAAA,YAAY,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,wBAAwB,oBAAqB;AAAA,EACzD,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IAAA;AAGD,UAAM,CAACA,SAAQ,WAAW,IAAI,8BAA8B,WAAW,IAAI;AAEvE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,WAAW;AAAA,IACpF;AAEOA,WAAAA;AAAAA,EACR;AACO,SAAA;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityList.js","sources":["../../../src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityListAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '../treeParameters'\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.getRelativeEntityList(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, forceUpdate] = useAccessorUpdateSubscription(getEntityList, true)\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, forceUpdate)\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,EAAA;AAGD,QAAM,YAAY;AAClB,QAAM,iBAAiB;AACjB,QAAA,gBAAgB,YAAY,MAAM;AACjC,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,sBAAsB,kBAAmB;AAAA,EACrD,GAAA,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AAEvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAGD,UAAM,CAAC,YAAY,WAAW,IAAI,8BAA8B,eAAe,IAAI;AAE/E,QAAA,mBAAmB,mBAAmB,QAAQ;AAEjD,4BAAsB,mBAAmB,mBAAmB,GAAG,OAAO,WAAW;AAAA,IAClF;AAEO,WAAA;AAAA,EACR;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"useEntityList.js","sources":["../../../src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { EntityListAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '../treeParameters'\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.getRelativeEntityList(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, forceUpdate] = useAccessorUpdateSubscription(getEntityList, true)\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, forceUpdate)\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,EAAA;AAGD,QAAM,YAAY;AAClB,QAAM,iBAAiB;AACjB,QAAA,gBAAgB,YAAY,MAAM;AACjC,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,sBAAsB,kBAAmB;AAAA,EACrD,GAAA,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AAEvB;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IAAA;AAGD,UAAM,CAAC,YAAY,WAAW,IAAI,8BAA8B,eAAe,IAAI;AAE/E,QAAA,mBAAmB,mBAAmB,QAAQ;AAEjD,4BAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,WAAW;AAAA,IAClF;AAEO,WAAA;AAAA,EACR;AACO,SAAA;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityListSubTree.js","sources":["../../../src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '../accessors'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '../treeParameters'\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)\n}\n"],"names":[],"mappings":";;;;AAQa,MAAA,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa;AACb,QAAA,aAAa,+BAA+B,mBAAmB;AAC/D,QAAA,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO;AACzB,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;AACjD;"}
1
+ {"version":3,"file":"useEntityListSubTree.js","sources":["../../../src/accessorPropagation/useEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '../accessors'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntityListSubTreeParameters } from './useEntityListSubTreeParameters'\nimport { useGetEntityListSubTree } from './useGetEntityListSubTree'\nimport { TreeRootId } from '../treeParameters'\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)\n}\n"],"names":[],"mappings":";;;;AAQa,MAAA,uBAAuB,CACnC,wBACG,WACqB;AACxB,QAAM,aAAa;AACb,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,EAAA;AAO9C,SAAO,8BAA8B,WAAW;AACjD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntitySubTree.js","sources":["../../../src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\nimport { TreeRootId } from '../treeParameters'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)\n}\n"],"names":[],"mappings":";;;;AAQa,MAAA,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAa;AACb,QAAA,aAAa,2BAA2B,qBAAqB;AAC7D,QAAA,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO;AACzB,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAO,8BAA8B,WAAW;AACjD;"}
1
+ {"version":3,"file":"useEntitySubTree.js","sources":["../../../src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\nimport { TreeRootId } from '../treeParameters'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)\n}\n"],"names":[],"mappings":";;;;AAQa,MAAA,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAa;AACb,QAAA,aAAa,2BAA2B,qBAAqB;AAC7D,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,EAAA;AAM9C,SAAO,8BAA8B,WAAW;AACjD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useField.js","sources":["../../../src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { FieldAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getRelativeSingleField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [field, forceUpdate] = useAccessorUpdateSubscription<Value>(getField, true)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, forceUpdate)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":[],"mappings":";;;;;;;AAeA,SAAS,SACR,4BACmC;AAC7B,QAAA,sBAAsB,gCAAgC,0BAA0B;AACtF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY;AAClB,QAAM,iBAAiB;AACjB,QAAA,WAAW,YAAY,MAAM;AAC5B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,uBAA8B,mBAAoB;AAAA,EAC9D,GAAA,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AAExB;AAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAGD,UAAM,CAAC,OAAO,WAAW,IAAI,8BAAqC,UAAU,IAAI;AAE5E,QAAA,oBAAoB,mBAAmB,QAAQ;AAElD,4BAAsB,oBAAoB,mBAAmB,GAAG,OAAO,WAAW;AAAA,IACnF;AAEO,WAAA;AAAA,EACR;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"useField.js","sources":["../../../src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from '../accessorPropagation'\nimport type { FieldAccessor } from '../accessors'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '../treeParameters'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getRelativeSingleField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [field, forceUpdate] = useAccessorUpdateSubscription<Value>(getField, true)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, forceUpdate)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":[],"mappings":";;;;;;;AAeA,SAAS,SACR,4BACmC;AAC7B,QAAA,sBAAsB,gCAAgC,0BAA0B;AACtF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY;AAClB,QAAM,iBAAiB;AACjB,QAAA,WAAW,YAAY,MAAM;AAC5B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,uBAA8B,mBAAoB;AAAA,EAC9D,GAAA,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AAExB;AAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAGD,UAAM,CAAC,OAAO,WAAW,IAAI,8BAAqC,UAAU,IAAI;AAE5E,QAAA,oBAAoB,mBAAmB,QAAQ;AAElD,4BAAsB,oBAAoB,mBAAmB,CAAC,EAAE,OAAO,WAAW;AAAA,IACnF;AAEO,WAAA;AAAA,EACR;AACO,SAAA;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGetEntityListSubTree.js","sources":["../../../src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '../accessors'\nimport type {\n\tAlias,\n\tSugaredQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tTreeRootId,\n} from '../treeParameters'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntityListSubTree = (): ((\n\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityListAccessor) => {\n\tconst environment = useEnvironment()\n\tconst getEntityListSubTree = useBindingOperations().getEntityListSubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntityListSubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntityListSubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,0BAA0B,MAGX;AAC3B,QAAM,cAAc;AACd,QAAA,uBAAuB,qBAAuB,EAAA;AACpD,QAAM,aAAa;AAEZ,SAAA;AAAA,IACN,CACC,sBACG,WACC,qBAAqB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,IAAI,WAAW;AAAA,IACtG,CAAC,aAAa,sBAAsB,UAAU;AAAA,EAAA;AAEhD;"}
1
+ {"version":3,"file":"useGetEntityListSubTree.js","sources":["../../../src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '../accessors'\nimport type {\n\tAlias,\n\tSugaredQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tTreeRootId,\n} from '../treeParameters'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntityListSubTree = (): ((\n\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityListAccessor) => {\n\tconst environment = useEnvironment()\n\tconst getEntityListSubTree = useBindingOperations().getEntityListSubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntityListSubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntityListSubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,0BAA0B,MAGX;AAC3B,QAAM,cAAc;AACd,QAAA,uBAAuB,qBAAuB,EAAA;AACpD,QAAM,aAAa;AAEZ,SAAA;AAAA,IACN,CACC,sBACG,WACC,qBAAqB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IACtG,CAAC,aAAa,sBAAsB,UAAU;AAAA,EAAA;AAEhD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGetEntitySubTree.js","sources":["../../../src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport type {\n\tAlias,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntitySubTree = (): ((\n\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityAccessor) => {\n\tconst environment = useEnvironment()\n\tconst getEntitySubTree = useBindingOperations().getEntitySubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntitySubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntitySubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,sBAAsB,MAGX;AACvB,QAAM,cAAc;AACd,QAAA,mBAAmB,qBAAuB,EAAA;AAChD,QAAM,aAAa;AAEZ,SAAA;AAAA,IACN,CACC,sBACG,WACC,iBAAiB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,IAAI,WAAW;AAAA,IAClG,CAAC,aAAa,kBAAkB,UAAU;AAAA,EAAA;AAE5C;"}
1
+ {"version":3,"file":"useGetEntitySubTree.js","sources":["../../../src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '../accessors'\nimport type {\n\tAlias,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntitySubTree = (): ((\n\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityAccessor) => {\n\tconst environment = useEnvironment()\n\tconst getEntitySubTree = useBindingOperations().getEntitySubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntitySubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntitySubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,sBAAsB,MAGX;AACvB,QAAM,cAAc;AACd,QAAA,mBAAmB,qBAAuB,EAAA;AAChD,QAAM,aAAa;AAEZ,SAAA;AAAA,IACN,CACC,sBACG,WACC,iBAAiB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IAClG,CAAC,aAAa,kBAAkB,UAAU;AAAA,EAAA;AAE5C;"}
@@ -1,4 +1,4 @@
1
- import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { GraphQlLiteral } from "@contember/client";
3
3
  import { addEntityAtIndex } from "./addEntityAtIndex.js";
4
4
  import { EntitySubTree } from "../coreComponents/EntitySubTree.js";
@@ -28,8 +28,8 @@ const SetOrderFieldOnCreate = Component(
28
28
  limit: 1,
29
29
  orderBy: getOrderBy("desc")
30
30
  };
31
- return /* @__PURE__ */ jsxDEV(Fragment, { children: [
32
- /* @__PURE__ */ jsxDEV(
31
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
32
+ /* @__PURE__ */ jsx(
33
33
  EntitySubTree,
34
34
  {
35
35
  entity,
@@ -40,43 +40,15 @@ const SetOrderFieldOnCreate = Component(
40
40
  const newOrderFieldValue2 = !entities.length ? 0 : (entities[0].getRelativeSingleField(desugaredOrderField).value ?? 0) + 1;
41
41
  getAccessor().getRelativeSingleField(desugaredOrderField).updateValue(newOrderFieldValue2);
42
42
  },
43
- children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
44
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
45
- lineNumber: 61,
46
- columnNumber: 7
47
- }, globalThis)
48
- },
49
- void 0,
50
- false,
51
- {
52
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
53
- lineNumber: 49,
54
- columnNumber: 6
55
- },
56
- globalThis
43
+ children: /* @__PURE__ */ jsx(SugaredField, { field: orderField })
44
+ }
57
45
  ),
58
- /* @__PURE__ */ jsxDEV(EntityListSubTree, { ...qel, children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
59
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
60
- lineNumber: 64,
61
- columnNumber: 7
62
- }, globalThis) }, void 0, false, {
63
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
64
- lineNumber: 63,
65
- columnNumber: 6
66
- }, globalThis)
67
- ] }, void 0, true, {
68
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
69
- lineNumber: 48,
70
- columnNumber: 5
71
- }, globalThis);
46
+ /* @__PURE__ */ jsx(EntityListSubTree, { ...qel, children: /* @__PURE__ */ jsx(SugaredField, { field: orderField }) })
47
+ ] });
72
48
  }
73
- return /* @__PURE__ */ jsxDEV(Fragment, { children: [
74
- /* @__PURE__ */ jsxDEV(Field, { field: desugaredOrderField, defaultValue: newOrderFieldValue, isNonbearing: true }, void 0, false, {
75
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
76
- lineNumber: 71,
77
- columnNumber: 5
78
- }, globalThis),
79
- /* @__PURE__ */ jsxDEV(
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ /* @__PURE__ */ jsx(Field, { field: desugaredOrderField, defaultValue: newOrderFieldValue, isNonbearing: true }),
51
+ /* @__PURE__ */ jsx(
80
52
  EntityListSubTree,
81
53
  {
82
54
  entities: entity,
@@ -89,26 +61,10 @@ const SetOrderFieldOnCreate = Component(
89
61
  });
90
62
  newEntityKey && bindingOperations.getEntityByKey(newEntityKey).deleteEntity();
91
63
  },
92
- children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
93
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
94
- lineNumber: 86,
95
- columnNumber: 6
96
- }, globalThis)
97
- },
98
- void 0,
99
- false,
100
- {
101
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
102
- lineNumber: 72,
103
- columnNumber: 5
104
- },
105
- globalThis
64
+ children: /* @__PURE__ */ jsx(SugaredField, { field: orderField })
65
+ }
106
66
  )
107
- ] }, void 0, true, {
108
- fileName: "/__w/interface/interface/packages/binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
109
- lineNumber: 70,
110
- columnNumber: 4
111
- }, globalThis);
67
+ ] });
112
68
  },
113
69
  "SetOrderFieldOnCreate"
114
70
  );
@@ -1 +1 @@
1
- {"version":3,"file":"SetOrderFieldOnCreate.js","sources":["../../../src/accessorSorting/SetOrderFieldOnCreate.tsx"],"sourcesContent":["import type { CrudQueryBuilder, Input } from '@contember/client'\nimport { GraphQlLiteral } from '@contember/client'\nimport { Component, EntityListSubTree, EntitySubTree, Field } from '../coreComponents'\nimport { SugaredField } from '../helperComponents'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tSugaredOrderBy,\n\tSugaredQualifiedEntityList,\n\tSugaredRelativeSingleField,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { addEntityAtIndex } from './addEntityAtIndex'\n\nexport interface SetOrderFieldOnCreateOwnProps {\n\torderField: SugaredRelativeSingleField | string\n\tnewOrderFieldValue?: number\n}\n\nexport interface SetOrderFieldOnCreateProps\n\textends SetOrderFieldOnCreateOwnProps,\n\t\tPick<SugaredUnconstrainedQualifiedSingleEntity, 'entity'> {}\n\nexport const SetOrderFieldOnCreate = Component<SetOrderFieldOnCreateProps>(\n\t() => null,\n\t({ orderField, newOrderFieldValue, entity }, environment) => {\n\t\tconst desugaredOrderField = QueryLanguage.desugarRelativeSingleField(orderField, environment)\n\t\tconst getOrderBy = (order: 'asc' | 'desc'): SugaredOrderBy => [\n\t\t\tdesugaredOrderField.hasOneRelationPath\n\t\t\t\t.map(relation => relation.field)\n\t\t\t\t.reduceRight(\n\t\t\t\t\t(accumulator, currentValue) => ({\n\t\t\t\t\t\t[currentValue]: accumulator,\n\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\t[desugaredOrderField.field]: new GraphQlLiteral(order),\n\t\t\t\t\t} as Input.OrderBy<CrudQueryBuilder.OrderDirection>,\n\t\t\t\t),\n\t\t]\n\n\t\tif (newOrderFieldValue === undefined) {\n\t\t\tconst qel: SugaredQualifiedEntityList = {\n\t\t\t\tentities: entity,\n\t\t\t\texpectedMutation: 'none',\n\t\t\t\tlimit: 1,\n\t\t\t\torderBy: getOrderBy('desc'),\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<EntitySubTree\n\t\t\t\t\t\tentity={entity}\n\t\t\t\t\t\tisCreating\n\t\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t\tconst listSubTree = bindingOperations.getEntityListSubTree(qel)\n\t\t\t\t\t\t\tconst entities = Array.from(listSubTree)\n\t\t\t\t\t\t\tconst newOrderFieldValue = !entities.length\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: (entities[0].getRelativeSingleField<number>(desugaredOrderField).value ?? 0) + 1\n\t\t\t\t\t\t\tgetAccessor().getRelativeSingleField<number>(desugaredOrderField).updateValue(newOrderFieldValue)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntitySubTree>\n\t\t\t\t\t<EntityListSubTree {...qel}>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntityListSubTree>\n\t\t\t\t</>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Field field={desugaredOrderField} defaultValue={newOrderFieldValue} isNonbearing />\n\t\t\t\t<EntityListSubTree\n\t\t\t\t\tentities={entity}\n\t\t\t\t\texpectedMutation=\"anyMutation\"\n\t\t\t\t\torderBy={getOrderBy('asc')}\n\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t// We're creating a new entity which adjusts the numbering of the other ones if applicable\n\t\t\t\t\t\t// and then deleting it again which leaves a hole for newOrderFieldValue that is set above.\n\t\t\t\t\t\tlet newEntityKey: string | undefined = undefined\n\t\t\t\t\t\taddEntityAtIndex(getAccessor(), desugaredOrderField, newOrderFieldValue, getNewEntity => {\n\t\t\t\t\t\t\tnewEntityKey = getNewEntity().key\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnewEntityKey && bindingOperations.getEntityByKey(newEntityKey).deleteEntity()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t</EntityListSubTree>\n\t\t\t</>\n\t\t)\n\t},\n\t'SetOrderFieldOnCreate',\n)\n"],"names":["newOrderFieldValue","this"],"mappings":";;;;;;;;;AAsBO,MAAM,wBAAwB;AAAA,EACpC,MAAM;AAAA,EACN,CAAC,EAAE,YAAY,oBAAoB,OAAA,GAAU,gBAAgB;AAC5D,UAAM,sBAAsB,cAAc,2BAA2B,YAAY,WAAW;AACtF,UAAA,aAAa,CAAC,UAA0C;AAAA,MAC7D,oBAAoB,mBAClB,IAAI,CAAY,aAAA,SAAS,KAAK,EAC9B;AAAA,QACA,CAAC,aAAa,kBAAkB;AAAA,UAC/B,CAAC,eAAe;AAAA,QAAA;AAAA,QAEjB;AAAA,UACC,CAAC,oBAAoB,QAAQ,IAAI,eAAe,KAAK;AAAA,QACtD;AAAA,MACD;AAAA,IAAA;AAGF,QAAI,uBAAuB,QAAW;AACrC,YAAM,MAAkC;AAAA,QACvC,UAAU;AAAA,QACV,kBAAkB;AAAA,QAClB,OAAO;AAAA,QACP,SAAS,WAAW,MAAM;AAAA,MAAA;AAE3B,aAEE,uBAAA,UAAA,EAAA,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA;AAAA,YACA,YAAU;AAAA,YACV,iBAAiB,CAAC,aAAa,sBAAsB;AAC9C,oBAAA,cAAc,kBAAkB,qBAAqB,GAAG;AACxD,oBAAA,WAAW,MAAM,KAAK,WAAW;AACjCA,oBAAAA,sBAAqB,CAAC,SAAS,SAClC,KACC,SAAS,GAAG,uBAA+B,mBAAmB,EAAE,SAAS,KAAK;AAClF,0BAAA,EAAc,uBAA+B,mBAAmB,EAAE,YAAYA,mBAAkB;AAAA,YACjG;AAAA,YAEA,UAAA,uBAAC,cAAa,EAAA,OAAO,cAArB,QAAA,OAAA;AAAA,cAAA,UAAA;AAAA,cAAA,YAAA;AAAA,cAAA,cAAA;AAAA,YAAiC,GAAAC,UAAA;AAAA,UAAA;AAAA,UAZlC;AAAA,UAAA;AAAA,UAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA;AAAA,UAAAA;AAAAA,QAaA;AAAA,+BACC,mBAAmB,EAAA,GAAG,KACtB,UAAC,uBAAA,cAAA,EAAa,OAAO,WAArB,GAAA,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,UAAiC,EADlC,GAAA,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAEA,GAAAA,UAAA;AAAA,MAAA,KAjBD,QAAA,MAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAkBA,GAAAA,UAAA;AAAA,IAEF;AACA,WAEE,uBAAA,UAAA,EAAA,UAAA;AAAA,MAAA,uBAAC,SAAM,OAAO,qBAAqB,cAAc,oBAAoB,cAAY,KAAjF,GAAA,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAkF,GAAAA,UAAA;AAAA,MAClF;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,UAAU;AAAA,UACV,kBAAiB;AAAA,UACjB,SAAS,WAAW,KAAK;AAAA,UACzB,iBAAiB,CAAC,aAAa,sBAAsB;AAGpD,gBAAI,eAAmC;AACvC,6BAAiB,YAAY,GAAG,qBAAqB,oBAAoB,CAAgB,iBAAA;AACxF,6BAAe,aAAe,EAAA;AAAA,YAAA,CAC9B;AACD,4BAAgB,kBAAkB,eAAe,YAAY,EAAE,aAAa;AAAA,UAC7E;AAAA,UAEA,UAAA,uBAAC,cAAa,EAAA,OAAO,cAArB,QAAA,OAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAiC,GAAAA,UAAA;AAAA,QAAA;AAAA,QAdlC;AAAA,QAAA;AAAA,QAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA;AAAA,QAAAA;AAAAA,MAeA;AAAA,IAAA,KAjBD,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAkBA,GAAAA,UAAA;AAAA,EAEF;AAAA,EACA;AACD;"}
1
+ {"version":3,"file":"SetOrderFieldOnCreate.js","sources":["../../../src/accessorSorting/SetOrderFieldOnCreate.tsx"],"sourcesContent":["import type { CrudQueryBuilder, Input } from '@contember/client'\nimport { GraphQlLiteral } from '@contember/client'\nimport { Component, EntityListSubTree, EntitySubTree, Field } from '../coreComponents'\nimport { SugaredField } from '../helperComponents'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tSugaredOrderBy,\n\tSugaredQualifiedEntityList,\n\tSugaredRelativeSingleField,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { addEntityAtIndex } from './addEntityAtIndex'\n\nexport interface SetOrderFieldOnCreateOwnProps {\n\torderField: SugaredRelativeSingleField | string\n\tnewOrderFieldValue?: number\n}\n\nexport interface SetOrderFieldOnCreateProps\n\textends SetOrderFieldOnCreateOwnProps,\n\t\tPick<SugaredUnconstrainedQualifiedSingleEntity, 'entity'> {}\n\nexport const SetOrderFieldOnCreate = Component<SetOrderFieldOnCreateProps>(\n\t() => null,\n\t({ orderField, newOrderFieldValue, entity }, environment) => {\n\t\tconst desugaredOrderField = QueryLanguage.desugarRelativeSingleField(orderField, environment)\n\t\tconst getOrderBy = (order: 'asc' | 'desc'): SugaredOrderBy => [\n\t\t\tdesugaredOrderField.hasOneRelationPath\n\t\t\t\t.map(relation => relation.field)\n\t\t\t\t.reduceRight(\n\t\t\t\t\t(accumulator, currentValue) => ({\n\t\t\t\t\t\t[currentValue]: accumulator,\n\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\t[desugaredOrderField.field]: new GraphQlLiteral(order),\n\t\t\t\t\t} as Input.OrderBy<CrudQueryBuilder.OrderDirection>,\n\t\t\t\t),\n\t\t]\n\n\t\tif (newOrderFieldValue === undefined) {\n\t\t\tconst qel: SugaredQualifiedEntityList = {\n\t\t\t\tentities: entity,\n\t\t\t\texpectedMutation: 'none',\n\t\t\t\tlimit: 1,\n\t\t\t\torderBy: getOrderBy('desc'),\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<EntitySubTree\n\t\t\t\t\t\tentity={entity}\n\t\t\t\t\t\tisCreating\n\t\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t\tconst listSubTree = bindingOperations.getEntityListSubTree(qel)\n\t\t\t\t\t\t\tconst entities = Array.from(listSubTree)\n\t\t\t\t\t\t\tconst newOrderFieldValue = !entities.length\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: (entities[0].getRelativeSingleField<number>(desugaredOrderField).value ?? 0) + 1\n\t\t\t\t\t\t\tgetAccessor().getRelativeSingleField<number>(desugaredOrderField).updateValue(newOrderFieldValue)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntitySubTree>\n\t\t\t\t\t<EntityListSubTree {...qel}>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntityListSubTree>\n\t\t\t\t</>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Field field={desugaredOrderField} defaultValue={newOrderFieldValue} isNonbearing />\n\t\t\t\t<EntityListSubTree\n\t\t\t\t\tentities={entity}\n\t\t\t\t\texpectedMutation=\"anyMutation\"\n\t\t\t\t\torderBy={getOrderBy('asc')}\n\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t// We're creating a new entity which adjusts the numbering of the other ones if applicable\n\t\t\t\t\t\t// and then deleting it again which leaves a hole for newOrderFieldValue that is set above.\n\t\t\t\t\t\tlet newEntityKey: string | undefined = undefined\n\t\t\t\t\t\taddEntityAtIndex(getAccessor(), desugaredOrderField, newOrderFieldValue, getNewEntity => {\n\t\t\t\t\t\t\tnewEntityKey = getNewEntity().key\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnewEntityKey && bindingOperations.getEntityByKey(newEntityKey).deleteEntity()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t</EntityListSubTree>\n\t\t\t</>\n\t\t)\n\t},\n\t'SetOrderFieldOnCreate',\n)\n"],"names":["newOrderFieldValue"],"mappings":";;;;;;;;;AAsBO,MAAM,wBAAwB;AAAA,EACpC,MAAM;AAAA,EACN,CAAC,EAAE,YAAY,oBAAoB,OAAA,GAAU,gBAAgB;AAC5D,UAAM,sBAAsB,cAAc,2BAA2B,YAAY,WAAW;AACtF,UAAA,aAAa,CAAC,UAA0C;AAAA,MAC7D,oBAAoB,mBAClB,IAAI,CAAY,aAAA,SAAS,KAAK,EAC9B;AAAA,QACA,CAAC,aAAa,kBAAkB;AAAA,UAC/B,CAAC,YAAY,GAAG;AAAA,QAAA;AAAA,QAEjB;AAAA,UACC,CAAC,oBAAoB,KAAK,GAAG,IAAI,eAAe,KAAK;AAAA,QACtD;AAAA,MACD;AAAA,IAAA;AAGF,QAAI,uBAAuB,QAAW;AACrC,YAAM,MAAkC;AAAA,QACvC,UAAU;AAAA,QACV,kBAAkB;AAAA,QAClB,OAAO;AAAA,QACP,SAAS,WAAW,MAAM;AAAA,MAAA;AAE3B,aAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA;AAAA,YACA,YAAU;AAAA,YACV,iBAAiB,CAAC,aAAa,sBAAsB;AAC9C,oBAAA,cAAc,kBAAkB,qBAAqB,GAAG;AACxD,oBAAA,WAAW,MAAM,KAAK,WAAW;AACvC,oBAAMA,sBAAqB,CAAC,SAAS,SAClC,KACC,SAAS,CAAC,EAAE,uBAA+B,mBAAmB,EAAE,SAAS,KAAK;AAClF,0BAAA,EAAc,uBAA+B,mBAAmB,EAAE,YAAYA,mBAAkB;AAAA,YACjG;AAAA,YAEA,UAAA,oBAAC,cAAa,EAAA,OAAO,WAAY,CAAA;AAAA,UAAA;AAAA,QAClC;AAAA,QACA,oBAAC,qBAAmB,GAAG,KACtB,8BAAC,cAAa,EAAA,OAAO,YAAY,EAClC,CAAA;AAAA,MACD,EAAA,CAAA;AAAA,IAEF;AACA,WAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,MAAA,oBAAC,SAAM,OAAO,qBAAqB,cAAc,oBAAoB,cAAY,MAAC;AAAA,MAClF;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,UAAU;AAAA,UACV,kBAAiB;AAAA,UACjB,SAAS,WAAW,KAAK;AAAA,UACzB,iBAAiB,CAAC,aAAa,sBAAsB;AAGpD,gBAAI,eAAmC;AACvC,6BAAiB,YAAY,GAAG,qBAAqB,oBAAoB,CAAgB,iBAAA;AACxF,6BAAe,aAAe,EAAA;AAAA,YAAA,CAC9B;AACD,4BAAgB,kBAAkB,eAAe,YAAY,EAAE,aAAa;AAAA,UAC7E;AAAA,UAEA,UAAA,oBAAC,cAAa,EAAA,OAAO,WAAY,CAAA;AAAA,QAAA;AAAA,MAClC;AAAA,IACD,EAAA,CAAA;AAAA,EAEF;AAAA,EACA;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"moveEntity.js","sources":["../../../src/accessorSorting/moveEntity.ts"],"sourcesContent":["import type { EntityAccessor, EntityListAccessor } from '../accessors'\nimport type { RelativeSingleField } from '../treeParameters'\nimport { sortEntities } from './sortEntities'\n\nexport const moveEntity = (\n\tentityList: EntityListAccessor,\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n) => {\n\tmoveEntityInArray(Array.from(entityList), entityList.getAccessor, sortByField, oldIndex, newIndex)\n}\n\nexport const moveEntityInArray = (\n\tentities: EntityAccessor[],\n\tgetAccessor: EntityListAccessor.GetEntityListAccessor,\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n): EntityAccessor[] => {\n\tconst sorted = sortEntities(entities, sortByField)\n\tconst order = computeEntityOrder(sorted, sortByField, oldIndex, newIndex)\n\n\tgetAccessor().batchUpdates((getAccessor, { getEntityByKey }) => {\n\t\tfor (const [entityKey, newOrderValue] of order) {\n\t\t\tconst targetEntity = getEntityByKey(entityKey)\n\t\t\tconst orderField = targetEntity.getRelativeSingleField<number>(sortByField)\n\n\t\t\torderField.updateValue(newOrderValue)\n\t\t}\n\t})\n\treturn sorted\n}\n\ntype EntityOrder = Map<string, number>\n\nconst computeEntityOrder = (\n\tentities: EntityAccessor[],\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n): EntityOrder => {\n\tconst order: EntityOrder = new Map()\n\n\tfor (let i = 0, len = entities.length; i < len; i++) {\n\t\tconst entity = entities[i]\n\t\tconst orderField = entity.getRelativeSingleField<number>(sortByField)\n\n\t\tlet targetValue\n\n\t\tif (i === oldIndex) {\n\t\t\ttargetValue = newIndex\n\t\t} else if (newIndex > oldIndex && oldIndex < i && i <= newIndex) {\n\t\t\ttargetValue = i - 1\n\t\t} else if (newIndex < oldIndex && newIndex <= i && i < oldIndex) {\n\t\t\ttargetValue = i + 1\n\t\t} else {\n\t\t\ttargetValue = i\n\t\t}\n\n\t\tif (typeof orderField.value !== 'number' || orderField.value !== targetValue) {\n\t\t\torder.set(entity.key, targetValue)\n\t\t}\n\t}\n\treturn order\n}\n"],"names":["getAccessor"],"mappings":";AAIO,MAAM,aAAa,CACzB,YACA,aACA,UACA,aACI;AACc,oBAAA,MAAM,KAAK,UAAU,GAAG,WAAW,aAAa,aAAa,UAAU,QAAQ;AAClG;AAEO,MAAM,oBAAoB,CAChC,UACA,aACA,aACA,UACA,aACsB;AAChB,QAAA,SAAS,aAAa,UAAU,WAAW;AACjD,QAAM,QAAQ,mBAAmB,QAAQ,aAAa,UAAU,QAAQ;AAExE,gBAAc,aAAa,CAACA,cAAa,EAAE,qBAAqB;AAC/D,eAAW,CAAC,WAAW,aAAa,KAAK,OAAO;AACzC,YAAA,eAAe,eAAe,SAAS;AACvC,YAAA,aAAa,aAAa,uBAA+B,WAAW;AAE1E,iBAAW,YAAY,aAAa;AAAA,IACrC;AAAA,EAAA,CACA;AACM,SAAA;AACR;AAIA,MAAM,qBAAqB,CAC1B,UACA,aACA,UACA,aACiB;AACX,QAAA,4BAAyB;AAE/B,WAAS,IAAI,GAAG,MAAM,SAAS,QAAQ,IAAI,KAAK,KAAK;AACpD,UAAM,SAAS,SAAS;AAClB,UAAA,aAAa,OAAO,uBAA+B,WAAW;AAEhE,QAAA;AAEJ,QAAI,MAAM,UAAU;AACL,oBAAA;AAAA,IAAA,WACJ,WAAW,YAAY,WAAW,KAAK,KAAK,UAAU;AAChE,oBAAc,IAAI;AAAA,IAAA,WACR,WAAW,YAAY,YAAY,KAAK,IAAI,UAAU;AAChE,oBAAc,IAAI;AAAA,IAAA,OACZ;AACQ,oBAAA;AAAA,IACf;AAEA,QAAI,OAAO,WAAW,UAAU,YAAY,WAAW,UAAU,aAAa;AACvE,YAAA,IAAI,OAAO,KAAK,WAAW;AAAA,IAClC;AAAA,EACD;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"moveEntity.js","sources":["../../../src/accessorSorting/moveEntity.ts"],"sourcesContent":["import type { EntityAccessor, EntityListAccessor } from '../accessors'\nimport type { RelativeSingleField } from '../treeParameters'\nimport { sortEntities } from './sortEntities'\n\nexport const moveEntity = (\n\tentityList: EntityListAccessor,\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n) => {\n\tmoveEntityInArray(Array.from(entityList), entityList.getAccessor, sortByField, oldIndex, newIndex)\n}\n\nexport const moveEntityInArray = (\n\tentities: EntityAccessor[],\n\tgetAccessor: EntityListAccessor.GetEntityListAccessor,\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n): EntityAccessor[] => {\n\tconst sorted = sortEntities(entities, sortByField)\n\tconst order = computeEntityOrder(sorted, sortByField, oldIndex, newIndex)\n\n\tgetAccessor().batchUpdates((getAccessor, { getEntityByKey }) => {\n\t\tfor (const [entityKey, newOrderValue] of order) {\n\t\t\tconst targetEntity = getEntityByKey(entityKey)\n\t\t\tconst orderField = targetEntity.getRelativeSingleField<number>(sortByField)\n\n\t\t\torderField.updateValue(newOrderValue)\n\t\t}\n\t})\n\treturn sorted\n}\n\ntype EntityOrder = Map<string, number>\n\nconst computeEntityOrder = (\n\tentities: EntityAccessor[],\n\tsortByField: RelativeSingleField,\n\toldIndex: number,\n\tnewIndex: number,\n): EntityOrder => {\n\tconst order: EntityOrder = new Map()\n\n\tfor (let i = 0, len = entities.length; i < len; i++) {\n\t\tconst entity = entities[i]\n\t\tconst orderField = entity.getRelativeSingleField<number>(sortByField)\n\n\t\tlet targetValue\n\n\t\tif (i === oldIndex) {\n\t\t\ttargetValue = newIndex\n\t\t} else if (newIndex > oldIndex && oldIndex < i && i <= newIndex) {\n\t\t\ttargetValue = i - 1\n\t\t} else if (newIndex < oldIndex && newIndex <= i && i < oldIndex) {\n\t\t\ttargetValue = i + 1\n\t\t} else {\n\t\t\ttargetValue = i\n\t\t}\n\n\t\tif (typeof orderField.value !== 'number' || orderField.value !== targetValue) {\n\t\t\torder.set(entity.key, targetValue)\n\t\t}\n\t}\n\treturn order\n}\n"],"names":["getAccessor"],"mappings":";AAIO,MAAM,aAAa,CACzB,YACA,aACA,UACA,aACI;AACc,oBAAA,MAAM,KAAK,UAAU,GAAG,WAAW,aAAa,aAAa,UAAU,QAAQ;AAClG;AAEO,MAAM,oBAAoB,CAChC,UACA,aACA,aACA,UACA,aACsB;AAChB,QAAA,SAAS,aAAa,UAAU,WAAW;AACjD,QAAM,QAAQ,mBAAmB,QAAQ,aAAa,UAAU,QAAQ;AAExE,gBAAc,aAAa,CAACA,cAAa,EAAE,qBAAqB;AAC/D,eAAW,CAAC,WAAW,aAAa,KAAK,OAAO;AACzC,YAAA,eAAe,eAAe,SAAS;AACvC,YAAA,aAAa,aAAa,uBAA+B,WAAW;AAE1E,iBAAW,YAAY,aAAa;AAAA,IACrC;AAAA,EAAA,CACA;AACM,SAAA;AACR;AAIA,MAAM,qBAAqB,CAC1B,UACA,aACA,UACA,aACiB;AACX,QAAA,4BAAyB;AAE/B,WAAS,IAAI,GAAG,MAAM,SAAS,QAAQ,IAAI,KAAK,KAAK;AAC9C,UAAA,SAAS,SAAS,CAAC;AACnB,UAAA,aAAa,OAAO,uBAA+B,WAAW;AAEhE,QAAA;AAEJ,QAAI,MAAM,UAAU;AACL,oBAAA;AAAA,IAAA,WACJ,WAAW,YAAY,WAAW,KAAK,KAAK,UAAU;AAChE,oBAAc,IAAI;AAAA,IAAA,WACR,WAAW,YAAY,YAAY,KAAK,IAAI,UAAU;AAChE,oBAAc,IAAI;AAAA,IAAA,OACZ;AACQ,oBAAA;AAAA,IACf;AAEA,QAAI,OAAO,WAAW,UAAU,YAAY,WAAW,UAAU,aAAa;AACvE,YAAA,IAAI,OAAO,KAAK,WAAW;AAAA,IAClC;AAAA,EACD;AACO,SAAA;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"repairEntitiesOrder.js","sources":["../../../src/accessorSorting/repairEntitiesOrder.ts"],"sourcesContent":["import type { EntityAccessor } from '../accessors'\nimport type { RelativeSingleField } from '../treeParameters'\n\nexport const repairEntitiesOrder = (sortableByField: RelativeSingleField, sortedEntities: EntityAccessor[]) => {\n\tfor (let i = 0, len = sortedEntities.length; i < len; i++) {\n\t\tconst entity = sortedEntities[i]\n\t\tconst orderField = entity.getRelativeSingleField(sortableByField)\n\n\t\tif (orderField.value !== i) {\n\t\t\t// TODO ideally, this condition should just be `orderField.value === null`\n\t\t\t// We should generally try to touch the indexes less\n\t\t\torderField.updateValue(i)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,sBAAsB,CAAC,iBAAsC,mBAAqC;AAC9G,WAAS,IAAI,GAAG,MAAM,eAAe,QAAQ,IAAI,KAAK,KAAK;AAC1D,UAAM,SAAS,eAAe;AACxB,UAAA,aAAa,OAAO,uBAAuB,eAAe;AAE5D,QAAA,WAAW,UAAU,GAAG;AAG3B,iBAAW,YAAY,CAAC;AAAA,IACzB;AAAA,EACD;AACD;"}
1
+ {"version":3,"file":"repairEntitiesOrder.js","sources":["../../../src/accessorSorting/repairEntitiesOrder.ts"],"sourcesContent":["import type { EntityAccessor } from '../accessors'\nimport type { RelativeSingleField } from '../treeParameters'\n\nexport const repairEntitiesOrder = (sortableByField: RelativeSingleField, sortedEntities: EntityAccessor[]) => {\n\tfor (let i = 0, len = sortedEntities.length; i < len; i++) {\n\t\tconst entity = sortedEntities[i]\n\t\tconst orderField = entity.getRelativeSingleField(sortableByField)\n\n\t\tif (orderField.value !== i) {\n\t\t\t// TODO ideally, this condition should just be `orderField.value === null`\n\t\t\t// We should generally try to touch the indexes less\n\t\t\torderField.updateValue(i)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,sBAAsB,CAAC,iBAAsC,mBAAqC;AAC9G,WAAS,IAAI,GAAG,MAAM,eAAe,QAAQ,IAAI,KAAK,KAAK;AACpD,UAAA,SAAS,eAAe,CAAC;AACzB,UAAA,aAAa,OAAO,uBAAuB,eAAe;AAE5D,QAAA,WAAW,UAAU,GAAG;AAG3B,iBAAW,YAAY,CAAC;AAAA,IACzB;AAAA,EACD;AACD;"}
@@ -1,37 +1,17 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { AccessorTreeStateContext } from "./AccessorTreeStateContext.js";
3
3
  import { DirtinessContext } from "./DirtinessContext.js";
4
4
  import { MutationStateContext } from "./MutationStateContext.js";
5
5
  import { EnvironmentContext } from "../accessorPropagation/EnvironmentContext.js";
6
6
  import { BindingOperationsProvider } from "../accessorPropagation/BindingOperationsProvider.js";
7
- function AccessorTree({ state, children }) {
7
+ const AccessorTree = ({ state, children }) => {
8
8
  const stateData = state.name === "initialized" ? state.data : {
9
9
  hasUnpersistedChanges: false,
10
10
  isMutating: false,
11
11
  bindingOperations: void 0
12
12
  };
13
- return /* @__PURE__ */ jsxDEV(EnvironmentContext.Provider, { value: state.environment, children: /* @__PURE__ */ jsxDEV(AccessorTreeStateContext.Provider, { value: state, children: /* @__PURE__ */ jsxDEV(DirtinessContext.Provider, { value: stateData.hasUnpersistedChanges, children: /* @__PURE__ */ jsxDEV(MutationStateContext.Provider, { value: stateData.isMutating, children: /* @__PURE__ */ jsxDEV(BindingOperationsProvider, { bindingOperations: stateData.bindingOperations, children }, void 0, false, {
14
- fileName: "/__w/interface/interface/packages/binding/src/accessorTree/AccessorTree.tsx",
15
- lineNumber: 24,
16
- columnNumber: 7
17
- }, this) }, void 0, false, {
18
- fileName: "/__w/interface/interface/packages/binding/src/accessorTree/AccessorTree.tsx",
19
- lineNumber: 23,
20
- columnNumber: 6
21
- }, this) }, void 0, false, {
22
- fileName: "/__w/interface/interface/packages/binding/src/accessorTree/AccessorTree.tsx",
23
- lineNumber: 22,
24
- columnNumber: 5
25
- }, this) }, void 0, false, {
26
- fileName: "/__w/interface/interface/packages/binding/src/accessorTree/AccessorTree.tsx",
27
- lineNumber: 21,
28
- columnNumber: 4
29
- }, this) }, void 0, false, {
30
- fileName: "/__w/interface/interface/packages/binding/src/accessorTree/AccessorTree.tsx",
31
- lineNumber: 20,
32
- columnNumber: 3
33
- }, this);
34
- }
13
+ return /* @__PURE__ */ jsx(EnvironmentContext.Provider, { value: state.environment, children: /* @__PURE__ */ jsx(AccessorTreeStateContext.Provider, { value: state, children: /* @__PURE__ */ jsx(DirtinessContext.Provider, { value: stateData.hasUnpersistedChanges, children: /* @__PURE__ */ jsx(MutationStateContext.Provider, { value: stateData.isMutating, children: /* @__PURE__ */ jsx(BindingOperationsProvider, { bindingOperations: stateData.bindingOperations, children }) }) }) }) });
14
+ };
35
15
  AccessorTree.displayName = "AccessorTree";
36
16
  export {
37
17
  AccessorTree
@@ -1 +1 @@
1
- {"version":3,"file":"AccessorTree.js","sources":["../../../src/accessorTree/AccessorTree.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { BindingOperationsProvider, EnvironmentContext } from '../accessorPropagation'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { DirtinessContext } from './DirtinessContext'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport interface AccessorTreeProps {\n\tstate: AccessorTreeState\n\tchildren: ReactNode\n}\n\nexport function AccessorTree({ state, children }: AccessorTreeProps) {\n\tconst stateData = state.name === 'initialized' ? state.data : {\n\t\thasUnpersistedChanges: false,\n\t\tisMutating: false,\n\t\tbindingOperations: undefined,\n\t}\n\treturn (\n\t\t<EnvironmentContext.Provider value={state.environment}>\n\t\t\t<AccessorTreeStateContext.Provider value={state}>\n\t\t\t\t<DirtinessContext.Provider value={stateData.hasUnpersistedChanges}>\n\t\t\t\t\t<MutationStateContext.Provider value={stateData.isMutating}>\n\t\t\t\t\t\t<BindingOperationsProvider bindingOperations={stateData.bindingOperations}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</BindingOperationsProvider>\n\t\t\t\t\t</MutationStateContext.Provider>\n\t\t\t\t</DirtinessContext.Provider>\n\t\t\t</AccessorTreeStateContext.Provider>\n\t\t</EnvironmentContext.Provider>\n\t)\n}\n\nAccessorTree.displayName = 'AccessorTree'\n"],"names":[],"mappings":";;;;;;AAYO,SAAS,aAAa,EAAE,OAAO,YAA+B;AACpE,QAAM,YAAY,MAAM,SAAS,gBAAgB,MAAM,OAAO;AAAA,IAC7D,uBAAuB;AAAA,IACvB,YAAY;AAAA,IACZ,mBAAmB;AAAA,EAAA;AAEpB,SACE,uBAAA,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,aACzC,UAAC,uBAAA,yBAAyB,UAAzB,EAAkC,OAAO,OACzC,iCAAC,iBAAiB,UAAjB,EAA0B,OAAO,UAAU,uBAC3C,UAAC,uBAAA,qBAAqB,UAArB,EAA8B,OAAO,UAAU,YAC/C,UAAC,uBAAA,2BAAA,EAA0B,mBAAmB,UAAU,mBACtD,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAEA,EAHD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAIA,EALD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAMA,EAPD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IAQA,EATD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAUA,GAAA,IAAA;AAEF;AAEA,aAAa,cAAc;"}
1
+ {"version":3,"file":"AccessorTree.js","sources":["../../../src/accessorTree/AccessorTree.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { BindingOperationsProvider, EnvironmentContext } from '../accessorPropagation'\nimport type { AccessorTreeState } from './AccessorTreeState'\nimport { AccessorTreeStateContext } from './AccessorTreeStateContext'\nimport { DirtinessContext } from './DirtinessContext'\nimport { MutationStateContext } from './MutationStateContext'\n\nexport interface AccessorTreeProps {\n\tstate: AccessorTreeState\n\tchildren: ReactNode\n}\n\n/**\n * @group Data binding\n */\nexport const AccessorTree = ({ state, children }: AccessorTreeProps) => {\n\tconst stateData = state.name === 'initialized' ? state.data : {\n\t\thasUnpersistedChanges: false,\n\t\tisMutating: false,\n\t\tbindingOperations: undefined,\n\t}\n\treturn (\n\t\t<EnvironmentContext.Provider value={state.environment}>\n\t\t\t<AccessorTreeStateContext.Provider value={state}>\n\t\t\t\t<DirtinessContext.Provider value={stateData.hasUnpersistedChanges}>\n\t\t\t\t\t<MutationStateContext.Provider value={stateData.isMutating}>\n\t\t\t\t\t\t<BindingOperationsProvider bindingOperations={stateData.bindingOperations}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</BindingOperationsProvider>\n\t\t\t\t\t</MutationStateContext.Provider>\n\t\t\t\t</DirtinessContext.Provider>\n\t\t\t</AccessorTreeStateContext.Provider>\n\t\t</EnvironmentContext.Provider>\n\t)\n}\n\nAccessorTree.displayName = 'AccessorTree'\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,eAAe,CAAC,EAAE,OAAO,eAAkC;AACvE,QAAM,YAAY,MAAM,SAAS,gBAAgB,MAAM,OAAO;AAAA,IAC7D,uBAAuB;AAAA,IACvB,YAAY;AAAA,IACZ,mBAAmB;AAAA,EAAA;AAEpB,6BACE,mBAAmB,UAAnB,EAA4B,OAAO,MAAM,aACzC,UAAA,oBAAC,yBAAyB,UAAzB,EAAkC,OAAO,OACzC,UAAC,oBAAA,iBAAiB,UAAjB,EAA0B,OAAO,UAAU,uBAC3C,8BAAC,qBAAqB,UAArB,EAA8B,OAAO,UAAU,YAC/C,UAAA,oBAAC,2BAA0B,EAAA,mBAAmB,UAAU,mBACtD,SAAA,CACF,EACD,CAAA,EACD,CAAA,GACD,EACD,CAAA;AAEF;AAEA,aAAa,cAAc;"}
@@ -1,10 +1,10 @@
1
- import { generateEnumerabilityPreventingEntropy } from "../utils/generateEnumerabilityPreventingEntropy.js";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
3
  var __publicField = (obj, key, value) => {
5
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
5
  return value;
7
6
  };
7
+ import { generateEnumerabilityPreventingEntropy } from "../utils/generateEnumerabilityPreventingEntropy.js";
8
8
  class ServerId {
9
9
  constructor(value, entityName) {
10
10
  this.value = value;