@contember/binding 1.1.0-alpha.9 → 1.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (764) hide show
  1. package/dist/development/BindingError.js +4 -1
  2. package/dist/development/BindingError.js.map +1 -1
  3. package/dist/development/accessorPropagation/AccessorProvider.js +20 -7
  4. package/dist/development/accessorPropagation/AccessorProvider.js.map +1 -1
  5. package/dist/development/accessorPropagation/BindingOperationsContext.js +7 -2
  6. package/dist/development/accessorPropagation/BindingOperationsContext.js.map +1 -1
  7. package/dist/development/accessorPropagation/BindingOperationsProvider.js +13 -5
  8. package/dist/development/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  9. package/dist/development/accessorPropagation/EntityKeyContext.js +3 -1
  10. package/dist/development/accessorPropagation/EntityKeyContext.js.map +1 -1
  11. package/dist/development/accessorPropagation/EntityKeyProvider.js +13 -5
  12. package/dist/development/accessorPropagation/EntityKeyProvider.js.map +1 -1
  13. package/dist/development/accessorPropagation/EnvironmentContext.js +66 -2
  14. package/dist/development/accessorPropagation/EnvironmentContext.js.map +1 -1
  15. package/dist/development/accessorPropagation/TreeRootIdContext.js +3 -1
  16. package/dist/development/accessorPropagation/TreeRootIdContext.js.map +1 -1
  17. package/dist/development/accessorPropagation/TreeRootIdProvider.js +13 -5
  18. package/dist/development/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  19. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js +3 -1
  20. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  21. package/dist/development/accessorPropagation/useBindingOperations.js +3 -1
  22. package/dist/development/accessorPropagation/useBindingOperations.js.map +1 -1
  23. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js +26 -18
  24. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  25. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js +14 -6
  26. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  27. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js +14 -6
  28. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  29. package/dist/development/accessorPropagation/useEntity.js +7 -2
  30. package/dist/development/accessorPropagation/useEntity.js.map +1 -1
  31. package/dist/development/accessorPropagation/useEntityKey.js +6 -2
  32. package/dist/development/accessorPropagation/useEntityKey.js.map +1 -1
  33. package/dist/development/accessorPropagation/useEntityList.js +11 -3
  34. package/dist/development/accessorPropagation/useEntityList.js.map +1 -1
  35. package/dist/development/accessorPropagation/useEntityListSubTree.js +7 -2
  36. package/dist/development/accessorPropagation/useEntityListSubTree.js.map +1 -1
  37. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js +50 -30
  38. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  39. package/dist/development/accessorPropagation/useEntitySubTree.js +7 -2
  40. package/dist/development/accessorPropagation/useEntitySubTree.js.map +1 -1
  41. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js +27 -16
  42. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  43. package/dist/development/accessorPropagation/useEnvironment.js +3 -1
  44. package/dist/development/accessorPropagation/useEnvironment.js.map +1 -1
  45. package/dist/development/accessorPropagation/useExtendTree.js +7 -2
  46. package/dist/development/accessorPropagation/useExtendTree.js.map +1 -1
  47. package/dist/development/accessorPropagation/useField.js +11 -3
  48. package/dist/development/accessorPropagation/useField.js.map +1 -1
  49. package/dist/development/accessorPropagation/useGetEntityByKey.js +3 -1
  50. package/dist/development/accessorPropagation/useGetEntityByKey.js.map +1 -1
  51. package/dist/development/accessorPropagation/useGetEntityListSubTree.js +7 -2
  52. package/dist/development/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  53. package/dist/development/accessorPropagation/useGetEntitySubTree.js +7 -2
  54. package/dist/development/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  55. package/dist/development/accessorPropagation/useGetTreeFilters.js +3 -1
  56. package/dist/development/accessorPropagation/useGetTreeFilters.js.map +1 -1
  57. package/dist/development/accessorPropagation/useHasEntity.js +3 -1
  58. package/dist/development/accessorPropagation/useHasEntity.js.map +1 -1
  59. package/dist/development/accessorPropagation/usePersist.js +3 -1
  60. package/dist/development/accessorPropagation/usePersist.js.map +1 -1
  61. package/dist/development/accessorPropagation/useTreeRootId.js +3 -1
  62. package/dist/development/accessorPropagation/useTreeRootId.js.map +1 -1
  63. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js +84 -44
  64. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  65. package/dist/development/accessorSorting/addEntityAtIndex.js +3 -1
  66. package/dist/development/accessorSorting/addEntityAtIndex.js.map +1 -1
  67. package/dist/development/accessorSorting/errors.js +6 -2
  68. package/dist/development/accessorSorting/errors.js.map +1 -1
  69. package/dist/development/accessorSorting/moveEntity.js +4 -1
  70. package/dist/development/accessorSorting/moveEntity.js.map +1 -1
  71. package/dist/development/accessorSorting/repairEntitiesOrder.js +3 -1
  72. package/dist/development/accessorSorting/repairEntitiesOrder.js.map +1 -1
  73. package/dist/development/accessorSorting/sortEntities.js +3 -1
  74. package/dist/development/accessorSorting/sortEntities.js.map +1 -1
  75. package/dist/development/accessorSorting/useSortedEntities.js +61 -23
  76. package/dist/development/accessorSorting/useSortedEntities.js.map +1 -1
  77. package/dist/development/accessorTree/AccessorTree.js +50 -22
  78. package/dist/development/accessorTree/AccessorTree.js.map +1 -1
  79. package/dist/development/accessorTree/AccessorTreeStateContext.js +3 -1
  80. package/dist/development/accessorTree/AccessorTreeStateContext.js.map +1 -1
  81. package/dist/development/accessorTree/DirtinessContext.js +3 -1
  82. package/dist/development/accessorTree/DirtinessContext.js.map +1 -1
  83. package/dist/development/accessorTree/MutationStateContext.js +3 -1
  84. package/dist/development/accessorTree/MutationStateContext.js.map +1 -1
  85. package/dist/development/accessorTree/NormalizedPersistedData.js +3 -1
  86. package/dist/development/accessorTree/NormalizedPersistedData.js.map +1 -1
  87. package/dist/development/accessorTree/RuntimeId.js +8 -2
  88. package/dist/development/accessorTree/RuntimeId.js.map +1 -1
  89. package/dist/development/accessorTree/accessorTreeStateReducer.js +10 -5
  90. package/dist/development/accessorTree/accessorTreeStateReducer.js.map +1 -1
  91. package/dist/development/accessorTree/metadataToRequestError.js +3 -1
  92. package/dist/development/accessorTree/metadataToRequestError.js.map +1 -1
  93. package/dist/development/accessorTree/useAccessorTreeState.js +3 -1
  94. package/dist/development/accessorTree/useAccessorTreeState.js.map +1 -1
  95. package/dist/development/accessorTree/useDataBinding.js +63 -53
  96. package/dist/development/accessorTree/useDataBinding.js.map +1 -1
  97. package/dist/development/accessorTree/useDirtinessState.js +3 -1
  98. package/dist/development/accessorTree/useDirtinessState.js.map +1 -1
  99. package/dist/development/accessorTree/useMutationState.js +3 -1
  100. package/dist/development/accessorTree/useMutationState.js.map +1 -1
  101. package/dist/development/accessors/EntityAccessor.js +35 -14
  102. package/dist/development/accessors/EntityAccessor.js.map +1 -1
  103. package/dist/development/accessors/EntityListAccessor.js +13 -11
  104. package/dist/development/accessors/EntityListAccessor.js.map +1 -1
  105. package/dist/development/accessors/ErrorAccessor.js +3 -1
  106. package/dist/development/accessors/ErrorAccessor.js.map +1 -1
  107. package/dist/development/accessors/FieldAccessor.js +9 -7
  108. package/dist/development/accessors/FieldAccessor.js.map +1 -1
  109. package/dist/development/accessors/TreeRootAccessor.js +3 -1
  110. package/dist/development/accessors/TreeRootAccessor.js.map +1 -1
  111. package/dist/development/bindingTypes.js +5 -1
  112. package/dist/development/bindingTypes.js.map +1 -1
  113. package/dist/development/core/AccessorErrorManager.js +3 -1
  114. package/dist/development/core/AccessorErrorManager.js.map +1 -1
  115. package/dist/development/core/Config.js +4 -4
  116. package/dist/development/core/Config.js.map +1 -1
  117. package/dist/development/core/DataBinding.js +146 -148
  118. package/dist/development/core/DataBinding.js.map +1 -1
  119. package/dist/development/core/DirtinessTracker.js +3 -1
  120. package/dist/development/core/DirtinessTracker.js.map +1 -1
  121. package/dist/development/core/ErrorsPreprocessor.js +12 -4
  122. package/dist/development/core/ErrorsPreprocessor.js.map +1 -1
  123. package/dist/development/core/EventManager.js +22 -8
  124. package/dist/development/core/EventManager.js.map +1 -1
  125. package/dist/development/core/IncrementalMarkerBuilder.js +36 -8
  126. package/dist/development/core/IncrementalMarkerBuilder.js.map +1 -1
  127. package/dist/development/core/MarkerComparator.js +7 -2
  128. package/dist/development/core/MarkerComparator.js.map +1 -1
  129. package/dist/development/core/MarkerMerger.js +60 -17
  130. package/dist/development/core/MarkerMerger.js.map +1 -1
  131. package/dist/development/core/MarkerTreeGenerator.js +11 -3
  132. package/dist/development/core/MarkerTreeGenerator.js.map +1 -1
  133. package/dist/development/core/MutationGenerator.js +127 -28
  134. package/dist/development/core/MutationGenerator.js.map +1 -1
  135. package/dist/development/core/QueryGenerator.js +40 -9
  136. package/dist/development/core/QueryGenerator.js.map +1 -1
  137. package/dist/development/core/RealmKeyGenerator.js +12 -3
  138. package/dist/development/core/RealmKeyGenerator.js.map +1 -1
  139. package/dist/development/core/RequestResponseNormalizer.js +3 -1
  140. package/dist/development/core/RequestResponseNormalizer.js.map +1 -1
  141. package/dist/development/core/StateInitializer.js +91 -34
  142. package/dist/development/core/StateInitializer.js.map +1 -1
  143. package/dist/development/core/TreeAugmenter.js +26 -5
  144. package/dist/development/core/TreeAugmenter.js.map +1 -1
  145. package/dist/development/core/TreeFilterGenerator.js +8 -2
  146. package/dist/development/core/TreeFilterGenerator.js.map +1 -1
  147. package/dist/development/core/TreeParameterMerger.js +25 -7
  148. package/dist/development/core/TreeParameterMerger.js.map +1 -1
  149. package/dist/development/core/TreeStore.js +23 -18
  150. package/dist/development/core/TreeStore.js.map +1 -1
  151. package/dist/development/core/VariableInputTransformer.js +3 -1
  152. package/dist/development/core/VariableInputTransformer.js.map +1 -1
  153. package/dist/development/core/exceptions/ErrorLocator.js +11 -3
  154. package/dist/development/core/exceptions/ErrorLocator.js.map +1 -1
  155. package/dist/development/core/exceptions/LocalizedBindingError.js +3 -1
  156. package/dist/development/core/exceptions/LocalizedBindingError.js.map +1 -1
  157. package/dist/development/core/exceptions/MarkerSugarer.js +8 -2
  158. package/dist/development/core/exceptions/MarkerSugarer.js.map +1 -1
  159. package/dist/development/core/exceptions/TreeParameterSugarer.js +3 -1
  160. package/dist/development/core/exceptions/TreeParameterSugarer.js.map +1 -1
  161. package/dist/development/core/factories/createBatchUpdatesOptions.js +3 -1
  162. package/dist/development/core/factories/createBatchUpdatesOptions.js.map +1 -1
  163. package/dist/development/core/operations/EntityOperations.js +47 -16
  164. package/dist/development/core/operations/EntityOperations.js.map +1 -1
  165. package/dist/development/core/operations/FieldOperations.js +22 -8
  166. package/dist/development/core/operations/FieldOperations.js.map +1 -1
  167. package/dist/development/core/operations/ListOperations.js +22 -9
  168. package/dist/development/core/operations/ListOperations.js.map +1 -1
  169. package/dist/development/core/operations/OperationsHelpers.js +6 -2
  170. package/dist/development/core/operations/OperationsHelpers.js.map +1 -1
  171. package/dist/development/core/requestAliases/MutationAlias.js +3 -1
  172. package/dist/development/core/requestAliases/MutationAlias.js.map +1 -1
  173. package/dist/development/core/schema/Schema.js +30 -4
  174. package/dist/development/core/schema/Schema.js.map +1 -1
  175. package/dist/development/core/schema/SchemaLoader.js +15 -13
  176. package/dist/development/core/schema/SchemaLoader.js.map +1 -1
  177. package/dist/development/core/schema/SchemaPreprocessor.js +3 -1
  178. package/dist/development/core/schema/SchemaPreprocessor.js.map +1 -1
  179. package/dist/development/core/state/StateIterator.js +3 -1
  180. package/dist/development/core/state/StateIterator.js.map +1 -1
  181. package/dist/development/core/state/getEntityMarker.js +3 -1
  182. package/dist/development/core/state/getEntityMarker.js.map +1 -1
  183. package/dist/development/core/utils/getCombinedSignal.js +3 -1
  184. package/dist/development/core/utils/getCombinedSignal.js.map +1 -1
  185. package/dist/development/coreComponents/Component.js +8 -3
  186. package/dist/development/coreComponents/Component.js.map +1 -1
  187. package/dist/development/coreComponents/DataBindingProvider.js +14 -9
  188. package/dist/development/coreComponents/DataBindingProvider.js.map +1 -1
  189. package/dist/development/coreComponents/Entity.js +16 -6
  190. package/dist/development/coreComponents/Entity.js.map +1 -1
  191. package/dist/development/coreComponents/EntityList.js +21 -9
  192. package/dist/development/coreComponents/EntityList.js.map +1 -1
  193. package/dist/development/coreComponents/EntityListSubTree.js +26 -9
  194. package/dist/development/coreComponents/EntityListSubTree.js.map +1 -1
  195. package/dist/development/coreComponents/EntitySubTree.js +37 -14
  196. package/dist/development/coreComponents/EntitySubTree.js.map +1 -1
  197. package/dist/development/coreComponents/Field.js +10 -4
  198. package/dist/development/coreComponents/Field.js.map +1 -1
  199. package/dist/development/coreComponents/HasMany.js +25 -9
  200. package/dist/development/coreComponents/HasMany.js.map +1 -1
  201. package/dist/development/coreComponents/HasOne.js +26 -10
  202. package/dist/development/coreComponents/HasOne.js.map +1 -1
  203. package/dist/development/coreComponents/ParentEntity.js +7 -3
  204. package/dist/development/coreComponents/ParentEntity.js.map +1 -1
  205. package/dist/development/dao/Environment.js +26 -2
  206. package/dist/development/dao/Environment.js.map +1 -1
  207. package/dist/development/dao/TreeNodeEnvironmentFactory.js +14 -14
  208. package/dist/development/dao/TreeNodeEnvironmentFactory.js.map +1 -1
  209. package/dist/development/dao/VariableFieldValue.js +3 -1
  210. package/dist/development/dao/VariableFieldValue.js.map +1 -1
  211. package/dist/development/entityEvents/useDerivedField.js +25 -17
  212. package/dist/development/entityEvents/useDerivedField.js.map +1 -1
  213. package/dist/development/entityEvents/useEntityBeforePersist.js +3 -1
  214. package/dist/development/entityEvents/useEntityBeforePersist.js.map +1 -1
  215. package/dist/development/entityEvents/useEntityBeforeUpdate.js +3 -1
  216. package/dist/development/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  217. package/dist/development/entityEvents/useEntityEvent.js +16 -8
  218. package/dist/development/entityEvents/useEntityEvent.js.map +1 -1
  219. package/dist/development/entityEvents/useEntityPersistError.js +3 -1
  220. package/dist/development/entityEvents/useEntityPersistError.js.map +1 -1
  221. package/dist/development/entityEvents/useEntityPersistSuccess.js +3 -1
  222. package/dist/development/entityEvents/useEntityPersistSuccess.js.map +1 -1
  223. package/dist/development/entityEvents/useOnConnectionUpdate.js +3 -1
  224. package/dist/development/entityEvents/useOnConnectionUpdate.js.map +1 -1
  225. package/dist/development/fieldHelpers/helpers/FieldHelper.js +3 -1
  226. package/dist/development/fieldHelpers/helpers/FieldHelper.js.map +1 -1
  227. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js +3 -1
  228. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -1
  229. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js +3 -1
  230. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -1
  231. package/dist/development/helperComponents/DeferredSubTrees.js +46 -13
  232. package/dist/development/helperComponents/DeferredSubTrees.js.map +1 -1
  233. package/dist/development/helperComponents/EntityView.js +7 -3
  234. package/dist/development/helperComponents/EntityView.js.map +1 -1
  235. package/dist/development/helperComponents/FieldView.js +22 -8
  236. package/dist/development/helperComponents/FieldView.js.map +1 -1
  237. package/dist/development/helperComponents/If.js +57 -19
  238. package/dist/development/helperComponents/If.js.map +1 -1
  239. package/dist/development/helperComponents/StaticRender.js +9 -3
  240. package/dist/development/helperComponents/StaticRender.js.map +1 -1
  241. package/dist/development/helperComponents/SugaredField.js +17 -6
  242. package/dist/development/helperComponents/SugaredField.js.map +1 -1
  243. package/dist/development/helperComponents/helpers/FilterEvaluator.js +3 -4
  244. package/dist/development/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  245. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js +3 -4
  246. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  247. package/dist/development/helperComponents/helpers/evaluateCondition.js +3 -1
  248. package/dist/development/helperComponents/helpers/evaluateCondition.js.map +1 -1
  249. package/dist/development/index.js +225 -104
  250. package/dist/development/index.js.map +1 -1
  251. package/dist/development/markers/EntityFieldMarkersContainer.js +3 -1
  252. package/dist/development/markers/EntityFieldMarkersContainer.js.map +1 -1
  253. package/dist/development/markers/EntityFieldsWithHoistablesMarker.js +3 -1
  254. package/dist/development/markers/EntityFieldsWithHoistablesMarker.js.map +1 -1
  255. package/dist/development/markers/EntityListSubTreeMarker.js +3 -1
  256. package/dist/development/markers/EntityListSubTreeMarker.js.map +1 -1
  257. package/dist/development/markers/EntitySubTreeMarker.js +3 -1
  258. package/dist/development/markers/EntitySubTreeMarker.js.map +1 -1
  259. package/dist/development/markers/FieldMarker.js +3 -1
  260. package/dist/development/markers/FieldMarker.js.map +1 -1
  261. package/dist/development/markers/HasManyRelationMarker.js +3 -1
  262. package/dist/development/markers/HasManyRelationMarker.js.map +1 -1
  263. package/dist/development/markers/HasOneRelationMarker.js +3 -1
  264. package/dist/development/markers/HasOneRelationMarker.js.map +1 -1
  265. package/dist/development/markers/MarkerTreeRoot.js +3 -1
  266. package/dist/development/markers/MarkerTreeRoot.js.map +1 -1
  267. package/dist/development/markers/ParentEntityMarker.js +3 -1
  268. package/dist/development/markers/ParentEntityMarker.js.map +1 -1
  269. package/dist/development/markers/PlaceholderGenerator.js +3 -1
  270. package/dist/development/markers/PlaceholderGenerator.js.map +1 -1
  271. package/dist/development/queryLanguage/CacheStore.js +3 -1
  272. package/dist/development/queryLanguage/CacheStore.js.map +1 -1
  273. package/dist/development/queryLanguage/MarkerFactory.js +117 -25
  274. package/dist/development/queryLanguage/MarkerFactory.js.map +1 -1
  275. package/dist/development/queryLanguage/Parser.js +114 -79
  276. package/dist/development/queryLanguage/Parser.js.map +1 -1
  277. package/dist/development/queryLanguage/QueryLanguage.js +73 -20
  278. package/dist/development/queryLanguage/QueryLanguage.js.map +1 -1
  279. package/dist/development/queryLanguage/QueryLanguageError.js +3 -1
  280. package/dist/development/queryLanguage/QueryLanguageError.js.map +1 -1
  281. package/dist/development/queryLanguage/tokenList.js +5 -1
  282. package/dist/development/queryLanguage/tokenList.js.map +1 -1
  283. package/dist/development/structures/BijectiveIndexedMap.js +3 -1
  284. package/dist/development/structures/BijectiveIndexedMap.js.map +1 -1
  285. package/dist/development/structures/LRUCache.js +3 -1
  286. package/dist/development/structures/LRUCache.js.map +1 -1
  287. package/dist/development/structures/WeakIdCache.js +3 -1
  288. package/dist/development/structures/WeakIdCache.js.map +1 -1
  289. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js +3 -1
  290. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -1
  291. package/dist/development/treeParameters/EntityCreationParameters.js +3 -1
  292. package/dist/development/treeParameters/EntityCreationParameters.js.map +1 -1
  293. package/dist/development/treeParameters/EntityListPreferences.js +3 -1
  294. package/dist/development/treeParameters/EntityListPreferences.js.map +1 -1
  295. package/dist/development/treeParameters/EventListenersStore.js +3 -1
  296. package/dist/development/treeParameters/EventListenersStore.js.map +1 -1
  297. package/dist/development/treeParameters/LeafField.js +3 -1
  298. package/dist/development/treeParameters/LeafField.js.map +1 -1
  299. package/dist/development/treeParameters/QualifiedEntityParameters.js +3 -1
  300. package/dist/development/treeParameters/QualifiedEntityParameters.js.map +1 -1
  301. package/dist/development/treeParameters/Relation.js +3 -1
  302. package/dist/development/treeParameters/Relation.js.map +1 -1
  303. package/dist/development/utils/Hashing.js +3 -1
  304. package/dist/development/utils/Hashing.js.map +1 -1
  305. package/dist/development/utils/assert.js +3 -1
  306. package/dist/development/utils/assert.js.map +1 -1
  307. package/dist/development/utils/assertNever.js +6 -2
  308. package/dist/development/utils/assertNever.js.map +1 -1
  309. package/dist/development/utils/generateEnumerabilityPreventingEntropy.js +3 -1
  310. package/dist/development/utils/generateEnumerabilityPreventingEntropy.js.map +1 -1
  311. package/dist/development/utils/isEmptyObject.js +3 -1
  312. package/dist/development/utils/isEmptyObject.js.map +1 -1
  313. package/dist/development/utils/ucfirst.js +3 -1
  314. package/dist/development/utils/ucfirst.js.map +1 -1
  315. package/dist/production/BindingError.js +4 -1
  316. package/dist/production/BindingError.js.map +1 -1
  317. package/dist/production/accessorPropagation/AccessorProvider.js +11 -7
  318. package/dist/production/accessorPropagation/AccessorProvider.js.map +1 -1
  319. package/dist/production/accessorPropagation/BindingOperationsContext.js +7 -2
  320. package/dist/production/accessorPropagation/BindingOperationsContext.js.map +1 -1
  321. package/dist/production/accessorPropagation/BindingOperationsProvider.js +8 -5
  322. package/dist/production/accessorPropagation/BindingOperationsProvider.js.map +1 -1
  323. package/dist/production/accessorPropagation/EntityKeyContext.js +3 -1
  324. package/dist/production/accessorPropagation/EntityKeyContext.js.map +1 -1
  325. package/dist/production/accessorPropagation/EntityKeyProvider.js +8 -5
  326. package/dist/production/accessorPropagation/EntityKeyProvider.js.map +1 -1
  327. package/dist/production/accessorPropagation/EnvironmentContext.js +53 -2
  328. package/dist/production/accessorPropagation/EnvironmentContext.js.map +1 -1
  329. package/dist/production/accessorPropagation/TreeRootIdContext.js +3 -1
  330. package/dist/production/accessorPropagation/TreeRootIdContext.js.map +1 -1
  331. package/dist/production/accessorPropagation/TreeRootIdProvider.js +8 -5
  332. package/dist/production/accessorPropagation/TreeRootIdProvider.js.map +1 -1
  333. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js +3 -1
  334. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
  335. package/dist/production/accessorPropagation/useBindingOperations.js +3 -1
  336. package/dist/production/accessorPropagation/useBindingOperations.js.map +1 -1
  337. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js +26 -18
  338. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
  339. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js +14 -6
  340. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
  341. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js +14 -6
  342. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
  343. package/dist/production/accessorPropagation/useEntity.js +7 -2
  344. package/dist/production/accessorPropagation/useEntity.js.map +1 -1
  345. package/dist/production/accessorPropagation/useEntityKey.js +6 -2
  346. package/dist/production/accessorPropagation/useEntityKey.js.map +1 -1
  347. package/dist/production/accessorPropagation/useEntityList.js +11 -3
  348. package/dist/production/accessorPropagation/useEntityList.js.map +1 -1
  349. package/dist/production/accessorPropagation/useEntityListSubTree.js +7 -2
  350. package/dist/production/accessorPropagation/useEntityListSubTree.js.map +1 -1
  351. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js +50 -30
  352. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
  353. package/dist/production/accessorPropagation/useEntitySubTree.js +7 -2
  354. package/dist/production/accessorPropagation/useEntitySubTree.js.map +1 -1
  355. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js +27 -16
  356. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
  357. package/dist/production/accessorPropagation/useEnvironment.js +3 -1
  358. package/dist/production/accessorPropagation/useEnvironment.js.map +1 -1
  359. package/dist/production/accessorPropagation/useExtendTree.js +7 -2
  360. package/dist/production/accessorPropagation/useExtendTree.js.map +1 -1
  361. package/dist/production/accessorPropagation/useField.js +11 -3
  362. package/dist/production/accessorPropagation/useField.js.map +1 -1
  363. package/dist/production/accessorPropagation/useGetEntityByKey.js +3 -1
  364. package/dist/production/accessorPropagation/useGetEntityByKey.js.map +1 -1
  365. package/dist/production/accessorPropagation/useGetEntityListSubTree.js +7 -2
  366. package/dist/production/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
  367. package/dist/production/accessorPropagation/useGetEntitySubTree.js +7 -2
  368. package/dist/production/accessorPropagation/useGetEntitySubTree.js.map +1 -1
  369. package/dist/production/accessorPropagation/useGetTreeFilters.js +3 -1
  370. package/dist/production/accessorPropagation/useGetTreeFilters.js.map +1 -1
  371. package/dist/production/accessorPropagation/useHasEntity.js +3 -1
  372. package/dist/production/accessorPropagation/useHasEntity.js.map +1 -1
  373. package/dist/production/accessorPropagation/usePersist.js +3 -1
  374. package/dist/production/accessorPropagation/usePersist.js.map +1 -1
  375. package/dist/production/accessorPropagation/useTreeRootId.js +3 -1
  376. package/dist/production/accessorPropagation/useTreeRootId.js.map +1 -1
  377. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js +55 -44
  378. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
  379. package/dist/production/accessorSorting/addEntityAtIndex.js +3 -1
  380. package/dist/production/accessorSorting/addEntityAtIndex.js.map +1 -1
  381. package/dist/production/accessorSorting/errors.js +6 -2
  382. package/dist/production/accessorSorting/errors.js.map +1 -1
  383. package/dist/production/accessorSorting/moveEntity.js +4 -1
  384. package/dist/production/accessorSorting/moveEntity.js.map +1 -1
  385. package/dist/production/accessorSorting/repairEntitiesOrder.js +3 -1
  386. package/dist/production/accessorSorting/repairEntitiesOrder.js.map +1 -1
  387. package/dist/production/accessorSorting/sortEntities.js +3 -1
  388. package/dist/production/accessorSorting/sortEntities.js.map +1 -1
  389. package/dist/production/accessorSorting/useSortedEntities.js +61 -23
  390. package/dist/production/accessorSorting/useSortedEntities.js.map +1 -1
  391. package/dist/production/accessorTree/AccessorTree.js +29 -22
  392. package/dist/production/accessorTree/AccessorTree.js.map +1 -1
  393. package/dist/production/accessorTree/AccessorTreeStateContext.js +3 -1
  394. package/dist/production/accessorTree/AccessorTreeStateContext.js.map +1 -1
  395. package/dist/production/accessorTree/DirtinessContext.js +3 -1
  396. package/dist/production/accessorTree/DirtinessContext.js.map +1 -1
  397. package/dist/production/accessorTree/MutationStateContext.js +3 -1
  398. package/dist/production/accessorTree/MutationStateContext.js.map +1 -1
  399. package/dist/production/accessorTree/NormalizedPersistedData.js +3 -1
  400. package/dist/production/accessorTree/NormalizedPersistedData.js.map +1 -1
  401. package/dist/production/accessorTree/RuntimeId.js +8 -2
  402. package/dist/production/accessorTree/RuntimeId.js.map +1 -1
  403. package/dist/production/accessorTree/accessorTreeStateReducer.js +10 -5
  404. package/dist/production/accessorTree/accessorTreeStateReducer.js.map +1 -1
  405. package/dist/production/accessorTree/metadataToRequestError.js +3 -1
  406. package/dist/production/accessorTree/metadataToRequestError.js.map +1 -1
  407. package/dist/production/accessorTree/useAccessorTreeState.js +3 -1
  408. package/dist/production/accessorTree/useAccessorTreeState.js.map +1 -1
  409. package/dist/production/accessorTree/useDataBinding.js +63 -53
  410. package/dist/production/accessorTree/useDataBinding.js.map +1 -1
  411. package/dist/production/accessorTree/useDirtinessState.js +3 -1
  412. package/dist/production/accessorTree/useDirtinessState.js.map +1 -1
  413. package/dist/production/accessorTree/useMutationState.js +3 -1
  414. package/dist/production/accessorTree/useMutationState.js.map +1 -1
  415. package/dist/production/accessors/EntityAccessor.js +35 -14
  416. package/dist/production/accessors/EntityAccessor.js.map +1 -1
  417. package/dist/production/accessors/EntityListAccessor.js +13 -11
  418. package/dist/production/accessors/EntityListAccessor.js.map +1 -1
  419. package/dist/production/accessors/ErrorAccessor.js +3 -1
  420. package/dist/production/accessors/ErrorAccessor.js.map +1 -1
  421. package/dist/production/accessors/FieldAccessor.js +9 -7
  422. package/dist/production/accessors/FieldAccessor.js.map +1 -1
  423. package/dist/production/accessors/TreeRootAccessor.js +3 -1
  424. package/dist/production/accessors/TreeRootAccessor.js.map +1 -1
  425. package/dist/production/bindingTypes.js +5 -1
  426. package/dist/production/bindingTypes.js.map +1 -1
  427. package/dist/production/core/AccessorErrorManager.js +3 -1
  428. package/dist/production/core/AccessorErrorManager.js.map +1 -1
  429. package/dist/production/core/Config.js +4 -4
  430. package/dist/production/core/Config.js.map +1 -1
  431. package/dist/production/core/DataBinding.js +146 -148
  432. package/dist/production/core/DataBinding.js.map +1 -1
  433. package/dist/production/core/DirtinessTracker.js +3 -1
  434. package/dist/production/core/DirtinessTracker.js.map +1 -1
  435. package/dist/production/core/ErrorsPreprocessor.js +12 -4
  436. package/dist/production/core/ErrorsPreprocessor.js.map +1 -1
  437. package/dist/production/core/EventManager.js +10 -4
  438. package/dist/production/core/EventManager.js.map +1 -1
  439. package/dist/production/core/IncrementalMarkerBuilder.js +36 -8
  440. package/dist/production/core/IncrementalMarkerBuilder.js.map +1 -1
  441. package/dist/production/core/MarkerComparator.js +7 -2
  442. package/dist/production/core/MarkerComparator.js.map +1 -1
  443. package/dist/production/core/MarkerMerger.js +60 -17
  444. package/dist/production/core/MarkerMerger.js.map +1 -1
  445. package/dist/production/core/MarkerTreeGenerator.js +11 -3
  446. package/dist/production/core/MarkerTreeGenerator.js.map +1 -1
  447. package/dist/production/core/MutationGenerator.js +127 -28
  448. package/dist/production/core/MutationGenerator.js.map +1 -1
  449. package/dist/production/core/QueryGenerator.js +40 -9
  450. package/dist/production/core/QueryGenerator.js.map +1 -1
  451. package/dist/production/core/RealmKeyGenerator.js +12 -3
  452. package/dist/production/core/RealmKeyGenerator.js.map +1 -1
  453. package/dist/production/core/RequestResponseNormalizer.js +3 -1
  454. package/dist/production/core/RequestResponseNormalizer.js.map +1 -1
  455. package/dist/production/core/StateInitializer.js +91 -34
  456. package/dist/production/core/StateInitializer.js.map +1 -1
  457. package/dist/production/core/TreeAugmenter.js +26 -5
  458. package/dist/production/core/TreeAugmenter.js.map +1 -1
  459. package/dist/production/core/TreeFilterGenerator.js +8 -2
  460. package/dist/production/core/TreeFilterGenerator.js.map +1 -1
  461. package/dist/production/core/TreeParameterMerger.js +25 -7
  462. package/dist/production/core/TreeParameterMerger.js.map +1 -1
  463. package/dist/production/core/TreeStore.js +23 -18
  464. package/dist/production/core/TreeStore.js.map +1 -1
  465. package/dist/production/core/VariableInputTransformer.js +3 -1
  466. package/dist/production/core/VariableInputTransformer.js.map +1 -1
  467. package/dist/production/core/exceptions/ErrorLocator.js +11 -3
  468. package/dist/production/core/exceptions/ErrorLocator.js.map +1 -1
  469. package/dist/production/core/exceptions/LocalizedBindingError.js +3 -1
  470. package/dist/production/core/exceptions/LocalizedBindingError.js.map +1 -1
  471. package/dist/production/core/exceptions/MarkerSugarer.js +8 -2
  472. package/dist/production/core/exceptions/MarkerSugarer.js.map +1 -1
  473. package/dist/production/core/exceptions/TreeParameterSugarer.js +3 -1
  474. package/dist/production/core/exceptions/TreeParameterSugarer.js.map +1 -1
  475. package/dist/production/core/factories/createBatchUpdatesOptions.js +3 -1
  476. package/dist/production/core/factories/createBatchUpdatesOptions.js.map +1 -1
  477. package/dist/production/core/operations/EntityOperations.js +47 -16
  478. package/dist/production/core/operations/EntityOperations.js.map +1 -1
  479. package/dist/production/core/operations/FieldOperations.js +11 -3
  480. package/dist/production/core/operations/FieldOperations.js.map +1 -1
  481. package/dist/production/core/operations/ListOperations.js +22 -9
  482. package/dist/production/core/operations/ListOperations.js.map +1 -1
  483. package/dist/production/core/operations/OperationsHelpers.js +6 -2
  484. package/dist/production/core/operations/OperationsHelpers.js.map +1 -1
  485. package/dist/production/core/requestAliases/MutationAlias.js +3 -1
  486. package/dist/production/core/requestAliases/MutationAlias.js.map +1 -1
  487. package/dist/production/core/schema/Schema.js +30 -4
  488. package/dist/production/core/schema/Schema.js.map +1 -1
  489. package/dist/production/core/schema/SchemaLoader.js +15 -13
  490. package/dist/production/core/schema/SchemaLoader.js.map +1 -1
  491. package/dist/production/core/schema/SchemaPreprocessor.js +3 -1
  492. package/dist/production/core/schema/SchemaPreprocessor.js.map +1 -1
  493. package/dist/production/core/state/StateIterator.js +3 -1
  494. package/dist/production/core/state/StateIterator.js.map +1 -1
  495. package/dist/production/core/state/getEntityMarker.js +3 -1
  496. package/dist/production/core/state/getEntityMarker.js.map +1 -1
  497. package/dist/production/core/utils/getCombinedSignal.js +3 -1
  498. package/dist/production/core/utils/getCombinedSignal.js.map +1 -1
  499. package/dist/production/coreComponents/Component.js +8 -3
  500. package/dist/production/coreComponents/Component.js.map +1 -1
  501. package/dist/production/coreComponents/DataBindingProvider.js +9 -9
  502. package/dist/production/coreComponents/DataBindingProvider.js.map +1 -1
  503. package/dist/production/coreComponents/Entity.js +11 -6
  504. package/dist/production/coreComponents/Entity.js.map +1 -1
  505. package/dist/production/coreComponents/EntityList.js +16 -9
  506. package/dist/production/coreComponents/EntityList.js.map +1 -1
  507. package/dist/production/coreComponents/EntityListSubTree.js +12 -8
  508. package/dist/production/coreComponents/EntityListSubTree.js.map +1 -1
  509. package/dist/production/coreComponents/EntitySubTree.js +19 -13
  510. package/dist/production/coreComponents/EntitySubTree.js.map +1 -1
  511. package/dist/production/coreComponents/Field.js +10 -4
  512. package/dist/production/coreComponents/Field.js.map +1 -1
  513. package/dist/production/coreComponents/HasMany.js +11 -8
  514. package/dist/production/coreComponents/HasMany.js.map +1 -1
  515. package/dist/production/coreComponents/HasOne.js +12 -9
  516. package/dist/production/coreComponents/HasOne.js.map +1 -1
  517. package/dist/production/coreComponents/ParentEntity.js +7 -3
  518. package/dist/production/coreComponents/ParentEntity.js.map +1 -1
  519. package/dist/production/dao/Environment.js +26 -2
  520. package/dist/production/dao/Environment.js.map +1 -1
  521. package/dist/production/dao/TreeNodeEnvironmentFactory.js +14 -14
  522. package/dist/production/dao/TreeNodeEnvironmentFactory.js.map +1 -1
  523. package/dist/production/dao/VariableFieldValue.js +3 -1
  524. package/dist/production/dao/VariableFieldValue.js.map +1 -1
  525. package/dist/production/entityEvents/useDerivedField.js +25 -17
  526. package/dist/production/entityEvents/useDerivedField.js.map +1 -1
  527. package/dist/production/entityEvents/useEntityBeforePersist.js +3 -1
  528. package/dist/production/entityEvents/useEntityBeforePersist.js.map +1 -1
  529. package/dist/production/entityEvents/useEntityBeforeUpdate.js +3 -1
  530. package/dist/production/entityEvents/useEntityBeforeUpdate.js.map +1 -1
  531. package/dist/production/entityEvents/useEntityEvent.js +16 -8
  532. package/dist/production/entityEvents/useEntityEvent.js.map +1 -1
  533. package/dist/production/entityEvents/useEntityPersistError.js +3 -1
  534. package/dist/production/entityEvents/useEntityPersistError.js.map +1 -1
  535. package/dist/production/entityEvents/useEntityPersistSuccess.js +3 -1
  536. package/dist/production/entityEvents/useEntityPersistSuccess.js.map +1 -1
  537. package/dist/production/entityEvents/useOnConnectionUpdate.js +3 -1
  538. package/dist/production/entityEvents/useOnConnectionUpdate.js.map +1 -1
  539. package/dist/production/fieldHelpers/helpers/FieldHelper.js +3 -1
  540. package/dist/production/fieldHelpers/helpers/FieldHelper.js.map +1 -1
  541. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js +3 -1
  542. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -1
  543. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js +3 -1
  544. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -1
  545. package/dist/production/helperComponents/DeferredSubTrees.js +37 -13
  546. package/dist/production/helperComponents/DeferredSubTrees.js.map +1 -1
  547. package/dist/production/helperComponents/EntityView.js +7 -3
  548. package/dist/production/helperComponents/EntityView.js.map +1 -1
  549. package/dist/production/helperComponents/FieldView.js +17 -8
  550. package/dist/production/helperComponents/FieldView.js.map +1 -1
  551. package/dist/production/helperComponents/If.js +44 -19
  552. package/dist/production/helperComponents/If.js.map +1 -1
  553. package/dist/production/helperComponents/StaticRender.js +9 -3
  554. package/dist/production/helperComponents/StaticRender.js.map +1 -1
  555. package/dist/production/helperComponents/SugaredField.js +6 -4
  556. package/dist/production/helperComponents/SugaredField.js.map +1 -1
  557. package/dist/production/helperComponents/helpers/FilterEvaluator.js +3 -4
  558. package/dist/production/helperComponents/helpers/FilterEvaluator.js.map +1 -1
  559. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js +3 -4
  560. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
  561. package/dist/production/helperComponents/helpers/evaluateCondition.js +3 -1
  562. package/dist/production/helperComponents/helpers/evaluateCondition.js.map +1 -1
  563. package/dist/production/index.js +225 -104
  564. package/dist/production/index.js.map +1 -1
  565. package/dist/production/markers/EntityFieldMarkersContainer.js +3 -1
  566. package/dist/production/markers/EntityFieldMarkersContainer.js.map +1 -1
  567. package/dist/production/markers/EntityFieldsWithHoistablesMarker.js +3 -1
  568. package/dist/production/markers/EntityFieldsWithHoistablesMarker.js.map +1 -1
  569. package/dist/production/markers/EntityListSubTreeMarker.js +3 -1
  570. package/dist/production/markers/EntityListSubTreeMarker.js.map +1 -1
  571. package/dist/production/markers/EntitySubTreeMarker.js +3 -1
  572. package/dist/production/markers/EntitySubTreeMarker.js.map +1 -1
  573. package/dist/production/markers/FieldMarker.js +3 -1
  574. package/dist/production/markers/FieldMarker.js.map +1 -1
  575. package/dist/production/markers/HasManyRelationMarker.js +3 -1
  576. package/dist/production/markers/HasManyRelationMarker.js.map +1 -1
  577. package/dist/production/markers/HasOneRelationMarker.js +3 -1
  578. package/dist/production/markers/HasOneRelationMarker.js.map +1 -1
  579. package/dist/production/markers/MarkerTreeRoot.js +3 -1
  580. package/dist/production/markers/MarkerTreeRoot.js.map +1 -1
  581. package/dist/production/markers/ParentEntityMarker.js +3 -1
  582. package/dist/production/markers/ParentEntityMarker.js.map +1 -1
  583. package/dist/production/markers/PlaceholderGenerator.js +3 -1
  584. package/dist/production/markers/PlaceholderGenerator.js.map +1 -1
  585. package/dist/production/queryLanguage/CacheStore.js +3 -1
  586. package/dist/production/queryLanguage/CacheStore.js.map +1 -1
  587. package/dist/production/queryLanguage/MarkerFactory.js +117 -25
  588. package/dist/production/queryLanguage/MarkerFactory.js.map +1 -1
  589. package/dist/production/queryLanguage/Parser.js +114 -79
  590. package/dist/production/queryLanguage/Parser.js.map +1 -1
  591. package/dist/production/queryLanguage/QueryLanguage.js +73 -20
  592. package/dist/production/queryLanguage/QueryLanguage.js.map +1 -1
  593. package/dist/production/queryLanguage/QueryLanguageError.js +3 -1
  594. package/dist/production/queryLanguage/QueryLanguageError.js.map +1 -1
  595. package/dist/production/queryLanguage/tokenList.js +5 -1
  596. package/dist/production/queryLanguage/tokenList.js.map +1 -1
  597. package/dist/production/structures/BijectiveIndexedMap.js +3 -1
  598. package/dist/production/structures/BijectiveIndexedMap.js.map +1 -1
  599. package/dist/production/structures/LRUCache.js +3 -1
  600. package/dist/production/structures/LRUCache.js.map +1 -1
  601. package/dist/production/structures/WeakIdCache.js +3 -1
  602. package/dist/production/structures/WeakIdCache.js.map +1 -1
  603. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js +3 -1
  604. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -1
  605. package/dist/production/treeParameters/EntityCreationParameters.js +3 -1
  606. package/dist/production/treeParameters/EntityCreationParameters.js.map +1 -1
  607. package/dist/production/treeParameters/EntityListPreferences.js +3 -1
  608. package/dist/production/treeParameters/EntityListPreferences.js.map +1 -1
  609. package/dist/production/treeParameters/EventListenersStore.js +3 -1
  610. package/dist/production/treeParameters/EventListenersStore.js.map +1 -1
  611. package/dist/production/treeParameters/LeafField.js +3 -1
  612. package/dist/production/treeParameters/LeafField.js.map +1 -1
  613. package/dist/production/treeParameters/QualifiedEntityParameters.js +3 -1
  614. package/dist/production/treeParameters/QualifiedEntityParameters.js.map +1 -1
  615. package/dist/production/treeParameters/Relation.js +3 -1
  616. package/dist/production/treeParameters/Relation.js.map +1 -1
  617. package/dist/production/utils/Hashing.js +3 -1
  618. package/dist/production/utils/Hashing.js.map +1 -1
  619. package/dist/production/utils/assert.js +3 -1
  620. package/dist/production/utils/assert.js.map +1 -1
  621. package/dist/production/utils/assertNever.js +6 -2
  622. package/dist/production/utils/assertNever.js.map +1 -1
  623. package/dist/production/utils/generateEnumerabilityPreventingEntropy.js +3 -1
  624. package/dist/production/utils/generateEnumerabilityPreventingEntropy.js.map +1 -1
  625. package/dist/production/utils/isEmptyObject.js +3 -1
  626. package/dist/production/utils/isEmptyObject.js.map +1 -1
  627. package/dist/production/utils/ucfirst.js +3 -1
  628. package/dist/production/utils/ucfirst.js.map +1 -1
  629. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +1 -1
  630. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
  631. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +1 -1
  632. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
  633. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +13 -2
  634. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -1
  635. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +1 -1
  636. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
  637. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts +2 -1
  638. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts.map +1 -1
  639. package/dist/types/accessorPropagation/useEntitySubTree.d.ts +2 -1
  640. package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +1 -1
  641. package/dist/types/accessorPropagation/useExtendTree.d.ts +1 -1
  642. package/dist/types/accessorPropagation/useExtendTree.d.ts.map +1 -1
  643. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +2 -1
  644. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +1 -1
  645. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +2 -1
  646. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +1 -1
  647. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
  648. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
  649. package/dist/types/accessorSorting/addEntityAtIndex.d.ts +1 -1
  650. package/dist/types/accessorSorting/addEntityAtIndex.d.ts.map +1 -1
  651. package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -1
  652. package/dist/types/accessorTree/AccessorTreeState.d.ts +7 -3
  653. package/dist/types/accessorTree/AccessorTreeState.d.ts.map +1 -1
  654. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts +2 -0
  655. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -1
  656. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +1 -1
  657. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -1
  658. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts +2 -2
  659. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +1 -1
  660. package/dist/types/accessorTree/DirtinessContext.d.ts +1 -1
  661. package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
  662. package/dist/types/accessorTree/MutationRequestResponse.d.ts +5 -5
  663. package/dist/types/accessorTree/MutationRequestResponse.d.ts.map +1 -1
  664. package/dist/types/accessorTree/MutationStateContext.d.ts +1 -1
  665. package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
  666. package/dist/types/accessorTree/PersistResult.d.ts +1 -4
  667. package/dist/types/accessorTree/PersistResult.d.ts.map +1 -1
  668. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +1 -1
  669. package/dist/types/accessorTree/useDataBinding.d.ts +1 -1
  670. package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
  671. package/dist/types/accessors/BindingConfig.d.ts +0 -2
  672. package/dist/types/accessors/BindingConfig.d.ts.map +1 -1
  673. package/dist/types/accessors/EntityAccessor.d.ts +4 -2
  674. package/dist/types/accessors/EntityAccessor.d.ts.map +1 -1
  675. package/dist/types/accessors/EntityListAccessor.d.ts +2 -2
  676. package/dist/types/accessors/EntityListAccessor.d.ts.map +1 -1
  677. package/dist/types/accessors/FieldAccessor.d.ts +2 -2
  678. package/dist/types/accessors/FieldAccessor.d.ts.map +1 -1
  679. package/dist/types/accessors/PersistErrorOptions.d.ts +0 -2
  680. package/dist/types/accessors/PersistErrorOptions.d.ts.map +1 -1
  681. package/dist/types/core/Config.d.ts.map +1 -1
  682. package/dist/types/core/DataBinding.d.ts +11 -4
  683. package/dist/types/core/DataBinding.d.ts.map +1 -1
  684. package/dist/types/core/MarkerMerger.d.ts.map +1 -1
  685. package/dist/types/core/MutationGenerator.d.ts.map +1 -1
  686. package/dist/types/core/StateInitializer.d.ts.map +1 -1
  687. package/dist/types/core/TreeAugmenter.d.ts +2 -1
  688. package/dist/types/core/TreeAugmenter.d.ts.map +1 -1
  689. package/dist/types/core/TreeStore.d.ts +2 -3
  690. package/dist/types/core/TreeStore.d.ts.map +1 -1
  691. package/dist/types/core/index.d.ts +1 -0
  692. package/dist/types/core/index.d.ts.map +1 -1
  693. package/dist/types/core/schema/Schema.d.ts +13 -3
  694. package/dist/types/core/schema/Schema.d.ts.map +1 -1
  695. package/dist/types/core/schema/SchemaColumn.d.ts +1 -1
  696. package/dist/types/core/schema/SchemaColumn.d.ts.map +1 -1
  697. package/dist/types/core/schema/SchemaLoader.d.ts +2 -1
  698. package/dist/types/core/schema/SchemaLoader.d.ts.map +1 -1
  699. package/dist/types/core/schema/SchemaRelation.d.ts +1 -1
  700. package/dist/types/core/schema/SchemaRelation.d.ts.map +1 -1
  701. package/dist/types/coreComponents/Component.d.ts +9 -4
  702. package/dist/types/coreComponents/Component.d.ts.map +1 -1
  703. package/dist/types/coreComponents/DataBindingProvider.d.ts +2 -6
  704. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
  705. package/dist/types/coreComponents/Entity.d.ts +1 -1
  706. package/dist/types/coreComponents/Entity.d.ts.map +1 -1
  707. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
  708. package/dist/types/coreComponents/ParentEntity.d.ts +1 -1
  709. package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
  710. package/dist/types/dao/Environment.d.ts +10 -2
  711. package/dist/types/dao/Environment.d.ts.map +1 -1
  712. package/dist/types/dao/TreeNodeEnvironmentFactory.d.ts.map +1 -1
  713. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts +1 -1
  714. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -1
  715. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts +1 -1
  716. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -1
  717. package/dist/types/helperComponents/DeferredSubTrees.d.ts +1 -1
  718. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
  719. package/dist/types/helperComponents/If.d.ts +1 -1
  720. package/dist/types/helperComponents/If.d.ts.map +1 -1
  721. package/dist/types/helperComponents/StaticRender.d.ts +1 -1
  722. package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
  723. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +1 -1
  724. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +1 -1
  725. package/dist/types/tsconfig.tsbuildinfo +1 -1
  726. package/package.json +9 -9
  727. package/src/accessorPropagation/EnvironmentContext.tsx +44 -0
  728. package/src/accessorTree/AccessorTree.tsx +12 -18
  729. package/src/accessorTree/AccessorTreeState.ts +11 -4
  730. package/src/accessorTree/AccessorTreeStateAction.ts +3 -1
  731. package/src/accessorTree/AccessorTreeStateOptions.ts +2 -2
  732. package/src/accessorTree/MutationRequestResponse.ts +9 -3
  733. package/src/accessorTree/PersistResult.ts +1 -5
  734. package/src/accessorTree/accessorTreeStateReducer.ts +6 -3
  735. package/src/accessorTree/useDataBinding.ts +65 -59
  736. package/src/accessors/BindingConfig.ts +0 -2
  737. package/src/accessors/EntityAccessor.ts +20 -7
  738. package/src/accessors/EntityListAccessor.ts +9 -9
  739. package/src/accessors/FieldAccessor.ts +5 -5
  740. package/src/accessors/PersistErrorOptions.ts +0 -2
  741. package/src/core/Config.ts +0 -2
  742. package/src/core/DataBinding.ts +136 -162
  743. package/src/core/MarkerMerger.ts +7 -5
  744. package/src/core/MutationGenerator.ts +8 -4
  745. package/src/core/StateInitializer.ts +3 -12
  746. package/src/core/TreeAugmenter.ts +4 -1
  747. package/src/core/TreeStore.ts +4 -17
  748. package/src/core/factories/createBatchUpdatesOptions.ts +1 -1
  749. package/src/core/index.ts +1 -0
  750. package/src/core/operations/EntityOperations.ts +1 -1
  751. package/src/core/schema/Schema.ts +38 -4
  752. package/src/core/schema/SchemaColumn.ts +1 -1
  753. package/src/core/schema/SchemaLoader.ts +13 -11
  754. package/src/core/schema/SchemaRelation.ts +1 -1
  755. package/src/coreComponents/Component.tsx +20 -7
  756. package/src/coreComponents/DataBindingProvider.tsx +4 -11
  757. package/src/coreComponents/EntityListSubTree.tsx +2 -3
  758. package/src/dao/Environment.ts +34 -3
  759. package/src/dao/TreeNodeEnvironmentFactory.ts +6 -11
  760. package/src/helperComponents/DeferredSubTrees.tsx +2 -1
  761. package/src/helperComponents/helpers/FilterEvaluator.ts +1 -3
  762. package/src/helperComponents/helpers/FilterFieldsCollector.ts +0 -3
  763. package/src/typings/react-fix.d.ts +12 -0
  764. package/src/accessorPropagation/EnvironmentContext.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"tokenList.js","sources":["../../../src/queryLanguage/tokenList.ts"],"sourcesContent":["import { createToken, Lexer } from 'chevrotain'\n\nexport namespace TokenRegExps {\n\texport const entityIdentifier = /[A-Z_]\\w*/\n\texport const identifier = /[a-zA-Z_]\\w*/\n}\n\nconst identifier = createToken({\n\tname: 'Identifier',\n\tpattern: TokenRegExps.identifier,\n})\n\nexport const tokens = {\n\tWhiteSpace: createToken({\n\t\tname: 'WhiteSpace',\n\t\tpattern: /\\s+/,\n\t\tgroup: Lexer.SKIPPED,\n\t}),\n\n\tEntityIdentifier: createToken({\n\t\tname: 'EntityIdentifier',\n\t\tpattern: TokenRegExps.entityIdentifier,\n\t}),\n\n\tIdentifier: identifier,\n\n\tDollarSign: createToken({\n\t\tname: 'DollarSign',\n\t\tpattern: /\\$/,\n\t}),\n\n\tDot: createToken({\n\t\tname: 'Dot',\n\t\tpattern: /\\./,\n\t}),\n\n\tComma: createToken({\n\t\tname: 'Comma',\n\t\tpattern: /,/,\n\t}),\n\n\tColon: createToken({\n\t\tname: 'Colon',\n\t\tpattern: /:/,\n\t}),\n\n\tSlash: createToken({\n\t\tname: 'Slash',\n\t\tpattern: /\\//,\n\t}),\n\n\tNumberLiteral: createToken({\n\t\tname: 'NumberLiteral',\n\t\tpattern: /-?(0|[1-9]\\d*)(\\.\\d+)?([eE][+-]?\\d+)?/,\n\t}),\n\n\tStringLiteral: createToken({\n\t\tname: 'StringLiteral',\n\t\tpattern: /'(:?[^\\\\']|\\\\(:?[bfnrtv'\\\\/]|u[0-9a-fA-F]{4}))*'/,\n\t}),\n\n\tLeftParenthesis: createToken({\n\t\tname: 'LeftParenthesis',\n\t\tpattern: /\\(/,\n\t}),\n\n\tRightParenthesis: createToken({\n\t\tname: 'RightParenthesis',\n\t\tpattern: /\\)/,\n\t}),\n\n\tLeftBracket: createToken({\n\t\tname: 'LeftBracket',\n\t\tpattern: /\\[/,\n\t}),\n\n\tRightBracket: createToken({\n\t\tname: 'RightBracket',\n\t\tpattern: /]/,\n\t}),\n\n\tNotEquals: createToken({\n\t\tname: 'NotEquals',\n\t\tpattern: /!=/,\n\t}),\n\n\tTrue: createToken({\n\t\tname: 'True',\n\t\tpattern: /true/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tFalse: createToken({\n\t\tname: 'False',\n\t\tpattern: /false/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tNull: createToken({\n\t\tname: 'Null',\n\t\tpattern: /null/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tEquals: createToken({\n\t\tname: 'Equals',\n\t\tpattern: /=/,\n\t}),\n\n\tNot: createToken({\n\t\tname: 'Not',\n\t\tpattern: /!/,\n\t}),\n\n\tAnd: createToken({\n\t\tname: 'And',\n\t\tpattern: /&&/,\n\t}),\n\n\tOr: createToken({\n\t\tname: 'Or',\n\t\tpattern: /\\|\\|/,\n\t}),\n\n\tLowerEqual: createToken({\n\t\tname: 'LowerEqual',\n\t\tpattern: /<=/,\n\t}),\n\n\tGreaterEqual: createToken({\n\t\tname: 'GreaterEqual',\n\t\tpattern: />=/,\n\t}),\n\n\tLowerThan: createToken({\n\t\tname: 'LowerThan',\n\t\tpattern: /</,\n\t}),\n\n\tGreaterThan: createToken({\n\t\tname: 'GreaterThan',\n\t\tpattern: />/,\n\t}),\n}\n\nconst tokenList = [\n\ttokens.WhiteSpace,\n\ttokens.True,\n\ttokens.False,\n\ttokens.Null,\n\ttokens.EntityIdentifier,\n\ttokens.Identifier,\n\ttokens.DollarSign,\n\ttokens.Dot,\n\ttokens.Comma,\n\ttokens.Colon,\n\ttokens.Slash,\n\ttokens.StringLiteral,\n\ttokens.NumberLiteral,\n\ttokens.LeftParenthesis,\n\ttokens.RightParenthesis,\n\ttokens.LeftBracket,\n\ttokens.RightBracket,\n\ttokens.NotEquals,\n\ttokens.Equals,\n\ttokens.Not,\n\ttokens.GreaterEqual,\n\ttokens.GreaterThan,\n\ttokens.LowerEqual,\n\ttokens.LowerThan,\n\ttokens.And,\n\ttokens.Or,\n]\n\nexport { tokenList }\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"tokenList.js","sources":["../../../src/queryLanguage/tokenList.ts"],"sourcesContent":["import { createToken, Lexer } from 'chevrotain'\n\nexport namespace TokenRegExps {\n\texport const entityIdentifier = /[A-Z_]\\w*/\n\texport const identifier = /[a-zA-Z_]\\w*/\n}\n\nconst identifier = createToken({\n\tname: 'Identifier',\n\tpattern: TokenRegExps.identifier,\n})\n\nexport const tokens = {\n\tWhiteSpace: createToken({\n\t\tname: 'WhiteSpace',\n\t\tpattern: /\\s+/,\n\t\tgroup: Lexer.SKIPPED,\n\t}),\n\n\tEntityIdentifier: createToken({\n\t\tname: 'EntityIdentifier',\n\t\tpattern: TokenRegExps.entityIdentifier,\n\t}),\n\n\tIdentifier: identifier,\n\n\tDollarSign: createToken({\n\t\tname: 'DollarSign',\n\t\tpattern: /\\$/,\n\t}),\n\n\tDot: createToken({\n\t\tname: 'Dot',\n\t\tpattern: /\\./,\n\t}),\n\n\tComma: createToken({\n\t\tname: 'Comma',\n\t\tpattern: /,/,\n\t}),\n\n\tColon: createToken({\n\t\tname: 'Colon',\n\t\tpattern: /:/,\n\t}),\n\n\tSlash: createToken({\n\t\tname: 'Slash',\n\t\tpattern: /\\//,\n\t}),\n\n\tNumberLiteral: createToken({\n\t\tname: 'NumberLiteral',\n\t\tpattern: /-?(0|[1-9]\\d*)(\\.\\d+)?([eE][+-]?\\d+)?/,\n\t}),\n\n\tStringLiteral: createToken({\n\t\tname: 'StringLiteral',\n\t\tpattern: /'(:?[^\\\\']|\\\\(:?[bfnrtv'\\\\/]|u[0-9a-fA-F]{4}))*'/,\n\t}),\n\n\tLeftParenthesis: createToken({\n\t\tname: 'LeftParenthesis',\n\t\tpattern: /\\(/,\n\t}),\n\n\tRightParenthesis: createToken({\n\t\tname: 'RightParenthesis',\n\t\tpattern: /\\)/,\n\t}),\n\n\tLeftBracket: createToken({\n\t\tname: 'LeftBracket',\n\t\tpattern: /\\[/,\n\t}),\n\n\tRightBracket: createToken({\n\t\tname: 'RightBracket',\n\t\tpattern: /]/,\n\t}),\n\n\tNotEquals: createToken({\n\t\tname: 'NotEquals',\n\t\tpattern: /!=/,\n\t}),\n\n\tTrue: createToken({\n\t\tname: 'True',\n\t\tpattern: /true/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tFalse: createToken({\n\t\tname: 'False',\n\t\tpattern: /false/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tNull: createToken({\n\t\tname: 'Null',\n\t\tpattern: /null/,\n\t\tlonger_alt: identifier,\n\t}),\n\n\tEquals: createToken({\n\t\tname: 'Equals',\n\t\tpattern: /=/,\n\t}),\n\n\tNot: createToken({\n\t\tname: 'Not',\n\t\tpattern: /!/,\n\t}),\n\n\tAnd: createToken({\n\t\tname: 'And',\n\t\tpattern: /&&/,\n\t}),\n\n\tOr: createToken({\n\t\tname: 'Or',\n\t\tpattern: /\\|\\|/,\n\t}),\n\n\tLowerEqual: createToken({\n\t\tname: 'LowerEqual',\n\t\tpattern: /<=/,\n\t}),\n\n\tGreaterEqual: createToken({\n\t\tname: 'GreaterEqual',\n\t\tpattern: />=/,\n\t}),\n\n\tLowerThan: createToken({\n\t\tname: 'LowerThan',\n\t\tpattern: /</,\n\t}),\n\n\tGreaterThan: createToken({\n\t\tname: 'GreaterThan',\n\t\tpattern: />/,\n\t}),\n}\n\nconst tokenList = [\n\ttokens.WhiteSpace,\n\ttokens.True,\n\ttokens.False,\n\ttokens.Null,\n\ttokens.EntityIdentifier,\n\ttokens.Identifier,\n\ttokens.DollarSign,\n\ttokens.Dot,\n\ttokens.Comma,\n\ttokens.Colon,\n\ttokens.Slash,\n\ttokens.StringLiteral,\n\ttokens.NumberLiteral,\n\ttokens.LeftParenthesis,\n\ttokens.RightParenthesis,\n\ttokens.LeftBracket,\n\ttokens.RightBracket,\n\ttokens.NotEquals,\n\ttokens.Equals,\n\ttokens.Not,\n\ttokens.GreaterEqual,\n\ttokens.GreaterThan,\n\ttokens.LowerEqual,\n\ttokens.LowerThan,\n\ttokens.And,\n\ttokens.Or,\n]\n\nexport { tokenList }\n"],"names":["TokenRegExps"],"mappings":"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"}
@@ -112,5 +112,7 @@ class BijectiveIndexedMap {
112
112
  }
113
113
  }
114
114
  }
115
- export { BijectiveIndexedMap };
115
+ export {
116
+ BijectiveIndexedMap
117
+ };
116
118
  //# sourceMappingURL=BijectiveIndexedMap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BijectiveIndexedMap.js","sources":["../../../src/structures/BijectiveIndexedMap.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\n// Bijective as in we need to supply the inverse and also guarantee that the values are unique.\n// Provided this invariant, this should behave more or less like a regular map except it has a somewhat special\n// iteration order. Unlike a regular map, which just honors insertion order, this also provides a special method\n// changeKey. With this, we can change the key under which a value (that is already on the map) is accessible.\n// With an ordinary map, that operation would require us to delete the original [K1, V] pair and insert\n// a new one [K2, V]. That would however change the order of iteration. This main purpose of this data structure is\n// the ability to avoid that and enable the value V to preserve its original place.\nexport class BijectiveIndexedMap<K, V> implements Map<K, V> {\n\tprivate readonly valueStore: Map<number, V>\n\tprivate readonly index: Map<K, number>\n\tprivate indexSeed: number\n\n\tprivate readonly inverse: (value: V) => K\n\n\tpublic readonly [Symbol.toStringTag] = 'BijectiveIndexedMap'\n\n\tpublic constructor(originalMap: BijectiveIndexedMap<K, V>)\n\tpublic constructor(inverse: (value: V) => K)\n\tpublic constructor(inverseOrMap: BijectiveIndexedMap<K, V> | ((value: V) => K)) {\n\t\tif (inverseOrMap instanceof BijectiveIndexedMap) {\n\t\t\tthis.valueStore = new Map(inverseOrMap.valueStore)\n\t\t\tthis.index = new Map(inverseOrMap.index)\n\t\t\tthis.indexSeed = inverseOrMap.indexSeed\n\t\t\tthis.inverse = inverseOrMap.inverse\n\t\t} else {\n\t\t\tthis.valueStore = new Map()\n\t\t\tthis.index = new Map()\n\t\t\tthis.indexSeed = 0\n\t\t\tthis.inverse = inverseOrMap\n\t\t}\n\t}\n\n\tprivate getNewIndex() {\n\t\treturn this.indexSeed++\n\t}\n\n\tpublic get size(): number {\n\t\treturn this.valueStore.size\n\t}\n\n\tpublic clear(): void {\n\t\tthis.valueStore.clear()\n\t\tthis.index.clear()\n\t}\n\tpublic delete(key: K): boolean {\n\t\tconst index = this.index.get(key)\n\n\t\tif (index === undefined) {\n\t\t\treturn false\n\t\t}\n\t\tthis.valueStore.delete(index)\n\t\tthis.index.delete(key)\n\t\treturn true\n\t}\n\tpublic forEach(callback: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void {\n\t\tfor (const [key, value] of this.entries()) {\n\t\t\tcallback.call(thisArg, value, key, this)\n\t\t}\n\t}\n\n\tpublic get(key: K): V | undefined {\n\t\tconst index = this.index.get(key)\n\n\t\tif (index === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn this.valueStore.get(index)\n\t}\n\tpublic has(key: K): boolean {\n\t\treturn this.index.has(key)\n\t}\n\tpublic set(key: K, value: V): this {\n\t\tconst existingIndex = this.index.get(key)\n\n\t\tif (existingIndex === undefined) {\n\t\t\tconst newIndex = this.getNewIndex()\n\t\t\tthis.index.set(key, newIndex)\n\t\t\tthis.valueStore.set(newIndex, value)\n\t\t} else {\n\t\t\tthis.valueStore.set(existingIndex, value)\n\t\t}\n\t\treturn this\n\t}\n\n\t// This doesn't use the inverse in order to avoid confusion.\n\t// See the description above.\n\tpublic changeKey(oldKey: K, newKey: K): this {\n\t\tconst index = this.index.get(oldKey)\n\t\tif (index === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tthis.index.delete(oldKey)\n\t\tthis.index.set(newKey, index)\n\t\treturn this\n\t}\n\n\tpublic changeKeyOrder(newOrder: Iterable<K>) {\n\t\tfor (const key of newOrder) {\n\t\t\tconst keyIndex = this.index.get(key)\n\t\t\tif (keyIndex === undefined) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\tconst value = this.valueStore.get(keyIndex)!\n\n\t\t\t// This effectively removes value from wherever it was and puts it at the end.\n\t\t\t// Provided newOrder.size is the same as valueStore, by the end of this loop\n\t\t\t// the values will be in the correct order.\n\t\t\tthis.valueStore.delete(keyIndex)\n\t\t\tthis.valueStore.set(keyIndex, value)\n\t\t}\n\t}\n\n\tpublic *[Symbol.iterator](): IterableIterator<[K, V]> {\n\t\tyield* this.entries()\n\t}\n\n\tpublic *entries(): IterableIterator<[K, V]> {\n\t\tfor (const value of this.values()) {\n\t\t\tyield [this.inverse(value), value]\n\t\t}\n\t}\n\n\tpublic *keys(): IterableIterator<K> {\n\t\tfor (const value of this.values()) {\n\t\t\tyield this.inverse(value)\n\t\t}\n\t}\n\n\tpublic *values(): IterableIterator<V> {\n\t\tfor (const value of this.valueStore.values()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tyield value\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"BijectiveIndexedMap.js","sources":["../../../src/structures/BijectiveIndexedMap.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\n// Bijective as in we need to supply the inverse and also guarantee that the values are unique.\n// Provided this invariant, this should behave more or less like a regular map except it has a somewhat special\n// iteration order. Unlike a regular map, which just honors insertion order, this also provides a special method\n// changeKey. With this, we can change the key under which a value (that is already on the map) is accessible.\n// With an ordinary map, that operation would require us to delete the original [K1, V] pair and insert\n// a new one [K2, V]. That would however change the order of iteration. This main purpose of this data structure is\n// the ability to avoid that and enable the value V to preserve its original place.\nexport class BijectiveIndexedMap<K, V> implements Map<K, V> {\n\tprivate readonly valueStore: Map<number, V>\n\tprivate readonly index: Map<K, number>\n\tprivate indexSeed: number\n\n\tprivate readonly inverse: (value: V) => K\n\n\tpublic readonly [Symbol.toStringTag] = 'BijectiveIndexedMap'\n\n\tpublic constructor(originalMap: BijectiveIndexedMap<K, V>)\n\tpublic constructor(inverse: (value: V) => K)\n\tpublic constructor(inverseOrMap: BijectiveIndexedMap<K, V> | ((value: V) => K)) {\n\t\tif (inverseOrMap instanceof BijectiveIndexedMap) {\n\t\t\tthis.valueStore = new Map(inverseOrMap.valueStore)\n\t\t\tthis.index = new Map(inverseOrMap.index)\n\t\t\tthis.indexSeed = inverseOrMap.indexSeed\n\t\t\tthis.inverse = inverseOrMap.inverse\n\t\t} else {\n\t\t\tthis.valueStore = new Map()\n\t\t\tthis.index = new Map()\n\t\t\tthis.indexSeed = 0\n\t\t\tthis.inverse = inverseOrMap\n\t\t}\n\t}\n\n\tprivate getNewIndex() {\n\t\treturn this.indexSeed++\n\t}\n\n\tpublic get size(): number {\n\t\treturn this.valueStore.size\n\t}\n\n\tpublic clear(): void {\n\t\tthis.valueStore.clear()\n\t\tthis.index.clear()\n\t}\n\tpublic delete(key: K): boolean {\n\t\tconst index = this.index.get(key)\n\n\t\tif (index === undefined) {\n\t\t\treturn false\n\t\t}\n\t\tthis.valueStore.delete(index)\n\t\tthis.index.delete(key)\n\t\treturn true\n\t}\n\tpublic forEach(callback: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void {\n\t\tfor (const [key, value] of this.entries()) {\n\t\t\tcallback.call(thisArg, value, key, this)\n\t\t}\n\t}\n\n\tpublic get(key: K): V | undefined {\n\t\tconst index = this.index.get(key)\n\n\t\tif (index === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn this.valueStore.get(index)\n\t}\n\tpublic has(key: K): boolean {\n\t\treturn this.index.has(key)\n\t}\n\tpublic set(key: K, value: V): this {\n\t\tconst existingIndex = this.index.get(key)\n\n\t\tif (existingIndex === undefined) {\n\t\t\tconst newIndex = this.getNewIndex()\n\t\t\tthis.index.set(key, newIndex)\n\t\t\tthis.valueStore.set(newIndex, value)\n\t\t} else {\n\t\t\tthis.valueStore.set(existingIndex, value)\n\t\t}\n\t\treturn this\n\t}\n\n\t// This doesn't use the inverse in order to avoid confusion.\n\t// See the description above.\n\tpublic changeKey(oldKey: K, newKey: K): this {\n\t\tconst index = this.index.get(oldKey)\n\t\tif (index === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tthis.index.delete(oldKey)\n\t\tthis.index.set(newKey, index)\n\t\treturn this\n\t}\n\n\tpublic changeKeyOrder(newOrder: Iterable<K>) {\n\t\tfor (const key of newOrder) {\n\t\t\tconst keyIndex = this.index.get(key)\n\t\t\tif (keyIndex === undefined) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\tconst value = this.valueStore.get(keyIndex)!\n\n\t\t\t// This effectively removes value from wherever it was and puts it at the end.\n\t\t\t// Provided newOrder.size is the same as valueStore, by the end of this loop\n\t\t\t// the values will be in the correct order.\n\t\t\tthis.valueStore.delete(keyIndex)\n\t\t\tthis.valueStore.set(keyIndex, value)\n\t\t}\n\t}\n\n\tpublic *[Symbol.iterator](): IterableIterator<[K, V]> {\n\t\tyield* this.entries()\n\t}\n\n\tpublic *entries(): IterableIterator<[K, V]> {\n\t\tfor (const value of this.values()) {\n\t\t\tyield [this.inverse(value), value]\n\t\t}\n\t}\n\n\tpublic *keys(): IterableIterator<K> {\n\t\tfor (const value of this.values()) {\n\t\t\tyield this.inverse(value)\n\t\t}\n\t}\n\n\tpublic *values(): IterableIterator<V> {\n\t\tfor (const value of this.valueStore.values()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tyield value\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"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"}
@@ -29,5 +29,7 @@ class LRUCache {
29
29
  return this.cache.keys().next().value;
30
30
  }
31
31
  }
32
- export { LRUCache };
32
+ export {
33
+ LRUCache
34
+ };
33
35
  //# sourceMappingURL=LRUCache.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LRUCache.js","sources":["../../../src/structures/LRUCache.ts"],"sourcesContent":["// This is heavily inspired by https://stackoverflow.com/a/46432113\nexport class LRUCache<Key, Value> {\n\tprivate readonly cache = new Map<Key, Value>()\n\n\tpublic constructor(private readonly maxSize: number) {}\n\n\tpublic get(key: Key): Value | undefined {\n\t\tconst value = this.cache.get(key)\n\n\t\tif (value !== undefined) {\n\t\t\tthis.cache.delete(key)\n\t\t\tthis.cache.set(key, value)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic set(key: Key, value: Value) {\n\t\tif (this.cache.has(key)) {\n\t\t\tthis.cache.delete(key) // Refresh this key\n\t\t} else if (this.cache.size === this.maxSize) {\n\t\t\tthis.cache.delete(this.getOldestKey()) // Evict the oldest value\n\t\t}\n\t\tthis.cache.set(key, value)\n\t}\n\n\tprivate getOldestKey(): Key {\n\t\treturn this.cache.keys().next().value\n\t}\n}\n"],"names":[],"mappings":";;;;;;AACO,MAAM,SAAqB;AAAA,EAG1B,YAA6B,SAAiB;AAFpC,qDAAY;AAEO,SAAA,UAAA;AAAA,EAAkB;AAAA,EAE/C,IAAI,KAA6B;AACvC,UAAM,QAAQ,KAAK,MAAM,IAAI,GAAG;AAEhC,QAAI,UAAU,QAAW;AACnB,WAAA,MAAM,OAAO,GAAG;AAChB,WAAA,MAAM,IAAI,KAAK,KAAK;AAAA,IAC1B;AACO,WAAA;AAAA,EACR;AAAA,EAEO,IAAI,KAAU,OAAc;AAClC,QAAI,KAAK,MAAM,IAAI,GAAG,GAAG;AACnB,WAAA,MAAM,OAAO,GAAG;AAAA,IACX,WAAA,KAAK,MAAM,SAAS,KAAK,SAAS;AAC5C,WAAK,MAAM,OAAO,KAAK,aAAc,CAAA;AAAA,IACtC;AACK,SAAA,MAAM,IAAI,KAAK,KAAK;AAAA,EAC1B;AAAA,EAEQ,eAAoB;AAC3B,WAAO,KAAK,MAAM,KAAK,EAAE,OAAO;AAAA,EACjC;AACD;;"}
1
+ {"version":3,"file":"LRUCache.js","sources":["../../../src/structures/LRUCache.ts"],"sourcesContent":["// This is heavily inspired by https://stackoverflow.com/a/46432113\nexport class LRUCache<Key, Value> {\n\tprivate readonly cache = new Map<Key, Value>()\n\n\tpublic constructor(private readonly maxSize: number) {}\n\n\tpublic get(key: Key): Value | undefined {\n\t\tconst value = this.cache.get(key)\n\n\t\tif (value !== undefined) {\n\t\t\tthis.cache.delete(key)\n\t\t\tthis.cache.set(key, value)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic set(key: Key, value: Value) {\n\t\tif (this.cache.has(key)) {\n\t\t\tthis.cache.delete(key) // Refresh this key\n\t\t} else if (this.cache.size === this.maxSize) {\n\t\t\tthis.cache.delete(this.getOldestKey()) // Evict the oldest value\n\t\t}\n\t\tthis.cache.set(key, value)\n\t}\n\n\tprivate getOldestKey(): Key {\n\t\treturn this.cache.keys().next().value\n\t}\n}\n"],"names":[],"mappings":";;;;;;AACO,MAAM,SAAqB;AAAA,EAG1B,YAA6B,SAAiB;AAFpC,qDAAY;AAEO,SAAA,UAAA;AAAA,EAAkB;AAAA,EAE/C,IAAI,KAA6B;AACvC,UAAM,QAAQ,KAAK,MAAM,IAAI,GAAG;AAEhC,QAAI,UAAU,QAAW;AACnB,WAAA,MAAM,OAAO,GAAG;AAChB,WAAA,MAAM,IAAI,KAAK,KAAK;AAAA,IAC1B;AACO,WAAA;AAAA,EACR;AAAA,EAEO,IAAI,KAAU,OAAc;AAClC,QAAI,KAAK,MAAM,IAAI,GAAG,GAAG;AACnB,WAAA,MAAM,OAAO,GAAG;AAAA,IACX,WAAA,KAAK,MAAM,SAAS,KAAK,SAAS;AAC5C,WAAK,MAAM,OAAO,KAAK,aAAc,CAAA;AAAA,IACtC;AACK,SAAA,MAAM,IAAI,KAAK,KAAK;AAAA,EAC1B;AAAA,EAEQ,eAAoB;AAC3B,WAAO,KAAK,MAAM,KAAK,EAAE,OAAO;AAAA,EACjC;AACD;"}
@@ -27,5 +27,7 @@ class WeakIdCache {
27
27
  return seed.toFixed(0);
28
28
  }
29
29
  }
30
- export { WeakIdCache };
30
+ export {
31
+ WeakIdCache
32
+ };
31
33
  //# sourceMappingURL=WeakIdCache.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WeakIdCache.js","sources":["../../../src/structures/WeakIdCache.ts"],"sourcesContent":["export class WeakIdCache<K extends object> {\n\tprivate readonly cache = new WeakMap<K, string>()\n\tprivate seed = 0\n\tprivate readonly rootId = this.seedToId(this.seed++)\n\n\tpublic getId(key: K): string {\n\t\tlet existing = this.cache.get(key)\n\n\t\tif (existing === undefined) {\n\t\t\tthis.cache.set(key, (existing = this.seedToId(this.seed++)))\n\t\t}\n\t\treturn existing\n\t}\n\n\tpublic getOptionalKeyId(key: K | undefined): string {\n\t\tif (key === undefined) {\n\t\t\treturn this.rootId\n\t\t}\n\t\treturn this.getId(key)\n\t}\n\n\tprivate seedToId(seed: number): string {\n\t\treturn seed.toFixed(0)\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,YAA8B;AAAA,EAApC;AACW,qDAAY;AACrB,gCAAO;AACE,kCAAS,KAAK,SAAS,KAAK,MAAM;AAAA;AAAA,EAE5C,MAAM,KAAgB;AAC5B,QAAI,WAAW,KAAK,MAAM,IAAI,GAAG;AAEjC,QAAI,aAAa,QAAW;AACtB,WAAA,MAAM,IAAI,KAAM,WAAW,KAAK,SAAS,KAAK,MAAM,CAAE;AAAA,IAC5D;AACO,WAAA;AAAA,EACR;AAAA,EAEO,iBAAiB,KAA4B;AACnD,QAAI,QAAQ,QAAW;AACtB,aAAO,KAAK;AAAA,IACb;AACO,WAAA,KAAK,MAAM,GAAG;AAAA,EACtB;AAAA,EAEQ,SAAS,MAAsB;AAC/B,WAAA,KAAK,QAAQ,CAAC;AAAA,EACtB;AACD;;"}
1
+ {"version":3,"file":"WeakIdCache.js","sources":["../../../src/structures/WeakIdCache.ts"],"sourcesContent":["export class WeakIdCache<K extends object> {\n\tprivate readonly cache = new WeakMap<K, string>()\n\tprivate seed = 0\n\tprivate readonly rootId = this.seedToId(this.seed++)\n\n\tpublic getId(key: K): string {\n\t\tlet existing = this.cache.get(key)\n\n\t\tif (existing === undefined) {\n\t\t\tthis.cache.set(key, (existing = this.seedToId(this.seed++)))\n\t\t}\n\t\treturn existing\n\t}\n\n\tpublic getOptionalKeyId(key: K | undefined): string {\n\t\tif (key === undefined) {\n\t\t\treturn this.rootId\n\t\t}\n\t\treturn this.getId(key)\n\t}\n\n\tprivate seedToId(seed: number): string {\n\t\treturn seed.toFixed(0)\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,YAA8B;AAAA,EAApC;AACW,qDAAY;AACrB,gCAAO;AACE,kCAAS,KAAK,SAAS,KAAK,MAAM;AAAA;AAAA,EAE5C,MAAM,KAAgB;AAC5B,QAAI,WAAW,KAAK,MAAM,IAAI,GAAG;AAEjC,QAAI,aAAa,QAAW;AACtB,WAAA,MAAM,IAAI,KAAM,WAAW,KAAK,SAAS,KAAK,MAAM,CAAE;AAAA,IAC5D;AACO,WAAA;AAAA,EACR;AAAA,EAEO,iBAAiB,KAA4B;AACnD,QAAI,QAAQ,QAAW;AACtB,aAAO,KAAK;AAAA,IACb;AACO,WAAA,KAAK,MAAM,GAAG;AAAA,EACtB;AAAA,EAEQ,SAAS,MAAsB;AAC/B,WAAA,KAAK,QAAQ,CAAC;AAAA,EACtB;AACD;"}
@@ -16,5 +16,7 @@ const wrapFilterInHasOnes = (path, filter) => {
16
16
  }
17
17
  return filter;
18
18
  };
19
- export { wrapFilterInHasOnes };
19
+ export {
20
+ wrapFilterInHasOnes
21
+ };
20
22
  //# sourceMappingURL=wrapFilterInHasOnes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrapFilterInHasOnes.js","sources":["../../../src/treeParameterHelpers/wrapFilterInHasOnes.ts"],"sourcesContent":["import { whereToFilter } from '@contember/client'\nimport type { Filter, HasOneRelation } from '../treeParameters'\n\nexport const wrapFilterInHasOnes = (path: HasOneRelation[], filter: Filter): Filter => {\n\tfor (let i = path.length - 1; i >= 0; i--) {\n\t\tconst current = path[i]\n\n\t\tif (current.reducedBy === undefined) {\n\t\t\tfilter = {\n\t\t\t\t[current.field]: filter,\n\t\t\t}\n\t\t} else {\n\t\t\tfilter = {\n\t\t\t\t[current.field]: {\n\t\t\t\t\tand: [filter, whereToFilter(current.reducedBy)],\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\treturn filter\n}\n"],"names":[],"mappings":";AAGa,MAAA,sBAAsB,CAAC,MAAwB,WAA2B;AACtF,WAAS,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;AAC1C,UAAM,UAAU,KAAK;AAEjB,QAAA,QAAQ,cAAc,QAAW;AAC3B,eAAA;AAAA,SACP,QAAQ,QAAQ;AAAA,MAAA;AAAA,IAClB,OACM;AACG,eAAA;AAAA,SACP,QAAQ,QAAQ;AAAA,UAChB,KAAK,CAAC,QAAQ,cAAc,QAAQ,SAAS,CAAC;AAAA,QAC/C;AAAA,MAAA;AAAA,IAEF;AAAA,EACD;AACO,SAAA;AACR;;"}
1
+ {"version":3,"file":"wrapFilterInHasOnes.js","sources":["../../../src/treeParameterHelpers/wrapFilterInHasOnes.ts"],"sourcesContent":["import { whereToFilter } from '@contember/client'\nimport type { Filter, HasOneRelation } from '../treeParameters'\n\nexport const wrapFilterInHasOnes = (path: HasOneRelation[], filter: Filter): Filter => {\n\tfor (let i = path.length - 1; i >= 0; i--) {\n\t\tconst current = path[i]\n\n\t\tif (current.reducedBy === undefined) {\n\t\t\tfilter = {\n\t\t\t\t[current.field]: filter,\n\t\t\t}\n\t\t} else {\n\t\t\tfilter = {\n\t\t\t\t[current.field]: {\n\t\t\t\t\tand: [filter, whereToFilter(current.reducedBy)],\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\treturn filter\n}\n"],"names":[],"mappings":";AAGa,MAAA,sBAAsB,CAAC,MAAwB,WAA2B;AACtF,WAAS,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;AAC1C,UAAM,UAAU,KAAK;AAEjB,QAAA,QAAQ,cAAc,QAAW;AAC3B,eAAA;AAAA,QACR,CAAC,QAAQ,QAAQ;AAAA,MAAA;AAAA,IAClB,OACM;AACG,eAAA;AAAA,QACR,CAAC,QAAQ,QAAQ;AAAA,UAChB,KAAK,CAAC,QAAQ,cAAc,QAAQ,SAAS,CAAC;AAAA,QAC/C;AAAA,MAAA;AAAA,IAEF;AAAA,EACD;AACO,SAAA;AACR;"}
@@ -1,5 +1,7 @@
1
1
  const EntityCreationParametersDefaults = {
2
2
  isNonbearing: false
3
3
  };
4
- export { EntityCreationParametersDefaults };
4
+ export {
5
+ EntityCreationParametersDefaults
6
+ };
5
7
  //# sourceMappingURL=EntityCreationParameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityCreationParameters.js","sources":["../../../src/treeParameters/EntityCreationParameters.ts"],"sourcesContent":["import type { SetOnCreate, SugaredSetOnCreate } from './SetOnCreate'\n\nexport const EntityCreationParametersDefaults = {\n\t// forceCreation: false,\n\tisNonbearing: false,\n} as const\n\n\n/*\nIt can be somewhat tricky to understand how these parameters actually work. These are all only relevant when *creating\na new entity*, NOT during updates.\n\nFirst, it is determined if any *bearing* field/relation has anything to be persisted. This occurs:\n- For fields if the resolved value (taking defaultValue into account) is not null\n- For relations if its children have anything to persist (TODO or if forceCreation is true.)\n\nIf at least one of the bearing fields/relations have anything to persist or in the rare case when all fields/relations\nare nonbearing, the nonbearing fields/relations are also processed using the same method as described for bearing\nfields/relations.\n\nLastly, setOnCreate comes to play. It doesn't influence whether the entity will be persisted or not but if after\nall of the above it is concluded that it will, the values from it are used.\n */\nexport interface EntityCreationParameters {\n\t// forceCreation: boolean\n\tisNonbearing: boolean\n\tsetOnCreate: SetOnCreate\n}\n\nexport interface UnsugarableEntityCreationParameters {\n\t// forceCreation?: boolean\n\tisNonbearing?: boolean\n\tsetOnCreate?: SugaredSetOnCreate\n}\n"],"names":[],"mappings":"AAEO,MAAM,mCAAmC;AAAA,EAE/C,cAAc;AACf;;"}
1
+ {"version":3,"file":"EntityCreationParameters.js","sources":["../../../src/treeParameters/EntityCreationParameters.ts"],"sourcesContent":["import type { SetOnCreate, SugaredSetOnCreate } from './SetOnCreate'\n\nexport const EntityCreationParametersDefaults = {\n\t// forceCreation: false,\n\tisNonbearing: false,\n} as const\n\n\n/*\nIt can be somewhat tricky to understand how these parameters actually work. These are all only relevant when *creating\na new entity*, NOT during updates.\n\nFirst, it is determined if any *bearing* field/relation has anything to be persisted. This occurs:\n- For fields if the resolved value (taking defaultValue into account) is not null\n- For relations if its children have anything to persist (TODO or if forceCreation is true.)\n\nIf at least one of the bearing fields/relations have anything to persist or in the rare case when all fields/relations\nare nonbearing, the nonbearing fields/relations are also processed using the same method as described for bearing\nfields/relations.\n\nLastly, setOnCreate comes to play. It doesn't influence whether the entity will be persisted or not but if after\nall of the above it is concluded that it will, the values from it are used.\n */\nexport interface EntityCreationParameters {\n\t// forceCreation: boolean\n\tisNonbearing: boolean\n\tsetOnCreate: SetOnCreate\n}\n\nexport interface UnsugarableEntityCreationParameters {\n\t// forceCreation?: boolean\n\tisNonbearing?: boolean\n\tsetOnCreate?: SugaredSetOnCreate\n}\n"],"names":[],"mappings":"AAEO,MAAM,mCAAmC;AAAA,EAE/C,cAAc;AACf;"}
@@ -1,5 +1,7 @@
1
1
  const EntityListPreferencesDefaults = {
2
2
  initialEntityCount: 0
3
3
  };
4
- export { EntityListPreferencesDefaults };
4
+ export {
5
+ EntityListPreferencesDefaults
6
+ };
5
7
  //# sourceMappingURL=EntityListPreferences.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityListPreferences.js","sources":["../../../src/treeParameters/EntityListPreferences.ts"],"sourcesContent":["export const EntityListPreferencesDefaults: EntityListPreferences = {\n\tinitialEntityCount: 0,\n}\n\nexport interface EntityListPreferences {\n\tinitialEntityCount: number\n}\n\nexport interface UnsugarableEntityListPreferences {\n\tinitialEntityCount?: number\n}\n"],"names":[],"mappings":"AAAO,MAAM,gCAAuD;AAAA,EACnE,oBAAoB;AACrB;;"}
1
+ {"version":3,"file":"EntityListPreferences.js","sources":["../../../src/treeParameters/EntityListPreferences.ts"],"sourcesContent":["export const EntityListPreferencesDefaults: EntityListPreferences = {\n\tinitialEntityCount: 0,\n}\n\nexport interface EntityListPreferences {\n\tinitialEntityCount: number\n}\n\nexport interface UnsugarableEntityListPreferences {\n\tinitialEntityCount?: number\n}\n"],"names":[],"mappings":"AAAO,MAAM,gCAAuD;AAAA,EACnE,oBAAoB;AACrB;"}
@@ -64,5 +64,7 @@ class EventListenersStore {
64
64
  return eventListeners;
65
65
  }
66
66
  }
67
- export { EventListenersStore };
67
+ export {
68
+ EventListenersStore
69
+ };
68
70
  //# sourceMappingURL=EventListenersStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventListenersStore.js","sources":["../../../src/treeParameters/EventListenersStore.ts"],"sourcesContent":["type GenericEventsMap<EventTypes extends string> = {\n\t[K in EventTypes]?: (...args: any[]) => void | Promise<void | any>\n}\n\nexport class EventListenersStore<EventTypes extends string, Events extends GenericEventsMap<EventTypes>> {\n\n\tconstructor(\n\t\tprivate readonly parentStoreGetter?: () => EventListenersStore<EventTypes, Events> | undefined,\n\t\tprivate listeners: Map<string, Set<Events[any]>> = new Map(),\n\t) {}\n\n\tset<Type extends EventTypes>(event: { type: Type; key?: string }, listeners: Set<Events[Type]>): void {\n\t\tthis.listeners.set(this.formatMapEntryKey(event), listeners)\n\t}\n\n\tdelete<Type extends EventTypes>(event: { type: Type; key?: string }) {\n\t\tthis.listeners.delete(this.formatMapEntryKey(event))\n\t}\n\n\tdeleteByType<Type extends EventTypes>(type: Type) {\n\t\tconst prefix = this.formatMapEntryKey({ type, key: '' })\n\t\tfor (const eventType of this.listeners.keys()) {\n\t\t\tif (eventType.startsWith(prefix)) {\n\t\t\t\tthis.listeners.delete(eventType)\n\t\t\t}\n\t\t}\n\t}\n\n\tget<Type extends EventTypes>(event: { type: Type; key?: string }): Set<Events[Type]> | undefined {\n\t\tconst ownListeners = this.listeners.get(this.formatMapEntryKey(event))\n\t\tconst parentListeners = this.parentStoreGetter?.()?.get(event)\n\t\tif (!parentListeners) {\n\t\t\treturn ownListeners\n\t\t} else if (!ownListeners) {\n\t\t\treturn parentListeners\n\t\t}\n\t\treturn new Set([...ownListeners, ...parentListeners])\n\t}\n\n\tadd<Type extends EventTypes>(event: { type: Type; key?: string }, handler: Events[Type]): () => void {\n\t\tconst key = this.formatMapEntryKey(event)\n\t\tlet eventListeners = this.addInternal(key, handler)\n\t\treturn () => eventListeners?.delete(handler)\n\t}\n\n\tcloneDeep(): EventListenersStore<EventTypes, Events> {\n\t\tconst store: EventListenersStore<EventTypes, Events> = new EventListenersStore()\n\t\tfor (const [key, value] of this.listeners.entries()) {\n\t\t\tstore.listeners.set(key, new Set(value))\n\t\t}\n\t\treturn store\n\t}\n\n\tclone(): EventListenersStore<EventTypes, Events> {\n\t\tconst store: EventListenersStore<EventTypes, Events> = new EventListenersStore()\n\t\tstore.listeners = new Map(this.listeners)\n\t\treturn store\n\t}\n\n\tappend(other: EventListenersStore<EventTypes, Events>) {\n\t\tfor (const [eventKey, otherListeners] of other.listeners) {\n\t\t\tfor (const listener of otherListeners) {\n\t\t\t\tthis.addInternal(eventKey, listener)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate formatMapEntryKey(event: { type: string; key?: string }): string {\n\t\treturn event.key ? `${event.type}_${event.key ?? ''}` : event.type\n\t}\n\n\tprivate addInternal<Type extends keyof Events>(key: string, handler: Events[Type]) {\n\t\tlet eventListeners = this.listeners.get(key)\n\t\tif (!eventListeners) {\n\t\t\teventListeners = new Set()\n\t\t\tthis.listeners.set(key, eventListeners)\n\t\t}\n\t\teventListeners.add(handler)\n\t\treturn eventListeners\n\t}\n}\n"],"names":[],"mappings":"AAIO,MAAM,oBAA4F;AAAA,EAExG,YACkB,mBACT,YAA2C,oBAAI,OACtD;AAFgB,SAAA,oBAAA;AACT,SAAA,YAAA;AAAA,EACN;AAAA,EAEH,IAA6B,OAAqC,WAAoC;AACrG,SAAK,UAAU,IAAI,KAAK,kBAAkB,KAAK,GAAG,SAAS;AAAA,EAC5D;AAAA,EAEA,OAAgC,OAAqC;AACpE,SAAK,UAAU,OAAO,KAAK,kBAAkB,KAAK,CAAC;AAAA,EACpD;AAAA,EAEA,aAAsC,MAAY;AACjD,UAAM,SAAS,KAAK,kBAAkB,EAAE,MAAM,KAAK,IAAI;AACvD,eAAW,aAAa,KAAK,UAAU,KAAA,GAAQ;AAC1C,UAAA,UAAU,WAAW,MAAM,GAAG;AAC5B,aAAA,UAAU,OAAO,SAAS;AAAA,MAChC;AAAA,IACD;AAAA,EACD;AAAA,EAEA,IAA6B,OAAoE;AAChG,UAAM,eAAe,KAAK,UAAU,IAAI,KAAK,kBAAkB,KAAK,CAAC;AACrE,UAAM,kBAAkB,KAAK,oBAAoB,GAAG,IAAI,KAAK;AAC7D,QAAI,CAAC,iBAAiB;AACd,aAAA;AAAA,IAAA,WACG,CAAC,cAAc;AAClB,aAAA;AAAA,IACR;AACA,+BAAW,IAAI,CAAC,GAAG,cAAc,GAAG,eAAe,CAAC;AAAA,EACrD;AAAA,EAEA,IAA6B,OAAqC,SAAmC;AAC9F,UAAA,MAAM,KAAK,kBAAkB,KAAK;AACxC,QAAI,iBAAiB,KAAK,YAAY,KAAK,OAAO;AAC3C,WAAA,MAAM,gBAAgB,OAAO,OAAO;AAAA,EAC5C;AAAA,EAEA,YAAqD;AAC9C,UAAA,QAAiD,IAAI;AAC3D,eAAW,CAAC,KAAK,UAAU,KAAK,UAAU,WAAW;AACpD,YAAM,UAAU,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC;AAAA,IACxC;AACO,WAAA;AAAA,EACR;AAAA,EAEA,QAAiD;AAC1C,UAAA,QAAiD,IAAI;AAC3D,UAAM,YAAY,IAAI,IAAI,KAAK,SAAS;AACjC,WAAA;AAAA,EACR;AAAA,EAEA,OAAO,OAAgD;AACtD,eAAW,CAAC,UAAU,mBAAmB,MAAM,WAAW;AACzD,iBAAW,YAAY,gBAAgB;AACjC,aAAA,YAAY,UAAU,QAAQ;AAAA,MACpC;AAAA,IACD;AAAA,EACD;AAAA,EAEQ,kBAAkB,OAA+C;AACjE,WAAA,MAAM,MAAM,GAAG,MAAM,QAAQ,MAAM,OAAO,OAAO,MAAM;AAAA,EAC/D;AAAA,EAEQ,YAAuC,KAAa,SAAuB;AAClF,QAAI,iBAAiB,KAAK,UAAU,IAAI,GAAG;AAC3C,QAAI,CAAC,gBAAgB;AACpB,2CAAqB;AAChB,WAAA,UAAU,IAAI,KAAK,cAAc;AAAA,IACvC;AACA,mBAAe,IAAI,OAAO;AACnB,WAAA;AAAA,EACR;AACD;;"}
1
+ {"version":3,"file":"EventListenersStore.js","sources":["../../../src/treeParameters/EventListenersStore.ts"],"sourcesContent":["type GenericEventsMap<EventTypes extends string> = {\n\t[K in EventTypes]?: (...args: any[]) => void | Promise<void | any>\n}\n\nexport class EventListenersStore<EventTypes extends string, Events extends GenericEventsMap<EventTypes>> {\n\n\tconstructor(\n\t\tprivate readonly parentStoreGetter?: () => EventListenersStore<EventTypes, Events> | undefined,\n\t\tprivate listeners: Map<string, Set<Events[any]>> = new Map(),\n\t) {}\n\n\tset<Type extends EventTypes>(event: { type: Type; key?: string }, listeners: Set<Events[Type]>): void {\n\t\tthis.listeners.set(this.formatMapEntryKey(event), listeners)\n\t}\n\n\tdelete<Type extends EventTypes>(event: { type: Type; key?: string }) {\n\t\tthis.listeners.delete(this.formatMapEntryKey(event))\n\t}\n\n\tdeleteByType<Type extends EventTypes>(type: Type) {\n\t\tconst prefix = this.formatMapEntryKey({ type, key: '' })\n\t\tfor (const eventType of this.listeners.keys()) {\n\t\t\tif (eventType.startsWith(prefix)) {\n\t\t\t\tthis.listeners.delete(eventType)\n\t\t\t}\n\t\t}\n\t}\n\n\tget<Type extends EventTypes>(event: { type: Type; key?: string }): Set<Events[Type]> | undefined {\n\t\tconst ownListeners = this.listeners.get(this.formatMapEntryKey(event))\n\t\tconst parentListeners = this.parentStoreGetter?.()?.get(event)\n\t\tif (!parentListeners) {\n\t\t\treturn ownListeners\n\t\t} else if (!ownListeners) {\n\t\t\treturn parentListeners\n\t\t}\n\t\treturn new Set([...ownListeners, ...parentListeners])\n\t}\n\n\tadd<Type extends EventTypes>(event: { type: Type; key?: string }, handler: Events[Type]): () => void {\n\t\tconst key = this.formatMapEntryKey(event)\n\t\tlet eventListeners = this.addInternal(key, handler)\n\t\treturn () => eventListeners?.delete(handler)\n\t}\n\n\tcloneDeep(): EventListenersStore<EventTypes, Events> {\n\t\tconst store: EventListenersStore<EventTypes, Events> = new EventListenersStore()\n\t\tfor (const [key, value] of this.listeners.entries()) {\n\t\t\tstore.listeners.set(key, new Set(value))\n\t\t}\n\t\treturn store\n\t}\n\n\tclone(): EventListenersStore<EventTypes, Events> {\n\t\tconst store: EventListenersStore<EventTypes, Events> = new EventListenersStore()\n\t\tstore.listeners = new Map(this.listeners)\n\t\treturn store\n\t}\n\n\tappend(other: EventListenersStore<EventTypes, Events>) {\n\t\tfor (const [eventKey, otherListeners] of other.listeners) {\n\t\t\tfor (const listener of otherListeners) {\n\t\t\t\tthis.addInternal(eventKey, listener)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate formatMapEntryKey(event: { type: string; key?: string }): string {\n\t\treturn event.key ? `${event.type}_${event.key ?? ''}` : event.type\n\t}\n\n\tprivate addInternal<Type extends keyof Events>(key: string, handler: Events[Type]) {\n\t\tlet eventListeners = this.listeners.get(key)\n\t\tif (!eventListeners) {\n\t\t\teventListeners = new Set()\n\t\t\tthis.listeners.set(key, eventListeners)\n\t\t}\n\t\teventListeners.add(handler)\n\t\treturn eventListeners\n\t}\n}\n"],"names":[],"mappings":"AAIO,MAAM,oBAA4F;AAAA,EAExG,YACkB,mBACT,YAA2C,oBAAI,OACtD;AAFgB,SAAA,oBAAA;AACT,SAAA,YAAA;AAAA,EACN;AAAA,EAEH,IAA6B,OAAqC,WAAoC;AACrG,SAAK,UAAU,IAAI,KAAK,kBAAkB,KAAK,GAAG,SAAS;AAAA,EAC5D;AAAA,EAEA,OAAgC,OAAqC;AACpE,SAAK,UAAU,OAAO,KAAK,kBAAkB,KAAK,CAAC;AAAA,EACpD;AAAA,EAEA,aAAsC,MAAY;AACjD,UAAM,SAAS,KAAK,kBAAkB,EAAE,MAAM,KAAK,IAAI;AACvD,eAAW,aAAa,KAAK,UAAU,KAAA,GAAQ;AAC1C,UAAA,UAAU,WAAW,MAAM,GAAG;AAC5B,aAAA,UAAU,OAAO,SAAS;AAAA,MAChC;AAAA,IACD;AAAA,EACD;AAAA,EAEA,IAA6B,OAAoE;AAChG,UAAM,eAAe,KAAK,UAAU,IAAI,KAAK,kBAAkB,KAAK,CAAC;AACrE,UAAM,kBAAkB,KAAK,oBAAoB,GAAG,IAAI,KAAK;AAC7D,QAAI,CAAC,iBAAiB;AACd,aAAA;AAAA,IAAA,WACG,CAAC,cAAc;AAClB,aAAA;AAAA,IACR;AACA,+BAAW,IAAI,CAAC,GAAG,cAAc,GAAG,eAAe,CAAC;AAAA,EACrD;AAAA,EAEA,IAA6B,OAAqC,SAAmC;AAC9F,UAAA,MAAM,KAAK,kBAAkB,KAAK;AACxC,QAAI,iBAAiB,KAAK,YAAY,KAAK,OAAO;AAC3C,WAAA,MAAM,gBAAgB,OAAO,OAAO;AAAA,EAC5C;AAAA,EAEA,YAAqD;AAC9C,UAAA,QAAiD,IAAI;AAC3D,eAAW,CAAC,KAAK,KAAK,KAAK,KAAK,UAAU,WAAW;AACpD,YAAM,UAAU,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC;AAAA,IACxC;AACO,WAAA;AAAA,EACR;AAAA,EAEA,QAAiD;AAC1C,UAAA,QAAiD,IAAI;AAC3D,UAAM,YAAY,IAAI,IAAI,KAAK,SAAS;AACjC,WAAA;AAAA,EACR;AAAA,EAEA,OAAO,OAAgD;AACtD,eAAW,CAAC,UAAU,cAAc,KAAK,MAAM,WAAW;AACzD,iBAAW,YAAY,gBAAgB;AACjC,aAAA,YAAY,UAAU,QAAQ;AAAA,MACpC;AAAA,IACD;AAAA,EACD;AAAA,EAEQ,kBAAkB,OAA+C;AACjE,WAAA,MAAM,MAAM,GAAG,MAAM,QAAQ,MAAM,OAAO,OAAO,MAAM;AAAA,EAC/D;AAAA,EAEQ,YAAuC,KAAa,SAAuB;AAClF,QAAI,iBAAiB,KAAK,UAAU,IAAI,GAAG;AAC3C,QAAI,CAAC,gBAAgB;AACpB,2CAAqB;AAChB,WAAA,UAAU,IAAI,KAAK,cAAc;AAAA,IACvC;AACA,mBAAe,IAAI,OAAO;AACnB,WAAA;AAAA,EACR;AACD;"}
@@ -1,5 +1,7 @@
1
1
  const LeafFieldDefaults = {
2
2
  isNonbearing: false
3
3
  };
4
- export { LeafFieldDefaults };
4
+ export {
5
+ LeafFieldDefaults
6
+ };
5
7
  //# sourceMappingURL=LeafField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LeafField.js","sources":["../../../src/treeParameters/LeafField.ts"],"sourcesContent":["import type { FieldEventListeners, UnsugarableFieldEventListeners } from './FieldEventListeners'\nimport type { FieldValue, OptionallyVariableFieldValue } from './primitives'\n\n// These are specific to leaf fields. Common but required parameters are in AnyField.\n\nexport const LeafFieldDefaults = {\n\tisNonbearing: false,\n} as const\n\nexport interface LeafField extends FieldEventListeners {\n\tisNonbearing: boolean\n\tdefaultValue: FieldValue | undefined\n}\n\nexport interface UnsugarableLeafField extends UnsugarableFieldEventListeners {\n\tisNonbearing?: boolean\n\tdefaultValue?: OptionallyVariableFieldValue\n}\n"],"names":[],"mappings":"AAKO,MAAM,oBAAoB;AAAA,EAChC,cAAc;AACf;;"}
1
+ {"version":3,"file":"LeafField.js","sources":["../../../src/treeParameters/LeafField.ts"],"sourcesContent":["import type { FieldEventListeners, UnsugarableFieldEventListeners } from './FieldEventListeners'\nimport type { FieldValue, OptionallyVariableFieldValue } from './primitives'\n\n// These are specific to leaf fields. Common but required parameters are in AnyField.\n\nexport const LeafFieldDefaults = {\n\tisNonbearing: false,\n} as const\n\nexport interface LeafField extends FieldEventListeners {\n\tisNonbearing: boolean\n\tdefaultValue: FieldValue | undefined\n}\n\nexport interface UnsugarableLeafField extends UnsugarableFieldEventListeners {\n\tisNonbearing?: boolean\n\tdefaultValue?: OptionallyVariableFieldValue\n}\n"],"names":[],"mappings":"AAKO,MAAM,oBAAoB;AAAA,EAChC,cAAc;AACf;"}
@@ -1,5 +1,7 @@
1
1
  const QualifiedEntityParametersDefaults = {
2
2
  expectedMutation: "anyMutation"
3
3
  };
4
- export { QualifiedEntityParametersDefaults };
4
+ export {
5
+ QualifiedEntityParametersDefaults
6
+ };
5
7
  //# sourceMappingURL=QualifiedEntityParameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QualifiedEntityParameters.js","sources":["../../../src/treeParameters/QualifiedEntityParameters.ts"],"sourcesContent":["import type { Alias, EntityName, ExpectedQualifiedEntityMutation } from './primitives'\n\nexport const QualifiedEntityParametersDefaults = {\n\texpectedMutation: 'anyMutation',\n} as const\n\nexport interface QualifiedEntityParameters {\n\talias: Set<Alias> | undefined\n\tentityName: EntityName\n\texpectedMutation: ExpectedQualifiedEntityMutation\n}\n\nexport interface SugarableQualifiedEntityParameters {\n\tentityName: EntityName\n}\n\nexport interface UnsugarableQualifiedEntityParameters {\n\talias?: Alias | Set<Alias>\n\texpectedMutation?: ExpectedQualifiedEntityMutation\n}\n"],"names":[],"mappings":"AAEO,MAAM,oCAAoC;AAAA,EAChD,kBAAkB;AACnB;;"}
1
+ {"version":3,"file":"QualifiedEntityParameters.js","sources":["../../../src/treeParameters/QualifiedEntityParameters.ts"],"sourcesContent":["import type { Alias, EntityName, ExpectedQualifiedEntityMutation } from './primitives'\n\nexport const QualifiedEntityParametersDefaults = {\n\texpectedMutation: 'anyMutation',\n} as const\n\nexport interface QualifiedEntityParameters {\n\talias: Set<Alias> | undefined\n\tentityName: EntityName\n\texpectedMutation: ExpectedQualifiedEntityMutation\n}\n\nexport interface SugarableQualifiedEntityParameters {\n\tentityName: EntityName\n}\n\nexport interface UnsugarableQualifiedEntityParameters {\n\talias?: Alias | Set<Alias>\n\texpectedMutation?: ExpectedQualifiedEntityMutation\n}\n"],"names":[],"mappings":"AAEO,MAAM,oCAAoC;AAAA,EAChD,kBAAkB;AACnB;"}
@@ -1,5 +1,7 @@
1
1
  const RelationDefaults = {
2
2
  expectedMutation: "anyMutation"
3
3
  };
4
- export { RelationDefaults };
4
+ export {
5
+ RelationDefaults
6
+ };
5
7
  //# sourceMappingURL=Relation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Relation.js","sources":["../../../src/treeParameters/Relation.ts"],"sourcesContent":["import type { AnyField, SugarableAnyField } from './AnyField'\nimport type { EntityCreationParameters, UnsugarableEntityCreationParameters } from './EntityCreationParameters'\nimport type { ExpectedRelationMutation } from './primitives'\n\nexport const RelationDefaults = {\n\texpectedMutation: 'anyMutation',\n} as const\n\nexport interface Relation extends AnyField, EntityCreationParameters {\n\texpectedMutation: ExpectedRelationMutation\n}\n\nexport interface SugarableRelation extends SugarableAnyField {}\n\nexport interface UnsugarableRelation extends UnsugarableEntityCreationParameters {\n\texpectedMutation?: ExpectedRelationMutation\n}\n"],"names":[],"mappings":"AAIO,MAAM,mBAAmB;AAAA,EAC/B,kBAAkB;AACnB;;"}
1
+ {"version":3,"file":"Relation.js","sources":["../../../src/treeParameters/Relation.ts"],"sourcesContent":["import type { AnyField, SugarableAnyField } from './AnyField'\nimport type { EntityCreationParameters, UnsugarableEntityCreationParameters } from './EntityCreationParameters'\nimport type { ExpectedRelationMutation } from './primitives'\n\nexport const RelationDefaults = {\n\texpectedMutation: 'anyMutation',\n} as const\n\nexport interface Relation extends AnyField, EntityCreationParameters {\n\texpectedMutation: ExpectedRelationMutation\n}\n\nexport interface SugarableRelation extends SugarableAnyField {}\n\nexport interface UnsugarableRelation extends UnsugarableEntityCreationParameters {\n\texpectedMutation?: ExpectedRelationMutation\n}\n"],"names":[],"mappings":"AAIO,MAAM,mBAAmB;AAAA,EAC/B,kBAAkB;AACnB;"}
@@ -69,5 +69,7 @@ class Hashing {
69
69
  return Math.abs(hash);
70
70
  }
71
71
  }
72
- export { Hashing };
72
+ export {
73
+ Hashing
74
+ };
73
75
  //# sourceMappingURL=Hashing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Hashing.js","sources":["../../../src/utils/Hashing.ts"],"sourcesContent":["import type {\n\tHasManyRelation,\n\tHasOneRelation,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { Environment } from '../dao'\n\n// TODO update hashing so that for offset, 0 == undefined\nexport class Hashing {\n\tpublic static hashHasOneRelation(relation: HasOneRelation): number {\n\t\tconst where = [\n\t\t\t'upToOne',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\trelation.reducedBy,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashHasManyRelation(relation: HasManyRelation): number {\n\t\tconst where = [\n\t\t\t'possiblyMany',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\t'offset' in relation ? relation.offset : undefined,\n\t\t\t'limit' in relation ? relation.limit : undefined,\n\t\t\t'orderBy' in relation ? relation.orderBy : undefined,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashEntityListSubTreeParameters(\n\t\tparameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tparameters.orderBy,\n\t\t\tparameters.offset,\n\t\t\tparameters.limit,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tpublic static hashEntitySubTreeParameters(\n\t\tparameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.where,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tprivate static hashArray(array: any[]): number {\n\t\tconst json = array.map(item => JSON.stringify(item)).join('_')\n\t\treturn Hashing.hash(json)\n\t}\n\n\t// Taken from Java\n\tpublic static hash(str: string): number {\n\t\tlet hash = 0\n\t\tif (str.length === 0) {\n\t\t\treturn hash\n\t\t}\n\t\tfor (let i = 0; i < str.length; i++) {\n\t\t\thash = (hash << 5) - hash + str.charCodeAt(i)\n\t\t\thash = hash & hash // Convert to 32bit integer\n\t\t}\n\t\treturn Math.abs(hash)\n\t}\n}\n"],"names":[],"mappings":"AAWO,MAAM,QAAQ;AAAA,SACN,mBAAmB,UAAkC;AAClE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAGH,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,SAEc,oBAAoB,UAAmC;AACpE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY,WAAW,SAAS,SAAS;AAAA,MACzC,WAAW,WAAW,SAAS,QAAQ;AAAA,MACvC,aAAa,WAAW,SAAS,UAAU;AAAA,IAAA;AAGrC,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,SAEc,gCACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,SAEc,4BACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,SAEe,UAAU,OAAsB;AACxC,UAAA,OAAO,MAAM,IAAI,CAAQ,SAAA,KAAK,UAAU,IAAI,CAAC,EAAE,KAAK,GAAG;AACtD,WAAA,QAAQ,KAAK,IAAI;AAAA,EACzB;AAAA,SAGc,KAAK,KAAqB;AACvC,QAAI,OAAO;AACP,QAAA,IAAI,WAAW,GAAG;AACd,aAAA;AAAA,IACR;AACA,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACpC,aAAgB,SAAA,KAAK,OAAO,IAAI,WAAW,CAAC;AAC5C,aAAO,OAAO;AAAA,IACf;AACO,WAAA,KAAK,IAAI,IAAI;AAAA,EACrB;AACD;;"}
1
+ {"version":3,"file":"Hashing.js","sources":["../../../src/utils/Hashing.ts"],"sourcesContent":["import type {\n\tHasManyRelation,\n\tHasOneRelation,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { Environment } from '../dao'\n\n// TODO update hashing so that for offset, 0 == undefined\nexport class Hashing {\n\tpublic static hashHasOneRelation(relation: HasOneRelation): number {\n\t\tconst where = [\n\t\t\t'upToOne',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\trelation.reducedBy,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashHasManyRelation(relation: HasManyRelation): number {\n\t\tconst where = [\n\t\t\t'possiblyMany',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\t'offset' in relation ? relation.offset : undefined,\n\t\t\t'limit' in relation ? relation.limit : undefined,\n\t\t\t'orderBy' in relation ? relation.orderBy : undefined,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashEntityListSubTreeParameters(\n\t\tparameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tparameters.orderBy,\n\t\t\tparameters.offset,\n\t\t\tparameters.limit,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tpublic static hashEntitySubTreeParameters(\n\t\tparameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.where,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tprivate static hashArray(array: any[]): number {\n\t\tconst json = array.map(item => JSON.stringify(item)).join('_')\n\t\treturn Hashing.hash(json)\n\t}\n\n\t// Taken from Java\n\tpublic static hash(str: string): number {\n\t\tlet hash = 0\n\t\tif (str.length === 0) {\n\t\t\treturn hash\n\t\t}\n\t\tfor (let i = 0; i < str.length; i++) {\n\t\t\thash = (hash << 5) - hash + str.charCodeAt(i)\n\t\t\thash = hash & hash // Convert to 32bit integer\n\t\t}\n\t\treturn Math.abs(hash)\n\t}\n}\n"],"names":[],"mappings":"AAWO,MAAM,QAAQ;AAAA,EACpB,OAAc,mBAAmB,UAAkC;AAClE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAGH,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,EAEA,OAAc,oBAAoB,UAAmC;AACpE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY,WAAW,SAAS,SAAS;AAAA,MACzC,WAAW,WAAW,SAAS,QAAQ;AAAA,MACvC,aAAa,WAAW,SAAS,UAAU;AAAA,IAAA;AAGrC,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,EAEA,OAAc,gCACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,EAEA,OAAc,4BACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,EAEA,OAAe,UAAU,OAAsB;AACxC,UAAA,OAAO,MAAM,IAAI,CAAQ,SAAA,KAAK,UAAU,IAAI,CAAC,EAAE,KAAK,GAAG;AACtD,WAAA,QAAQ,KAAK,IAAI;AAAA,EACzB;AAAA,EAGA,OAAc,KAAK,KAAqB;AACvC,QAAI,OAAO;AACP,QAAA,IAAI,WAAW,GAAG;AACd,aAAA;AAAA,IACR;AACA,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACpC,cAAQ,QAAQ,KAAK,OAAO,IAAI,WAAW,CAAC;AAC5C,aAAO,OAAO;AAAA,IACf;AACO,WAAA,KAAK,IAAI,IAAI;AAAA,EACrB;AACD;"}
@@ -5,5 +5,7 @@ function assert(arg, message) {
5
5
  ${message}` : ""}`);
6
6
  }
7
7
  }
8
- export { assert };
8
+ export {
9
+ assert
10
+ };
9
11
  //# sourceMappingURL=assert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assert.js","sources":["../../../src/utils/assert.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\nexport function assert(arg: boolean, message?: string): asserts arg {\n\tif (!arg) {\n\t\tthrow new BindingError(`Assertion fail!${message ? `\\n${message}` : ''}`)\n\t}\n}\n"],"names":[],"mappings":";AAEO,gBAAgB,KAAc,SAA+B;AACnE,MAAI,CAAC,KAAK;AACH,UAAA,IAAI,aAAa,kBAAkB,UAAU;AAAA,EAAK,YAAY,IAAI;AAAA,EACzE;AACD;;"}
1
+ {"version":3,"file":"assert.js","sources":["../../../src/utils/assert.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\nexport function assert(arg: boolean, message?: string): asserts arg {\n\tif (!arg) {\n\t\tthrow new BindingError(`Assertion fail!${message ? `\\n${message}` : ''}`)\n\t}\n}\n"],"names":[],"mappings":";AAEgB,SAAA,OAAO,KAAc,SAA+B;AACnE,MAAI,CAAC,KAAK;AACH,UAAA,IAAI,aAAa,kBAAkB,UAAU;AAAA,EAAK,YAAY,IAAI;AAAA,EACzE;AACD;"}
@@ -1,6 +1,10 @@
1
1
  import { BindingError } from "../BindingError.js";
2
2
  function assertNever(_) {
3
- throw new BindingError(`FATAL ERROR. This should absolutely never have happened. Yet, despite all efforts, here we are. Please find solace in having a good laugh about the whole situation. You have just witnessed true harshness of software development. Please report this bug.`);
3
+ throw new BindingError(
4
+ `FATAL ERROR. This should absolutely never have happened. Yet, despite all efforts, here we are. Please find solace in having a good laugh about the whole situation. You have just witnessed true harshness of software development. Please report this bug.`
5
+ );
4
6
  }
5
- export { assertNever };
7
+ export {
8
+ assertNever
9
+ };
6
10
  //# sourceMappingURL=assertNever.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertNever.js","sources":["../../../src/utils/assertNever.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\nexport function assertNever(_: never): never {\n\tthrow new BindingError(\n\t\t`FATAL ERROR. This should absolutely never have happened. Yet, despite all efforts, here we are. ` +\n\t\t\t`Please find solace in having a good laugh about the whole situation. ` +\n\t\t\t`You have just witnessed true harshness of software development. ` +\n\t\t\t`Please report this bug.`,\n\t)\n}\n"],"names":[],"mappings":";AAEO,qBAAqB,GAAiB;AACtC,QAAA,IAAI,aACT,8PAID;AACD;;"}
1
+ {"version":3,"file":"assertNever.js","sources":["../../../src/utils/assertNever.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\n\nexport function assertNever(_: never): never {\n\tthrow new BindingError(\n\t\t`FATAL ERROR. This should absolutely never have happened. Yet, despite all efforts, here we are. ` +\n\t\t\t`Please find solace in having a good laugh about the whole situation. ` +\n\t\t\t`You have just witnessed true harshness of software development. ` +\n\t\t\t`Please report this bug.`,\n\t)\n}\n"],"names":[],"mappings":";AAEO,SAAS,YAAY,GAAiB;AAC5C,QAAM,IAAI;AAAA,IACT;AAAA,EAAA;AAKF;"}
@@ -1,5 +1,7 @@
1
1
  const generateEnumerabilityPreventingEntropy = (length = 5) => {
2
2
  return (Math.random() * Math.pow(10, length)).toFixed(0).padStart(length, "0");
3
3
  };
4
- export { generateEnumerabilityPreventingEntropy };
4
+ export {
5
+ generateEnumerabilityPreventingEntropy
6
+ };
5
7
  //# sourceMappingURL=generateEnumerabilityPreventingEntropy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateEnumerabilityPreventingEntropy.js","sources":["../../../src/utils/generateEnumerabilityPreventingEntropy.ts"],"sourcesContent":["export const generateEnumerabilityPreventingEntropy = (length: number = 5): string => {\n\treturn (Math.random() * Math.pow(10, length)).toFixed(0).padStart(length, '0')\n}\n"],"names":[],"mappings":"AAAa,MAAA,yCAAyC,CAAC,SAAiB,MAAc;AACrF,SAAa,MAAA,OAAW,IAAA,KAAK,IAAI,IAAI,MAAM,GAAG,QAAQ,CAAC,EAAE,SAAS,QAAQ,GAAG;AAC9E;;"}
1
+ {"version":3,"file":"generateEnumerabilityPreventingEntropy.js","sources":["../../../src/utils/generateEnumerabilityPreventingEntropy.ts"],"sourcesContent":["export const generateEnumerabilityPreventingEntropy = (length: number = 5): string => {\n\treturn (Math.random() * Math.pow(10, length)).toFixed(0).padStart(length, '0')\n}\n"],"names":[],"mappings":"AAAa,MAAA,yCAAyC,CAAC,SAAiB,MAAc;AACrF,UAAQ,KAAK,OAAW,IAAA,KAAK,IAAI,IAAI,MAAM,GAAG,QAAQ,CAAC,EAAE,SAAS,QAAQ,GAAG;AAC9E;"}
@@ -6,5 +6,7 @@ const isEmptyObject = (arg) => {
6
6
  }
7
7
  return true;
8
8
  };
9
- export { isEmptyObject };
9
+ export {
10
+ isEmptyObject
11
+ };
10
12
  //# sourceMappingURL=isEmptyObject.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isEmptyObject.js","sources":["../../../src/utils/isEmptyObject.ts"],"sourcesContent":["export const isEmptyObject = (arg: object): boolean => {\n\t// This is faster than Object.keys(arg).length === 0 && arg.constructor === Object\n\tfor (const key in arg) {\n\t\tif (arg.hasOwnProperty(key)) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"],"names":[],"mappings":"AAAa,MAAA,gBAAgB,CAAC,QAAyB;AAEtD,aAAW,OAAO,KAAK;AAClB,QAAA,IAAI,eAAe,GAAG,GAAG;AACrB,aAAA;AAAA,IACR;AAAA,EACD;AACO,SAAA;AACR;;"}
1
+ {"version":3,"file":"isEmptyObject.js","sources":["../../../src/utils/isEmptyObject.ts"],"sourcesContent":["export const isEmptyObject = (arg: object): boolean => {\n\t// This is faster than Object.keys(arg).length === 0 && arg.constructor === Object\n\tfor (const key in arg) {\n\t\tif (arg.hasOwnProperty(key)) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"],"names":[],"mappings":"AAAa,MAAA,gBAAgB,CAAC,QAAyB;AAEtD,aAAW,OAAO,KAAK;AAClB,QAAA,IAAI,eAAe,GAAG,GAAG;AACrB,aAAA;AAAA,IACR;AAAA,EACD;AACO,SAAA;AACR;"}
@@ -1,3 +1,5 @@
1
1
  const ucfirst = (string) => `${string.charAt(0).toUpperCase()}${string.substring(1)}`;
2
- export { ucfirst };
2
+ export {
3
+ ucfirst
4
+ };
3
5
  //# sourceMappingURL=ucfirst.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ucfirst.js","sources":["../../../src/utils/ucfirst.ts"],"sourcesContent":["export const ucfirst = (string: string) => `${string.charAt(0).toUpperCase()}${string.substring(1)}`\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,CAAC,WAAmB,GAAG,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,UAAU,CAAC;;"}
1
+ {"version":3,"file":"ucfirst.js","sources":["../../../src/utils/ucfirst.ts"],"sourcesContent":["export const ucfirst = (string: string) => `${string.charAt(0).toUpperCase()}${string.substring(1)}`\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,CAAC,WAAmB,GAAG,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,UAAU,CAAC;"}
@@ -3,5 +3,8 @@ class BindingError extends Error {
3
3
  const throwBindingError = (message) => {
4
4
  throw new BindingError(message);
5
5
  };
6
- export { BindingError, throwBindingError };
6
+ export {
7
+ BindingError,
8
+ throwBindingError
9
+ };
7
10
  //# sourceMappingURL=BindingError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BindingError.js","sources":["../../src/BindingError.ts"],"sourcesContent":["export class BindingError extends Error {}\n\nexport const throwBindingError = (message: string): never => {\n\tthrow new BindingError(message)\n}\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB,MAAM;AAAC;AAE5B,MAAA,oBAAoB,CAAC,YAA2B;AACtD,QAAA,IAAI,aAAa,OAAO;AAC/B;;"}
1
+ {"version":3,"file":"BindingError.js","sources":["../../src/BindingError.ts"],"sourcesContent":["export class BindingError extends Error {}\n\nexport const throwBindingError = (message: string): never => {\n\tthrow new BindingError(message)\n}\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB,MAAM;AAAC;AAE5B,MAAA,oBAAoB,CAAC,YAA2B;AACtD,QAAA,IAAI,aAAa,OAAO;AAC/B;"}
@@ -1,12 +1,16 @@
1
- import { createElement } from "react";
2
1
  import { EntityKeyContext } from "./EntityKeyContext.js";
3
2
  import { EnvironmentContext } from "./EnvironmentContext.js";
3
+ import { jsx } from "react/jsx-runtime";
4
4
  function AccessorProvider(props) {
5
- return /* @__PURE__ */ createElement(EntityKeyContext.Provider, {
6
- value: props.accessor.key
7
- }, /* @__PURE__ */ createElement(EnvironmentContext.Provider, {
8
- value: props.accessor.environment
9
- }, props.children));
5
+ return /* @__PURE__ */ jsx(EntityKeyContext.Provider, {
6
+ value: props.accessor.key,
7
+ children: /* @__PURE__ */ jsx(EnvironmentContext.Provider, {
8
+ value: props.accessor.environment,
9
+ children: props.children
10
+ })
11
+ });
10
12
  }
11
- export { AccessorProvider };
13
+ export {
14
+ AccessorProvider
15
+ };
12
16
  //# sourceMappingURL=AccessorProvider.js.map
@@ -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":["_jsx"],"mappings":";;;AAUO,0BAA0B,OAA4B;AAE3D,SAAAA,8BAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO,MAAM,SAAS;AAAA,EAAA,GAChDA,8BAAC,mBAAmB,UAAnB;AAAA,IAA4B,OAAO,MAAM,SAAS;AAAA,EAAA,GAAc,MAAM,QAAS,CACjF;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":["AccessorProvider","props","_jsx","accessor","key","environment","children"],"mappings":";;;AAUO,SAASA,iBAAiBC,OAA4B;AAE3D,SAAAC,oBAAC,iBAAiB,UAAQ;AAAA,IAAC,OAAOD,MAAME,SAASC;AAAAA,IAAI,UACnDF,oBAAA,mBAAmB,UAAQ;AAAA,MAAC,OAAOD,MAAME,SAASE;AAAAA,MAAY,UAAEJ,MAAMK;AAAAA,IAAAA,CAAQ;AAAA,EAAA,CACpD;AAE9B;"}
@@ -1,7 +1,9 @@
1
1
  import { createContext } from "react";
2
2
  import { BindingError } from "../BindingError.js";
3
3
  const getRejecter = (operation) => () => {
4
- throw new BindingError(`Trying to ${operation} but data binding is unavailable. You likely used a bound component outside <DataBindingProvider /> or it tried to reach its accessor whilst the tree was in an non-interactive state (e.g. still loading).`);
4
+ throw new BindingError(
5
+ `Trying to ${operation} but data binding is unavailable. You likely used a bound component outside <DataBindingProvider /> or it tried to reach its accessor whilst the tree was in an non-interactive state (e.g. still loading).`
6
+ );
5
7
  };
6
8
  const defaultBindingOperations = Object.freeze({
7
9
  get contentClient() {
@@ -22,5 +24,8 @@ const defaultBindingOperations = Object.freeze({
22
24
  persist: getRejecter("persist")
23
25
  });
24
26
  const BindingOperationsContext = createContext(defaultBindingOperations);
25
- export { BindingOperationsContext, defaultBindingOperations };
27
+ export {
28
+ BindingOperationsContext,
29
+ defaultBindingOperations
30
+ };
26
31
  //# sourceMappingURL=BindingOperationsContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BindingOperationsContext.js","sources":["../../../src/accessorPropagation/BindingOperationsContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { BindingOperations } from '../accessors'\nimport { BindingError } from '../BindingError'\n\nconst getRejecter = (operation: string) => () => {\n\tthrow new BindingError(\n\t\t`Trying to ${operation} but data binding is unavailable. You likely used a bound component outside ` +\n\t\t\t`<DataBindingProvider /> or it tried to reach its accessor whilst the tree was in an non-interactive state ` +\n\t\t\t`(e.g. still loading).`,\n\t)\n}\n\nexport const defaultBindingOperations = Object.freeze<BindingOperations>({\n\tget contentClient() {\n\t\treturn getRejecter('retrieve the content api client')()\n\t},\n\tget systemClient() {\n\t\treturn getRejecter('retrieve the system api client')()\n\t},\n\tget tenantClient() {\n\t\treturn getRejecter('retrieve the tenant api client')()\n\t},\n\tgetEntityListSubTree: getRejecter('retrieve an entity list sub tree'),\n\tgetEntitySubTree: getRejecter('retrieve a single entity sub tree'),\n\tgetEntityByKey: getRejecter('retrieve an entity by key'),\n\tgetTreeFilters: getRejecter('retrieve tree filters'),\n\tbatchDeferredUpdates: getRejecter('batch deferred updates'),\n\textendTree: getRejecter('extendTree'),\n\tpersist: getRejecter('persist'),\n})\n\nexport const BindingOperationsContext = createContext<BindingOperations>(defaultBindingOperations)\n"],"names":[],"mappings":";;AAIA,MAAM,cAAc,CAAC,cAAsB,MAAM;AAC1C,QAAA,IAAI,aACT,aAAa,sNAGd;AACD;AAEa,MAAA,2BAA2B,OAAO,OAA0B;AAAA,MACpE,gBAAgB;AACZ,WAAA,YAAY,iCAAiC;EACrD;AAAA,MACI,eAAe;AACX,WAAA,YAAY,gCAAgC;EACpD;AAAA,MACI,eAAe;AACX,WAAA,YAAY,gCAAgC;EACpD;AAAA,EACA,sBAAsB,YAAY,kCAAkC;AAAA,EACpE,kBAAkB,YAAY,mCAAmC;AAAA,EACjE,gBAAgB,YAAY,2BAA2B;AAAA,EACvD,gBAAgB,YAAY,uBAAuB;AAAA,EACnD,sBAAsB,YAAY,wBAAwB;AAAA,EAC1D,YAAY,YAAY,YAAY;AAAA,EACpC,SAAS,YAAY,SAAS;AAC/B,CAAC;AAEY,MAAA,2BAA2B,cAAiC,wBAAwB;;"}
1
+ {"version":3,"file":"BindingOperationsContext.js","sources":["../../../src/accessorPropagation/BindingOperationsContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { BindingOperations } from '../accessors'\nimport { BindingError } from '../BindingError'\n\nconst getRejecter = (operation: string) => () => {\n\tthrow new BindingError(\n\t\t`Trying to ${operation} but data binding is unavailable. You likely used a bound component outside ` +\n\t\t\t`<DataBindingProvider /> or it tried to reach its accessor whilst the tree was in an non-interactive state ` +\n\t\t\t`(e.g. still loading).`,\n\t)\n}\n\nexport const defaultBindingOperations = Object.freeze<BindingOperations>({\n\tget contentClient() {\n\t\treturn getRejecter('retrieve the content api client')()\n\t},\n\tget systemClient() {\n\t\treturn getRejecter('retrieve the system api client')()\n\t},\n\tget tenantClient() {\n\t\treturn getRejecter('retrieve the tenant api client')()\n\t},\n\tgetEntityListSubTree: getRejecter('retrieve an entity list sub tree'),\n\tgetEntitySubTree: getRejecter('retrieve a single entity sub tree'),\n\tgetEntityByKey: getRejecter('retrieve an entity by key'),\n\tgetTreeFilters: getRejecter('retrieve tree filters'),\n\tbatchDeferredUpdates: getRejecter('batch deferred updates'),\n\textendTree: getRejecter('extendTree'),\n\tpersist: getRejecter('persist'),\n})\n\nexport const BindingOperationsContext = createContext<BindingOperations>(defaultBindingOperations)\n"],"names":[],"mappings":";;AAIA,MAAM,cAAc,CAAC,cAAsB,MAAM;AAChD,QAAM,IAAI;AAAA,IACT,aAAa;AAAA,EAAA;AAIf;AAEa,MAAA,2BAA2B,OAAO,OAA0B;AAAA,EACxE,IAAI,gBAAgB;AACZ,WAAA,YAAY,iCAAiC;EACrD;AAAA,EACA,IAAI,eAAe;AACX,WAAA,YAAY,gCAAgC;EACpD;AAAA,EACA,IAAI,eAAe;AACX,WAAA,YAAY,gCAAgC;EACpD;AAAA,EACA,sBAAsB,YAAY,kCAAkC;AAAA,EACpE,kBAAkB,YAAY,mCAAmC;AAAA,EACjE,gBAAgB,YAAY,2BAA2B;AAAA,EACvD,gBAAgB,YAAY,uBAAuB;AAAA,EACnD,sBAAsB,YAAY,wBAAwB;AAAA,EAC1D,YAAY,YAAY,YAAY;AAAA,EACpC,SAAS,YAAY,SAAS;AAC/B,CAAC;AAEY,MAAA,2BAA2B,cAAiC,wBAAwB;"}
@@ -1,9 +1,12 @@
1
- import { createElement } from "react";
2
1
  import { BindingOperationsContext, defaultBindingOperations } from "./BindingOperationsContext.js";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  function BindingOperationsProvider(props) {
4
- return /* @__PURE__ */ createElement(BindingOperationsContext.Provider, {
5
- value: props.bindingOperations || defaultBindingOperations
6
- }, props.children);
4
+ return /* @__PURE__ */ jsx(BindingOperationsContext.Provider, {
5
+ value: props.bindingOperations || defaultBindingOperations,
6
+ children: props.children
7
+ });
7
8
  }
8
- export { BindingOperationsProvider };
9
+ export {
10
+ BindingOperationsProvider
11
+ };
9
12
  //# sourceMappingURL=BindingOperationsProvider.js.map
@@ -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":["_jsx"],"mappings":";;AASO,mCAAmC,OAAuC;AAE/E,SAAAA,8BAAC,yBAAyB,UAAzB;AAAA,IAAkC,OAAO,MAAM,qBAAqB;AAAA,EAAA,GACnE,MAAM,QACR;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":["BindingOperationsProvider","props","_jsx","bindingOperations","defaultBindingOperations","children"],"mappings":";;AASO,SAASA,0BAA0BC,OAAuC;AAE/E,SAAAC,oBAAC,yBAAyB,UAAQ;AAAA,IAAC,OAAOD,MAAME,qBAAqBC;AAAAA,IAAyB,UAC5FH,MAAMI;AAAAA,EAAAA,CAC4B;AAEtC;"}
@@ -1,5 +1,7 @@
1
1
  import { createContext } from "react";
2
2
  const EntityKeyContext = createContext(void 0);
3
3
  EntityKeyContext.displayName = "EntityKeyContext";
4
- export { EntityKeyContext };
4
+ export {
5
+ EntityKeyContext
6
+ };
5
7
  //# sourceMappingURL=EntityKeyContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityKeyContext.js","sources":["../../../src/accessorPropagation/EntityKeyContext.ts"],"sourcesContent":["import { createContext } from 'react'\n\nexport const EntityKeyContext = createContext<undefined | string>(undefined)\nEntityKeyContext.displayName = 'EntityKeyContext'\n"],"names":[],"mappings":";AAEa,MAAA,mBAAmB,cAAkC,MAAS;AAC3E,iBAAiB,cAAc;;"}
1
+ {"version":3,"file":"EntityKeyContext.js","sources":["../../../src/accessorPropagation/EntityKeyContext.ts"],"sourcesContent":["import { createContext } from 'react'\n\nexport const EntityKeyContext = createContext<undefined | string>(undefined)\nEntityKeyContext.displayName = 'EntityKeyContext'\n"],"names":[],"mappings":";AAEa,MAAA,mBAAmB,cAAkC,MAAS;AAC3E,iBAAiB,cAAc;"}
@@ -1,9 +1,12 @@
1
- import { createElement } from "react";
2
1
  import { EntityKeyContext } from "./EntityKeyContext.js";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  function EntityKeyProvider(props) {
4
- return /* @__PURE__ */ createElement(EntityKeyContext.Provider, {
5
- value: props.entityKey
6
- }, props.children);
4
+ return /* @__PURE__ */ jsx(EntityKeyContext.Provider, {
5
+ value: props.entityKey,
6
+ children: props.children
7
+ });
7
8
  }
8
- export { EntityKeyProvider };
9
+ export {
10
+ EntityKeyProvider
11
+ };
9
12
  //# sourceMappingURL=EntityKeyProvider.js.map
@@ -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":["_jsx"],"mappings":";;AAQO,2BAA2B,OAA+B;AACzD,SAAAA,8BAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO,MAAM;AAAA,EAAA,GAAY,MAAM,QAAS;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":["EntityKeyProvider","props","_jsx","entityKey","children"],"mappings":";;AAQO,SAASA,kBAAkBC,OAA+B;AACzD,SAAAC,oBAAC,iBAAiB,UAAQ;AAAA,IAAC,OAAOD,MAAME;AAAAA,IAAU,UAAEF,MAAMG;AAAAA,EAAAA,CAAqC;AACvG;"}
@@ -1,6 +1,57 @@
1
- import { createContext } from "react";
1
+ import { createContext, useCallback } from "react";
2
+ import { useEnvironment } from "./useEnvironment.js";
3
+ import { jsx, Fragment } from "react/jsx-runtime";
2
4
  import { Environment } from "../dao/Environment.js";
5
+ import { Component } from "../coreComponents/Component.js";
3
6
  const EnvironmentContext = createContext(Environment.create());
4
7
  EnvironmentContext.displayName = "EnvironmentContext";
5
- export { EnvironmentContext };
8
+ const EnvironmentMiddleware = Component(({
9
+ children,
10
+ create
11
+ }) => {
12
+ const env = useEnvironment();
13
+ return /* @__PURE__ */ jsx(EnvironmentContext.Provider, {
14
+ value: create(env),
15
+ children
16
+ });
17
+ }, {
18
+ staticRender: ({
19
+ children
20
+ }) => {
21
+ return /* @__PURE__ */ jsx(Fragment, {
22
+ children
23
+ });
24
+ },
25
+ generateEnvironment: ({
26
+ create
27
+ }, env) => {
28
+ return create(env);
29
+ }
30
+ });
31
+ const EnvironmentExtensionProvider = Component(({
32
+ children,
33
+ extension,
34
+ state
35
+ }) => {
36
+ const create = useCallback((env) => env.withExtension(extension, state), [extension, state]);
37
+ return /* @__PURE__ */ jsx(EnvironmentMiddleware, {
38
+ create,
39
+ children
40
+ });
41
+ }, ({
42
+ children,
43
+ extension,
44
+ state
45
+ }) => {
46
+ const create = (env) => env.withExtension(extension, state);
47
+ return /* @__PURE__ */ jsx(EnvironmentMiddleware, {
48
+ create,
49
+ children
50
+ });
51
+ });
52
+ export {
53
+ EnvironmentContext,
54
+ EnvironmentExtensionProvider,
55
+ EnvironmentMiddleware
56
+ };
6
57
  //# sourceMappingURL=EnvironmentContext.js.map