@contember/binding 1.0.0-alpha.8 → 1.0.0-rc.4

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 (806) hide show
  1. package/dist/development/accessors/FieldAccessor.js +2 -1
  2. package/dist/development/accessors/FieldAccessor.js.map +1 -1
  3. package/dist/development/core/DataBinding.js +6 -2
  4. package/dist/development/core/DataBinding.js.map +1 -1
  5. package/dist/development/core/StateInitializer.js +8 -1
  6. package/dist/development/core/StateInitializer.js.map +1 -1
  7. package/dist/production/accessors/FieldAccessor.js +2 -1
  8. package/dist/production/accessors/FieldAccessor.js.map +1 -1
  9. package/dist/production/core/DataBinding.js +6 -2
  10. package/dist/production/core/DataBinding.js.map +1 -1
  11. package/dist/production/core/StateInitializer.js +8 -1
  12. package/dist/production/core/StateInitializer.js.map +1 -1
  13. package/dist/types/BindingError.d.ts +4 -0
  14. package/dist/types/BindingError.d.ts.map +1 -0
  15. package/dist/types/accessorPropagation/AccessorProvider.d.ts +8 -0
  16. package/dist/types/accessorPropagation/AccessorProvider.d.ts.map +1 -0
  17. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +5 -0
  18. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -0
  19. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts +8 -0
  20. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts.map +1 -0
  21. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +3 -0
  22. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -0
  23. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts +7 -0
  24. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts.map +1 -0
  25. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +4 -0
  26. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -0
  27. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +3 -0
  28. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -0
  29. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts +8 -0
  30. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts.map +1 -0
  31. package/dist/types/accessorPropagation/index.d.ts +27 -0
  32. package/dist/types/accessorPropagation/index.d.ts.map +1 -0
  33. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts +16 -0
  34. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +1 -0
  35. package/dist/types/accessorPropagation/useBindingOperations.d.ts +3 -0
  36. package/dist/types/accessorPropagation/useBindingOperations.d.ts.map +1 -0
  37. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts +11 -0
  38. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +1 -0
  39. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts +11 -0
  40. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +1 -0
  41. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts +11 -0
  42. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +1 -0
  43. package/dist/types/accessorPropagation/useEntity.d.ts +7 -0
  44. package/dist/types/accessorPropagation/useEntity.d.ts.map +1 -0
  45. package/dist/types/accessorPropagation/useEntityKey.d.ts +2 -0
  46. package/dist/types/accessorPropagation/useEntityKey.d.ts.map +1 -0
  47. package/dist/types/accessorPropagation/useEntityList.d.ts +6 -0
  48. package/dist/types/accessorPropagation/useEntityList.d.ts.map +1 -0
  49. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts +4 -0
  50. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts.map +1 -0
  51. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts +5 -0
  52. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts.map +1 -0
  53. package/dist/types/accessorPropagation/useEntitySubTree.d.ts +4 -0
  54. package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +1 -0
  55. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts +5 -0
  56. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts.map +1 -0
  57. package/dist/types/accessorPropagation/useEnvironment.d.ts +3 -0
  58. package/dist/types/accessorPropagation/useEnvironment.d.ts.map +1 -0
  59. package/dist/types/accessorPropagation/useField.d.ts +6 -0
  60. package/dist/types/accessorPropagation/useField.d.ts.map +1 -0
  61. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts +3 -0
  62. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts.map +1 -0
  63. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +4 -0
  64. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +1 -0
  65. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +4 -0
  66. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +1 -0
  67. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts +3 -0
  68. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts.map +1 -0
  69. package/dist/types/accessorPropagation/useHasEntity.d.ts +2 -0
  70. package/dist/types/accessorPropagation/useHasEntity.d.ts.map +1 -0
  71. package/dist/types/accessorPropagation/usePersist.d.ts +3 -0
  72. package/dist/types/accessorPropagation/usePersist.d.ts.map +1 -0
  73. package/dist/types/accessorPropagation/useTreeRootId.d.ts +3 -0
  74. package/dist/types/accessorPropagation/useTreeRootId.d.ts.map +1 -0
  75. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +10 -0
  76. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -0
  77. package/dist/types/accessorSorting/SortedEntities.d.ts +9 -0
  78. package/dist/types/accessorSorting/SortedEntities.d.ts.map +1 -0
  79. package/dist/types/accessorSorting/addEntityAtIndex.d.ts +4 -0
  80. package/dist/types/accessorSorting/addEntityAtIndex.d.ts.map +1 -0
  81. package/dist/types/accessorSorting/errors.d.ts +6 -0
  82. package/dist/types/accessorSorting/errors.d.ts.map +1 -0
  83. package/dist/types/accessorSorting/index.d.ts +8 -0
  84. package/dist/types/accessorSorting/index.d.ts.map +1 -0
  85. package/dist/types/accessorSorting/moveEntity.d.ts +5 -0
  86. package/dist/types/accessorSorting/moveEntity.d.ts.map +1 -0
  87. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts +4 -0
  88. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts.map +1 -0
  89. package/dist/types/accessorSorting/sortEntities.d.ts +4 -0
  90. package/dist/types/accessorSorting/sortEntities.d.ts.map +1 -0
  91. package/dist/types/accessorSorting/useSortedEntities.d.ts +5 -0
  92. package/dist/types/accessorSorting/useSortedEntities.d.ts.map +1 -0
  93. package/dist/types/accessorTree/AccessorTree.d.ts +11 -0
  94. package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -0
  95. package/dist/types/accessorTree/AccessorTreeState.d.ts +15 -0
  96. package/dist/types/accessorTree/AccessorTreeState.d.ts.map +1 -0
  97. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts +12 -0
  98. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -0
  99. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts +4 -0
  100. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts.map +1 -0
  101. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts +7 -0
  102. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +1 -0
  103. package/dist/types/accessorTree/DirtinessContext.d.ts +3 -0
  104. package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -0
  105. package/dist/types/accessorTree/MutationRequestResponse.d.ts +44 -0
  106. package/dist/types/accessorTree/MutationRequestResponse.d.ts.map +1 -0
  107. package/dist/types/accessorTree/MutationStateContext.d.ts +3 -0
  108. package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -0
  109. package/dist/types/accessorTree/NormalizedPersistedData.d.ts +13 -0
  110. package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +1 -0
  111. package/dist/types/accessorTree/PersistResult.d.ts +24 -0
  112. package/dist/types/accessorTree/PersistResult.d.ts.map +1 -0
  113. package/dist/types/accessorTree/QueryRequestResponse.d.ts +15 -0
  114. package/dist/types/accessorTree/QueryRequestResponse.d.ts.map +1 -0
  115. package/dist/types/accessorTree/RequestError.d.ts +13 -0
  116. package/dist/types/accessorTree/RequestError.d.ts.map +1 -0
  117. package/dist/types/accessorTree/RuntimeId.d.ts +25 -0
  118. package/dist/types/accessorTree/RuntimeId.d.ts.map +1 -0
  119. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts +4 -0
  120. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +1 -0
  121. package/dist/types/accessorTree/index.d.ts +19 -0
  122. package/dist/types/accessorTree/index.d.ts.map +1 -0
  123. package/dist/types/accessorTree/metadataToRequestError.d.ts +4 -0
  124. package/dist/types/accessorTree/metadataToRequestError.d.ts.map +1 -0
  125. package/dist/types/accessorTree/useDataBinding.d.ts +4 -0
  126. package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -0
  127. package/dist/types/accessorTree/useDirtinessState.d.ts +2 -0
  128. package/dist/types/accessorTree/useDirtinessState.d.ts.map +1 -0
  129. package/dist/types/accessorTree/useMutationState.d.ts +2 -0
  130. package/dist/types/accessorTree/useMutationState.d.ts.map +1 -0
  131. package/dist/types/accessors/AsyncBatchUpdatesOptions.d.ts +8 -0
  132. package/dist/types/accessors/AsyncBatchUpdatesOptions.d.ts.map +1 -0
  133. package/dist/types/accessors/BatchUpdatesOptions.d.ts +9 -0
  134. package/dist/types/accessors/BatchUpdatesOptions.d.ts.map +1 -0
  135. package/dist/types/accessors/BindingConfig.d.ts +8 -0
  136. package/dist/types/accessors/BindingConfig.d.ts.map +1 -0
  137. package/dist/types/accessors/BindingOperations.d.ts +12 -0
  138. package/dist/types/accessors/BindingOperations.d.ts.map +1 -0
  139. package/dist/types/accessors/EntityAccessor.d.ts +90 -0
  140. package/dist/types/accessors/EntityAccessor.d.ts.map +1 -0
  141. package/dist/types/accessors/EntityListAccessor.d.ts +84 -0
  142. package/dist/types/accessors/EntityListAccessor.d.ts.map +1 -0
  143. package/dist/types/accessors/ErrorAccessor.d.ts +26 -0
  144. package/dist/types/accessors/ErrorAccessor.d.ts.map +1 -0
  145. package/dist/types/accessors/Errorable.d.ts +5 -0
  146. package/dist/types/accessors/Errorable.d.ts.map +1 -0
  147. package/dist/types/accessors/ExtendTree.d.ts +9 -0
  148. package/dist/types/accessors/ExtendTree.d.ts.map +1 -0
  149. package/dist/types/accessors/FieldAccessor.d.ts +55 -0
  150. package/dist/types/accessors/FieldAccessor.d.ts.map +1 -0
  151. package/dist/types/accessors/GetEntityByKey.d.ts +3 -0
  152. package/dist/types/accessors/GetEntityByKey.d.ts.map +1 -0
  153. package/dist/types/accessors/GetEntityListSubTree.d.ts +5 -0
  154. package/dist/types/accessors/GetEntityListSubTree.d.ts.map +1 -0
  155. package/dist/types/accessors/GetEntitySubTree.d.ts +5 -0
  156. package/dist/types/accessors/GetEntitySubTree.d.ts.map +1 -0
  157. package/dist/types/accessors/Persist.d.ts +10 -0
  158. package/dist/types/accessors/Persist.d.ts.map +1 -0
  159. package/dist/types/accessors/PersistErrorOptions.d.ts +10 -0
  160. package/dist/types/accessors/PersistErrorOptions.d.ts.map +1 -0
  161. package/dist/types/accessors/PersistSuccessOptions.d.ts +5 -0
  162. package/dist/types/accessors/PersistSuccessOptions.d.ts.map +1 -0
  163. package/dist/types/accessors/TreeRootAccessor.d.ts +11 -0
  164. package/dist/types/accessors/TreeRootAccessor.d.ts.map +1 -0
  165. package/dist/types/accessors/index.d.ts +18 -0
  166. package/dist/types/accessors/index.d.ts.map +1 -0
  167. package/dist/types/bindingTypes.d.ts +4 -0
  168. package/dist/types/bindingTypes.d.ts.map +1 -0
  169. package/dist/types/core/AccessorErrorManager.d.ts +24 -0
  170. package/dist/types/core/AccessorErrorManager.d.ts.map +1 -0
  171. package/dist/types/core/Config.d.ts +9 -0
  172. package/dist/types/core/Config.d.ts.map +1 -0
  173. package/dist/types/core/DataBinding.d.ts +37 -0
  174. package/dist/types/core/DataBinding.d.ts.map +1 -0
  175. package/dist/types/core/DirtinessTracker.d.ts +12 -0
  176. package/dist/types/core/DirtinessTracker.d.ts.map +1 -0
  177. package/dist/types/core/ErrorsPreprocessor.d.ts +33 -0
  178. package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -0
  179. package/dist/types/core/EventManager.d.ts +56 -0
  180. package/dist/types/core/EventManager.d.ts.map +1 -0
  181. package/dist/types/core/IncrementalMarkerBuilder.d.ts +7 -0
  182. package/dist/types/core/IncrementalMarkerBuilder.d.ts.map +1 -0
  183. package/dist/types/core/MarkerComparator.d.ts +8 -0
  184. package/dist/types/core/MarkerComparator.d.ts.map +1 -0
  185. package/dist/types/core/MarkerMerger.d.ts +22 -0
  186. package/dist/types/core/MarkerMerger.d.ts.map +1 -0
  187. package/dist/types/core/MarkerTreeGenerator.d.ts +14 -0
  188. package/dist/types/core/MarkerTreeGenerator.d.ts.map +1 -0
  189. package/dist/types/core/MutationGenerator.d.ts +18 -0
  190. package/dist/types/core/MutationGenerator.d.ts.map +1 -0
  191. package/dist/types/core/QueryGenerator.d.ts +14 -0
  192. package/dist/types/core/QueryGenerator.d.ts.map +1 -0
  193. package/dist/types/core/RealmKeyGenerator.d.ts +11 -0
  194. package/dist/types/core/RealmKeyGenerator.d.ts.map +1 -0
  195. package/dist/types/core/RequestResponseNormalizer.d.ts +11 -0
  196. package/dist/types/core/RequestResponseNormalizer.d.ts.map +1 -0
  197. package/dist/types/core/StateInitializer.d.ts +38 -0
  198. package/dist/types/core/StateInitializer.d.ts.map +1 -0
  199. package/dist/types/core/TreeAugmenter.d.ts +20 -0
  200. package/dist/types/core/TreeAugmenter.d.ts.map +1 -0
  201. package/dist/types/core/TreeFilterGenerator.d.ts +13 -0
  202. package/dist/types/core/TreeFilterGenerator.d.ts.map +1 -0
  203. package/dist/types/core/TreeParameterMerger.d.ts +20 -0
  204. package/dist/types/core/TreeParameterMerger.d.ts.map +1 -0
  205. package/dist/types/core/TreeStore.d.ts +32 -0
  206. package/dist/types/core/TreeStore.d.ts.map +1 -0
  207. package/dist/types/core/UpdateMetadata.d.ts +4 -0
  208. package/dist/types/core/UpdateMetadata.d.ts.map +1 -0
  209. package/dist/types/core/VariableInputTransformer.d.ts +7 -0
  210. package/dist/types/core/VariableInputTransformer.d.ts.map +1 -0
  211. package/dist/types/core/exceptions/ErrorLocator.d.ts +8 -0
  212. package/dist/types/core/exceptions/ErrorLocator.d.ts.map +1 -0
  213. package/dist/types/core/exceptions/LocalizedBindingError.d.ts +9 -0
  214. package/dist/types/core/exceptions/LocalizedBindingError.d.ts.map +1 -0
  215. package/dist/types/core/exceptions/MarkerSugarer.d.ts +10 -0
  216. package/dist/types/core/exceptions/MarkerSugarer.d.ts.map +1 -0
  217. package/dist/types/core/exceptions/RawMarkerPath.d.ts +3 -0
  218. package/dist/types/core/exceptions/RawMarkerPath.d.ts.map +1 -0
  219. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts +11 -0
  220. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts.map +1 -0
  221. package/dist/types/core/exceptions/index.d.ts +6 -0
  222. package/dist/types/core/exceptions/index.d.ts.map +1 -0
  223. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts +5 -0
  224. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts.map +1 -0
  225. package/dist/types/core/factories/index.d.ts +2 -0
  226. package/dist/types/core/factories/index.d.ts.map +1 -0
  227. package/dist/types/core/index.d.ts +6 -0
  228. package/dist/types/core/index.d.ts.map +1 -0
  229. package/dist/types/core/operations/EntityOperations.d.ts +26 -0
  230. package/dist/types/core/operations/EntityOperations.d.ts.map +1 -0
  231. package/dist/types/core/operations/FieldOperations.d.ts +22 -0
  232. package/dist/types/core/operations/FieldOperations.d.ts.map +1 -0
  233. package/dist/types/core/operations/ListOperations.d.ts +32 -0
  234. package/dist/types/core/operations/ListOperations.d.ts.map +1 -0
  235. package/dist/types/core/operations/OperationsHelpers.d.ts +14 -0
  236. package/dist/types/core/operations/OperationsHelpers.d.ts.map +1 -0
  237. package/dist/types/core/operations/index.d.ts +4 -0
  238. package/dist/types/core/operations/index.d.ts.map +1 -0
  239. package/dist/types/core/requestAliases/MutationAlias.d.ts +9 -0
  240. package/dist/types/core/requestAliases/MutationAlias.d.ts.map +1 -0
  241. package/dist/types/core/requestAliases/TopLevelMutationOperation.d.ts +11 -0
  242. package/dist/types/core/requestAliases/TopLevelMutationOperation.d.ts.map +1 -0
  243. package/dist/types/core/requestAliases/index.d.ts +5 -0
  244. package/dist/types/core/requestAliases/index.d.ts.map +1 -0
  245. package/dist/types/core/requestAliases/mutationOperationSubTreeType.d.ts +5 -0
  246. package/dist/types/core/requestAliases/mutationOperationSubTreeType.d.ts.map +1 -0
  247. package/dist/types/core/requestAliases/mutationOperationType.d.ts +6 -0
  248. package/dist/types/core/requestAliases/mutationOperationType.d.ts.map +1 -0
  249. package/dist/types/core/schema/RawSchema.d.ts +7 -0
  250. package/dist/types/core/schema/RawSchema.d.ts.map +1 -0
  251. package/dist/types/core/schema/RawSchemaEntity.d.ts +12 -0
  252. package/dist/types/core/schema/RawSchemaEntity.d.ts.map +1 -0
  253. package/dist/types/core/schema/RawSchemaEnum.d.ts +6 -0
  254. package/dist/types/core/schema/RawSchemaEnum.d.ts.map +1 -0
  255. package/dist/types/core/schema/Schema.d.ts +9 -0
  256. package/dist/types/core/schema/Schema.d.ts.map +1 -0
  257. package/dist/types/core/schema/SchemaColumn.d.ts +12 -0
  258. package/dist/types/core/schema/SchemaColumn.d.ts.map +1 -0
  259. package/dist/types/core/schema/SchemaColumnType.d.ts +3 -0
  260. package/dist/types/core/schema/SchemaColumnType.d.ts.map +1 -0
  261. package/dist/types/core/schema/SchemaEntities.d.ts +4 -0
  262. package/dist/types/core/schema/SchemaEntities.d.ts.map +1 -0
  263. package/dist/types/core/schema/SchemaEntity.d.ts +10 -0
  264. package/dist/types/core/schema/SchemaEntity.d.ts.map +1 -0
  265. package/dist/types/core/schema/SchemaEnums.d.ts +4 -0
  266. package/dist/types/core/schema/SchemaEnums.d.ts.map +1 -0
  267. package/dist/types/core/schema/SchemaField.d.ts +4 -0
  268. package/dist/types/core/schema/SchemaField.d.ts.map +1 -0
  269. package/dist/types/core/schema/SchemaFields.d.ts +4 -0
  270. package/dist/types/core/schema/SchemaFields.d.ts.map +1 -0
  271. package/dist/types/core/schema/SchemaLoader.d.ts +7 -0
  272. package/dist/types/core/schema/SchemaLoader.d.ts.map +1 -0
  273. package/dist/types/core/schema/SchemaPreprocessor.d.ts +9 -0
  274. package/dist/types/core/schema/SchemaPreprocessor.d.ts.map +1 -0
  275. package/dist/types/core/schema/SchemaRelation.d.ts +24 -0
  276. package/dist/types/core/schema/SchemaRelation.d.ts.map +1 -0
  277. package/dist/types/core/schema/SchemaRelationOrderBy.d.ts +5 -0
  278. package/dist/types/core/schema/SchemaRelationOrderBy.d.ts.map +1 -0
  279. package/dist/types/core/schema/SchemaStore.d.ts +7 -0
  280. package/dist/types/core/schema/SchemaStore.d.ts.map +1 -0
  281. package/dist/types/core/schema/SchemaUniqueConstraint.d.ts +5 -0
  282. package/dist/types/core/schema/SchemaUniqueConstraint.d.ts.map +1 -0
  283. package/dist/types/core/schema/SchemaValidator.d.ts +14 -0
  284. package/dist/types/core/schema/SchemaValidator.d.ts.map +1 -0
  285. package/dist/types/core/schema/index.d.ts +15 -0
  286. package/dist/types/core/schema/index.d.ts.map +1 -0
  287. package/dist/types/core/state/EntityListState.d.ts +27 -0
  288. package/dist/types/core/state/EntityListState.d.ts.map +1 -0
  289. package/dist/types/core/state/EntityRealmState.d.ts +44 -0
  290. package/dist/types/core/state/EntityRealmState.d.ts.map +1 -0
  291. package/dist/types/core/state/EntityState.d.ts +12 -0
  292. package/dist/types/core/state/EntityState.d.ts.map +1 -0
  293. package/dist/types/core/state/FieldState.d.ts +19 -0
  294. package/dist/types/core/state/FieldState.d.ts.map +1 -0
  295. package/dist/types/core/state/StateIterator.d.ts +14 -0
  296. package/dist/types/core/state/StateIterator.d.ts.map +1 -0
  297. package/dist/types/core/state/StateNode.d.ts +8 -0
  298. package/dist/types/core/state/StateNode.d.ts.map +1 -0
  299. package/dist/types/core/state/getEntityMarker.d.ts +3 -0
  300. package/dist/types/core/state/getEntityMarker.d.ts.map +1 -0
  301. package/dist/types/core/state/index.d.ts +8 -0
  302. package/dist/types/core/state/index.d.ts.map +1 -0
  303. package/dist/types/core/utils/getCombinedSignal.d.ts +2 -0
  304. package/dist/types/core/utils/getCombinedSignal.d.ts.map +1 -0
  305. package/dist/types/core/utils/index.d.ts +2 -0
  306. package/dist/types/core/utils/index.d.ts.map +1 -0
  307. package/dist/types/coreComponents/Component.d.ts +8 -0
  308. package/dist/types/coreComponents/Component.d.ts.map +1 -0
  309. package/dist/types/coreComponents/DataBindingProvider.d.ts +17 -0
  310. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -0
  311. package/dist/types/coreComponents/Entity.d.ts +9 -0
  312. package/dist/types/coreComponents/Entity.d.ts.map +1 -0
  313. package/dist/types/coreComponents/EntityList.d.ts +12 -0
  314. package/dist/types/coreComponents/EntityList.d.ts.map +1 -0
  315. package/dist/types/coreComponents/EntityListSubTree.d.ts +16 -0
  316. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -0
  317. package/dist/types/coreComponents/EntitySubTree.d.ts +14 -0
  318. package/dist/types/coreComponents/EntitySubTree.d.ts.map +1 -0
  319. package/dist/types/coreComponents/Field.d.ts +11 -0
  320. package/dist/types/coreComponents/Field.d.ts.map +1 -0
  321. package/dist/types/coreComponents/HasMany.d.ts +13 -0
  322. package/dist/types/coreComponents/HasMany.d.ts.map +1 -0
  323. package/dist/types/coreComponents/HasOne.d.ts +9 -0
  324. package/dist/types/coreComponents/HasOne.d.ts.map +1 -0
  325. package/dist/types/coreComponents/MarkerProvider.d.ts +21 -0
  326. package/dist/types/coreComponents/MarkerProvider.d.ts.map +1 -0
  327. package/dist/types/coreComponents/ParentEntity.d.ts +7 -0
  328. package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -0
  329. package/dist/types/coreComponents/index.d.ts +12 -0
  330. package/dist/types/coreComponents/index.d.ts.map +1 -0
  331. package/dist/types/dao/Environment.d.ts +55 -0
  332. package/dist/types/dao/Environment.d.ts.map +1 -0
  333. package/dist/types/dao/VariableFieldValue.d.ts +5 -0
  334. package/dist/types/dao/VariableFieldValue.d.ts.map +1 -0
  335. package/dist/types/dao/index.d.ts +3 -0
  336. package/dist/types/dao/index.d.ts.map +1 -0
  337. package/dist/types/entityEvents/index.d.ts +8 -0
  338. package/dist/types/entityEvents/index.d.ts.map +1 -0
  339. package/dist/types/entityEvents/useDerivedField.d.ts +9 -0
  340. package/dist/types/entityEvents/useDerivedField.d.ts.map +1 -0
  341. package/dist/types/entityEvents/useEntityBeforePersist.d.ts +3 -0
  342. package/dist/types/entityEvents/useEntityBeforePersist.d.ts.map +1 -0
  343. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts +3 -0
  344. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts.map +1 -0
  345. package/dist/types/entityEvents/useEntityEvent.d.ts +9 -0
  346. package/dist/types/entityEvents/useEntityEvent.d.ts.map +1 -0
  347. package/dist/types/entityEvents/useEntityPersistError.d.ts +3 -0
  348. package/dist/types/entityEvents/useEntityPersistError.d.ts.map +1 -0
  349. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts +3 -0
  350. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts.map +1 -0
  351. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts +4 -0
  352. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts.map +1 -0
  353. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts +7 -0
  354. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts.map +1 -0
  355. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts +10 -0
  356. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -0
  357. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts +10 -0
  358. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -0
  359. package/dist/types/fieldHelpers/helpers/index.d.ts +3 -0
  360. package/dist/types/fieldHelpers/helpers/index.d.ts.map +1 -0
  361. package/dist/types/fieldHelpers/index.d.ts +2 -0
  362. package/dist/types/fieldHelpers/index.d.ts.map +1 -0
  363. package/dist/types/helperComponents/DeferredSubTrees.d.ts +7 -0
  364. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -0
  365. package/dist/types/helperComponents/EntityView.d.ts +9 -0
  366. package/dist/types/helperComponents/EntityView.d.ts.map +1 -0
  367. package/dist/types/helperComponents/FieldView.d.ts +46 -0
  368. package/dist/types/helperComponents/FieldView.d.ts.map +1 -0
  369. package/dist/types/helperComponents/StaticRender.d.ts +6 -0
  370. package/dist/types/helperComponents/StaticRender.d.ts.map +1 -0
  371. package/dist/types/helperComponents/SugaredField.d.ts +9 -0
  372. package/dist/types/helperComponents/SugaredField.d.ts.map +1 -0
  373. package/dist/types/helperComponents/index.d.ts +6 -0
  374. package/dist/types/helperComponents/index.d.ts.map +1 -0
  375. package/dist/types/index.d.ts +17 -0
  376. package/dist/types/index.d.ts.map +1 -0
  377. package/dist/types/markers/EntityFieldMarkers.d.ts +7 -0
  378. package/dist/types/markers/EntityFieldMarkers.d.ts.map +1 -0
  379. package/dist/types/markers/EntityFieldMarkersContainer.d.ts +13 -0
  380. package/dist/types/markers/EntityFieldMarkersContainer.d.ts.map +1 -0
  381. package/dist/types/markers/EntityFieldPlaceholders.d.ts +3 -0
  382. package/dist/types/markers/EntityFieldPlaceholders.d.ts.map +1 -0
  383. package/dist/types/markers/EntityFieldsWithHoistablesMarker.d.ts +10 -0
  384. package/dist/types/markers/EntityFieldsWithHoistablesMarker.d.ts.map +1 -0
  385. package/dist/types/markers/EntityListSubTreeMarker.d.ts +12 -0
  386. package/dist/types/markers/EntityListSubTreeMarker.d.ts.map +1 -0
  387. package/dist/types/markers/EntitySubTreeMarker.d.ts +12 -0
  388. package/dist/types/markers/EntitySubTreeMarker.d.ts.map +1 -0
  389. package/dist/types/markers/FieldMarker.d.ts +14 -0
  390. package/dist/types/markers/FieldMarker.d.ts.map +1 -0
  391. package/dist/types/markers/HasManyRelationMarker.d.ts +12 -0
  392. package/dist/types/markers/HasManyRelationMarker.d.ts.map +1 -0
  393. package/dist/types/markers/HasOneRelationMarker.d.ts +12 -0
  394. package/dist/types/markers/HasOneRelationMarker.d.ts.map +1 -0
  395. package/dist/types/markers/MarkerTreeRoot.d.ts +8 -0
  396. package/dist/types/markers/MarkerTreeRoot.d.ts.map +1 -0
  397. package/dist/types/markers/MeaningfulMarker.d.ts +7 -0
  398. package/dist/types/markers/MeaningfulMarker.d.ts.map +1 -0
  399. package/dist/types/markers/ParentEntityMarker.d.ts +8 -0
  400. package/dist/types/markers/ParentEntityMarker.d.ts.map +1 -0
  401. package/dist/types/markers/PlaceholderGenerator.d.ts +9 -0
  402. package/dist/types/markers/PlaceholderGenerator.d.ts.map +1 -0
  403. package/dist/types/markers/SubTreeMarkers.d.ts +5 -0
  404. package/dist/types/markers/SubTreeMarkers.d.ts.map +1 -0
  405. package/dist/types/markers/index.d.ts +15 -0
  406. package/dist/types/markers/index.d.ts.map +1 -0
  407. package/dist/types/queryLanguage/CacheStore.d.ts +9 -0
  408. package/dist/types/queryLanguage/CacheStore.d.ts.map +1 -0
  409. package/dist/types/queryLanguage/MarkerFactory.d.ts +21 -0
  410. package/dist/types/queryLanguage/MarkerFactory.d.ts.map +1 -0
  411. package/dist/types/queryLanguage/Parser.d.ts +81 -0
  412. package/dist/types/queryLanguage/Parser.d.ts.map +1 -0
  413. package/dist/types/queryLanguage/ParserResults.d.ts +63 -0
  414. package/dist/types/queryLanguage/ParserResults.d.ts.map +1 -0
  415. package/dist/types/queryLanguage/QueryLanguage.d.ts +44 -0
  416. package/dist/types/queryLanguage/QueryLanguage.d.ts.map +1 -0
  417. package/dist/types/queryLanguage/QueryLanguageError.d.ts +3 -0
  418. package/dist/types/queryLanguage/QueryLanguageError.d.ts.map +1 -0
  419. package/dist/types/queryLanguage/index.d.ts +6 -0
  420. package/dist/types/queryLanguage/index.d.ts.map +1 -0
  421. package/dist/types/queryLanguage/tokenList.d.ts +34 -0
  422. package/dist/types/queryLanguage/tokenList.d.ts.map +1 -0
  423. package/dist/types/structures/BijectiveIndexedMap.d.ts +24 -0
  424. package/dist/types/structures/BijectiveIndexedMap.d.ts.map +1 -0
  425. package/dist/types/structures/LRUCache.d.ts +9 -0
  426. package/dist/types/structures/LRUCache.d.ts.map +1 -0
  427. package/dist/types/structures/WeakIdCache.d.ts +9 -0
  428. package/dist/types/structures/WeakIdCache.d.ts.map +1 -0
  429. package/dist/types/structures/index.d.ts +4 -0
  430. package/dist/types/structures/index.d.ts.map +1 -0
  431. package/dist/types/treeParameterHelpers/index.d.ts +2 -0
  432. package/dist/types/treeParameterHelpers/index.d.ts.map +1 -0
  433. package/dist/types/treeParameterHelpers/wrapFilterInHasOnes.d.ts +3 -0
  434. package/dist/types/treeParameterHelpers/wrapFilterInHasOnes.d.ts.map +1 -0
  435. package/dist/types/treeParameters/AnyField.d.ts +8 -0
  436. package/dist/types/treeParameters/AnyField.d.ts.map +1 -0
  437. package/dist/types/treeParameters/EntityCreationParameters.d.ts +13 -0
  438. package/dist/types/treeParameters/EntityCreationParameters.d.ts.map +1 -0
  439. package/dist/types/treeParameters/EntityListEventListeners.d.ts +15 -0
  440. package/dist/types/treeParameters/EntityListEventListeners.d.ts.map +1 -0
  441. package/dist/types/treeParameters/EntityListParameters.d.ts +17 -0
  442. package/dist/types/treeParameters/EntityListParameters.d.ts.map +1 -0
  443. package/dist/types/treeParameters/EntityListPreferences.d.ts +8 -0
  444. package/dist/types/treeParameters/EntityListPreferences.d.ts.map +1 -0
  445. package/dist/types/treeParameters/EventListenersStore.d.ts +32 -0
  446. package/dist/types/treeParameters/EventListenersStore.d.ts.map +1 -0
  447. package/dist/types/treeParameters/FieldEventListeners.d.ts +13 -0
  448. package/dist/types/treeParameters/FieldEventListeners.d.ts.map +1 -0
  449. package/dist/types/treeParameters/HasManyRelation.d.ts +10 -0
  450. package/dist/types/treeParameters/HasManyRelation.d.ts.map +1 -0
  451. package/dist/types/treeParameters/HasOneRelation.d.ts +13 -0
  452. package/dist/types/treeParameters/HasOneRelation.d.ts.map +1 -0
  453. package/dist/types/treeParameters/LeafField.d.ts +14 -0
  454. package/dist/types/treeParameters/LeafField.d.ts.map +1 -0
  455. package/dist/types/treeParameters/ParentEntityParameters.d.ts +8 -0
  456. package/dist/types/treeParameters/ParentEntityParameters.d.ts.map +1 -0
  457. package/dist/types/treeParameters/QualifiedEntityList.d.ts +19 -0
  458. package/dist/types/treeParameters/QualifiedEntityList.d.ts.map +1 -0
  459. package/dist/types/treeParameters/QualifiedEntityParameters.d.ts +17 -0
  460. package/dist/types/treeParameters/QualifiedEntityParameters.d.ts.map +1 -0
  461. package/dist/types/treeParameters/QualifiedFieldList.d.ts +17 -0
  462. package/dist/types/treeParameters/QualifiedFieldList.d.ts.map +1 -0
  463. package/dist/types/treeParameters/QualifiedSingleEntity.d.ts +20 -0
  464. package/dist/types/treeParameters/QualifiedSingleEntity.d.ts.map +1 -0
  465. package/dist/types/treeParameters/QualifiedSingleEntityParameters.d.ts +8 -0
  466. package/dist/types/treeParameters/QualifiedSingleEntityParameters.d.ts.map +1 -0
  467. package/dist/types/treeParameters/Relation.d.ts +15 -0
  468. package/dist/types/treeParameters/Relation.d.ts.map +1 -0
  469. package/dist/types/treeParameters/RelativeEntityList.d.ts +19 -0
  470. package/dist/types/treeParameters/RelativeEntityList.d.ts.map +1 -0
  471. package/dist/types/treeParameters/RelativeSingleEntity.d.ts +13 -0
  472. package/dist/types/treeParameters/RelativeSingleEntity.d.ts.map +1 -0
  473. package/dist/types/treeParameters/RelativeSingleField.d.ts +15 -0
  474. package/dist/types/treeParameters/RelativeSingleField.d.ts.map +1 -0
  475. package/dist/types/treeParameters/SetOnCreate.d.ts +4 -0
  476. package/dist/types/treeParameters/SetOnCreate.d.ts.map +1 -0
  477. package/dist/types/treeParameters/SingleEntityEventListeners.d.ts +16 -0
  478. package/dist/types/treeParameters/SingleEntityEventListeners.d.ts.map +1 -0
  479. package/dist/types/treeParameters/SingleEntityParameters.d.ts +8 -0
  480. package/dist/types/treeParameters/SingleEntityParameters.d.ts.map +1 -0
  481. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts +19 -0
  482. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +1 -0
  483. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts +18 -0
  484. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +1 -0
  485. package/dist/types/treeParameters/index.d.ts +27 -0
  486. package/dist/types/treeParameters/index.d.ts.map +1 -0
  487. package/dist/types/treeParameters/primitives/Alias.d.ts +2 -0
  488. package/dist/types/treeParameters/primitives/Alias.d.ts.map +1 -0
  489. package/dist/types/treeParameters/primitives/EntityId.d.ts +2 -0
  490. package/dist/types/treeParameters/primitives/EntityId.d.ts.map +1 -0
  491. package/dist/types/treeParameters/primitives/EntityName.d.ts +2 -0
  492. package/dist/types/treeParameters/primitives/EntityName.d.ts.map +1 -0
  493. package/dist/types/treeParameters/primitives/EntityRealmKey.d.ts +2 -0
  494. package/dist/types/treeParameters/primitives/EntityRealmKey.d.ts.map +1 -0
  495. package/dist/types/treeParameters/primitives/ExpectedEntityCount.d.ts +2 -0
  496. package/dist/types/treeParameters/primitives/ExpectedEntityCount.d.ts.map +1 -0
  497. package/dist/types/treeParameters/primitives/ExpectedQualifiedEntityMutation.d.ts +2 -0
  498. package/dist/types/treeParameters/primitives/ExpectedQualifiedEntityMutation.d.ts.map +1 -0
  499. package/dist/types/treeParameters/primitives/ExpectedRelationMutation.d.ts +2 -0
  500. package/dist/types/treeParameters/primitives/ExpectedRelationMutation.d.ts.map +1 -0
  501. package/dist/types/treeParameters/primitives/FieldName.d.ts +2 -0
  502. package/dist/types/treeParameters/primitives/FieldName.d.ts.map +1 -0
  503. package/dist/types/treeParameters/primitives/FieldValue.d.ts +5 -0
  504. package/dist/types/treeParameters/primitives/FieldValue.d.ts.map +1 -0
  505. package/dist/types/treeParameters/primitives/Filter.d.ts +4 -0
  506. package/dist/types/treeParameters/primitives/Filter.d.ts.map +1 -0
  507. package/dist/types/treeParameters/primitives/Limit.d.ts +2 -0
  508. package/dist/types/treeParameters/primitives/Limit.d.ts.map +1 -0
  509. package/dist/types/treeParameters/primitives/Offset.d.ts +2 -0
  510. package/dist/types/treeParameters/primitives/Offset.d.ts.map +1 -0
  511. package/dist/types/treeParameters/primitives/OrderBy.d.ts +4 -0
  512. package/dist/types/treeParameters/primitives/OrderBy.d.ts.map +1 -0
  513. package/dist/types/treeParameters/primitives/PlaceholderName.d.ts +2 -0
  514. package/dist/types/treeParameters/primitives/PlaceholderName.d.ts.map +1 -0
  515. package/dist/types/treeParameters/primitives/RemovalType.d.ts +2 -0
  516. package/dist/types/treeParameters/primitives/RemovalType.d.ts.map +1 -0
  517. package/dist/types/treeParameters/primitives/Scalar.d.ts +2 -0
  518. package/dist/types/treeParameters/primitives/Scalar.d.ts.map +1 -0
  519. package/dist/types/treeParameters/primitives/TreeRootId.d.ts +2 -0
  520. package/dist/types/treeParameters/primitives/TreeRootId.d.ts.map +1 -0
  521. package/dist/types/treeParameters/primitives/UniqueWhere.d.ts +4 -0
  522. package/dist/types/treeParameters/primitives/UniqueWhere.d.ts.map +1 -0
  523. package/dist/types/treeParameters/primitives/index.d.ts +19 -0
  524. package/dist/types/treeParameters/primitives/index.d.ts.map +1 -0
  525. package/dist/types/tsconfig.tsbuildinfo +1 -0
  526. package/dist/types/utils/Hashing.d.ts +10 -0
  527. package/dist/types/utils/Hashing.d.ts.map +1 -0
  528. package/dist/types/utils/assert.d.ts +2 -0
  529. package/dist/types/utils/assert.d.ts.map +1 -0
  530. package/dist/types/utils/assertNever.d.ts +2 -0
  531. package/dist/types/utils/assertNever.d.ts.map +1 -0
  532. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts +2 -0
  533. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts.map +1 -0
  534. package/dist/types/utils/index.d.ts +7 -0
  535. package/dist/types/utils/index.d.ts.map +1 -0
  536. package/dist/types/utils/isEmptyObject.d.ts +2 -0
  537. package/dist/types/utils/isEmptyObject.d.ts.map +1 -0
  538. package/dist/types/utils/ucfirst.d.ts +2 -0
  539. package/dist/types/utils/ucfirst.d.ts.map +1 -0
  540. package/package.json +8 -9
  541. package/src/BindingError.ts +5 -0
  542. package/src/accessorPropagation/AccessorProvider.tsx +17 -0
  543. package/src/accessorPropagation/BindingOperationsContext.ts +32 -0
  544. package/src/accessorPropagation/BindingOperationsProvider.tsx +16 -0
  545. package/src/accessorPropagation/EntityKeyContext.ts +4 -0
  546. package/src/accessorPropagation/EntityKeyProvider.tsx +11 -0
  547. package/src/accessorPropagation/EnvironmentContext.ts +5 -0
  548. package/src/accessorPropagation/TreeRootIdContext.ts +5 -0
  549. package/src/accessorPropagation/TreeRootIdProvider.tsx +12 -0
  550. package/src/accessorPropagation/index.ts +29 -0
  551. package/src/accessorPropagation/useAccessorUpdateSubscription.ts +107 -0
  552. package/src/accessorPropagation/useBindingOperations.ts +5 -0
  553. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +70 -0
  554. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +58 -0
  555. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +58 -0
  556. package/src/accessorPropagation/useEntity.ts +56 -0
  557. package/src/accessorPropagation/useEntityKey.ts +15 -0
  558. package/src/accessorPropagation/useEntityList.ts +49 -0
  559. package/src/accessorPropagation/useEntityListSubTree.ts +20 -0
  560. package/src/accessorPropagation/useEntityListSubTreeParameters.ts +88 -0
  561. package/src/accessorPropagation/useEntitySubTree.ts +19 -0
  562. package/src/accessorPropagation/useEntitySubTreeParameters.ts +66 -0
  563. package/src/accessorPropagation/useEnvironment.ts +7 -0
  564. package/src/accessorPropagation/useField.ts +51 -0
  565. package/src/accessorPropagation/useGetEntityByKey.ts +4 -0
  566. package/src/accessorPropagation/useGetEntityListSubTree.ts +28 -0
  567. package/src/accessorPropagation/useGetEntitySubTree.ts +28 -0
  568. package/src/accessorPropagation/useGetTreeFilters.ts +4 -0
  569. package/src/accessorPropagation/useHasEntity.ts +6 -0
  570. package/src/accessorPropagation/usePersist.ts +4 -0
  571. package/src/accessorPropagation/useTreeRootId.ts +5 -0
  572. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +92 -0
  573. package/src/accessorSorting/SortedEntities.ts +9 -0
  574. package/src/accessorSorting/addEntityAtIndex.ts +27 -0
  575. package/src/accessorSorting/errors.ts +18 -0
  576. package/src/accessorSorting/index.ts +9 -0
  577. package/src/accessorSorting/moveEntity.ts +66 -0
  578. package/src/accessorSorting/repairEntitiesOrder.ts +15 -0
  579. package/src/accessorSorting/sortEntities.ts +20 -0
  580. package/src/accessorSorting/useSortedEntities.ts +105 -0
  581. package/src/accessorTree/AccessorTree.tsx +34 -0
  582. package/src/accessorTree/AccessorTreeState.ts +18 -0
  583. package/src/accessorTree/AccessorTreeStateAction.ts +15 -0
  584. package/src/accessorTree/AccessorTreeStateMetadata.ts +3 -0
  585. package/src/accessorTree/AccessorTreeStateOptions.ts +7 -0
  586. package/src/accessorTree/DirtinessContext.ts +4 -0
  587. package/src/accessorTree/MutationRequestResponse.ts +55 -0
  588. package/src/accessorTree/MutationStateContext.ts +4 -0
  589. package/src/accessorTree/NormalizedPersistedData.ts +23 -0
  590. package/src/accessorTree/PersistResult.ts +30 -0
  591. package/src/accessorTree/QueryRequestResponse.ts +19 -0
  592. package/src/accessorTree/RequestError.ts +16 -0
  593. package/src/accessorTree/RuntimeId.ts +49 -0
  594. package/src/accessorTree/accessorTreeStateReducer.ts +27 -0
  595. package/src/accessorTree/index.ts +18 -0
  596. package/src/accessorTree/metadataToRequestError.ts +14 -0
  597. package/src/accessorTree/useDataBinding.ts +98 -0
  598. package/src/accessorTree/useDirtinessState.ts +4 -0
  599. package/src/accessorTree/useMutationState.ts +4 -0
  600. package/src/accessors/AsyncBatchUpdatesOptions.ts +8 -0
  601. package/src/accessors/BatchUpdatesOptions.ts +9 -0
  602. package/src/accessors/BindingConfig.ts +7 -0
  603. package/src/accessors/BindingOperations.ts +15 -0
  604. package/src/accessors/EntityAccessor.ts +259 -0
  605. package/src/accessors/EntityListAccessor.ts +173 -0
  606. package/src/accessors/ErrorAccessor.ts +39 -0
  607. package/src/accessors/Errorable.ts +5 -0
  608. package/src/accessors/ExtendTree.ts +10 -0
  609. package/src/accessors/FieldAccessor.ts +102 -0
  610. package/src/accessors/GetEntityByKey.ts +3 -0
  611. package/src/accessors/GetEntityListSubTree.ts +14 -0
  612. package/src/accessors/GetEntitySubTree.ts +14 -0
  613. package/src/accessors/Persist.ts +11 -0
  614. package/src/accessors/PersistErrorOptions.ts +12 -0
  615. package/src/accessors/PersistSuccessOptions.ts +5 -0
  616. package/src/accessors/TreeRootAccessor.ts +14 -0
  617. package/src/accessors/index.ts +17 -0
  618. package/src/ambient.d.ts +1 -0
  619. package/src/bindingTypes.ts +3 -0
  620. package/src/core/AccessorErrorManager.ts +231 -0
  621. package/src/core/Config.ts +29 -0
  622. package/src/core/DataBinding.ts +454 -0
  623. package/src/core/DirtinessTracker.ts +33 -0
  624. package/src/core/ErrorsPreprocessor.ts +240 -0
  625. package/src/core/EventManager.ts +580 -0
  626. package/src/core/IncrementalMarkerBuilder.ts +60 -0
  627. package/src/core/MarkerComparator.ts +102 -0
  628. package/src/core/MarkerMerger.ts +297 -0
  629. package/src/core/MarkerTreeGenerator.ts +121 -0
  630. package/src/core/MutationGenerator.ts +716 -0
  631. package/src/core/QueryGenerator.ts +173 -0
  632. package/src/core/RealmKeyGenerator.ts +54 -0
  633. package/src/core/RequestResponseNormalizer.ts +213 -0
  634. package/src/core/StateInitializer.ts +571 -0
  635. package/src/core/TreeAugmenter.ts +262 -0
  636. package/src/core/TreeFilterGenerator.ts +116 -0
  637. package/src/core/TreeParameterMerger.ts +374 -0
  638. package/src/core/TreeStore.ts +260 -0
  639. package/src/core/UpdateMetadata.ts +3 -0
  640. package/src/core/VariableInputTransformer.ts +23 -0
  641. package/src/core/exceptions/ErrorLocator.ts +58 -0
  642. package/src/core/exceptions/LocalizedBindingError.ts +20 -0
  643. package/src/core/exceptions/MarkerSugarer.ts +61 -0
  644. package/src/core/exceptions/RawMarkerPath.ts +3 -0
  645. package/src/core/exceptions/TreeParameterSugarer.ts +41 -0
  646. package/src/core/exceptions/index.ts +5 -0
  647. package/src/core/factories/createBatchUpdatesOptions.ts +38 -0
  648. package/src/core/factories/index.ts +1 -0
  649. package/src/core/index.ts +5 -0
  650. package/src/core/operations/EntityOperations.ts +310 -0
  651. package/src/core/operations/FieldOperations.ts +127 -0
  652. package/src/core/operations/ListOperations.ts +207 -0
  653. package/src/core/operations/OperationsHelpers.ts +150 -0
  654. package/src/core/operations/index.ts +3 -0
  655. package/src/core/requestAliases/MutationAlias.ts +66 -0
  656. package/src/core/requestAliases/TopLevelMutationOperation.ts +11 -0
  657. package/src/core/requestAliases/index.ts +4 -0
  658. package/src/core/requestAliases/mutationOperationSubTreeType.ts +4 -0
  659. package/src/core/requestAliases/mutationOperationType.ts +5 -0
  660. package/src/core/schema/RawSchema.ts +7 -0
  661. package/src/core/schema/RawSchemaEntity.ts +13 -0
  662. package/src/core/schema/RawSchemaEnum.ts +6 -0
  663. package/src/core/schema/Schema.ts +11 -0
  664. package/src/core/schema/SchemaColumn.ts +15 -0
  665. package/src/core/schema/SchemaColumnType.ts +3 -0
  666. package/src/core/schema/SchemaEntities.ts +4 -0
  667. package/src/core/schema/SchemaEntity.ts +10 -0
  668. package/src/core/schema/SchemaEnums.ts +3 -0
  669. package/src/core/schema/SchemaField.ts +4 -0
  670. package/src/core/schema/SchemaFields.ts +4 -0
  671. package/src/core/schema/SchemaLoader.ts +62 -0
  672. package/src/core/schema/SchemaPreprocessor.ts +51 -0
  673. package/src/core/schema/SchemaRelation.ts +29 -0
  674. package/src/core/schema/SchemaRelationOrderBy.ts +4 -0
  675. package/src/core/schema/SchemaStore.ts +8 -0
  676. package/src/core/schema/SchemaUniqueConstraint.ts +5 -0
  677. package/src/core/schema/SchemaValidator.ts +238 -0
  678. package/src/core/schema/index.ts +14 -0
  679. package/src/core/state/EntityListState.ts +37 -0
  680. package/src/core/state/EntityRealmState.ts +63 -0
  681. package/src/core/state/EntityState.ts +12 -0
  682. package/src/core/state/FieldState.ts +20 -0
  683. package/src/core/state/StateIterator.ts +122 -0
  684. package/src/core/state/StateNode.ts +8 -0
  685. package/src/core/state/getEntityMarker.ts +4 -0
  686. package/src/core/state/index.ts +7 -0
  687. package/src/core/utils/getCombinedSignal.ts +36 -0
  688. package/src/core/utils/index.ts +1 -0
  689. package/src/coreComponents/Component.tsx +61 -0
  690. package/src/coreComponents/DataBindingProvider.tsx +45 -0
  691. package/src/coreComponents/Entity.tsx +23 -0
  692. package/src/coreComponents/EntityList.tsx +52 -0
  693. package/src/coreComponents/EntityListSubTree.tsx +85 -0
  694. package/src/coreComponents/EntitySubTree.tsx +98 -0
  695. package/src/coreComponents/Field.tsx +39 -0
  696. package/src/coreComponents/HasMany.tsx +46 -0
  697. package/src/coreComponents/HasOne.tsx +39 -0
  698. package/src/coreComponents/MarkerProvider.ts +59 -0
  699. package/src/coreComponents/ParentEntity.tsx +17 -0
  700. package/src/coreComponents/index.ts +11 -0
  701. package/src/dao/Environment.ts +201 -0
  702. package/src/dao/VariableFieldValue.ts +3 -0
  703. package/src/dao/index.ts +2 -0
  704. package/src/entityEvents/index.ts +7 -0
  705. package/src/entityEvents/useDerivedField.ts +64 -0
  706. package/src/entityEvents/useEntityBeforePersist.ts +6 -0
  707. package/src/entityEvents/useEntityBeforeUpdate.ts +6 -0
  708. package/src/entityEvents/useEntityEvent.ts +57 -0
  709. package/src/entityEvents/useEntityPersistError.ts +6 -0
  710. package/src/entityEvents/useEntityPersistSuccess.ts +6 -0
  711. package/src/entityEvents/useOnConnectionUpdate.ts +10 -0
  712. package/src/fieldHelpers/helpers/FieldHelper.ts +10 -0
  713. package/src/fieldHelpers/helpers/TemporalFieldHelper.ts +21 -0
  714. package/src/fieldHelpers/helpers/UuidFieldHelper.ts +18 -0
  715. package/src/fieldHelpers/helpers/index.ts +2 -0
  716. package/src/fieldHelpers/index.ts +1 -0
  717. package/src/helperComponents/DeferredSubTrees.tsx +116 -0
  718. package/src/helperComponents/EntityView.tsx +16 -0
  719. package/src/helperComponents/FieldView.tsx +129 -0
  720. package/src/helperComponents/StaticRender.tsx +12 -0
  721. package/src/helperComponents/SugaredField.tsx +15 -0
  722. package/src/helperComponents/index.ts +5 -0
  723. package/src/index.ts +19 -0
  724. package/src/markers/EntityFieldMarkers.ts +7 -0
  725. package/src/markers/EntityFieldMarkersContainer.ts +45 -0
  726. package/src/markers/EntityFieldPlaceholders.ts +3 -0
  727. package/src/markers/EntityFieldsWithHoistablesMarker.ts +11 -0
  728. package/src/markers/EntityListSubTreeMarker.ts +20 -0
  729. package/src/markers/EntitySubTreeMarker.ts +20 -0
  730. package/src/markers/FieldMarker.ts +19 -0
  731. package/src/markers/HasManyRelationMarker.ts +27 -0
  732. package/src/markers/HasOneRelationMarker.ts +21 -0
  733. package/src/markers/MarkerTreeRoot.ts +9 -0
  734. package/src/markers/MeaningfulMarker.ts +12 -0
  735. package/src/markers/ParentEntityMarker.ts +9 -0
  736. package/src/markers/PlaceholderGenerator.ts +36 -0
  737. package/src/markers/SubTreeMarkers.ts +5 -0
  738. package/src/markers/index.ts +14 -0
  739. package/src/queryLanguage/CacheStore.ts +56 -0
  740. package/src/queryLanguage/MarkerFactory.ts +300 -0
  741. package/src/queryLanguage/Parser.ts +848 -0
  742. package/src/queryLanguage/ParserResults.ts +81 -0
  743. package/src/queryLanguage/QueryLanguage.ts +730 -0
  744. package/src/queryLanguage/QueryLanguageError.ts +1 -0
  745. package/src/queryLanguage/index.ts +5 -0
  746. package/src/queryLanguage/tokenList.ts +169 -0
  747. package/src/structures/BijectiveIndexedMap.ts +139 -0
  748. package/src/structures/LRUCache.ts +29 -0
  749. package/src/structures/WeakIdCache.ts +25 -0
  750. package/src/structures/index.ts +3 -0
  751. package/src/treeParameterHelpers/index.ts +1 -0
  752. package/src/treeParameterHelpers/wrapFilterInHasOnes.ts +21 -0
  753. package/src/treeParameters/AnyField.ts +9 -0
  754. package/src/treeParameters/EntityCreationParameters.ts +34 -0
  755. package/src/treeParameters/EntityListEventListeners.ts +20 -0
  756. package/src/treeParameters/EntityListParameters.ts +19 -0
  757. package/src/treeParameters/EntityListPreferences.ts +11 -0
  758. package/src/treeParameters/EventListenersStore.ts +81 -0
  759. package/src/treeParameters/FieldEventListeners.ts +22 -0
  760. package/src/treeParameters/HasManyRelation.ts +18 -0
  761. package/src/treeParameters/HasOneRelation.ts +21 -0
  762. package/src/treeParameters/LeafField.ts +18 -0
  763. package/src/treeParameters/ParentEntityParameters.ts +10 -0
  764. package/src/treeParameters/QualifiedEntityList.ts +43 -0
  765. package/src/treeParameters/QualifiedEntityParameters.ts +20 -0
  766. package/src/treeParameters/QualifiedFieldList.ts +36 -0
  767. package/src/treeParameters/QualifiedSingleEntity.ts +46 -0
  768. package/src/treeParameters/QualifiedSingleEntityParameters.ts +9 -0
  769. package/src/treeParameters/Relation.ts +17 -0
  770. package/src/treeParameters/RelativeEntityList.ts +25 -0
  771. package/src/treeParameters/RelativeSingleEntity.ts +16 -0
  772. package/src/treeParameters/RelativeSingleField.ts +20 -0
  773. package/src/treeParameters/SetOnCreate.ts +6 -0
  774. package/src/treeParameters/SingleEntityEventListeners.ts +24 -0
  775. package/src/treeParameters/SingleEntityParameters.ts +9 -0
  776. package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +37 -0
  777. package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +37 -0
  778. package/src/treeParameters/index.ts +27 -0
  779. package/src/treeParameters/primitives/Alias.ts +1 -0
  780. package/src/treeParameters/primitives/EntityId.ts +2 -0
  781. package/src/treeParameters/primitives/EntityName.ts +4 -0
  782. package/src/treeParameters/primitives/EntityRealmKey.ts +2 -0
  783. package/src/treeParameters/primitives/ExpectedEntityCount.ts +1 -0
  784. package/src/treeParameters/primitives/ExpectedQualifiedEntityMutation.ts +1 -0
  785. package/src/treeParameters/primitives/ExpectedRelationMutation.ts +1 -0
  786. package/src/treeParameters/primitives/FieldName.ts +7 -0
  787. package/src/treeParameters/primitives/FieldValue.ts +6 -0
  788. package/src/treeParameters/primitives/Filter.ts +7 -0
  789. package/src/treeParameters/primitives/Limit.ts +1 -0
  790. package/src/treeParameters/primitives/Offset.ts +1 -0
  791. package/src/treeParameters/primitives/OrderBy.ts +6 -0
  792. package/src/treeParameters/primitives/PlaceholderName.ts +4 -0
  793. package/src/treeParameters/primitives/RemovalType.ts +1 -0
  794. package/src/treeParameters/primitives/Scalar.ts +1 -0
  795. package/src/treeParameters/primitives/TreeRootId.ts +1 -0
  796. package/src/treeParameters/primitives/UniqueWhere.ts +7 -0
  797. package/src/treeParameters/primitives/index.ts +18 -0
  798. package/src/tsconfig.json +12 -0
  799. package/src/utils/Hashing.ts +81 -0
  800. package/src/utils/assert.ts +7 -0
  801. package/src/utils/assertNever.ts +10 -0
  802. package/src/utils/generateEnumerabilityPreventingEntropy.ts +3 -0
  803. package/src/utils/index.ts +6 -0
  804. package/src/utils/isEmptyObject.ts +9 -0
  805. package/src/utils/ucfirst.ts +1 -0
  806. package/dist/binding.d.ts +0 -2242
@@ -1 +1 @@
1
- {"version":3,"file":"StateInitializer.js","sources":["../../../src/core/StateInitializer.ts"],"sourcesContent":["import { BatchUpdatesOptions, EntityAccessor, EntityListAccessor, FieldAccessor } from '../accessors'\nimport { EntityFieldPersistedData, RuntimeId, ServerGeneratedUuid, UnpersistedEntityDummyId } from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport {\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '../markers'\nimport { BijectiveIndexedMap } from '../structures'\nimport type {\n\tEntityEventListenerStore,\n\tEntityListEventListenerStore,\n\tEntityName,\n\tFieldEventListenerStore,\n\tFieldName,\n\tScalar,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport type { AccessorErrorManager } from './AccessorErrorManager'\nimport type { Config } from './Config'\nimport type { EventManager } from './EventManager'\nimport { EntityOperations, FieldOperations, ListOperations } from './operations'\nimport { RealmKeyGenerator } from './RealmKeyGenerator'\nimport {\n\tEntityListBlueprint,\n\tEntityListState,\n\tEntityRealmBlueprint,\n\tEntityRealmState,\n\tEntityRealmStateStub,\n\tEntityState,\n\tFieldState,\n\tgetEntityMarker,\n\tRootStateNode,\n} from './state'\nimport { TreeParameterMerger } from './TreeParameterMerger'\nimport type { TreeStore } from './TreeStore'\nimport { EventListenersStore } from '../treeParameters'\n\nexport class StateInitializer {\n\tprivate readonly fieldOperations: FieldOperations\n\tprivate readonly entityOperations: EntityOperations\n\tprivate readonly listOperations: ListOperations\n\n\tpublic constructor(\n\t\tprivate readonly accessorErrorManager: AccessorErrorManager,\n\t\tprivate readonly batchUpdatesOptions: BatchUpdatesOptions,\n\t\tprivate readonly config: Config,\n\t\tprivate readonly eventManager: EventManager,\n\t\tprivate readonly treeStore: TreeStore,\n\t) {\n\t\tthis.fieldOperations = new FieldOperations(this.accessorErrorManager, this.eventManager, this, this.treeStore)\n\t\tthis.entityOperations = new EntityOperations(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis,\n\t\t\tthis.treeStore,\n\t\t)\n\t\tthis.listOperations = new ListOperations(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis,\n\t\t\tthis.treeStore,\n\t\t)\n\t}\n\n\tpublic initializeSubTree(tree: EntitySubTreeMarker | EntityListSubTreeMarker): RootStateNode {\n\t\tlet subTreeState: RootStateNode\n\t\tconst persistedRootData = this.treeStore.subTreePersistedData.get(tree.placeholderName)\n\n\t\tif (tree instanceof EntityListSubTreeMarker) {\n\t\t\tconst persistedEntityIds: Set<string> = persistedRootData instanceof Set ? persistedRootData : new Set()\n\t\t\tsubTreeState = this.initializeEntityListState(\n\t\t\t\t{ marker: tree, parent: undefined },\n\t\t\t\ttree.entityName,\n\t\t\t\tpersistedEntityIds,\n\t\t\t)\n\t\t} else {\n\t\t\tsubTreeState = this.materializeEntityRealm(\n\t\t\t\tthis.initializeEntityRealm(\n\t\t\t\t\tpersistedRootData instanceof ServerGeneratedUuid ? persistedRootData : new UnpersistedEntityDummyId(),\n\t\t\t\t\ttree.entityName,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'subTree',\n\t\t\t\t\t\tmarker: tree,\n\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\n\t\treturn subTreeState\n\t}\n\n\tpublic initializeEntityRealm(\n\t\tid: RuntimeId,\n\t\tentityName: EntityName,\n\t\tblueprint: EntityRealmBlueprint,\n\t\tcopyFrom?: EntityRealmState | EntityRealmStateStub,\n\t): EntityRealmState | EntityRealmStateStub {\n\t\t// This is counter-intuitive a bit. The method can also return an EntityRealmState, not just a stub.\n\t\t// The reason is so that each call-site can just default to trying to initialize a stub without having to keep\n\t\t// in mind that the realm might have already been initialized.\n\n\t\tconst entity = this.initializeEntityState(id, entityName)\n\t\tconst realmKey = RealmKeyGenerator.getRealmKey(id, blueprint)\n\n\t\tconst existing = this.treeStore.entityRealmStore.get(realmKey)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\n\t\tif (!copyFrom || copyFrom.type !== 'entityRealm') {\n\t\t\tconst stub: EntityRealmStateStub = {\n\t\t\t\ttype: 'entityRealmStub',\n\n\t\t\t\tblueprint,\n\t\t\t\tentity,\n\t\t\t\trealmKey,\n\t\t\t\tgetAccessor: () => this.materializeEntityRealm(stub).getAccessor(),\n\t\t\t}\n\t\t\tthis.registerEntityRealm(stub)\n\n\t\t\treturn stub\n\t\t}\n\t\tconst realm = this.createEntityRealm(blueprint, realmKey, entity)\n\n\t\tthis.registerEntityRealm(realm)\n\n\t\tconst marker = getEntityMarker(realm)\n\t\tconst pathBack = this.treeStore.getPathBackToParent(realm)\n\n\t\tfor (const [placeholderName, field] of marker.fields.markers) {\n\t\t\tif (field instanceof FieldMarker) {\n\t\t\t\tconst value = copyFrom.children.get(placeholderName)\n\t\t\t\tif (!value || value.type !== 'field') {\n\t\t\t\t\tthrow new BindingError()\n\t\t\t\t}\n\t\t\t\tthis.initializeFromFieldMarker(realm, field, value.value)\n\t\t\t} else if (field instanceof HasManyRelationMarker) {\n\t\t\t\t// todo: get from copyFrom\n\t\t\t\tthis.initializeFromHasManyRelationMarker(realm, field, new Set())\n\t\t\t} else if (field instanceof HasOneRelationMarker) {\n\t\t\t\tlet runtimeId: RuntimeId\n\t\t\t\tlet subCopyFrom: EntityRealmState | undefined = undefined\n\t\t\t\tif (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t\truntimeId = pathBack.parent.entity.id\n\t\t\t\t} else {\n\t\t\t\t\tconst value = copyFrom.children.get(placeholderName)\n\t\t\t\t\tif (!value || (value.type !== 'entityRealm' && value.type !== 'entityRealmStub')) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (value.type === 'entityRealm') {\n\t\t\t\t\t\tsubCopyFrom = value\n\t\t\t\t\t\truntimeId = value.entity.id\n\t\t\t\t\t} else {\n\t\t\t\t\t\truntimeId = new UnpersistedEntityDummyId()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.initializeFromHasOneRelationMarker(realm, field, runtimeId, subCopyFrom)\n\t\t\t} else {\n\t\t\t\tassertNever(field)\n\t\t\t}\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(realm)\n\t\treturn realm\n\t}\n\n\tprivate createEntityRealm(blueprint: EntityRealmBlueprint, realmKey: string, entity: EntityState): EntityRealmState {\n\t\tconst entityRealm: EntityRealmState = {\n\t\t\ttype: 'entityRealm',\n\n\t\t\tblueprint,\n\t\t\trealmKey,\n\t\t\tentity,\n\n\t\t\taccessor: undefined,\n\t\t\tchildren: new Map(),\n\t\t\tchildrenWithPendingUpdates: undefined,\n\t\t\terrors: undefined,\n\t\t\teventListeners: this.initializeEntityEventListenerStore(blueprint),\n\t\t\tfieldsWithPendingConnectionUpdates: undefined,\n\t\t\tplannedHasOneDeletions: undefined,\n\t\t\tunpersistedChangesCount: 0,\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (entityRealm.accessor === undefined) {\n\t\t\t\t\tconst entity = entityRealm.entity\n\t\t\t\t\tentityRealm.accessor = new EntityAccessor(\n\t\t\t\t\t\tentityRealm,\n\t\t\t\t\t\tthis.entityOperations,\n\t\t\t\t\t\tentity.id,\n\t\t\t\t\t\tentityRealm.realmKey,\n\t\t\t\t\t\tentity.entityName,\n\n\t\t\t\t\t\t// We're technically exposing more info in runtime than we'd like but that way we don't have to allocate and\n\t\t\t\t\t\t// keep in sync two copies of the same data. TS hides the extra info anyway.\n\t\t\t\t\t\tentityRealm.children,\n\t\t\t\t\t\tthis.treeStore.persistedEntityData.get(entity.id.value),\n\t\t\t\t\t\tentityRealm.unpersistedChangesCount !== 0,\n\t\t\t\t\t\tentityRealm.errors,\n\t\t\t\t\t\tgetEntityMarker(entityRealm).environment,\n\t\t\t\t\t\tentityRealm.getAccessor,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn entityRealm.accessor\n\t\t\t},\n\t\t}\n\t\treturn entityRealm\n\t}\n\n\tprivate materializeEntityRealm(state: EntityRealmState | EntityRealmStateStub): EntityRealmState {\n\t\tif (state.type === 'entityRealm') {\n\t\t\treturn state\n\t\t}\n\t\tconst { realmKey, entity, blueprint } = state\n\n\t\tconst existing = this.treeStore.entityRealmStore.get(realmKey)\n\t\tif (existing !== undefined && existing.type === 'entityRealm') {\n\t\t\treturn existing\n\t\t}\n\n\t\tconst entityRealm = this.createEntityRealm(blueprint, realmKey, entity)\n\n\t\tthis.registerEntityRealm(entityRealm)\n\n\t\t// if (blueprint.creationParameters.forceCreation && !entity.id.existsOnServer) {\n\t\t// \tentityRealm.unpersistedChangesCount += 1\n\t\t// }\n\n\t\tconst persistedData = this.treeStore.persistedEntityData.get(entity.id.value)\n\n\t\tconst marker = getEntityMarker(state)\n\t\tconst pathBack = this.treeStore.getPathBackToParent(entityRealm)\n\n\t\tfor (const [placeholderName, field] of marker.fields.markers) {\n\t\t\tconst fieldDatum = persistedData?.get(placeholderName)\n\n\t\t\tif (field instanceof FieldMarker) {\n\t\t\t\tthis.initializeFromFieldMarker(entityRealm, field, fieldDatum)\n\t\t\t} else if (field instanceof HasManyRelationMarker) {\n\t\t\t\t// if (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t// \t// TODO this is probably wrong?\n\t\t\t\t// \tconst ids = pathBack.parent.children.get(field.placeholderName)\n\t\t\t\t// \tconst newData = this.treeStore.persistedEntityData.get(pathBack.parent.entity.id.value)\n\t\t\t\t// \tconsole.log('many?', pathBack, field, entityRealm, fieldDatum, ids)\n\t\t\t\t// }\n\t\t\t\tthis.initializeFromHasManyRelationMarker(entityRealm, field, fieldDatum instanceof Set ? fieldDatum : new Set())\n\t\t\t} else if (field instanceof HasOneRelationMarker) {\n\t\t\t\tlet runtimeId: RuntimeId\n\t\t\t\tif (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t\truntimeId = pathBack.parent.entity.id\n\t\t\t\t} else {\n\t\t\t\t\truntimeId = fieldDatum instanceof ServerGeneratedUuid ? fieldDatum : new UnpersistedEntityDummyId()\n\t\t\t\t}\n\t\t\t\tthis.initializeFromHasOneRelationMarker(entityRealm, field, runtimeId)\n\t\t\t} else {\n\t\t\t\tassertNever(field)\n\t\t\t}\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(entityRealm)\n\n\t\treturn entityRealm\n\t}\n\n\tprivate registerEntityRealm(entityRealm: EntityRealmState | EntityRealmStateStub) {\n\t\tconst { realmKey, blueprint, entity } = entityRealm\n\n\t\tthis.treeStore.entityRealmStore.set(entityRealm.realmKey, entityRealm)\n\n\t\tif (blueprint.type === 'listEntity') {\n\t\t\tblueprint.parent.children.set(entity.id.value, entityRealm)\n\t\t} else if (blueprint.type === 'hasOne') {\n\t\t\tblueprint.parent.children.set(blueprint.marker.placeholderName, entityRealm)\n\t\t}\n\t\tentity.realms.set(realmKey, entityRealm)\n\t}\n\n\tpublic initializeEntityState(id: RuntimeId, entityName: EntityName): EntityState {\n\t\tconst entityId = id.value\n\n\t\tconst existing = this.treeStore.entityStore.get(entityId)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\n\t\tconst entityState: EntityState = {\n\t\t\tentityName,\n\t\t\thasIdSetInStone: id instanceof ServerGeneratedUuid,\n\t\t\tid,\n\t\t\tisScheduledForDeletion: false,\n\t\t\tmaidenId: id instanceof UnpersistedEntityDummyId ? id : undefined,\n\t\t\trealms: new Map(),\n\t\t}\n\t\tthis.treeStore.entityStore.set(entityId, entityState)\n\n\t\treturn entityState\n\t}\n\n\tprivate initializeEntityListState(\n\t\tblueprint: EntityListBlueprint,\n\t\tentityName: EntityName,\n\t\tinitialEntityIds: Set<string>,\n\t): EntityListState {\n\t\tconst entityListState: EntityListState = {\n\t\t\ttype: 'entityList',\n\t\t\taccessor: undefined,\n\t\t\tblueprint,\n\t\t\tchildren: new BijectiveIndexedMap(realm => realm.entity.id.value),\n\t\t\tchildrenWithPendingUpdates: undefined,\n\t\t\tentityName,\n\t\t\teventListeners: this.initializeEntityListEventListenerStore(blueprint),\n\t\t\tchildEventListeners: this.initializeEntityListChildEventListenerStore(blueprint),\n\t\t\terrors: undefined,\n\t\t\tplannedRemovals: undefined,\n\t\t\tunpersistedChangesCount: 0, // TODO force creation?\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (entityListState.accessor === undefined) {\n\t\t\t\t\tconst persistedEntityIds = this.treeStore.getEntityListPersistedIds(entityListState)\n\t\t\t\t\tentityListState.accessor = new EntityListAccessor(\n\t\t\t\t\t\tentityListState,\n\t\t\t\t\t\tthis.listOperations,\n\t\t\t\t\t\tentityListState.children,\n\t\t\t\t\t\tpersistedEntityIds,\n\t\t\t\t\t\tentityListState.unpersistedChangesCount !== 0,\n\t\t\t\t\t\tentityListState.errors,\n\t\t\t\t\t\tentityListState.blueprint.marker.environment,\n\t\t\t\t\t\tentityListState.getAccessor,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn entityListState.accessor\n\t\t\t},\n\t\t}\n\n\t\tconst initialData: Iterable<string | undefined> =\n\t\t\tinitialEntityIds.size === 0\n\t\t\t\t? Array.from({ length: blueprint.marker.parameters.initialEntityCount })\n\t\t\t\t: initialEntityIds\n\t\tfor (const entityId of initialData) {\n\t\t\tthis.initializeEntityRealm(\n\t\t\t\tentityId ? new ServerGeneratedUuid(entityId) : new UnpersistedEntityDummyId(),\n\t\t\t\tentityListState.entityName,\n\t\t\t\t{\n\t\t\t\t\ttype: 'listEntity',\n\t\t\t\t\tparent: entityListState,\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(entityListState)\n\n\t\treturn entityListState\n\t}\n\n\tprivate initializeFieldState(\n\t\tparent: EntityRealmState,\n\t\tplaceholderName: FieldName,\n\t\tfieldMarker: FieldMarker,\n\t\tpersistedValue: Scalar | undefined,\n\t): FieldState {\n\t\tconst resolvedFieldValue = persistedValue ?? fieldMarker.defaultValue ?? null\n\n\t\tconst fieldState: FieldState = {\n\t\t\ttype: 'field',\n\t\t\taccessor: undefined,\n\t\t\tfieldMarker,\n\t\t\tplaceholderName,\n\t\t\tpersistedValue,\n\t\t\tparent,\n\t\t\tvalue: resolvedFieldValue,\n\t\t\teventListeners: this.initializeFieldEventListenerStore(fieldMarker),\n\t\t\terrors: undefined,\n\t\t\ttouchLog: undefined,\n\t\t\thasUnpersistedChanges: false,\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (fieldState.accessor === undefined) {\n\t\t\t\t\tfieldState.accessor = new FieldAccessor(\n\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\tthis.fieldOperations,\n\t\t\t\t\t\tfieldState.placeholderName,\n\t\t\t\t\t\tfieldState.value,\n\t\t\t\t\t\tfieldState.persistedValue === undefined ? null : fieldState.persistedValue,\n\t\t\t\t\t\tfieldState.fieldMarker.defaultValue,\n\t\t\t\t\t\tfieldState.errors,\n\t\t\t\t\t\tfieldState.hasUnpersistedChanges,\n\t\t\t\t\t\tfieldState.touchLog,\n\t\t\t\t\t\tfieldState.getAccessor,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn fieldState.accessor\n\t\t\t},\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(fieldState)\n\t\treturn fieldState\n\t}\n\n\tprivate initializeFromFieldMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: FieldMarker,\n\t\tfieldDatum: EntityFieldPersistedData | undefined,\n\t) {\n\t\tif (fieldDatum instanceof Set) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Received a collection of referenced entities where a single '${field.fieldName}' field was expected. ` +\n\t\t\t\t\t`Perhaps you wanted to use a <Repeater />?`,\n\t\t\t)\n\t\t}\n\t\tif (fieldDatum instanceof ServerGeneratedUuid) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Received a referenced entity where a single '${field.fieldName}' field was expected. ` +\n\t\t\t\t\t`Perhaps you wanted to use <HasOne />?`,\n\t\t\t)\n\t\t}\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeFieldState(parent, field.placeholderName, field, fieldDatum),\n\t\t)\n\t}\n\n\tprivate initializeFromHasOneRelationMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: HasOneRelationMarker,\n\t\tentityId: RuntimeId,\n\t\tcopyFrom?: EntityRealmState | EntityRealmStateStub,\n\t) {\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeEntityRealm(entityId, this.getRelationTargetEntityName(parent, field), {\n\t\t\t\ttype: 'hasOne',\n\t\t\t\tparent,\n\t\t\t\tmarker: field,\n\t\t\t}, copyFrom),\n\t\t)\n\t\t// if (fieldDatum instanceof ServerGeneratedUuid || fieldDatum === null || fieldDatum === undefined) {\n\t\t// \tconst entityId = fieldDatum instanceof ServerGeneratedUuid ? fieldDatum : new UnpersistedEntityDummyId()\n\t\t//\n\t\t//\n\t\t// } else if (fieldDatum instanceof Set) {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a collection of entities for field '${relation.field}' where a single entity was expected. ` +\n\t\t// \t\t\t`Perhaps you wanted to use a <Repeater />?`,\n\t\t// \t)\n\t\t// } else {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a scalar value for field '${relation.field}' where a single entity was expected.` +\n\t\t// \t\t\t`Perhaps you meant to use a variant of <Field />?`,\n\t\t// \t)\n\t\t// }\n\t}\n\n\tprivate initializeFromHasManyRelationMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: HasManyRelationMarker,\n\t\tpersistedEntityIds: Set<string>,\n\t) {\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeEntityListState(\n\t\t\t\t{ marker: field, parent },\n\t\t\t\tthis.getRelationTargetEntityName(parent, field),\n\t\t\t\tpersistedEntityIds,\n\t\t\t),\n\t\t)\n\t\t// const relation = field.parameters\n\t\t//\n\t\t// if (fieldDatum === undefined || fieldDatum instanceof Set) {\n\t\t//\n\t\t// } else if (typeof fieldDatum === 'object') {\n\t\t// \t// Intentionally allowing `fieldDatum === null` here as well since this should only happen when a *hasOne\n\t\t// \t// relation is unlinked, e.g. a Person does not have a linked Nationality.\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a referenced entity for field '${relation.field}' where a collection of entities was expected.` +\n\t\t// \t\t\t`Perhaps you wanted to use a <HasOne />?`,\n\t\t// \t)\n\t\t// } else {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a scalar value for field '${relation.field}' where a collection of entities was expected.` +\n\t\t// \t\t\t`Perhaps you meant to use a variant of <Field />?`,\n\t\t// \t)\n\t\t// }\n\t}\n\n\tprivate getRelationTargetEntityName(\n\t\tentityRealm: EntityRealmState,\n\t\tfield: HasOneRelationMarker | HasManyRelationMarker,\n\t): EntityName {\n\t\tconst targetField = this.treeStore.schema.getEntityField(entityRealm.entity.entityName, field.parameters.field)\n\n\t\tif (targetField?.__typename !== '_Relation') {\n\t\t\tthrow new BindingError() // This should have been validated elsewhere.\n\t\t}\n\t\treturn targetField.targetEntity\n\t}\n\n\tpublic runImmediateUserInitialization(\n\t\trealm: EntityRealmState | EntityRealmStateStub,\n\t\tinitialize: EntityAccessor.BatchUpdatesHandler | undefined,\n\t) {\n\t\tif (initialize === undefined) {\n\t\t\treturn\n\t\t}\n\t\tconst entityRealm = this.materializeEntityRealm(realm)\n\n\t\trealm.getAccessor().batchUpdates(initialize)\n\n\t\tconst initializeListeners = this.eventManager.getEventListeners(entityRealm, { type: 'initialize' })\n\t\tif (initializeListeners === undefined || initializeListeners.size === 0) {\n\t\t\trealm.entity.hasIdSetInStone = true\n\t\t}\n\t}\n\n\tpublic initializeEntityEventListenerStore(blueprint: EntityRealmBlueprint): EntityEventListenerStore | undefined {\n\t\tif (blueprint.type === 'listEntity') {\n\t\t\tconst blueprintListeners = blueprint.parent.blueprint.marker.parameters.childEventListeners\n\t\t\tconst childInitialize = blueprintListeners?.get({ type: 'initialize' })\n\t\t\tconst store: EntityEventListenerStore = new EventListenersStore(() => blueprint.parent.childEventListeners)\n\n\t\t\tif (childInitialize !== undefined) {\n\t\t\t\tstore.set({ type: 'initialize' }, childInitialize)\n\t\t\t}\n\t\t\treturn store\n\t\t}\n\n\t\tconst blueprintListeners = blueprint.marker.parameters.eventListeners\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneSingleEntityEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeEntityListEventListenerStore(\n\t\tblueprint: EntityListBlueprint,\n\t): EntityListEventListenerStore | undefined {\n\t\tconst blueprintListeners = blueprint.marker.parameters.eventListeners\n\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneEntityListEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeEntityListChildEventListenerStore(\n\t\tblueprint: EntityListBlueprint,\n\t): EntityEventListenerStore | undefined {\n\t\tconst blueprintListeners = blueprint.marker.parameters.childEventListeners\n\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneSingleEntityEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeFieldEventListenerStore(marker: FieldMarker): FieldEventListenerStore | undefined {\n\t\t// TODO !!!\n\t\treturn undefined\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;uBAwC8B;AAAA,EAKtB,YACW,sBACA,qBACA,QACA,cACA,WAChB;AAVe;AACA;AACA;;;;;;SASX,kBAAkB,IAAI,gBAAgB,KAAK,sBAAsB,KAAK,cAAc,MAAM,KAAK;SAC/F,mBAAmB,IAAI,iBAC3B,KAAK,sBACL,KAAK,qBACL,KAAK,cACL,MACA,KAAK;SAED,iBAAiB,IAAI,eACzB,KAAK,sBACL,KAAK,qBACL,KAAK,cACL,MACA,KAAK;AAAA;AAAA,EAIA,kBAAkB,MAAoE;QACxF;UACE,oBAAoB,KAAK,UAAU,qBAAqB,IAAI,KAAK;QAEnE,gBAAgB,yBAAyB;YACtC,qBAAkC,6BAA6B,MAAM,oBAAoB,IAAI;qBACpF,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AC9B;AAAA;WAED,oBAAoB,gCAAgC;AAAA;AAAA,EAGpD,kCAAkC,QAA0D;WAE5F;AAAA;AAAA;;"}
1
+ {"version":3,"file":"StateInitializer.js","sources":["../../../src/core/StateInitializer.ts"],"sourcesContent":["import { BatchUpdatesOptions, EntityAccessor, EntityListAccessor, FieldAccessor } from '../accessors'\nimport { EntityFieldPersistedData, RuntimeId, ServerGeneratedUuid, UnpersistedEntityDummyId } from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport {\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '../markers'\nimport { BijectiveIndexedMap } from '../structures'\nimport type {\n\tEntityEventListenerStore,\n\tEntityListEventListenerStore,\n\tEntityName,\n\tFieldEventListenerStore,\n\tFieldName,\n\tScalar,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport type { AccessorErrorManager } from './AccessorErrorManager'\nimport type { Config } from './Config'\nimport type { EventManager } from './EventManager'\nimport { EntityOperations, FieldOperations, ListOperations } from './operations'\nimport { RealmKeyGenerator } from './RealmKeyGenerator'\nimport {\n\tEntityListBlueprint,\n\tEntityListState,\n\tEntityRealmBlueprint,\n\tEntityRealmState,\n\tEntityRealmStateStub,\n\tEntityState,\n\tFieldState,\n\tgetEntityMarker,\n\tRootStateNode,\n} from './state'\nimport { TreeParameterMerger } from './TreeParameterMerger'\nimport type { TreeStore } from './TreeStore'\nimport { EventListenersStore } from '../treeParameters'\n\nexport class StateInitializer {\n\tprivate readonly fieldOperations: FieldOperations\n\tprivate readonly entityOperations: EntityOperations\n\tprivate readonly listOperations: ListOperations\n\n\tpublic constructor(\n\t\tprivate readonly accessorErrorManager: AccessorErrorManager,\n\t\tprivate readonly batchUpdatesOptions: BatchUpdatesOptions,\n\t\tprivate readonly config: Config,\n\t\tprivate readonly eventManager: EventManager,\n\t\tprivate readonly treeStore: TreeStore,\n\t) {\n\t\tthis.fieldOperations = new FieldOperations(this.accessorErrorManager, this.eventManager, this, this.treeStore)\n\t\tthis.entityOperations = new EntityOperations(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis,\n\t\t\tthis.treeStore,\n\t\t)\n\t\tthis.listOperations = new ListOperations(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis,\n\t\t\tthis.treeStore,\n\t\t)\n\t}\n\n\tpublic initializeSubTree(tree: EntitySubTreeMarker | EntityListSubTreeMarker): RootStateNode {\n\t\tlet subTreeState: RootStateNode\n\t\tconst persistedRootData = this.treeStore.subTreePersistedData.get(tree.placeholderName)\n\n\t\tif (tree instanceof EntityListSubTreeMarker) {\n\t\t\tconst persistedEntityIds: Set<string> = persistedRootData instanceof Set ? persistedRootData : new Set()\n\t\t\tsubTreeState = this.initializeEntityListState(\n\t\t\t\t{ marker: tree, parent: undefined },\n\t\t\t\ttree.entityName,\n\t\t\t\tpersistedEntityIds,\n\t\t\t)\n\t\t} else {\n\t\t\tsubTreeState = this.materializeEntityRealm(\n\t\t\t\tthis.initializeEntityRealm(\n\t\t\t\t\tpersistedRootData instanceof ServerGeneratedUuid ? persistedRootData : new UnpersistedEntityDummyId(),\n\t\t\t\t\ttree.entityName,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'subTree',\n\t\t\t\t\t\tmarker: tree,\n\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\n\t\treturn subTreeState\n\t}\n\n\tpublic initializeEntityRealm(\n\t\tid: RuntimeId,\n\t\tentityName: EntityName,\n\t\tblueprint: EntityRealmBlueprint,\n\t\tcopyFrom?: EntityRealmState | EntityRealmStateStub,\n\t): EntityRealmState | EntityRealmStateStub {\n\t\t// This is counter-intuitive a bit. The method can also return an EntityRealmState, not just a stub.\n\t\t// The reason is so that each call-site can just default to trying to initialize a stub without having to keep\n\t\t// in mind that the realm might have already been initialized.\n\n\t\tconst entity = this.initializeEntityState(id, entityName)\n\t\tconst realmKey = RealmKeyGenerator.getRealmKey(id, blueprint)\n\n\t\tconst existing = this.treeStore.entityRealmStore.get(realmKey)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\n\t\tif (!copyFrom || copyFrom.type !== 'entityRealm') {\n\t\t\tconst stub: EntityRealmStateStub = {\n\t\t\t\ttype: 'entityRealmStub',\n\n\t\t\t\tblueprint,\n\t\t\t\tentity,\n\t\t\t\trealmKey,\n\t\t\t\tgetAccessor: () => this.materializeEntityRealm(stub).getAccessor(),\n\t\t\t}\n\t\t\tthis.registerEntityRealm(stub)\n\n\t\t\treturn stub\n\t\t}\n\t\tconst realm = this.createEntityRealm(blueprint, realmKey, entity)\n\n\t\tthis.registerEntityRealm(realm)\n\n\t\tconst marker = getEntityMarker(realm)\n\t\tconst pathBack = this.treeStore.getPathBackToParent(realm)\n\n\t\tfor (const [placeholderName, field] of marker.fields.markers) {\n\t\t\tif (field instanceof FieldMarker) {\n\t\t\t\tconst value = copyFrom.children.get(placeholderName)\n\t\t\t\tif (!value || value.type !== 'field') {\n\t\t\t\t\tthrow new BindingError()\n\t\t\t\t}\n\t\t\t\tthis.initializeFromFieldMarker(realm, field, value.value)\n\t\t\t} else if (field instanceof HasManyRelationMarker) {\n\t\t\t\t// todo: get from copyFrom\n\t\t\t\tthis.initializeFromHasManyRelationMarker(realm, field, new Set())\n\t\t\t} else if (field instanceof HasOneRelationMarker) {\n\t\t\t\tlet runtimeId: RuntimeId\n\t\t\t\tlet subCopyFrom: EntityRealmState | undefined = undefined\n\t\t\t\tif (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t\truntimeId = pathBack.parent.entity.id\n\t\t\t\t} else {\n\t\t\t\t\tconst value = copyFrom.children.get(placeholderName)\n\t\t\t\t\tif (!value || (value.type !== 'entityRealm' && value.type !== 'entityRealmStub')) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (value.type === 'entityRealm') {\n\t\t\t\t\t\tsubCopyFrom = value\n\t\t\t\t\t\truntimeId = value.entity.id\n\t\t\t\t\t} else {\n\t\t\t\t\t\truntimeId = new UnpersistedEntityDummyId()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.initializeFromHasOneRelationMarker(realm, field, runtimeId, subCopyFrom)\n\t\t\t} else {\n\t\t\t\tassertNever(field)\n\t\t\t}\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(realm)\n\t\treturn realm\n\t}\n\n\tprivate createEntityRealm(blueprint: EntityRealmBlueprint, realmKey: string, entity: EntityState): EntityRealmState {\n\t\tconst entityRealm: EntityRealmState = {\n\t\t\ttype: 'entityRealm',\n\n\t\t\tblueprint,\n\t\t\trealmKey,\n\t\t\tentity,\n\n\t\t\taccessor: undefined,\n\t\t\tchildren: new Map(),\n\t\t\tchildrenWithPendingUpdates: undefined,\n\t\t\terrors: undefined,\n\t\t\teventListeners: this.initializeEntityEventListenerStore(blueprint),\n\t\t\tfieldsWithPendingConnectionUpdates: undefined,\n\t\t\tplannedHasOneDeletions: undefined,\n\t\t\tunpersistedChangesCount: 0,\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (entityRealm.accessor === undefined) {\n\t\t\t\t\tconst entity = entityRealm.entity\n\t\t\t\t\tentityRealm.accessor = new EntityAccessor(\n\t\t\t\t\t\tentityRealm,\n\t\t\t\t\t\tthis.entityOperations,\n\t\t\t\t\t\tentity.id,\n\t\t\t\t\t\tentityRealm.realmKey,\n\t\t\t\t\t\tentity.entityName,\n\n\t\t\t\t\t\t// We're technically exposing more info in runtime than we'd like but that way we don't have to allocate and\n\t\t\t\t\t\t// keep in sync two copies of the same data. TS hides the extra info anyway.\n\t\t\t\t\t\tentityRealm.children,\n\t\t\t\t\t\tthis.treeStore.persistedEntityData.get(entity.id.value),\n\t\t\t\t\t\tentityRealm.unpersistedChangesCount !== 0,\n\t\t\t\t\t\tentityRealm.errors,\n\t\t\t\t\t\tgetEntityMarker(entityRealm).environment,\n\t\t\t\t\t\tentityRealm.getAccessor,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn entityRealm.accessor\n\t\t\t},\n\t\t}\n\t\treturn entityRealm\n\t}\n\n\tprivate materializeEntityRealm(state: EntityRealmState | EntityRealmStateStub): EntityRealmState {\n\t\tif (state.type === 'entityRealm') {\n\t\t\treturn state\n\t\t}\n\t\tconst { realmKey, entity, blueprint } = state\n\n\t\tconst existing = this.treeStore.entityRealmStore.get(realmKey)\n\t\tif (existing !== undefined && existing.type === 'entityRealm') {\n\t\t\treturn existing\n\t\t}\n\n\t\tconst entityRealm = this.createEntityRealm(blueprint, realmKey, entity)\n\n\t\tthis.registerEntityRealm(entityRealm)\n\n\t\t// if (blueprint.creationParameters.forceCreation && !entity.id.existsOnServer) {\n\t\t// \tentityRealm.unpersistedChangesCount += 1\n\t\t// }\n\n\t\tconst persistedData = this.treeStore.persistedEntityData.get(entity.id.value)\n\n\t\tconst marker = getEntityMarker(state)\n\t\tconst pathBack = this.treeStore.getPathBackToParent(entityRealm)\n\n\t\tfor (const [placeholderName, field] of marker.fields.markers) {\n\t\t\tconst fieldDatum = persistedData?.get(placeholderName)\n\n\t\t\tif (field instanceof FieldMarker) {\n\t\t\t\tthis.initializeFromFieldMarker(entityRealm, field, fieldDatum)\n\t\t\t} else if (field instanceof HasManyRelationMarker) {\n\t\t\t\t// if (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t// \t// TODO this is probably wrong?\n\t\t\t\t// \tconst ids = pathBack.parent.children.get(field.placeholderName)\n\t\t\t\t// \tconst newData = this.treeStore.persistedEntityData.get(pathBack.parent.entity.id.value)\n\t\t\t\t// \tconsole.log('many?', pathBack, field, entityRealm, fieldDatum, ids)\n\t\t\t\t// }\n\t\t\t\tthis.initializeFromHasManyRelationMarker(entityRealm, field, fieldDatum instanceof Set ? fieldDatum : new Set())\n\t\t\t} else if (field instanceof HasOneRelationMarker) {\n\t\t\t\tlet runtimeId: RuntimeId\n\t\t\t\tif (pathBack?.fieldBackToParent === field.parameters.field) {\n\t\t\t\t\truntimeId = pathBack.parent.entity.id\n\t\t\t\t} else {\n\t\t\t\t\truntimeId = fieldDatum instanceof ServerGeneratedUuid ? fieldDatum : new UnpersistedEntityDummyId()\n\t\t\t\t}\n\t\t\t\tthis.initializeFromHasOneRelationMarker(entityRealm, field, runtimeId)\n\t\t\t} else {\n\t\t\t\tassertNever(field)\n\t\t\t}\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(entityRealm)\n\n\t\treturn entityRealm\n\t}\n\n\tprivate registerEntityRealm(entityRealm: EntityRealmState | EntityRealmStateStub) {\n\t\tconst { realmKey, blueprint, entity } = entityRealm\n\n\t\tthis.treeStore.entityRealmStore.set(entityRealm.realmKey, entityRealm)\n\n\t\tif (blueprint.type === 'listEntity') {\n\t\t\tblueprint.parent.children.set(entity.id.value, entityRealm)\n\t\t} else if (blueprint.type === 'hasOne') {\n\t\t\tblueprint.parent.children.set(blueprint.marker.placeholderName, entityRealm)\n\t\t}\n\t\tentity.realms.set(realmKey, entityRealm)\n\t}\n\n\tpublic initializeEntityState(id: RuntimeId, entityName: EntityName): EntityState {\n\t\tconst entityId = id.value\n\n\t\tconst existing = this.treeStore.entityStore.get(entityId)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\n\t\tconst entityState: EntityState = {\n\t\t\tentityName,\n\t\t\thasIdSetInStone: id instanceof ServerGeneratedUuid,\n\t\t\tid,\n\t\t\tisScheduledForDeletion: false,\n\t\t\tmaidenId: id instanceof UnpersistedEntityDummyId ? id : undefined,\n\t\t\trealms: new Map(),\n\t\t}\n\t\tthis.treeStore.entityStore.set(entityId, entityState)\n\n\t\treturn entityState\n\t}\n\n\tprivate initializeEntityListState(\n\t\tblueprint: EntityListBlueprint,\n\t\tentityName: EntityName,\n\t\tinitialEntityIds: Set<string>,\n\t): EntityListState {\n\t\tconst entityListState: EntityListState = {\n\t\t\ttype: 'entityList',\n\t\t\taccessor: undefined,\n\t\t\tblueprint,\n\t\t\tchildren: new BijectiveIndexedMap(realm => realm.entity.id.value),\n\t\t\tchildrenWithPendingUpdates: undefined,\n\t\t\tentityName,\n\t\t\teventListeners: this.initializeEntityListEventListenerStore(blueprint),\n\t\t\tchildEventListeners: this.initializeEntityListChildEventListenerStore(blueprint),\n\t\t\terrors: undefined,\n\t\t\tplannedRemovals: undefined,\n\t\t\tunpersistedChangesCount: 0, // TODO force creation?\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (entityListState.accessor === undefined) {\n\t\t\t\t\tconst persistedEntityIds = this.treeStore.getEntityListPersistedIds(entityListState)\n\t\t\t\t\tentityListState.accessor = new EntityListAccessor(\n\t\t\t\t\t\tentityListState,\n\t\t\t\t\t\tthis.listOperations,\n\t\t\t\t\t\tentityListState.children,\n\t\t\t\t\t\tpersistedEntityIds,\n\t\t\t\t\t\tentityListState.unpersistedChangesCount !== 0,\n\t\t\t\t\t\tentityListState.errors,\n\t\t\t\t\t\tentityListState.blueprint.marker.environment,\n\t\t\t\t\t\tentityListState.getAccessor,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn entityListState.accessor\n\t\t\t},\n\t\t}\n\n\t\tconst initialData: Iterable<string | undefined> =\n\t\t\tinitialEntityIds.size === 0\n\t\t\t\t? Array.from({ length: blueprint.marker.parameters.initialEntityCount })\n\t\t\t\t: initialEntityIds\n\t\tfor (const entityId of initialData) {\n\t\t\tthis.initializeEntityRealm(\n\t\t\t\tentityId ? new ServerGeneratedUuid(entityId) : new UnpersistedEntityDummyId(),\n\t\t\t\tentityListState.entityName,\n\t\t\t\t{\n\t\t\t\t\ttype: 'listEntity',\n\t\t\t\t\tparent: entityListState,\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(entityListState)\n\n\t\treturn entityListState\n\t}\n\n\tprivate initializeFieldState(\n\t\tparent: EntityRealmState,\n\t\tplaceholderName: FieldName,\n\t\tfieldMarker: FieldMarker,\n\t\tpersistedValue: Scalar | undefined,\n\t): FieldState {\n\t\tconst resolvedFieldValue = persistedValue ?? fieldMarker.defaultValue ?? null\n\n\t\tconst fieldState: FieldState = {\n\t\t\ttype: 'field',\n\t\t\taccessor: undefined,\n\t\t\tfieldMarker,\n\t\t\tplaceholderName,\n\t\t\tpersistedValue,\n\t\t\tparent,\n\t\t\tvalue: resolvedFieldValue,\n\t\t\teventListeners: this.initializeFieldEventListenerStore(fieldMarker),\n\t\t\terrors: undefined,\n\t\t\ttouchLog: undefined,\n\t\t\thasUnpersistedChanges: false,\n\n\t\t\tgetAccessor: () => {\n\t\t\t\tif (fieldState.accessor === undefined) {\n\t\t\t\t\tconst fieldSchema = this.treeStore.schema.getEntityField(parent.entity.entityName, fieldMarker.fieldName)\n\t\t\t\t\tif (!fieldSchema) {\n\t\t\t\t\t\tthrow new BindingError(`Unknown field ${parent.entity.entityName}.${fieldMarker.fieldName}.`)\n\t\t\t\t\t}\n\t\t\t\t\tif (fieldSchema.__typename !== '_Column') {\n\t\t\t\t\t\tthrow new BindingError(`Invalid type of field ${parent.entity.entityName}.${fieldMarker.fieldName}. Expected '_Column', '${fieldSchema.__typename}' found.`)\n\t\t\t\t\t}\n\t\t\t\t\tfieldState.accessor = new FieldAccessor(\n\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\tthis.fieldOperations,\n\t\t\t\t\t\tfieldState.placeholderName,\n\t\t\t\t\t\tfieldState.value,\n\t\t\t\t\t\tfieldState.persistedValue === undefined ? null : fieldState.persistedValue,\n\t\t\t\t\t\tfieldState.fieldMarker.defaultValue,\n\t\t\t\t\t\tfieldState.errors,\n\t\t\t\t\t\tfieldState.hasUnpersistedChanges,\n\t\t\t\t\t\tfieldState.touchLog,\n\t\t\t\t\t\tfieldState.getAccessor,\n\t\t\t\t\t\tfieldSchema,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn fieldState.accessor\n\t\t\t},\n\t\t}\n\n\t\tthis.eventManager.registerNewlyInitialized(fieldState)\n\t\treturn fieldState\n\t}\n\n\tprivate initializeFromFieldMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: FieldMarker,\n\t\tfieldDatum: EntityFieldPersistedData | undefined,\n\t) {\n\t\tif (fieldDatum instanceof Set) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Received a collection of referenced entities where a single '${field.fieldName}' field was expected. ` +\n\t\t\t\t\t`Perhaps you wanted to use a <Repeater />?`,\n\t\t\t)\n\t\t}\n\t\tif (fieldDatum instanceof ServerGeneratedUuid) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Received a referenced entity where a single '${field.fieldName}' field was expected. ` +\n\t\t\t\t\t`Perhaps you wanted to use <HasOne />?`,\n\t\t\t)\n\t\t}\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeFieldState(parent, field.placeholderName, field, fieldDatum),\n\t\t)\n\t}\n\n\tprivate initializeFromHasOneRelationMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: HasOneRelationMarker,\n\t\tentityId: RuntimeId,\n\t\tcopyFrom?: EntityRealmState | EntityRealmStateStub,\n\t) {\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeEntityRealm(entityId, this.getRelationTargetEntityName(parent, field), {\n\t\t\t\ttype: 'hasOne',\n\t\t\t\tparent,\n\t\t\t\tmarker: field,\n\t\t\t}, copyFrom),\n\t\t)\n\t\t// if (fieldDatum instanceof ServerGeneratedUuid || fieldDatum === null || fieldDatum === undefined) {\n\t\t// \tconst entityId = fieldDatum instanceof ServerGeneratedUuid ? fieldDatum : new UnpersistedEntityDummyId()\n\t\t//\n\t\t//\n\t\t// } else if (fieldDatum instanceof Set) {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a collection of entities for field '${relation.field}' where a single entity was expected. ` +\n\t\t// \t\t\t`Perhaps you wanted to use a <Repeater />?`,\n\t\t// \t)\n\t\t// } else {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a scalar value for field '${relation.field}' where a single entity was expected.` +\n\t\t// \t\t\t`Perhaps you meant to use a variant of <Field />?`,\n\t\t// \t)\n\t\t// }\n\t}\n\n\tprivate initializeFromHasManyRelationMarker(\n\t\tparent: EntityRealmState,\n\t\tfield: HasManyRelationMarker,\n\t\tpersistedEntityIds: Set<string>,\n\t) {\n\t\tparent.children.set(\n\t\t\tfield.placeholderName,\n\t\t\tthis.initializeEntityListState(\n\t\t\t\t{ marker: field, parent },\n\t\t\t\tthis.getRelationTargetEntityName(parent, field),\n\t\t\t\tpersistedEntityIds,\n\t\t\t),\n\t\t)\n\t\t// const relation = field.parameters\n\t\t//\n\t\t// if (fieldDatum === undefined || fieldDatum instanceof Set) {\n\t\t//\n\t\t// } else if (typeof fieldDatum === 'object') {\n\t\t// \t// Intentionally allowing `fieldDatum === null` here as well since this should only happen when a *hasOne\n\t\t// \t// relation is unlinked, e.g. a Person does not have a linked Nationality.\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a referenced entity for field '${relation.field}' where a collection of entities was expected.` +\n\t\t// \t\t\t`Perhaps you wanted to use a <HasOne />?`,\n\t\t// \t)\n\t\t// } else {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Received a scalar value for field '${relation.field}' where a collection of entities was expected.` +\n\t\t// \t\t\t`Perhaps you meant to use a variant of <Field />?`,\n\t\t// \t)\n\t\t// }\n\t}\n\n\tprivate getRelationTargetEntityName(\n\t\tentityRealm: EntityRealmState,\n\t\tfield: HasOneRelationMarker | HasManyRelationMarker,\n\t): EntityName {\n\t\tconst targetField = this.treeStore.schema.getEntityField(entityRealm.entity.entityName, field.parameters.field)\n\n\t\tif (targetField?.__typename !== '_Relation') {\n\t\t\tthrow new BindingError() // This should have been validated elsewhere.\n\t\t}\n\t\treturn targetField.targetEntity\n\t}\n\n\tpublic runImmediateUserInitialization(\n\t\trealm: EntityRealmState | EntityRealmStateStub,\n\t\tinitialize: EntityAccessor.BatchUpdatesHandler | undefined,\n\t) {\n\t\tif (initialize === undefined) {\n\t\t\treturn\n\t\t}\n\t\tconst entityRealm = this.materializeEntityRealm(realm)\n\n\t\trealm.getAccessor().batchUpdates(initialize)\n\n\t\tconst initializeListeners = this.eventManager.getEventListeners(entityRealm, { type: 'initialize' })\n\t\tif (initializeListeners === undefined || initializeListeners.size === 0) {\n\t\t\trealm.entity.hasIdSetInStone = true\n\t\t}\n\t}\n\n\tpublic initializeEntityEventListenerStore(blueprint: EntityRealmBlueprint): EntityEventListenerStore | undefined {\n\t\tif (blueprint.type === 'listEntity') {\n\t\t\tconst blueprintListeners = blueprint.parent.blueprint.marker.parameters.childEventListeners\n\t\t\tconst childInitialize = blueprintListeners?.get({ type: 'initialize' })\n\t\t\tconst store: EntityEventListenerStore = new EventListenersStore(() => blueprint.parent.childEventListeners)\n\n\t\t\tif (childInitialize !== undefined) {\n\t\t\t\tstore.set({ type: 'initialize' }, childInitialize)\n\t\t\t}\n\t\t\treturn store\n\t\t}\n\n\t\tconst blueprintListeners = blueprint.marker.parameters.eventListeners\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneSingleEntityEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeEntityListEventListenerStore(\n\t\tblueprint: EntityListBlueprint,\n\t): EntityListEventListenerStore | undefined {\n\t\tconst blueprintListeners = blueprint.marker.parameters.eventListeners\n\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneEntityListEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeEntityListChildEventListenerStore(\n\t\tblueprint: EntityListBlueprint,\n\t): EntityEventListenerStore | undefined {\n\t\tconst blueprintListeners = blueprint.marker.parameters.childEventListeners\n\n\t\tif (blueprintListeners === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn TreeParameterMerger.cloneSingleEntityEventListeners(blueprintListeners)\n\t}\n\n\tprivate initializeFieldEventListenerStore(marker: FieldMarker): FieldEventListenerStore | undefined {\n\t\t// TODO !!!\n\t\treturn undefined\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;uBAwC8B;AAAA,EAKtB,YACW,sBACA,qBACA,QACA,cACA,WAChB;AAVe;AACA;AACA;;;;;;SASX,kBAAkB,IAAI,gBAAgB,KAAK,sBAAsB,KAAK,cAAc,MAAM,KAAK;SAC/F,mBAAmB,IAAI,iBAC3B,KAAK,sBACL,KAAK,qBACL,KAAK,cACL,MACA,KAAK;SAED,iBAAiB,IAAI,eACzB,KAAK,sBACL,KAAK,qBACL,KAAK,cACL,MACA,KAAK;AAAA;AAAA,EAIA,kBAAkB,MAAoE;QACxF;UACE,oBAAoB,KAAK,UAAU,qBAAqB,IAAI,KAAK;QAEnE,gBAAgB,yBAAyB;YACtC,qBAAkC,6BAA6B,MAAM,oBAAoB,IAAI;qBACpF,KAAK,0BACnB,EAAE,QAAQ,MAAM,QAAQ,UACxB,KAAK,YACL;AAAA,WAEK;qBACS,KAAK,uBACnB,KAAK,sBACJ,6BAA6B,sBAAsB,oBAAoB,IAAI,4BAC3E,KAAK,YACL;AAAA,QACC,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA;AAAA;WAML;AAAA;AAAA,EAGD,sBACN,IACA,YACA,WACA,UAC0C;UAKpC,SAAS,KAAK,sBAAsB,IAAI;UACxC,WAAW,kBAAkB,YAAY,IAAI;UAE7C,WAAW,KAAK,UAAU,iBAAiB,IAAI;QACjD,aAAa,QAAW;aACpB;AAAA;QAGJ,CAAC,YAAY,SAAS,SAAS,eAAe;YAC3C,OAA6B;AAAA,QAClC,MAAM;AAAA,QAEN;AAAA,QACA;AAAA,QACA;AAAA,QACA,aAAa,MAAM,KAAK,uBAAuB,MAAM;AAAA;WAEjD,oBAAoB;aAElB;AAAA;UAEF,QAAQ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O,eAAe,YAAY,OAAO,YAAY,MAAM,WAAW;QAErG,aAAa,eAAe,aAAa;YACtC,IAAI;AAAA;WAEJ,YAAY;AAAA;AAAA,EAGb,+BACN,OACA,YACC;QACG,eAAe,QAAW;;;UAGxB,cAAc,KAAK,uBAAuB;UAE1C,cAAc,aAAa;UAE3B,sBAAsB,KAAK,aAAa,kBAAkB,aAAa,EAAE,MAAM;QACjF,wBAAwB,UAAa,oBAAoB,SAAS,GAAG;YAClE,OAAO,kBAAkB;AAAA;AAAA;AAAA,EAI1B,mCAAmC,WAAuE;QAC5G,UAAU,SAAS,cAAc;YAC9B,sBAAqB,UAAU,OAAO,UAAU,OAAO,WAAW;YAClE,kBAAkB,qBAAoB,IAAI,EAAE,MAAM;YAClD,QAAkC,IAAI,oBAAoB,MAAM,UAAU,OAAO;UAEnF,oBAAoB,QAAW;cAC5B,IAAI,EAAE,MAAM,gBAAgB;AAAA;aAE5B;AAAA;UAGF,qBAAqB,UAAU,OAAO,WAAW;QACnD,uBAAuB,QAAW;aAC9B;AAAA;WAED,oBAAoB,gCAAgC;AAAA;AAAA,EAGpD,uCACP,WAC2C;UACrC,qBAAqB,UAAU,OAAO,WAAW;QAEnD,uBAAuB,QAAW;aAC9B;AAAA;WAED,oBAAoB,8BAA8B;AAAA;AAAA,EAGlD,4CACP,WACuC;UACjC,qBAAqB,UAAU,OAAO,WAAW;QAEnD,uBAAuB,QAAW;aAC9B;AAAA;WAED,oBAAoB,gCAAgC;AAAA;AAAA,EAGpD,kCAAkC,QAA0D;WAE5F;AAAA;AAAA;;"}
@@ -0,0 +1,4 @@
1
+ export declare class BindingError extends Error {
2
+ }
3
+ export declare const throwBindingError: (message: string) => never;
4
+ //# sourceMappingURL=BindingError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BindingError.d.ts","sourceRoot":"","sources":["../../src/BindingError.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;CAAG;AAE1C,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,KAEnD,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { EntityAccessor } from '../accessors';
3
+ export interface EntityProviderProps {
4
+ accessor: EntityAccessor;
5
+ children: ReactNode;
6
+ }
7
+ export declare function AccessorProvider(props: EntityProviderProps): JSX.Element;
8
+ //# sourceMappingURL=AccessorProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessorProvider.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/AccessorProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIlD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,cAAc,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,eAM1D"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { BindingOperations } from '../accessors';
3
+ export declare const defaultBindingOperations: Readonly<BindingOperations>;
4
+ export declare const BindingOperationsContext: import("react").Context<BindingOperations>;
5
+ //# sourceMappingURL=BindingOperationsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BindingOperationsContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/BindingOperationsContext.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAWrD,eAAO,MAAM,wBAAwB,6BAiBnC,CAAA;AAEF,eAAO,MAAM,wBAAwB,4CAA6D,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BindingOperations } from '../accessors';
3
+ export interface BindingOperationsProviderProps {
4
+ bindingOperations: BindingOperations | undefined;
5
+ children: ReactNode;
6
+ }
7
+ export declare function BindingOperationsProvider(props: BindingOperationsProviderProps): JSX.Element;
8
+ //# sourceMappingURL=BindingOperationsProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BindingOperationsProvider.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/BindingOperationsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGrD,MAAM,WAAW,8BAA8B;IAC9C,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAChD,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,eAM9E"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const EntityKeyContext: import("react").Context<string | undefined>;
3
+ //# sourceMappingURL=EntityKeyContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityKeyContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EntityKeyContext.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,gBAAgB,6CAA+C,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface EntityKeyProviderProps {
3
+ entityKey: string;
4
+ children: ReactNode;
5
+ }
6
+ export declare function EntityKeyProvider(props: EntityKeyProviderProps): JSX.Element;
7
+ //# sourceMappingURL=EntityKeyProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityKeyProvider.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EntityKeyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,WAAW,sBAAsB;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAE9D"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { Environment } from '../dao';
3
+ export declare const EnvironmentContext: import("react").Context<Environment>;
4
+ //# sourceMappingURL=EnvironmentContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnvironmentContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EnvironmentContext.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,eAAO,MAAM,kBAAkB,sCAAmD,CAAA"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const TreeRootIdContext: import("react").Context<string | undefined>;
3
+ //# sourceMappingURL=TreeRootIdContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeRootIdContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/TreeRootIdContext.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,iBAAiB,6CAAmD,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { TreeRootId } from '../treeParameters';
3
+ export interface TreeRootIdProviderProps {
4
+ treeRootId: TreeRootId | undefined;
5
+ children: ReactNode;
6
+ }
7
+ export declare function TreeRootIdProvider(props: TreeRootIdProviderProps): JSX.Element;
8
+ //# sourceMappingURL=TreeRootIdProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeRootIdProvider.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/TreeRootIdProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,MAAM,WAAW,uBAAuB;IACvC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAA;IAClC,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAEhE"}
@@ -0,0 +1,27 @@
1
+ export * from './AccessorProvider';
2
+ export * from './BindingOperationsProvider';
3
+ export * from './EntityKeyProvider';
4
+ export * from './EnvironmentContext';
5
+ export * from './TreeRootIdProvider';
6
+ export * from './useAccessorUpdateSubscription';
7
+ export * from './useBindingOperations';
8
+ export * from './useDesugaredRelativeEntityList';
9
+ export * from './useDesugaredRelativeSingleEntity';
10
+ export * from './useDesugaredRelativeSingleField';
11
+ export * from './useEntity';
12
+ export * from './useEntityKey';
13
+ export * from './useHasEntity';
14
+ export * from './useEntityList';
15
+ export * from './useEntityListSubTree';
16
+ export * from './useEntityListSubTreeParameters';
17
+ export * from './useEntitySubTree';
18
+ export * from './useEntitySubTreeParameters';
19
+ export * from './useEnvironment';
20
+ export * from './useField';
21
+ export * from './useGetEntityByKey';
22
+ export * from './useGetEntityListSubTree';
23
+ export * from './useGetEntitySubTree';
24
+ export * from './useGetTreeFilters';
25
+ export * from './usePersist';
26
+ export * from './useTreeRootId';
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { EntityAccessor, EntityListAccessor, FieldAccessor } from '../accessors';
2
+ import type { FieldValue } from '../treeParameters';
3
+ export declare type ForceAccessorUpdate = () => void;
4
+ /**
5
+ * It is VERY IMPORTANT for the parameter to be referentially stable!
6
+ */
7
+ declare function useAccessorUpdateSubscription<Value extends FieldValue = FieldValue>(getFieldAccessor: () => FieldAccessor<Value>): FieldAccessor<Value>;
8
+ declare function useAccessorUpdateSubscription(getEntityAccessor: () => EntityAccessor): EntityAccessor;
9
+ declare function useAccessorUpdateSubscription(getListAccessor: () => EntityListAccessor): EntityListAccessor;
10
+ declare function useAccessorUpdateSubscription(getAccessor: () => EntityListAccessor | EntityAccessor): EntityListAccessor | EntityAccessor;
11
+ declare function useAccessorUpdateSubscription<Value extends FieldValue = FieldValue>(getFieldAccessor: () => FieldAccessor<Value>, withForceUpdate: true): [FieldAccessor<Value>, ForceAccessorUpdate];
12
+ declare function useAccessorUpdateSubscription(getEntityAccessor: () => EntityAccessor, withForceUpdate: true): [EntityAccessor, ForceAccessorUpdate];
13
+ declare function useAccessorUpdateSubscription(getListAccessor: () => EntityListAccessor, withForceUpdate: true): [EntityListAccessor, ForceAccessorUpdate];
14
+ declare function useAccessorUpdateSubscription(getAccessor: () => EntityListAccessor | EntityAccessor, withForceUpdate: true): [EntityListAccessor | EntityAccessor, ForceAccessorUpdate];
15
+ export { useAccessorUpdateSubscription };
16
+ //# sourceMappingURL=useAccessorUpdateSubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAccessorUpdateSubscription.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useAccessorUpdateSubscription.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,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { BindingOperations } from '../accessors';
2
+ export declare const useBindingOperations: () => BindingOperations;
3
+ //# sourceMappingURL=useBindingOperations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBindingOperations.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useBindingOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGrD,eAAO,MAAM,oBAAoB,QAAO,iBAAyD,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { RelativeEntityList, SugaredRelativeEntityList } from '../treeParameters';
2
+ /**
3
+ * @deprecated Use useEntityList instead.
4
+ */
5
+ declare function useDesugaredRelativeEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): RelativeEntityList;
6
+ /**
7
+ * @deprecated Use useEntityList instead.
8
+ */
9
+ declare function useDesugaredRelativeEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined): RelativeEntityList | undefined;
10
+ export { useDesugaredRelativeEntityList };
11
+ //# sourceMappingURL=useDesugaredRelativeEntityList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDesugaredRelativeEntityList.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAGtF;;GAEG;AACH,iBAAS,8BAA8B,CACtC,yBAAyB,EAAE,MAAM,GAAG,yBAAyB,GAC3D,kBAAkB,CAAA;AACrB;;GAEG;AACH,iBAAS,8BAA8B,CACtC,yBAAyB,EAAE,MAAM,GAAG,yBAAyB,GAAG,SAAS,GACvE,kBAAkB,GAAG,SAAS,CAAA;AAqDjC,OAAO,EAAE,8BAA8B,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '../treeParameters';
2
+ /**
3
+ * @deprecated Use useEntity instead.
4
+ */
5
+ declare function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): RelativeSingleEntity;
6
+ /**
7
+ * @deprecated Use useEntity instead.
8
+ */
9
+ declare function useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined): RelativeSingleEntity | undefined;
10
+ export { useDesugaredRelativeSingleEntity };
11
+ //# sourceMappingURL=useDesugaredRelativeSingleEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDesugaredRelativeSingleEntity.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAG1F;;GAEG;AACH,iBAAS,gCAAgC,CACxC,2BAA2B,EAAE,MAAM,GAAG,2BAA2B,GAC/D,oBAAoB,CAAA;AACvB;;GAEG;AACH,iBAAS,gCAAgC,CACxC,2BAA2B,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,GAC3E,oBAAoB,GAAG,SAAS,CAAA;AAyCnC,OAAO,EAAE,gCAAgC,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { RelativeSingleField, SugaredRelativeSingleField } from '../treeParameters';
2
+ /**
3
+ * @deprecated Use useField instead.
4
+ */
5
+ declare function useDesugaredRelativeSingleField(sugaredRelativeSingleField: string | SugaredRelativeSingleField): RelativeSingleField;
6
+ /**
7
+ * @deprecated Use useField instead.
8
+ */
9
+ declare function useDesugaredRelativeSingleField(sugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined): RelativeSingleField | undefined;
10
+ export { useDesugaredRelativeSingleField };
11
+ //# sourceMappingURL=useDesugaredRelativeSingleField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDesugaredRelativeSingleField.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAGxF;;GAEG;AACH,iBAAS,+BAA+B,CACvC,0BAA0B,EAAE,MAAM,GAAG,0BAA0B,GAC7D,mBAAmB,CAAA;AACtB;;GAEG;AACH,iBAAS,+BAA+B,CACvC,0BAA0B,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,GACzE,mBAAmB,GAAG,SAAS,CAAA;AAyClC,OAAO,EAAE,+BAA+B,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { EntityAccessor } from '../accessors';
2
+ import type { SugaredRelativeSingleEntity } from '../treeParameters';
3
+ declare function useEntity(): EntityAccessor;
4
+ declare function useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor;
5
+ declare function useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined): EntityAccessor | undefined;
6
+ export { useEntity };
7
+ //# sourceMappingURL=useEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntity.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAIpE,iBAAS,SAAS,IAAI,cAAc,CAAA;AACpC,iBAAS,SAAS,CAAC,2BAA2B,EAAE,MAAM,GAAG,2BAA2B,GAAG,cAAc,CAAA;AACrG,iBAAS,SAAS,CACjB,2BAA2B,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,GAC3E,cAAc,GAAG,SAAS,CAAA;AA0C7B,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useEntityKey: () => string;
2
+ //# sourceMappingURL=useEntityKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntityKey.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityKey.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,QAAO,MAU/B,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { EntityListAccessor } from '../accessors';
2
+ import type { SugaredRelativeEntityList } from '../treeParameters';
3
+ declare function useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor;
4
+ declare function useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined): EntityListAccessor | undefined;
5
+ export { useEntityList };
6
+ //# sourceMappingURL=useEntityList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntityList.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityList.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAIlE,iBAAS,aAAa,CAAC,yBAAyB,EAAE,MAAM,GAAG,yBAAyB,GAAG,kBAAkB,CAAA;AACzG,iBAAS,aAAa,CACrB,yBAAyB,EAAE,MAAM,GAAG,yBAAyB,GAAG,SAAS,GACvE,kBAAkB,GAAG,SAAS,CAAA;AAoCjC,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { EntityListAccessor } from '../accessors';
2
+ import type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '../treeParameters';
3
+ export declare const useEntityListSubTree: (qualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList) => EntityListAccessor;
4
+ //# sourceMappingURL=useEntityListSubTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityListSubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAA;AAKnH,eAAO,MAAM,oBAAoB,wBACX,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,KAC/F,kBAUF,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '../treeParameters';
2
+ export declare function useEntityListSubTreeParameters(alias: Alias): Alias;
3
+ export declare function useEntityListSubTreeParameters(qualifiedEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList): SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList;
4
+ export declare function useEntityListSubTreeParameters(qualifiedEntityListOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList;
5
+ //# sourceMappingURL=useEntityListSubTreeParameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntityListSubTreeParameters.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityListSubTreeParameters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAA;AAEnH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAA;AACnE,wBAAgB,8BAA8B,CAC7C,mBAAmB,EAAE,0BAA0B,GAAG,uCAAuC,GACvF,0BAA0B,GAAG,uCAAuC,CAAA;AACvE,wBAAgB,8BAA8B,CAC7C,0BAA0B,EAAE,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,GACtG,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { EntityAccessor } from '../accessors';
2
+ import type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters';
3
+ export declare const useEntitySubTree: (qualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity) => EntityAccessor;
4
+ //# sourceMappingURL=useEntitySubTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntitySubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,MAAM,mBAAmB,CAAA;AAKvH,eAAO,MAAM,gBAAgB,0BACL,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,KACrG,cASF,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters';
2
+ export declare function useEntitySubTreeParameters(alias: Alias): Alias;
3
+ export declare function useEntitySubTreeParameters(qualifiedEntity: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity): SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity;
4
+ export declare function useEntitySubTreeParameters(qualifiedSingleEntityOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity;
5
+ //# sourceMappingURL=useEntitySubTreeParameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntitySubTreeParameters.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntitySubTreeParameters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,MAAM,mBAAmB,CAAA;AAEvH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAA;AAC/D,wBAAgB,0BAA0B,CACzC,eAAe,EAAE,4BAA4B,GAAG,yCAAyC,GACvF,4BAA4B,GAAG,yCAAyC,CAAA;AAC3E,wBAAgB,0BAA0B,CACzC,4BAA4B,EAAE,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,GAC5G,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Environment } from '../dao';
2
+ export declare const useEnvironment: () => Environment;
3
+ //# sourceMappingURL=useEnvironment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEnvironment.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEnvironment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGzC,eAAO,MAAM,cAAc,QAAO,WAEjC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { FieldAccessor } from '../accessors';
2
+ import type { FieldValue, SugaredRelativeSingleField } from '../treeParameters';
3
+ declare function useField<Value extends FieldValue = FieldValue>(sugaredRelativeSingleField: string | SugaredRelativeSingleField): FieldAccessor<Value>;
4
+ declare function useField<Value extends FieldValue = FieldValue>(sugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined): FieldAccessor<Value> | undefined;
5
+ export { useField };
6
+ //# sourceMappingURL=useField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useField.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useField.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAI/E,iBAAS,QAAQ,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,EACtD,0BAA0B,EAAE,MAAM,GAAG,0BAA0B,GAC7D,aAAa,CAAC,KAAK,CAAC,CAAA;AACvB,iBAAS,QAAQ,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,EACtD,0BAA0B,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,GACzE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;AAoCnC,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GetEntityByKey } from '../accessors';
2
+ export declare const useGetEntityByKey: () => GetEntityByKey;
3
+ //# sourceMappingURL=useGetEntityByKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetEntityByKey.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useGetEntityByKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAGlD,eAAO,MAAM,iBAAiB,QAAO,cAAuD,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { EntityListAccessor } from '../accessors';
2
+ import type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '../treeParameters';
3
+ export declare const useGetEntityListSubTree: () => (parametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList, ...treeId: [TreeRootId | undefined] | []) => EntityListAccessor;
4
+ //# sourceMappingURL=useGetEntityListSubTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetEntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useGetEntityListSubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EACX,KAAK,EACL,0BAA0B,EAC1B,uCAAuC,EACvC,UAAU,EACV,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,uBAAuB,4BAChB,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,aACpF,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,KACpC,kBAYJ,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { EntityAccessor } from '../accessors';
2
+ import type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '../treeParameters';
3
+ export declare const useGetEntitySubTree: () => (parametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity, ...treeId: [TreeRootId | undefined] | []) => EntityAccessor;
4
+ //# sourceMappingURL=useGetEntitySubTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetEntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useGetEntitySubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EACX,KAAK,EACL,4BAA4B,EAC5B,yCAAyC,EACzC,UAAU,EACV,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,mBAAmB,4BACZ,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,aACxF,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,KACpC,cAYJ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { TreeFilter } from '@contember/client';
2
+ export declare const useGetTreeFilters: () => (() => TreeFilter[]);
3
+ //# sourceMappingURL=useGetTreeFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetTreeFilters.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useGetTreeFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,eAAO,MAAM,iBAAiB,QAAO,CAAC,MAAM,UAAU,EAAE,CAA0C,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useHasEntity: () => boolean;
2
+ //# sourceMappingURL=useHasEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHasEntity.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useHasEntity.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,QAAO,OAE/B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Persist } from '../accessors';
2
+ export declare const usePersist: () => Persist;
3
+ //# sourceMappingURL=usePersist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePersist.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/usePersist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAG3C,eAAO,MAAM,UAAU,QAAO,OAAyC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { TreeRootId } from '../treeParameters';
2
+ export declare const useTreeRootId: () => TreeRootId | undefined;
3
+ //# sourceMappingURL=useTreeRootId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTreeRootId.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useTreeRootId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAA0C,CAAA"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { SugaredRelativeSingleField, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters';
3
+ export interface SetOrderFieldOnCreateOwnProps {
4
+ orderField: SugaredRelativeSingleField | string;
5
+ newOrderFieldValue?: number;
6
+ }
7
+ export interface SetOrderFieldOnCreateProps extends SetOrderFieldOnCreateOwnProps, Pick<SugaredUnconstrainedQualifiedSingleEntity, 'entity'> {
8
+ }
9
+ export declare const SetOrderFieldOnCreate: import("react").NamedExoticComponent<SetOrderFieldOnCreateProps>;
10
+ //# sourceMappingURL=SetOrderFieldOnCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetOrderFieldOnCreate.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/SetOrderFieldOnCreate.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAGX,0BAA0B,EAC1B,yCAAyC,EACzC,MAAM,mBAAmB,CAAA;AAG1B,MAAM,WAAW,6BAA6B;IAC7C,UAAU,EAAE,0BAA0B,GAAG,MAAM,CAAA;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,0BAChB,SAAQ,6BAA6B,EACpC,IAAI,CAAC,yCAAyC,EAAE,QAAQ,CAAC;CAAG;AAE9D,eAAO,MAAM,qBAAqB,kEAqEjC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { EntityAccessor } from '../accessors';
2
+ export interface SortedEntities {
3
+ entities: EntityAccessor[];
4
+ prependNew: (initialize?: EntityAccessor.BatchUpdatesHandler) => void;
5
+ appendNew: (initialize?: EntityAccessor.BatchUpdatesHandler) => void;
6
+ addNewAtIndex: (index: number, preprocess?: EntityAccessor.BatchUpdatesHandler) => void;
7
+ moveEntity: (oldIndex: number, newIndex: number) => void;
8
+ }
9
+ //# sourceMappingURL=SortedEntities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortedEntities.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/SortedEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,mBAAmB,KAAK,IAAI,CAAA;IACrE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,mBAAmB,KAAK,IAAI,CAAA;IACpE,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,cAAc,CAAC,mBAAmB,KAAK,IAAI,CAAA;IACvF,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACxD"}
@@ -0,0 +1,4 @@
1
+ import type { EntityAccessor, EntityListAccessor } from '../accessors';
2
+ import type { RelativeSingleField } from '../treeParameters';
3
+ export declare const addEntityAtIndex: (entityList: EntityListAccessor, sortableByField: RelativeSingleField, index: number, preprocess?: EntityAccessor.BatchUpdatesHandler | undefined) => void;
4
+ //# sourceMappingURL=addEntityAtIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addEntityAtIndex.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/addEntityAtIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,eAAO,MAAM,gBAAgB,eAChB,kBAAkB,mBACb,mBAAmB,SAC7B,MAAM,sEAkBb,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { EntityListAccessor } from '../accessors';
2
+ import type { FieldName } from '../treeParameters';
3
+ import type { SortedEntities } from './SortedEntities';
4
+ export declare const throwNoopError: (callbackName: keyof SortedEntities) => never;
5
+ export declare const throwNonWritableError: (target: FieldName | EntityListAccessor) => never;
6
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,eAAO,MAAM,cAAc,iBAAkB,MAAM,cAAc,UAKhE,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,SAAS,GAAG,kBAAkB,UAK3E,CAAA"}