@contember/binding 1.2.7 → 1.3.0-alpha.11

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 (1106) hide show
  1. package/dist/development/BindingError.cjs +10 -0
  2. package/dist/development/BindingError.cjs.map +1 -0
  3. package/dist/development/accessorTree/NormalizedPersistedData.cjs +10 -0
  4. package/dist/development/accessorTree/NormalizedPersistedData.cjs.map +1 -0
  5. package/dist/development/accessorTree/RuntimeId.cjs +64 -0
  6. package/dist/development/accessorTree/RuntimeId.cjs.map +1 -0
  7. package/dist/development/accessorTree/RuntimeId.js +5 -5
  8. package/dist/development/accessorTree/RuntimeId.js.map +1 -1
  9. package/dist/development/accessors/EntityAccessor.cjs +169 -0
  10. package/dist/development/accessors/EntityAccessor.cjs.map +1 -0
  11. package/dist/development/accessors/EntityAccessor.js +1 -1
  12. package/dist/development/accessors/EntityAccessor.js.map +1 -1
  13. package/dist/development/accessors/EntityListAccessor.cjs +101 -0
  14. package/dist/development/accessors/EntityListAccessor.cjs.map +1 -0
  15. package/dist/development/accessors/ErrorAccessor.cjs +16 -0
  16. package/dist/development/accessors/ErrorAccessor.cjs.map +1 -0
  17. package/dist/development/accessors/FieldAccessor.cjs +59 -0
  18. package/dist/development/accessors/FieldAccessor.cjs.map +1 -0
  19. package/dist/development/accessors/TreeRootAccessor.cjs +14 -0
  20. package/dist/development/accessors/TreeRootAccessor.cjs.map +1 -0
  21. package/dist/development/accessors/TreeRootAccessor.js.map +1 -1
  22. package/dist/development/bindingTypes.cjs +9 -0
  23. package/dist/development/bindingTypes.cjs.map +1 -0
  24. package/dist/development/core/AccessorErrorManager.cjs +207 -0
  25. package/dist/development/core/AccessorErrorManager.cjs.map +1 -0
  26. package/dist/development/core/AccessorErrorManager.js +6 -5
  27. package/dist/development/core/AccessorErrorManager.js.map +1 -1
  28. package/dist/development/core/Config.cjs +32 -0
  29. package/dist/development/core/Config.cjs.map +1 -0
  30. package/dist/development/core/Config.js +3 -3
  31. package/dist/development/core/Config.js.map +1 -1
  32. package/dist/development/core/DataBinding.cjs +352 -0
  33. package/dist/development/core/DataBinding.cjs.map +1 -0
  34. package/dist/development/core/DataBinding.js +56 -49
  35. package/dist/development/core/DataBinding.js.map +1 -1
  36. package/dist/development/core/DirtinessTracker.cjs +29 -0
  37. package/dist/development/core/DirtinessTracker.cjs.map +1 -0
  38. package/dist/development/core/ErrorsPreprocessor.cjs +181 -0
  39. package/dist/development/core/ErrorsPreprocessor.cjs.map +1 -0
  40. package/dist/development/core/ErrorsPreprocessor.js +16 -16
  41. package/dist/development/core/ErrorsPreprocessor.js.map +1 -1
  42. package/dist/development/core/EventManager.cjs +440 -0
  43. package/dist/development/core/EventManager.cjs.map +1 -0
  44. package/dist/development/core/EventManager.js +7 -5
  45. package/dist/development/core/EventManager.js.map +1 -1
  46. package/dist/development/core/MarkerComparator.cjs +79 -0
  47. package/dist/development/core/MarkerComparator.cjs.map +1 -0
  48. package/dist/development/core/MarkerComparator.js.map +1 -1
  49. package/dist/development/core/MarkerMerger.cjs +252 -0
  50. package/dist/development/core/MarkerMerger.cjs.map +1 -0
  51. package/dist/development/core/MarkerMerger.js +2 -2
  52. package/dist/development/core/MarkerMerger.js.map +1 -1
  53. package/dist/development/core/MutationGenerator.cjs +635 -0
  54. package/dist/development/core/MutationGenerator.cjs.map +1 -0
  55. package/dist/development/core/MutationGenerator.js +341 -294
  56. package/dist/development/core/MutationGenerator.js.map +1 -1
  57. package/dist/development/core/QueryGenerator.cjs +113 -0
  58. package/dist/development/core/QueryGenerator.cjs.map +1 -0
  59. package/dist/development/core/QueryGenerator.js +62 -75
  60. package/dist/development/core/QueryGenerator.js.map +1 -1
  61. package/dist/development/core/RealmKeyGenerator.cjs +47 -0
  62. package/dist/development/core/RealmKeyGenerator.cjs.map +1 -0
  63. package/dist/development/core/RealmKeyGenerator.js.map +1 -1
  64. package/dist/development/core/RequestResponseNormalizer.cjs +125 -0
  65. package/dist/development/core/RequestResponseNormalizer.cjs.map +1 -0
  66. package/dist/development/core/StateInitializer.cjs +389 -0
  67. package/dist/development/core/StateInitializer.cjs.map +1 -0
  68. package/dist/development/core/StateInitializer.js +2 -2
  69. package/dist/development/core/StateInitializer.js.map +1 -1
  70. package/dist/development/core/TreeAugmenter.cjs +213 -0
  71. package/dist/development/core/TreeAugmenter.cjs.map +1 -0
  72. package/dist/development/core/TreeFilterGenerator.cjs +83 -0
  73. package/dist/development/core/TreeFilterGenerator.cjs.map +1 -0
  74. package/dist/development/core/TreeParameterMerger.cjs +304 -0
  75. package/dist/development/core/TreeParameterMerger.cjs.map +1 -0
  76. package/dist/development/core/TreeParameterMerger.js +8 -0
  77. package/dist/development/core/TreeParameterMerger.js.map +1 -1
  78. package/dist/development/core/TreeStore.cjs +182 -0
  79. package/dist/development/core/TreeStore.cjs.map +1 -0
  80. package/dist/development/core/TreeStore.js +1 -1
  81. package/dist/development/core/TreeStore.js.map +1 -1
  82. package/dist/development/core/VariableInputTransformer.cjs +24 -0
  83. package/dist/development/core/VariableInputTransformer.cjs.map +1 -0
  84. package/dist/development/core/VariableInputTransformer.js.map +1 -1
  85. package/dist/development/core/exceptions/ErrorLocator.cjs +62 -0
  86. package/dist/development/core/exceptions/ErrorLocator.cjs.map +1 -0
  87. package/dist/development/core/exceptions/LocalizedBindingError.cjs +14 -0
  88. package/dist/development/core/exceptions/LocalizedBindingError.cjs.map +1 -0
  89. package/dist/development/core/exceptions/MarkerSugarer.cjs +56 -0
  90. package/dist/development/core/exceptions/MarkerSugarer.cjs.map +1 -0
  91. package/dist/development/core/exceptions/TreeParameterSugarer.cjs +33 -0
  92. package/dist/development/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  93. package/dist/development/core/exceptions/TreeParameterSugarer.js.map +1 -1
  94. package/dist/development/core/factories/createBatchUpdatesOptions.cjs +20 -0
  95. package/dist/development/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  96. package/dist/development/core/factories/createBatchUpdatesOptions.js.map +1 -1
  97. package/dist/development/core/operations/EntityOperations.cjs +238 -0
  98. package/dist/development/core/operations/EntityOperations.cjs.map +1 -0
  99. package/dist/development/core/operations/EntityOperations.js +1 -1
  100. package/dist/development/core/operations/EntityOperations.js.map +1 -1
  101. package/dist/development/core/operations/FieldOperations.cjs +96 -0
  102. package/dist/development/core/operations/FieldOperations.cjs.map +1 -0
  103. package/dist/development/core/operations/FieldOperations.js +1 -1
  104. package/dist/development/core/operations/FieldOperations.js.map +1 -1
  105. package/dist/development/core/operations/ListOperations.cjs +159 -0
  106. package/dist/development/core/operations/ListOperations.cjs.map +1 -0
  107. package/dist/development/core/operations/ListOperations.js.map +1 -1
  108. package/dist/development/core/operations/OperationsHelpers.cjs +85 -0
  109. package/dist/development/core/operations/OperationsHelpers.cjs.map +1 -0
  110. package/dist/development/core/operations/OperationsHelpers.js.map +1 -1
  111. package/dist/development/core/requestAliases/MutationAlias.cjs +14 -0
  112. package/dist/development/core/requestAliases/MutationAlias.cjs.map +1 -0
  113. package/dist/development/core/requestAliases/MutationAlias.js.map +1 -1
  114. package/dist/development/core/schema/Schema.cjs +39 -0
  115. package/dist/development/core/schema/Schema.cjs.map +1 -0
  116. package/dist/development/core/schema/Schema.js.map +1 -1
  117. package/dist/development/core/schema/SchemaLoader.cjs +28 -0
  118. package/dist/development/core/schema/SchemaLoader.cjs.map +1 -0
  119. package/dist/development/core/schema/SchemaLoader.js +2 -2
  120. package/dist/development/core/schema/SchemaLoader.js.map +1 -1
  121. package/dist/development/core/schema/SchemaPreprocessor.cjs +38 -0
  122. package/dist/development/core/schema/SchemaPreprocessor.cjs.map +1 -0
  123. package/dist/development/core/state/StateIterator.cjs +100 -0
  124. package/dist/development/core/state/StateIterator.cjs.map +1 -0
  125. package/dist/development/core/state/getEntityMarker.cjs +5 -0
  126. package/dist/development/core/state/getEntityMarker.cjs.map +1 -0
  127. package/dist/development/core/utils/createQueryBuilder.cjs +32 -0
  128. package/dist/development/core/utils/createQueryBuilder.cjs.map +1 -0
  129. package/dist/development/core/utils/createQueryBuilder.js +32 -0
  130. package/dist/development/core/utils/createQueryBuilder.js.map +1 -0
  131. package/dist/development/core/utils/getCombinedSignal.cjs +33 -0
  132. package/dist/development/core/utils/getCombinedSignal.cjs.map +1 -0
  133. package/dist/development/dao/Environment.cjs +213 -0
  134. package/dist/development/dao/Environment.cjs.map +1 -0
  135. package/dist/development/dao/Environment.js.map +1 -1
  136. package/dist/development/dao/TreeNodeEnvironmentFactory.cjs +89 -0
  137. package/dist/development/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
  138. package/dist/development/dao/VariableFieldValue.cjs +9 -0
  139. package/dist/development/dao/VariableFieldValue.cjs.map +1 -0
  140. package/dist/development/fieldHelpers/helpers/FieldHelper.cjs +17 -0
  141. package/dist/development/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  142. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  143. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  144. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  145. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  146. package/dist/development/index.cjs +124 -0
  147. package/dist/development/index.cjs.map +1 -0
  148. package/dist/development/index.js +18 -135
  149. package/dist/development/index.js.map +1 -1
  150. package/dist/development/markers/EntityFieldMarkersContainer.cjs +41 -0
  151. package/dist/development/markers/EntityFieldMarkersContainer.cjs.map +1 -0
  152. package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs +11 -0
  153. package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
  154. package/dist/development/markers/EntityListSubTreeMarker.cjs +23 -0
  155. package/dist/development/markers/EntityListSubTreeMarker.cjs.map +1 -0
  156. package/dist/development/markers/EntitySubTreeMarker.cjs +23 -0
  157. package/dist/development/markers/EntitySubTreeMarker.cjs.map +1 -0
  158. package/dist/development/markers/FieldMarker.cjs +20 -0
  159. package/dist/development/markers/FieldMarker.cjs.map +1 -0
  160. package/dist/development/markers/HasManyRelationMarker.cjs +29 -0
  161. package/dist/development/markers/HasManyRelationMarker.cjs.map +1 -0
  162. package/dist/development/markers/HasOneRelationMarker.cjs +23 -0
  163. package/dist/development/markers/HasOneRelationMarker.cjs.map +1 -0
  164. package/dist/development/markers/MarkerTreeRoot.cjs +10 -0
  165. package/dist/development/markers/MarkerTreeRoot.cjs.map +1 -0
  166. package/dist/development/markers/ParentEntityMarker.cjs +10 -0
  167. package/dist/development/markers/ParentEntityMarker.cjs.map +1 -0
  168. package/dist/development/markers/PlaceholderGenerator.cjs +23 -0
  169. package/dist/development/markers/PlaceholderGenerator.cjs.map +1 -0
  170. package/dist/development/markers/PlaceholderGenerator.js.map +1 -1
  171. package/dist/development/markers/PlaceholderParametersGenerator.cjs +62 -0
  172. package/dist/development/markers/PlaceholderParametersGenerator.cjs.map +1 -0
  173. package/dist/development/queryLanguage/CacheStore.cjs +47 -0
  174. package/dist/development/queryLanguage/CacheStore.cjs.map +1 -0
  175. package/dist/development/queryLanguage/CacheStore.js +2 -1
  176. package/dist/development/queryLanguage/CacheStore.js.map +1 -1
  177. package/dist/development/queryLanguage/MarkerFactory.cjs +200 -0
  178. package/dist/development/queryLanguage/MarkerFactory.cjs.map +1 -0
  179. package/dist/development/queryLanguage/MarkerFactory.js +1 -1
  180. package/dist/development/queryLanguage/Parser.cjs +728 -0
  181. package/dist/development/queryLanguage/Parser.cjs.map +1 -0
  182. package/dist/development/queryLanguage/Parser.js +70 -29
  183. package/dist/development/queryLanguage/Parser.js.map +1 -1
  184. package/dist/development/queryLanguage/QueryLanguage.cjs +520 -0
  185. package/dist/development/queryLanguage/QueryLanguage.cjs.map +1 -0
  186. package/dist/development/queryLanguage/QueryLanguage.js +16 -14
  187. package/dist/development/queryLanguage/QueryLanguage.js.map +1 -1
  188. package/dist/development/queryLanguage/QueryLanguageError.cjs +6 -0
  189. package/dist/development/queryLanguage/QueryLanguageError.cjs.map +1 -0
  190. package/dist/development/queryLanguage/tokenList.cjs +150 -0
  191. package/dist/development/queryLanguage/tokenList.cjs.map +1 -0
  192. package/dist/development/queryLanguage/tokenList.js +1 -1
  193. package/dist/development/queryLanguage/tokenList.js.map +1 -1
  194. package/dist/development/structures/BijectiveIndexedMap.cjs +120 -0
  195. package/dist/development/structures/BijectiveIndexedMap.cjs.map +1 -0
  196. package/dist/development/structures/LRUCache.cjs +35 -0
  197. package/dist/development/structures/LRUCache.cjs.map +1 -0
  198. package/dist/development/structures/WeakIdCache.cjs +33 -0
  199. package/dist/development/structures/WeakIdCache.cjs.map +1 -0
  200. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs +22 -0
  201. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
  202. package/dist/development/treeParameters/EntityCreationParameters.cjs +8 -0
  203. package/dist/development/treeParameters/EntityCreationParameters.cjs.map +1 -0
  204. package/dist/development/treeParameters/EntityListPreferences.cjs +7 -0
  205. package/dist/development/treeParameters/EntityListPreferences.cjs.map +1 -0
  206. package/dist/development/treeParameters/EventListenersStore.cjs +70 -0
  207. package/dist/development/treeParameters/EventListenersStore.cjs.map +1 -0
  208. package/dist/development/treeParameters/EventListenersStore.js.map +1 -1
  209. package/dist/development/treeParameters/LeafField.cjs +7 -0
  210. package/dist/development/treeParameters/LeafField.cjs.map +1 -0
  211. package/dist/development/treeParameters/QualifiedEntityParameters.cjs +7 -0
  212. package/dist/development/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
  213. package/dist/development/treeParameters/Relation.cjs +7 -0
  214. package/dist/development/treeParameters/Relation.cjs.map +1 -0
  215. package/dist/development/utils/Hashing.cjs +22 -0
  216. package/dist/development/utils/Hashing.cjs.map +1 -0
  217. package/dist/development/utils/TreeNodeUtils.cjs +77 -0
  218. package/dist/development/utils/TreeNodeUtils.cjs.map +1 -0
  219. package/dist/development/utils/TreeNodeUtils.js.map +1 -1
  220. package/dist/development/utils/assert.cjs +11 -0
  221. package/dist/development/utils/assert.cjs.map +1 -0
  222. package/dist/development/utils/assert.js.map +1 -1
  223. package/dist/development/utils/assertNever.cjs +10 -0
  224. package/dist/development/utils/assertNever.cjs.map +1 -0
  225. package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  226. package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  227. package/dist/development/utils/isEmptyObject.cjs +12 -0
  228. package/dist/development/utils/isEmptyObject.cjs.map +1 -0
  229. package/dist/development/utils/ucfirst.cjs +5 -0
  230. package/dist/development/utils/ucfirst.cjs.map +1 -0
  231. package/dist/development/utils/ucfirst.js.map +1 -1
  232. package/dist/production/BindingError.cjs +10 -0
  233. package/dist/production/BindingError.cjs.map +1 -0
  234. package/dist/production/accessorTree/NormalizedPersistedData.cjs +10 -0
  235. package/dist/production/accessorTree/NormalizedPersistedData.cjs.map +1 -0
  236. package/dist/production/accessorTree/RuntimeId.cjs +64 -0
  237. package/dist/production/accessorTree/RuntimeId.cjs.map +1 -0
  238. package/dist/production/accessorTree/RuntimeId.js +5 -5
  239. package/dist/production/accessorTree/RuntimeId.js.map +1 -1
  240. package/dist/production/accessors/EntityAccessor.cjs +169 -0
  241. package/dist/production/accessors/EntityAccessor.cjs.map +1 -0
  242. package/dist/production/accessors/EntityAccessor.js +1 -1
  243. package/dist/production/accessors/EntityAccessor.js.map +1 -1
  244. package/dist/production/accessors/EntityListAccessor.cjs +101 -0
  245. package/dist/production/accessors/EntityListAccessor.cjs.map +1 -0
  246. package/dist/production/accessors/ErrorAccessor.cjs +16 -0
  247. package/dist/production/accessors/ErrorAccessor.cjs.map +1 -0
  248. package/dist/production/accessors/FieldAccessor.cjs +59 -0
  249. package/dist/production/accessors/FieldAccessor.cjs.map +1 -0
  250. package/dist/production/accessors/TreeRootAccessor.cjs +14 -0
  251. package/dist/production/accessors/TreeRootAccessor.cjs.map +1 -0
  252. package/dist/production/accessors/TreeRootAccessor.js.map +1 -1
  253. package/dist/production/bindingTypes.cjs +9 -0
  254. package/dist/production/bindingTypes.cjs.map +1 -0
  255. package/dist/production/core/AccessorErrorManager.cjs +207 -0
  256. package/dist/production/core/AccessorErrorManager.cjs.map +1 -0
  257. package/dist/production/core/AccessorErrorManager.js +6 -5
  258. package/dist/production/core/AccessorErrorManager.js.map +1 -1
  259. package/dist/production/core/Config.cjs +32 -0
  260. package/dist/production/core/Config.cjs.map +1 -0
  261. package/dist/production/core/Config.js +3 -3
  262. package/dist/production/core/Config.js.map +1 -1
  263. package/dist/production/core/DataBinding.cjs +352 -0
  264. package/dist/production/core/DataBinding.cjs.map +1 -0
  265. package/dist/production/core/DataBinding.js +56 -49
  266. package/dist/production/core/DataBinding.js.map +1 -1
  267. package/dist/production/core/DirtinessTracker.cjs +29 -0
  268. package/dist/production/core/DirtinessTracker.cjs.map +1 -0
  269. package/dist/production/core/ErrorsPreprocessor.cjs +181 -0
  270. package/dist/production/core/ErrorsPreprocessor.cjs.map +1 -0
  271. package/dist/production/core/ErrorsPreprocessor.js +16 -16
  272. package/dist/production/core/ErrorsPreprocessor.js.map +1 -1
  273. package/dist/production/core/EventManager.cjs +414 -0
  274. package/dist/production/core/EventManager.cjs.map +1 -0
  275. package/dist/production/core/EventManager.js +7 -5
  276. package/dist/production/core/EventManager.js.map +1 -1
  277. package/dist/production/core/MarkerComparator.cjs +79 -0
  278. package/dist/production/core/MarkerComparator.cjs.map +1 -0
  279. package/dist/production/core/MarkerComparator.js.map +1 -1
  280. package/dist/production/core/MarkerMerger.cjs +252 -0
  281. package/dist/production/core/MarkerMerger.cjs.map +1 -0
  282. package/dist/production/core/MarkerMerger.js +2 -2
  283. package/dist/production/core/MarkerMerger.js.map +1 -1
  284. package/dist/production/core/MutationGenerator.cjs +635 -0
  285. package/dist/production/core/MutationGenerator.cjs.map +1 -0
  286. package/dist/production/core/MutationGenerator.js +341 -294
  287. package/dist/production/core/MutationGenerator.js.map +1 -1
  288. package/dist/production/core/QueryGenerator.cjs +113 -0
  289. package/dist/production/core/QueryGenerator.cjs.map +1 -0
  290. package/dist/production/core/QueryGenerator.js +62 -75
  291. package/dist/production/core/QueryGenerator.js.map +1 -1
  292. package/dist/production/core/RealmKeyGenerator.cjs +47 -0
  293. package/dist/production/core/RealmKeyGenerator.cjs.map +1 -0
  294. package/dist/production/core/RealmKeyGenerator.js.map +1 -1
  295. package/dist/production/core/RequestResponseNormalizer.cjs +125 -0
  296. package/dist/production/core/RequestResponseNormalizer.cjs.map +1 -0
  297. package/dist/production/core/StateInitializer.cjs +389 -0
  298. package/dist/production/core/StateInitializer.cjs.map +1 -0
  299. package/dist/production/core/StateInitializer.js +2 -2
  300. package/dist/production/core/StateInitializer.js.map +1 -1
  301. package/dist/production/core/TreeAugmenter.cjs +213 -0
  302. package/dist/production/core/TreeAugmenter.cjs.map +1 -0
  303. package/dist/production/core/TreeFilterGenerator.cjs +83 -0
  304. package/dist/production/core/TreeFilterGenerator.cjs.map +1 -0
  305. package/dist/production/core/TreeParameterMerger.cjs +304 -0
  306. package/dist/production/core/TreeParameterMerger.cjs.map +1 -0
  307. package/dist/production/core/TreeParameterMerger.js +8 -0
  308. package/dist/production/core/TreeParameterMerger.js.map +1 -1
  309. package/dist/production/core/TreeStore.cjs +182 -0
  310. package/dist/production/core/TreeStore.cjs.map +1 -0
  311. package/dist/production/core/TreeStore.js +1 -1
  312. package/dist/production/core/TreeStore.js.map +1 -1
  313. package/dist/production/core/VariableInputTransformer.cjs +24 -0
  314. package/dist/production/core/VariableInputTransformer.cjs.map +1 -0
  315. package/dist/production/core/VariableInputTransformer.js.map +1 -1
  316. package/dist/production/core/exceptions/ErrorLocator.cjs +62 -0
  317. package/dist/production/core/exceptions/ErrorLocator.cjs.map +1 -0
  318. package/dist/production/core/exceptions/LocalizedBindingError.cjs +14 -0
  319. package/dist/production/core/exceptions/LocalizedBindingError.cjs.map +1 -0
  320. package/dist/production/core/exceptions/MarkerSugarer.cjs +56 -0
  321. package/dist/production/core/exceptions/MarkerSugarer.cjs.map +1 -0
  322. package/dist/production/core/exceptions/TreeParameterSugarer.cjs +33 -0
  323. package/dist/production/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  324. package/dist/production/core/exceptions/TreeParameterSugarer.js.map +1 -1
  325. package/dist/production/core/factories/createBatchUpdatesOptions.cjs +20 -0
  326. package/dist/production/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  327. package/dist/production/core/factories/createBatchUpdatesOptions.js.map +1 -1
  328. package/dist/production/core/operations/EntityOperations.cjs +238 -0
  329. package/dist/production/core/operations/EntityOperations.cjs.map +1 -0
  330. package/dist/production/core/operations/EntityOperations.js +1 -1
  331. package/dist/production/core/operations/EntityOperations.js.map +1 -1
  332. package/dist/production/core/operations/FieldOperations.cjs +76 -0
  333. package/dist/production/core/operations/FieldOperations.cjs.map +1 -0
  334. package/dist/production/core/operations/FieldOperations.js +1 -1
  335. package/dist/production/core/operations/ListOperations.cjs +159 -0
  336. package/dist/production/core/operations/ListOperations.cjs.map +1 -0
  337. package/dist/production/core/operations/ListOperations.js.map +1 -1
  338. package/dist/production/core/operations/OperationsHelpers.cjs +85 -0
  339. package/dist/production/core/operations/OperationsHelpers.cjs.map +1 -0
  340. package/dist/production/core/operations/OperationsHelpers.js.map +1 -1
  341. package/dist/production/core/requestAliases/MutationAlias.cjs +14 -0
  342. package/dist/production/core/requestAliases/MutationAlias.cjs.map +1 -0
  343. package/dist/production/core/requestAliases/MutationAlias.js.map +1 -1
  344. package/dist/production/core/schema/Schema.cjs +39 -0
  345. package/dist/production/core/schema/Schema.cjs.map +1 -0
  346. package/dist/production/core/schema/Schema.js.map +1 -1
  347. package/dist/production/core/schema/SchemaLoader.cjs +28 -0
  348. package/dist/production/core/schema/SchemaLoader.cjs.map +1 -0
  349. package/dist/production/core/schema/SchemaLoader.js +2 -2
  350. package/dist/production/core/schema/SchemaLoader.js.map +1 -1
  351. package/dist/production/core/schema/SchemaPreprocessor.cjs +38 -0
  352. package/dist/production/core/schema/SchemaPreprocessor.cjs.map +1 -0
  353. package/dist/production/core/state/StateIterator.cjs +100 -0
  354. package/dist/production/core/state/StateIterator.cjs.map +1 -0
  355. package/dist/production/core/state/getEntityMarker.cjs +5 -0
  356. package/dist/production/core/state/getEntityMarker.cjs.map +1 -0
  357. package/dist/production/core/utils/createQueryBuilder.cjs +32 -0
  358. package/dist/production/core/utils/createQueryBuilder.cjs.map +1 -0
  359. package/dist/production/core/utils/createQueryBuilder.js +32 -0
  360. package/dist/production/core/utils/createQueryBuilder.js.map +1 -0
  361. package/dist/production/core/utils/getCombinedSignal.cjs +33 -0
  362. package/dist/production/core/utils/getCombinedSignal.cjs.map +1 -0
  363. package/dist/production/dao/Environment.cjs +213 -0
  364. package/dist/production/dao/Environment.cjs.map +1 -0
  365. package/dist/production/dao/Environment.js.map +1 -1
  366. package/dist/production/dao/TreeNodeEnvironmentFactory.cjs +89 -0
  367. package/dist/production/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
  368. package/dist/production/dao/VariableFieldValue.cjs +9 -0
  369. package/dist/production/dao/VariableFieldValue.cjs.map +1 -0
  370. package/dist/production/fieldHelpers/helpers/FieldHelper.cjs +17 -0
  371. package/dist/production/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  372. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  373. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  374. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  375. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  376. package/dist/production/index.cjs +124 -0
  377. package/dist/production/index.cjs.map +1 -0
  378. package/dist/production/index.js +18 -135
  379. package/dist/production/index.js.map +1 -1
  380. package/dist/production/markers/EntityFieldMarkersContainer.cjs +41 -0
  381. package/dist/production/markers/EntityFieldMarkersContainer.cjs.map +1 -0
  382. package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs +11 -0
  383. package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
  384. package/dist/production/markers/EntityListSubTreeMarker.cjs +23 -0
  385. package/dist/production/markers/EntityListSubTreeMarker.cjs.map +1 -0
  386. package/dist/production/markers/EntitySubTreeMarker.cjs +23 -0
  387. package/dist/production/markers/EntitySubTreeMarker.cjs.map +1 -0
  388. package/dist/production/markers/FieldMarker.cjs +20 -0
  389. package/dist/production/markers/FieldMarker.cjs.map +1 -0
  390. package/dist/production/markers/HasManyRelationMarker.cjs +23 -0
  391. package/dist/production/markers/HasManyRelationMarker.cjs.map +1 -0
  392. package/dist/production/markers/HasOneRelationMarker.cjs +23 -0
  393. package/dist/production/markers/HasOneRelationMarker.cjs.map +1 -0
  394. package/dist/production/markers/MarkerTreeRoot.cjs +10 -0
  395. package/dist/production/markers/MarkerTreeRoot.cjs.map +1 -0
  396. package/dist/production/markers/ParentEntityMarker.cjs +10 -0
  397. package/dist/production/markers/ParentEntityMarker.cjs.map +1 -0
  398. package/dist/production/markers/PlaceholderGenerator.cjs +23 -0
  399. package/dist/production/markers/PlaceholderGenerator.cjs.map +1 -0
  400. package/dist/production/markers/PlaceholderGenerator.js.map +1 -1
  401. package/dist/production/markers/PlaceholderParametersGenerator.cjs +62 -0
  402. package/dist/production/markers/PlaceholderParametersGenerator.cjs.map +1 -0
  403. package/dist/production/queryLanguage/CacheStore.cjs +47 -0
  404. package/dist/production/queryLanguage/CacheStore.cjs.map +1 -0
  405. package/dist/production/queryLanguage/CacheStore.js +2 -1
  406. package/dist/production/queryLanguage/CacheStore.js.map +1 -1
  407. package/dist/production/queryLanguage/MarkerFactory.cjs +200 -0
  408. package/dist/production/queryLanguage/MarkerFactory.cjs.map +1 -0
  409. package/dist/production/queryLanguage/MarkerFactory.js +1 -1
  410. package/dist/production/queryLanguage/Parser.cjs +725 -0
  411. package/dist/production/queryLanguage/Parser.cjs.map +1 -0
  412. package/dist/production/queryLanguage/Parser.js +70 -29
  413. package/dist/production/queryLanguage/Parser.js.map +1 -1
  414. package/dist/production/queryLanguage/QueryLanguage.cjs +517 -0
  415. package/dist/production/queryLanguage/QueryLanguage.cjs.map +1 -0
  416. package/dist/production/queryLanguage/QueryLanguage.js +16 -14
  417. package/dist/production/queryLanguage/QueryLanguage.js.map +1 -1
  418. package/dist/production/queryLanguage/QueryLanguageError.cjs +6 -0
  419. package/dist/production/queryLanguage/QueryLanguageError.cjs.map +1 -0
  420. package/dist/production/queryLanguage/tokenList.cjs +150 -0
  421. package/dist/production/queryLanguage/tokenList.cjs.map +1 -0
  422. package/dist/production/queryLanguage/tokenList.js +1 -1
  423. package/dist/production/queryLanguage/tokenList.js.map +1 -1
  424. package/dist/production/structures/BijectiveIndexedMap.cjs +120 -0
  425. package/dist/production/structures/BijectiveIndexedMap.cjs.map +1 -0
  426. package/dist/production/structures/LRUCache.cjs +35 -0
  427. package/dist/production/structures/LRUCache.cjs.map +1 -0
  428. package/dist/production/structures/WeakIdCache.cjs +33 -0
  429. package/dist/production/structures/WeakIdCache.cjs.map +1 -0
  430. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs +22 -0
  431. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
  432. package/dist/production/treeParameters/EntityCreationParameters.cjs +8 -0
  433. package/dist/production/treeParameters/EntityCreationParameters.cjs.map +1 -0
  434. package/dist/production/treeParameters/EntityListPreferences.cjs +7 -0
  435. package/dist/production/treeParameters/EntityListPreferences.cjs.map +1 -0
  436. package/dist/production/treeParameters/EventListenersStore.cjs +70 -0
  437. package/dist/production/treeParameters/EventListenersStore.cjs.map +1 -0
  438. package/dist/production/treeParameters/EventListenersStore.js.map +1 -1
  439. package/dist/production/treeParameters/LeafField.cjs +7 -0
  440. package/dist/production/treeParameters/LeafField.cjs.map +1 -0
  441. package/dist/production/treeParameters/QualifiedEntityParameters.cjs +7 -0
  442. package/dist/production/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
  443. package/dist/production/treeParameters/Relation.cjs +7 -0
  444. package/dist/production/treeParameters/Relation.cjs.map +1 -0
  445. package/dist/production/utils/Hashing.cjs +22 -0
  446. package/dist/production/utils/Hashing.cjs.map +1 -0
  447. package/dist/production/utils/TreeNodeUtils.cjs +77 -0
  448. package/dist/production/utils/TreeNodeUtils.cjs.map +1 -0
  449. package/dist/production/utils/TreeNodeUtils.js.map +1 -1
  450. package/dist/production/utils/assert.cjs +11 -0
  451. package/dist/production/utils/assert.cjs.map +1 -0
  452. package/dist/production/utils/assert.js.map +1 -1
  453. package/dist/production/utils/assertNever.cjs +10 -0
  454. package/dist/production/utils/assertNever.cjs.map +1 -0
  455. package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  456. package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  457. package/dist/production/utils/isEmptyObject.cjs +12 -0
  458. package/dist/production/utils/isEmptyObject.cjs.map +1 -0
  459. package/dist/production/utils/ucfirst.cjs +5 -0
  460. package/dist/production/utils/ucfirst.cjs.map +1 -0
  461. package/dist/production/utils/ucfirst.js.map +1 -1
  462. package/dist/types/accessorTree/PersistResult.d.ts +1 -2
  463. package/dist/types/accessorTree/PersistResult.d.ts.map +1 -1
  464. package/dist/types/accessorTree/index.d.ts +0 -15
  465. package/dist/types/accessorTree/index.d.ts.map +1 -1
  466. package/dist/types/accessors/BindingOperations.d.ts +2 -2
  467. package/dist/types/accessors/BindingOperations.d.ts.map +1 -1
  468. package/dist/types/accessors/EntityAccessor.d.ts +2 -2
  469. package/dist/types/accessors/EntityAccessor.d.ts.map +1 -1
  470. package/dist/types/accessors/ExtendTree.d.ts +1 -2
  471. package/dist/types/accessors/ExtendTree.d.ts.map +1 -1
  472. package/dist/types/accessors/TreeRootAccessor.d.ts +3 -3
  473. package/dist/types/accessors/TreeRootAccessor.d.ts.map +1 -1
  474. package/dist/types/core/AccessorErrorManager.d.ts +2 -2
  475. package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
  476. package/dist/types/core/DataBinding.d.ts +11 -6
  477. package/dist/types/core/DataBinding.d.ts.map +1 -1
  478. package/dist/types/core/ErrorsPreprocessor.d.ts +2 -2
  479. package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -1
  480. package/dist/types/core/EventManager.d.ts +2 -1
  481. package/dist/types/core/EventManager.d.ts.map +1 -1
  482. package/dist/types/core/MutationGenerator.d.ts +16 -13
  483. package/dist/types/core/MutationGenerator.d.ts.map +1 -1
  484. package/dist/types/core/QueryGenerator.d.ts +6 -8
  485. package/dist/types/core/QueryGenerator.d.ts.map +1 -1
  486. package/dist/types/core/TreeParameterMerger.d.ts.map +1 -1
  487. package/dist/types/core/index.d.ts +7 -1
  488. package/dist/types/core/index.d.ts.map +1 -1
  489. package/dist/types/core/schema/index.d.ts +2 -0
  490. package/dist/types/core/schema/index.d.ts.map +1 -1
  491. package/dist/types/core/state/EntityListState.d.ts +2 -0
  492. package/dist/types/core/state/EntityListState.d.ts.map +1 -1
  493. package/dist/types/core/utils/createQueryBuilder.d.ts +4 -0
  494. package/dist/types/core/utils/createQueryBuilder.d.ts.map +1 -0
  495. package/dist/types/dao/Environment.d.ts +5 -2
  496. package/dist/types/dao/Environment.d.ts.map +1 -1
  497. package/dist/types/dao/index.d.ts +1 -0
  498. package/dist/types/dao/index.d.ts.map +1 -1
  499. package/dist/types/index.d.ts +0 -5
  500. package/dist/types/index.d.ts.map +1 -1
  501. package/dist/types/queryLanguage/CacheStore.d.ts.map +1 -1
  502. package/dist/types/queryLanguage/Parser.d.ts +3 -2
  503. package/dist/types/queryLanguage/Parser.d.ts.map +1 -1
  504. package/dist/types/queryLanguage/QueryLanguage.d.ts.map +1 -1
  505. package/dist/types/treeParameters/EventListenersStore.d.ts +2 -1
  506. package/dist/types/treeParameters/EventListenersStore.d.ts.map +1 -1
  507. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts +2 -0
  508. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +1 -1
  509. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts +2 -0
  510. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +1 -1
  511. package/dist/types/tsconfig.tsbuildinfo +1 -1
  512. package/package.json +13 -15
  513. package/src/accessorTree/PersistResult.ts +1 -2
  514. package/src/accessorTree/index.ts +0 -15
  515. package/src/accessors/BindingOperations.ts +2 -2
  516. package/src/accessors/EntityAccessor.ts +2 -2
  517. package/src/accessors/ExtendTree.ts +1 -2
  518. package/src/accessors/TreeRootAccessor.ts +2 -2
  519. package/src/core/AccessorErrorManager.ts +11 -9
  520. package/src/core/DataBinding.ts +76 -75
  521. package/src/core/ErrorsPreprocessor.ts +24 -23
  522. package/src/core/EventManager.ts +6 -3
  523. package/src/core/MutationGenerator.ts +411 -412
  524. package/src/core/QueryGenerator.ts +66 -117
  525. package/src/core/StateInitializer.ts +2 -2
  526. package/src/core/TreeParameterMerger.ts +8 -0
  527. package/src/core/index.ts +7 -1
  528. package/src/core/schema/SchemaLoader.ts +2 -2
  529. package/src/core/schema/index.ts +2 -0
  530. package/src/core/state/EntityListState.ts +2 -0
  531. package/src/core/utils/createQueryBuilder.ts +31 -0
  532. package/src/dao/Environment.ts +6 -2
  533. package/src/dao/index.ts +1 -0
  534. package/src/index.ts +0 -5
  535. package/src/queryLanguage/CacheStore.ts +1 -0
  536. package/src/queryLanguage/Parser.ts +76 -37
  537. package/src/queryLanguage/QueryLanguage.ts +4 -1
  538. package/src/queryLanguage/tokenList.ts +1 -1
  539. package/src/treeParameters/EventListenersStore.ts +2 -1
  540. package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +2 -0
  541. package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +2 -0
  542. package/src/tsconfig.json +1 -4
  543. package/dist/development/accessorPropagation/AccessorProvider.js +0 -18
  544. package/dist/development/accessorPropagation/AccessorProvider.js.map +0 -1
  545. package/dist/development/accessorPropagation/BindingOperationsContext.js +0 -31
  546. package/dist/development/accessorPropagation/BindingOperationsContext.js.map +0 -1
  547. package/dist/development/accessorPropagation/BindingOperationsProvider.js +0 -13
  548. package/dist/development/accessorPropagation/BindingOperationsProvider.js.map +0 -1
  549. package/dist/development/accessorPropagation/EntityKeyContext.js +0 -7
  550. package/dist/development/accessorPropagation/EntityKeyContext.js.map +0 -1
  551. package/dist/development/accessorPropagation/EntityKeyProvider.js +0 -13
  552. package/dist/development/accessorPropagation/EntityKeyProvider.js.map +0 -1
  553. package/dist/development/accessorPropagation/EnvironmentContext.js +0 -53
  554. package/dist/development/accessorPropagation/EnvironmentContext.js.map +0 -1
  555. package/dist/development/accessorPropagation/TreeRootIdContext.js +0 -7
  556. package/dist/development/accessorPropagation/TreeRootIdContext.js.map +0 -1
  557. package/dist/development/accessorPropagation/TreeRootIdProvider.js +0 -13
  558. package/dist/development/accessorPropagation/TreeRootIdProvider.js.map +0 -1
  559. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js +0 -55
  560. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js.map +0 -1
  561. package/dist/development/accessorPropagation/useBindingOperations.js +0 -7
  562. package/dist/development/accessorPropagation/useBindingOperations.js.map +0 -1
  563. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js +0 -47
  564. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js.map +0 -1
  565. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js +0 -35
  566. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +0 -1
  567. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js +0 -35
  568. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js.map +0 -1
  569. package/dist/development/accessorPropagation/useEntity.js +0 -38
  570. package/dist/development/accessorPropagation/useEntity.js.map +0 -1
  571. package/dist/development/accessorPropagation/useEntityKey.js +0 -16
  572. package/dist/development/accessorPropagation/useEntityKey.js.map +0 -1
  573. package/dist/development/accessorPropagation/useEntityList.js +0 -36
  574. package/dist/development/accessorPropagation/useEntityList.js.map +0 -1
  575. package/dist/development/accessorPropagation/useEntityListSubTree.js +0 -19
  576. package/dist/development/accessorPropagation/useEntityListSubTree.js.map +0 -1
  577. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js +0 -69
  578. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js.map +0 -1
  579. package/dist/development/accessorPropagation/useEntitySubTree.js +0 -19
  580. package/dist/development/accessorPropagation/useEntitySubTree.js.map +0 -1
  581. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js +0 -47
  582. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js.map +0 -1
  583. package/dist/development/accessorPropagation/useEnvironment.js +0 -9
  584. package/dist/development/accessorPropagation/useEnvironment.js.map +0 -1
  585. package/dist/development/accessorPropagation/useExtendTree.js +0 -32
  586. package/dist/development/accessorPropagation/useExtendTree.js.map +0 -1
  587. package/dist/development/accessorPropagation/useField.js +0 -36
  588. package/dist/development/accessorPropagation/useField.js.map +0 -1
  589. package/dist/development/accessorPropagation/useGetEntityByKey.js +0 -6
  590. package/dist/development/accessorPropagation/useGetEntityByKey.js.map +0 -1
  591. package/dist/development/accessorPropagation/useGetEntityListSubTree.js +0 -17
  592. package/dist/development/accessorPropagation/useGetEntityListSubTree.js.map +0 -1
  593. package/dist/development/accessorPropagation/useGetEntitySubTree.js +0 -17
  594. package/dist/development/accessorPropagation/useGetEntitySubTree.js.map +0 -1
  595. package/dist/development/accessorPropagation/useGetTreeFilters.js +0 -6
  596. package/dist/development/accessorPropagation/useGetTreeFilters.js.map +0 -1
  597. package/dist/development/accessorPropagation/useHasEntity.js +0 -9
  598. package/dist/development/accessorPropagation/useHasEntity.js.map +0 -1
  599. package/dist/development/accessorPropagation/usePersist.js +0 -6
  600. package/dist/development/accessorPropagation/usePersist.js.map +0 -1
  601. package/dist/development/accessorPropagation/useTreeRootId.js +0 -7
  602. package/dist/development/accessorPropagation/useTreeRootId.js.map +0 -1
  603. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js +0 -118
  604. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js.map +0 -1
  605. package/dist/development/accessorSorting/addEntityAtIndex.js +0 -18
  606. package/dist/development/accessorSorting/addEntityAtIndex.js.map +0 -1
  607. package/dist/development/accessorSorting/errors.js +0 -10
  608. package/dist/development/accessorSorting/errors.js.map +0 -1
  609. package/dist/development/accessorSorting/moveEntity.js +0 -42
  610. package/dist/development/accessorSorting/moveEntity.js.map +0 -1
  611. package/dist/development/accessorSorting/repairEntitiesOrder.js +0 -13
  612. package/dist/development/accessorSorting/repairEntitiesOrder.js.map +0 -1
  613. package/dist/development/accessorSorting/sortEntities.js +0 -17
  614. package/dist/development/accessorSorting/sortEntities.js.map +0 -1
  615. package/dist/development/accessorSorting/useSortedEntities.js +0 -80
  616. package/dist/development/accessorSorting/useSortedEntities.js.map +0 -1
  617. package/dist/development/accessorTree/AccessorTree.js +0 -39
  618. package/dist/development/accessorTree/AccessorTree.js.map +0 -1
  619. package/dist/development/accessorTree/AccessorTreeStateContext.js +0 -6
  620. package/dist/development/accessorTree/AccessorTreeStateContext.js.map +0 -1
  621. package/dist/development/accessorTree/DirtinessContext.js +0 -7
  622. package/dist/development/accessorTree/DirtinessContext.js.map +0 -1
  623. package/dist/development/accessorTree/MutationStateContext.js +0 -7
  624. package/dist/development/accessorTree/MutationStateContext.js.map +0 -1
  625. package/dist/development/accessorTree/accessorTreeStateReducer.js +0 -34
  626. package/dist/development/accessorTree/accessorTreeStateReducer.js.map +0 -1
  627. package/dist/development/accessorTree/metadataToRequestError.js +0 -15
  628. package/dist/development/accessorTree/metadataToRequestError.js.map +0 -1
  629. package/dist/development/accessorTree/useAccessorTreeState.js +0 -14
  630. package/dist/development/accessorTree/useAccessorTreeState.js.map +0 -1
  631. package/dist/development/accessorTree/useDataBinding.js +0 -84
  632. package/dist/development/accessorTree/useDataBinding.js.map +0 -1
  633. package/dist/development/accessorTree/useDirtinessState.js +0 -7
  634. package/dist/development/accessorTree/useDirtinessState.js.map +0 -1
  635. package/dist/development/accessorTree/useMutationState.js +0 -7
  636. package/dist/development/accessorTree/useMutationState.js.map +0 -1
  637. package/dist/development/core/IncrementalMarkerBuilder.js +0 -70
  638. package/dist/development/core/IncrementalMarkerBuilder.js.map +0 -1
  639. package/dist/development/core/MarkerTreeGenerator.js +0 -95
  640. package/dist/development/core/MarkerTreeGenerator.js.map +0 -1
  641. package/dist/development/coreComponents/Component.js +0 -33
  642. package/dist/development/coreComponents/Component.js.map +0 -1
  643. package/dist/development/coreComponents/DataBindingProvider.js +0 -24
  644. package/dist/development/coreComponents/DataBindingProvider.js.map +0 -1
  645. package/dist/development/coreComponents/Entity.js +0 -20
  646. package/dist/development/coreComponents/Entity.js.map +0 -1
  647. package/dist/development/coreComponents/EntityList.js +0 -45
  648. package/dist/development/coreComponents/EntityList.js.map +0 -1
  649. package/dist/development/coreComponents/EntityListSubTree.js +0 -58
  650. package/dist/development/coreComponents/EntityListSubTree.js.map +0 -1
  651. package/dist/development/coreComponents/EntitySubTree.js +0 -81
  652. package/dist/development/coreComponents/EntitySubTree.js.map +0 -1
  653. package/dist/development/coreComponents/Field.js +0 -37
  654. package/dist/development/coreComponents/Field.js.map +0 -1
  655. package/dist/development/coreComponents/HasMany.js +0 -42
  656. package/dist/development/coreComponents/HasMany.js.map +0 -1
  657. package/dist/development/coreComponents/HasOne.js +0 -42
  658. package/dist/development/coreComponents/HasOne.js.map +0 -1
  659. package/dist/development/coreComponents/ParentEntity.js +0 -18
  660. package/dist/development/coreComponents/ParentEntity.js.map +0 -1
  661. package/dist/development/entityEvents/useDerivedField.js +0 -42
  662. package/dist/development/entityEvents/useDerivedField.js.map +0 -1
  663. package/dist/development/entityEvents/useEntityBeforePersist.js +0 -8
  664. package/dist/development/entityEvents/useEntityBeforePersist.js.map +0 -1
  665. package/dist/development/entityEvents/useEntityBeforeUpdate.js +0 -8
  666. package/dist/development/entityEvents/useEntityBeforeUpdate.js.map +0 -1
  667. package/dist/development/entityEvents/useEntityEvent.js +0 -32
  668. package/dist/development/entityEvents/useEntityEvent.js.map +0 -1
  669. package/dist/development/entityEvents/useEntityPersistError.js +0 -8
  670. package/dist/development/entityEvents/useEntityPersistError.js.map +0 -1
  671. package/dist/development/entityEvents/useEntityPersistSuccess.js +0 -8
  672. package/dist/development/entityEvents/useEntityPersistSuccess.js.map +0 -1
  673. package/dist/development/entityEvents/useOnConnectionUpdate.js +0 -8
  674. package/dist/development/entityEvents/useOnConnectionUpdate.js.map +0 -1
  675. package/dist/development/helperComponents/DeferredSubTrees.js +0 -105
  676. package/dist/development/helperComponents/DeferredSubTrees.js.map +0 -1
  677. package/dist/development/helperComponents/EntityView.js +0 -14
  678. package/dist/development/helperComponents/EntityView.js.map +0 -1
  679. package/dist/development/helperComponents/FieldView.js +0 -61
  680. package/dist/development/helperComponents/FieldView.js.map +0 -1
  681. package/dist/development/helperComponents/If.js +0 -84
  682. package/dist/development/helperComponents/If.js.map +0 -1
  683. package/dist/development/helperComponents/StaticRender.js +0 -15
  684. package/dist/development/helperComponents/StaticRender.js.map +0 -1
  685. package/dist/development/helperComponents/SugaredField.js +0 -21
  686. package/dist/development/helperComponents/SugaredField.js.map +0 -1
  687. package/dist/development/helperComponents/helpers/FilterEvaluator.js +0 -37
  688. package/dist/development/helperComponents/helpers/FilterEvaluator.js.map +0 -1
  689. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js +0 -40
  690. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js.map +0 -1
  691. package/dist/development/helperComponents/helpers/evaluateCondition.js +0 -49
  692. package/dist/development/helperComponents/helpers/evaluateCondition.js.map +0 -1
  693. package/dist/production/accessorPropagation/AccessorProvider.js +0 -10
  694. package/dist/production/accessorPropagation/AccessorProvider.js.map +0 -1
  695. package/dist/production/accessorPropagation/BindingOperationsContext.js +0 -31
  696. package/dist/production/accessorPropagation/BindingOperationsContext.js.map +0 -1
  697. package/dist/production/accessorPropagation/BindingOperationsProvider.js +0 -9
  698. package/dist/production/accessorPropagation/BindingOperationsProvider.js.map +0 -1
  699. package/dist/production/accessorPropagation/EntityKeyContext.js +0 -7
  700. package/dist/production/accessorPropagation/EntityKeyContext.js.map +0 -1
  701. package/dist/production/accessorPropagation/EntityKeyProvider.js +0 -9
  702. package/dist/production/accessorPropagation/EntityKeyProvider.js.map +0 -1
  703. package/dist/production/accessorPropagation/EnvironmentContext.js +0 -37
  704. package/dist/production/accessorPropagation/EnvironmentContext.js.map +0 -1
  705. package/dist/production/accessorPropagation/TreeRootIdContext.js +0 -7
  706. package/dist/production/accessorPropagation/TreeRootIdContext.js.map +0 -1
  707. package/dist/production/accessorPropagation/TreeRootIdProvider.js +0 -9
  708. package/dist/production/accessorPropagation/TreeRootIdProvider.js.map +0 -1
  709. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js +0 -55
  710. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js.map +0 -1
  711. package/dist/production/accessorPropagation/useBindingOperations.js +0 -7
  712. package/dist/production/accessorPropagation/useBindingOperations.js.map +0 -1
  713. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js +0 -47
  714. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js.map +0 -1
  715. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js +0 -35
  716. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +0 -1
  717. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js +0 -35
  718. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js.map +0 -1
  719. package/dist/production/accessorPropagation/useEntity.js +0 -38
  720. package/dist/production/accessorPropagation/useEntity.js.map +0 -1
  721. package/dist/production/accessorPropagation/useEntityKey.js +0 -16
  722. package/dist/production/accessorPropagation/useEntityKey.js.map +0 -1
  723. package/dist/production/accessorPropagation/useEntityList.js +0 -36
  724. package/dist/production/accessorPropagation/useEntityList.js.map +0 -1
  725. package/dist/production/accessorPropagation/useEntityListSubTree.js +0 -19
  726. package/dist/production/accessorPropagation/useEntityListSubTree.js.map +0 -1
  727. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js +0 -69
  728. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js.map +0 -1
  729. package/dist/production/accessorPropagation/useEntitySubTree.js +0 -19
  730. package/dist/production/accessorPropagation/useEntitySubTree.js.map +0 -1
  731. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js +0 -47
  732. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js.map +0 -1
  733. package/dist/production/accessorPropagation/useEnvironment.js +0 -9
  734. package/dist/production/accessorPropagation/useEnvironment.js.map +0 -1
  735. package/dist/production/accessorPropagation/useExtendTree.js +0 -32
  736. package/dist/production/accessorPropagation/useExtendTree.js.map +0 -1
  737. package/dist/production/accessorPropagation/useField.js +0 -36
  738. package/dist/production/accessorPropagation/useField.js.map +0 -1
  739. package/dist/production/accessorPropagation/useGetEntityByKey.js +0 -6
  740. package/dist/production/accessorPropagation/useGetEntityByKey.js.map +0 -1
  741. package/dist/production/accessorPropagation/useGetEntityListSubTree.js +0 -17
  742. package/dist/production/accessorPropagation/useGetEntityListSubTree.js.map +0 -1
  743. package/dist/production/accessorPropagation/useGetEntitySubTree.js +0 -17
  744. package/dist/production/accessorPropagation/useGetEntitySubTree.js.map +0 -1
  745. package/dist/production/accessorPropagation/useGetTreeFilters.js +0 -6
  746. package/dist/production/accessorPropagation/useGetTreeFilters.js.map +0 -1
  747. package/dist/production/accessorPropagation/useHasEntity.js +0 -9
  748. package/dist/production/accessorPropagation/useHasEntity.js.map +0 -1
  749. package/dist/production/accessorPropagation/usePersist.js +0 -6
  750. package/dist/production/accessorPropagation/usePersist.js.map +0 -1
  751. package/dist/production/accessorPropagation/useTreeRootId.js +0 -7
  752. package/dist/production/accessorPropagation/useTreeRootId.js.map +0 -1
  753. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js +0 -74
  754. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js.map +0 -1
  755. package/dist/production/accessorSorting/addEntityAtIndex.js +0 -18
  756. package/dist/production/accessorSorting/addEntityAtIndex.js.map +0 -1
  757. package/dist/production/accessorSorting/errors.js +0 -10
  758. package/dist/production/accessorSorting/errors.js.map +0 -1
  759. package/dist/production/accessorSorting/moveEntity.js +0 -42
  760. package/dist/production/accessorSorting/moveEntity.js.map +0 -1
  761. package/dist/production/accessorSorting/repairEntitiesOrder.js +0 -13
  762. package/dist/production/accessorSorting/repairEntitiesOrder.js.map +0 -1
  763. package/dist/production/accessorSorting/sortEntities.js +0 -17
  764. package/dist/production/accessorSorting/sortEntities.js.map +0 -1
  765. package/dist/production/accessorSorting/useSortedEntities.js +0 -80
  766. package/dist/production/accessorSorting/useSortedEntities.js.map +0 -1
  767. package/dist/production/accessorTree/AccessorTree.js +0 -19
  768. package/dist/production/accessorTree/AccessorTree.js.map +0 -1
  769. package/dist/production/accessorTree/AccessorTreeStateContext.js +0 -6
  770. package/dist/production/accessorTree/AccessorTreeStateContext.js.map +0 -1
  771. package/dist/production/accessorTree/DirtinessContext.js +0 -7
  772. package/dist/production/accessorTree/DirtinessContext.js.map +0 -1
  773. package/dist/production/accessorTree/MutationStateContext.js +0 -7
  774. package/dist/production/accessorTree/MutationStateContext.js.map +0 -1
  775. package/dist/production/accessorTree/accessorTreeStateReducer.js +0 -34
  776. package/dist/production/accessorTree/accessorTreeStateReducer.js.map +0 -1
  777. package/dist/production/accessorTree/metadataToRequestError.js +0 -15
  778. package/dist/production/accessorTree/metadataToRequestError.js.map +0 -1
  779. package/dist/production/accessorTree/useAccessorTreeState.js +0 -14
  780. package/dist/production/accessorTree/useAccessorTreeState.js.map +0 -1
  781. package/dist/production/accessorTree/useDataBinding.js +0 -84
  782. package/dist/production/accessorTree/useDataBinding.js.map +0 -1
  783. package/dist/production/accessorTree/useDirtinessState.js +0 -7
  784. package/dist/production/accessorTree/useDirtinessState.js.map +0 -1
  785. package/dist/production/accessorTree/useMutationState.js +0 -7
  786. package/dist/production/accessorTree/useMutationState.js.map +0 -1
  787. package/dist/production/core/IncrementalMarkerBuilder.js +0 -70
  788. package/dist/production/core/IncrementalMarkerBuilder.js.map +0 -1
  789. package/dist/production/core/MarkerTreeGenerator.js +0 -95
  790. package/dist/production/core/MarkerTreeGenerator.js.map +0 -1
  791. package/dist/production/coreComponents/Component.js +0 -33
  792. package/dist/production/coreComponents/Component.js.map +0 -1
  793. package/dist/production/coreComponents/DataBindingProvider.js +0 -20
  794. package/dist/production/coreComponents/DataBindingProvider.js.map +0 -1
  795. package/dist/production/coreComponents/Entity.js +0 -16
  796. package/dist/production/coreComponents/Entity.js.map +0 -1
  797. package/dist/production/coreComponents/EntityList.js +0 -33
  798. package/dist/production/coreComponents/EntityList.js.map +0 -1
  799. package/dist/production/coreComponents/EntityListSubTree.js +0 -46
  800. package/dist/production/coreComponents/EntityListSubTree.js.map +0 -1
  801. package/dist/production/coreComponents/EntitySubTree.js +0 -57
  802. package/dist/production/coreComponents/EntitySubTree.js.map +0 -1
  803. package/dist/production/coreComponents/Field.js +0 -29
  804. package/dist/production/coreComponents/Field.js.map +0 -1
  805. package/dist/production/coreComponents/HasMany.js +0 -30
  806. package/dist/production/coreComponents/HasMany.js.map +0 -1
  807. package/dist/production/coreComponents/HasOne.js +0 -30
  808. package/dist/production/coreComponents/HasOne.js.map +0 -1
  809. package/dist/production/coreComponents/ParentEntity.js +0 -14
  810. package/dist/production/coreComponents/ParentEntity.js.map +0 -1
  811. package/dist/production/entityEvents/useDerivedField.js +0 -42
  812. package/dist/production/entityEvents/useDerivedField.js.map +0 -1
  813. package/dist/production/entityEvents/useEntityBeforePersist.js +0 -8
  814. package/dist/production/entityEvents/useEntityBeforePersist.js.map +0 -1
  815. package/dist/production/entityEvents/useEntityBeforeUpdate.js +0 -8
  816. package/dist/production/entityEvents/useEntityBeforeUpdate.js.map +0 -1
  817. package/dist/production/entityEvents/useEntityEvent.js +0 -32
  818. package/dist/production/entityEvents/useEntityEvent.js.map +0 -1
  819. package/dist/production/entityEvents/useEntityPersistError.js +0 -8
  820. package/dist/production/entityEvents/useEntityPersistError.js.map +0 -1
  821. package/dist/production/entityEvents/useEntityPersistSuccess.js +0 -8
  822. package/dist/production/entityEvents/useEntityPersistSuccess.js.map +0 -1
  823. package/dist/production/entityEvents/useOnConnectionUpdate.js +0 -8
  824. package/dist/production/entityEvents/useOnConnectionUpdate.js.map +0 -1
  825. package/dist/production/helperComponents/DeferredSubTrees.js +0 -89
  826. package/dist/production/helperComponents/DeferredSubTrees.js.map +0 -1
  827. package/dist/production/helperComponents/EntityView.js +0 -10
  828. package/dist/production/helperComponents/EntityView.js.map +0 -1
  829. package/dist/production/helperComponents/FieldView.js +0 -49
  830. package/dist/production/helperComponents/FieldView.js.map +0 -1
  831. package/dist/production/helperComponents/If.js +0 -52
  832. package/dist/production/helperComponents/If.js.map +0 -1
  833. package/dist/production/helperComponents/StaticRender.js +0 -11
  834. package/dist/production/helperComponents/StaticRender.js.map +0 -1
  835. package/dist/production/helperComponents/SugaredField.js +0 -13
  836. package/dist/production/helperComponents/SugaredField.js.map +0 -1
  837. package/dist/production/helperComponents/helpers/FilterEvaluator.js +0 -37
  838. package/dist/production/helperComponents/helpers/FilterEvaluator.js.map +0 -1
  839. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js +0 -40
  840. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js.map +0 -1
  841. package/dist/production/helperComponents/helpers/evaluateCondition.js +0 -49
  842. package/dist/production/helperComponents/helpers/evaluateCondition.js.map +0 -1
  843. package/dist/types/accessorPropagation/AccessorProvider.d.ts +0 -8
  844. package/dist/types/accessorPropagation/AccessorProvider.d.ts.map +0 -1
  845. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +0 -4
  846. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +0 -1
  847. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts +0 -8
  848. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts.map +0 -1
  849. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +0 -2
  850. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +0 -1
  851. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts +0 -7
  852. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts.map +0 -1
  853. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +0 -15
  854. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +0 -1
  855. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +0 -2
  856. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +0 -1
  857. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts +0 -8
  858. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts.map +0 -1
  859. package/dist/types/accessorPropagation/index.d.ts +0 -28
  860. package/dist/types/accessorPropagation/index.d.ts.map +0 -1
  861. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts +0 -16
  862. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +0 -1
  863. package/dist/types/accessorPropagation/useBindingOperations.d.ts +0 -3
  864. package/dist/types/accessorPropagation/useBindingOperations.d.ts.map +0 -1
  865. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts +0 -11
  866. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +0 -1
  867. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts +0 -11
  868. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +0 -1
  869. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts +0 -11
  870. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +0 -1
  871. package/dist/types/accessorPropagation/useEntity.d.ts +0 -7
  872. package/dist/types/accessorPropagation/useEntity.d.ts.map +0 -1
  873. package/dist/types/accessorPropagation/useEntityKey.d.ts +0 -2
  874. package/dist/types/accessorPropagation/useEntityKey.d.ts.map +0 -1
  875. package/dist/types/accessorPropagation/useEntityList.d.ts +0 -6
  876. package/dist/types/accessorPropagation/useEntityList.d.ts.map +0 -1
  877. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts +0 -6
  878. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts.map +0 -1
  879. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts +0 -5
  880. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts.map +0 -1
  881. package/dist/types/accessorPropagation/useEntitySubTree.d.ts +0 -6
  882. package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +0 -1
  883. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts +0 -5
  884. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts.map +0 -1
  885. package/dist/types/accessorPropagation/useEnvironment.d.ts +0 -3
  886. package/dist/types/accessorPropagation/useEnvironment.d.ts.map +0 -1
  887. package/dist/types/accessorPropagation/useExtendTree.d.ts +0 -5
  888. package/dist/types/accessorPropagation/useExtendTree.d.ts.map +0 -1
  889. package/dist/types/accessorPropagation/useField.d.ts +0 -6
  890. package/dist/types/accessorPropagation/useField.d.ts.map +0 -1
  891. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts +0 -3
  892. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts.map +0 -1
  893. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +0 -5
  894. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +0 -1
  895. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +0 -5
  896. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +0 -1
  897. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts +0 -3
  898. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts.map +0 -1
  899. package/dist/types/accessorPropagation/useHasEntity.d.ts +0 -2
  900. package/dist/types/accessorPropagation/useHasEntity.d.ts.map +0 -1
  901. package/dist/types/accessorPropagation/usePersist.d.ts +0 -3
  902. package/dist/types/accessorPropagation/usePersist.d.ts.map +0 -1
  903. package/dist/types/accessorPropagation/useTreeRootId.d.ts +0 -3
  904. package/dist/types/accessorPropagation/useTreeRootId.d.ts.map +0 -1
  905. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +0 -9
  906. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +0 -1
  907. package/dist/types/accessorSorting/SortedEntities.d.ts +0 -9
  908. package/dist/types/accessorSorting/SortedEntities.d.ts.map +0 -1
  909. package/dist/types/accessorSorting/addEntityAtIndex.d.ts +0 -4
  910. package/dist/types/accessorSorting/addEntityAtIndex.d.ts.map +0 -1
  911. package/dist/types/accessorSorting/errors.d.ts +0 -3
  912. package/dist/types/accessorSorting/errors.d.ts.map +0 -1
  913. package/dist/types/accessorSorting/index.d.ts +0 -8
  914. package/dist/types/accessorSorting/index.d.ts.map +0 -1
  915. package/dist/types/accessorSorting/moveEntity.d.ts +0 -5
  916. package/dist/types/accessorSorting/moveEntity.d.ts.map +0 -1
  917. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts +0 -4
  918. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts.map +0 -1
  919. package/dist/types/accessorSorting/sortEntities.d.ts +0 -4
  920. package/dist/types/accessorSorting/sortEntities.d.ts.map +0 -1
  921. package/dist/types/accessorSorting/useSortedEntities.d.ts +0 -5
  922. package/dist/types/accessorSorting/useSortedEntities.d.ts.map +0 -1
  923. package/dist/types/accessorTree/AccessorTree.d.ts +0 -14
  924. package/dist/types/accessorTree/AccessorTree.d.ts.map +0 -1
  925. package/dist/types/accessorTree/AccessorTreeState.d.ts +0 -23
  926. package/dist/types/accessorTree/AccessorTreeState.d.ts.map +0 -1
  927. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts +0 -18
  928. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +0 -1
  929. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +0 -3
  930. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +0 -1
  931. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts +0 -4
  932. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts.map +0 -1
  933. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts +0 -7
  934. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +0 -1
  935. package/dist/types/accessorTree/DirtinessContext.d.ts +0 -2
  936. package/dist/types/accessorTree/DirtinessContext.d.ts.map +0 -1
  937. package/dist/types/accessorTree/MutationRequestResponse.d.ts +0 -52
  938. package/dist/types/accessorTree/MutationRequestResponse.d.ts.map +0 -1
  939. package/dist/types/accessorTree/MutationStateContext.d.ts +0 -2
  940. package/dist/types/accessorTree/MutationStateContext.d.ts.map +0 -1
  941. package/dist/types/accessorTree/RequestError.d.ts +0 -21
  942. package/dist/types/accessorTree/RequestError.d.ts.map +0 -1
  943. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts +0 -4
  944. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +0 -1
  945. package/dist/types/accessorTree/metadataToRequestError.d.ts +0 -4
  946. package/dist/types/accessorTree/metadataToRequestError.d.ts.map +0 -1
  947. package/dist/types/accessorTree/useAccessorTreeState.d.ts +0 -2
  948. package/dist/types/accessorTree/useAccessorTreeState.d.ts.map +0 -1
  949. package/dist/types/accessorTree/useDataBinding.d.ts +0 -4
  950. package/dist/types/accessorTree/useDataBinding.d.ts.map +0 -1
  951. package/dist/types/accessorTree/useDirtinessState.d.ts +0 -2
  952. package/dist/types/accessorTree/useDirtinessState.d.ts.map +0 -1
  953. package/dist/types/accessorTree/useMutationState.d.ts +0 -2
  954. package/dist/types/accessorTree/useMutationState.d.ts.map +0 -1
  955. package/dist/types/core/IncrementalMarkerBuilder.d.ts +0 -7
  956. package/dist/types/core/IncrementalMarkerBuilder.d.ts.map +0 -1
  957. package/dist/types/core/MarkerTreeGenerator.d.ts +0 -14
  958. package/dist/types/core/MarkerTreeGenerator.d.ts.map +0 -1
  959. package/dist/types/coreComponents/Component.d.ts +0 -13
  960. package/dist/types/coreComponents/Component.d.ts.map +0 -1
  961. package/dist/types/coreComponents/DataBindingProvider.d.ts +0 -27
  962. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +0 -1
  963. package/dist/types/coreComponents/Entity.d.ts +0 -12
  964. package/dist/types/coreComponents/Entity.d.ts.map +0 -1
  965. package/dist/types/coreComponents/EntityList.d.ts +0 -15
  966. package/dist/types/coreComponents/EntityList.d.ts.map +0 -1
  967. package/dist/types/coreComponents/EntityListSubTree.d.ts +0 -26
  968. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +0 -1
  969. package/dist/types/coreComponents/EntitySubTree.d.ts +0 -24
  970. package/dist/types/coreComponents/EntitySubTree.d.ts.map +0 -1
  971. package/dist/types/coreComponents/Field.d.ts +0 -14
  972. package/dist/types/coreComponents/Field.d.ts.map +0 -1
  973. package/dist/types/coreComponents/HasMany.d.ts +0 -16
  974. package/dist/types/coreComponents/HasMany.d.ts.map +0 -1
  975. package/dist/types/coreComponents/HasOne.d.ts +0 -12
  976. package/dist/types/coreComponents/HasOne.d.ts.map +0 -1
  977. package/dist/types/coreComponents/MarkerProvider.d.ts +0 -21
  978. package/dist/types/coreComponents/MarkerProvider.d.ts.map +0 -1
  979. package/dist/types/coreComponents/ParentEntity.d.ts +0 -10
  980. package/dist/types/coreComponents/ParentEntity.d.ts.map +0 -1
  981. package/dist/types/coreComponents/index.d.ts +0 -12
  982. package/dist/types/coreComponents/index.d.ts.map +0 -1
  983. package/dist/types/entityEvents/index.d.ts +0 -8
  984. package/dist/types/entityEvents/index.d.ts.map +0 -1
  985. package/dist/types/entityEvents/useDerivedField.d.ts +0 -9
  986. package/dist/types/entityEvents/useDerivedField.d.ts.map +0 -1
  987. package/dist/types/entityEvents/useEntityBeforePersist.d.ts +0 -3
  988. package/dist/types/entityEvents/useEntityBeforePersist.d.ts.map +0 -1
  989. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts +0 -3
  990. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts.map +0 -1
  991. package/dist/types/entityEvents/useEntityEvent.d.ts +0 -9
  992. package/dist/types/entityEvents/useEntityEvent.d.ts.map +0 -1
  993. package/dist/types/entityEvents/useEntityPersistError.d.ts +0 -3
  994. package/dist/types/entityEvents/useEntityPersistError.d.ts.map +0 -1
  995. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts +0 -3
  996. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts.map +0 -1
  997. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts +0 -4
  998. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts.map +0 -1
  999. package/dist/types/helperComponents/DeferredSubTrees.d.ts +0 -10
  1000. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +0 -1
  1001. package/dist/types/helperComponents/EntityView.d.ts +0 -12
  1002. package/dist/types/helperComponents/EntityView.d.ts.map +0 -1
  1003. package/dist/types/helperComponents/FieldView.d.ts +0 -59
  1004. package/dist/types/helperComponents/FieldView.d.ts.map +0 -1
  1005. package/dist/types/helperComponents/If.d.ts +0 -17
  1006. package/dist/types/helperComponents/If.d.ts.map +0 -1
  1007. package/dist/types/helperComponents/StaticRender.d.ts +0 -9
  1008. package/dist/types/helperComponents/StaticRender.d.ts.map +0 -1
  1009. package/dist/types/helperComponents/SugaredField.d.ts +0 -12
  1010. package/dist/types/helperComponents/SugaredField.d.ts.map +0 -1
  1011. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts +0 -9
  1012. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +0 -1
  1013. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts +0 -10
  1014. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +0 -1
  1015. package/dist/types/helperComponents/helpers/evaluateCondition.d.ts +0 -4
  1016. package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +0 -1
  1017. package/dist/types/helperComponents/index.d.ts +0 -7
  1018. package/dist/types/helperComponents/index.d.ts.map +0 -1
  1019. package/src/accessorPropagation/AccessorProvider.tsx +0 -17
  1020. package/src/accessorPropagation/BindingOperationsContext.ts +0 -32
  1021. package/src/accessorPropagation/BindingOperationsProvider.tsx +0 -16
  1022. package/src/accessorPropagation/EntityKeyContext.ts +0 -4
  1023. package/src/accessorPropagation/EntityKeyProvider.tsx +0 -11
  1024. package/src/accessorPropagation/EnvironmentContext.tsx +0 -44
  1025. package/src/accessorPropagation/TreeRootIdContext.ts +0 -5
  1026. package/src/accessorPropagation/TreeRootIdProvider.tsx +0 -12
  1027. package/src/accessorPropagation/index.ts +0 -30
  1028. package/src/accessorPropagation/useAccessorUpdateSubscription.ts +0 -107
  1029. package/src/accessorPropagation/useBindingOperations.ts +0 -5
  1030. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +0 -70
  1031. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +0 -58
  1032. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +0 -58
  1033. package/src/accessorPropagation/useEntity.ts +0 -56
  1034. package/src/accessorPropagation/useEntityKey.ts +0 -15
  1035. package/src/accessorPropagation/useEntityList.ts +0 -49
  1036. package/src/accessorPropagation/useEntityListSubTree.ts +0 -27
  1037. package/src/accessorPropagation/useEntityListSubTreeParameters.ts +0 -88
  1038. package/src/accessorPropagation/useEntitySubTree.ts +0 -26
  1039. package/src/accessorPropagation/useEntitySubTreeParameters.ts +0 -66
  1040. package/src/accessorPropagation/useEnvironment.ts +0 -7
  1041. package/src/accessorPropagation/useExtendTree.ts +0 -30
  1042. package/src/accessorPropagation/useField.ts +0 -51
  1043. package/src/accessorPropagation/useGetEntityByKey.ts +0 -4
  1044. package/src/accessorPropagation/useGetEntityListSubTree.ts +0 -28
  1045. package/src/accessorPropagation/useGetEntitySubTree.ts +0 -28
  1046. package/src/accessorPropagation/useGetTreeFilters.ts +0 -4
  1047. package/src/accessorPropagation/useHasEntity.ts +0 -6
  1048. package/src/accessorPropagation/usePersist.ts +0 -4
  1049. package/src/accessorPropagation/useTreeRootId.ts +0 -5
  1050. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +0 -92
  1051. package/src/accessorSorting/SortedEntities.ts +0 -9
  1052. package/src/accessorSorting/addEntityAtIndex.ts +0 -27
  1053. package/src/accessorSorting/errors.ts +0 -9
  1054. package/src/accessorSorting/index.ts +0 -9
  1055. package/src/accessorSorting/moveEntity.ts +0 -66
  1056. package/src/accessorSorting/repairEntitiesOrder.ts +0 -15
  1057. package/src/accessorSorting/sortEntities.ts +0 -20
  1058. package/src/accessorSorting/useSortedEntities.ts +0 -102
  1059. package/src/accessorTree/AccessorTree.tsx +0 -37
  1060. package/src/accessorTree/AccessorTreeState.ts +0 -29
  1061. package/src/accessorTree/AccessorTreeStateAction.ts +0 -21
  1062. package/src/accessorTree/AccessorTreeStateContext.ts +0 -4
  1063. package/src/accessorTree/AccessorTreeStateMetadata.ts +0 -3
  1064. package/src/accessorTree/AccessorTreeStateOptions.ts +0 -7
  1065. package/src/accessorTree/DirtinessContext.ts +0 -4
  1066. package/src/accessorTree/MutationRequestResponse.ts +0 -64
  1067. package/src/accessorTree/MutationStateContext.ts +0 -4
  1068. package/src/accessorTree/RequestError.ts +0 -22
  1069. package/src/accessorTree/accessorTreeStateReducer.ts +0 -36
  1070. package/src/accessorTree/metadataToRequestError.ts +0 -14
  1071. package/src/accessorTree/useAccessorTreeState.ts +0 -11
  1072. package/src/accessorTree/useDataBinding.ts +0 -104
  1073. package/src/accessorTree/useDirtinessState.ts +0 -4
  1074. package/src/accessorTree/useMutationState.ts +0 -4
  1075. package/src/core/IncrementalMarkerBuilder.ts +0 -60
  1076. package/src/core/MarkerTreeGenerator.ts +0 -121
  1077. package/src/coreComponents/Component.tsx +0 -74
  1078. package/src/coreComponents/DataBindingProvider.tsx +0 -54
  1079. package/src/coreComponents/Entity.tsx +0 -26
  1080. package/src/coreComponents/EntityList.tsx +0 -55
  1081. package/src/coreComponents/EntityListSubTree.tsx +0 -83
  1082. package/src/coreComponents/EntitySubTree.tsx +0 -93
  1083. package/src/coreComponents/Field.tsx +0 -46
  1084. package/src/coreComponents/HasMany.tsx +0 -47
  1085. package/src/coreComponents/HasOne.tsx +0 -41
  1086. package/src/coreComponents/MarkerProvider.ts +0 -59
  1087. package/src/coreComponents/ParentEntity.tsx +0 -20
  1088. package/src/coreComponents/index.ts +0 -11
  1089. package/src/entityEvents/index.ts +0 -7
  1090. package/src/entityEvents/useDerivedField.ts +0 -64
  1091. package/src/entityEvents/useEntityBeforePersist.ts +0 -6
  1092. package/src/entityEvents/useEntityBeforeUpdate.ts +0 -6
  1093. package/src/entityEvents/useEntityEvent.ts +0 -57
  1094. package/src/entityEvents/useEntityPersistError.ts +0 -6
  1095. package/src/entityEvents/useEntityPersistSuccess.ts +0 -6
  1096. package/src/entityEvents/useOnConnectionUpdate.ts +0 -10
  1097. package/src/helperComponents/DeferredSubTrees.tsx +0 -126
  1098. package/src/helperComponents/EntityView.tsx +0 -19
  1099. package/src/helperComponents/FieldView.tsx +0 -142
  1100. package/src/helperComponents/If.tsx +0 -74
  1101. package/src/helperComponents/StaticRender.tsx +0 -15
  1102. package/src/helperComponents/SugaredField.tsx +0 -18
  1103. package/src/helperComponents/helpers/FilterEvaluator.ts +0 -46
  1104. package/src/helperComponents/helpers/FilterFieldsCollector.ts +0 -46
  1105. package/src/helperComponents/helpers/evaluateCondition.ts +0 -52
  1106. package/src/helperComponents/index.ts +0 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeStore.cjs","sources":["../../../src/core/TreeStore.ts"],"sourcesContent":["import {\n\tNormalizedPersistedData,\n\tPersistedEntityDataStore,\n\tReceivedDataTree,\n\tSubTreeDataStore,\n\tUniqueEntityId,\n} from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { Environment } from '../dao'\nimport { MarkerTreeRoot, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tAlias,\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tPlaceholderName,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MarkerComparator } from './MarkerComparator'\nimport { RequestResponseNormalizer } from './RequestResponseNormalizer'\nimport type { Schema } from './schema'\nimport type { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, RootStateNode } from './state'\nimport { SubMutationOperation } from './MutationGenerator'\n\nconst emptyEntityIdSet: ReadonlySet<EntityId> = new Set()\n\nexport class TreeStore {\n\tpublic readonly entityStore: Map<UniqueEntityId, EntityState> = new Map()\n\tpublic readonly entityRealmStore: Map<EntityRealmKey, EntityRealmState | EntityRealmStateStub> = new Map()\n\n\t// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.\n\t// This is useful when the tree is extended to contain a sub-tree with the same placeholder.\n\tpublic readonly markerTrees: Map<TreeRootId | undefined, MarkerTreeRoot> = new Map()\n\tpublic readonly subTreeStatesByRoot: Map<TreeRootId | undefined, Map<PlaceholderName, RootStateNode>> = new Map()\n\n\tpublic readonly persistedData: NormalizedPersistedData = new NormalizedPersistedData(new Map(), new Map())\n\n\tpublic constructor(\n\t\tprivate readonly _schema: Schema,\n\t) {}\n\n\tpublic mergeInQueryResponse(response: ReceivedDataTree, markerTree: MarkerTreeRoot): void {\n\t\tRequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree)\n\t}\n\n\tpublic mergeInMutationResponse(response: ReceivedDataTree, operations: SubMutationOperation[]): void {\n\t\tRequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations)\n\t}\n\n\tpublic get persistedEntityData(): PersistedEntityDataStore {\n\t\treturn this.persistedData.persistedEntityDataStore\n\t}\n\n\tpublic get subTreePersistedData(): SubTreeDataStore {\n\t\treturn this.persistedData.subTreeDataStore\n\t}\n\n\tpublic get schema(): Schema {\n\t\treturn this._schema\n\t}\n\n\tpublic getPathBackToParent(entityRealm: EntityRealmState | EntityRealmStateStub):\n\t\t| {\n\t\t\t\tfieldBackToParent: FieldName\n\t\t\t\tparent: EntityRealmState\n\t\t }\n\t\t| undefined {\n\t\tconst blueprint = entityRealm.blueprint\n\t\tif (blueprint.parent === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tlet parentEntityName: EntityName\n\t\tlet relationFromParent: FieldName\n\t\tlet parent: EntityRealmState\n\n\t\tif (blueprint.type === 'hasOne') {\n\t\t\tparentEntityName = blueprint.parent.entity.entityName\n\t\t\trelationFromParent = blueprint.marker.parameters.field\n\t\t\tparent = blueprint.parent\n\t\t} else if (blueprint.type === 'listEntity') {\n\t\t\tconst grandparentBlueprint = blueprint.parent.blueprint\n\n\t\t\tif (grandparentBlueprint.parent === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tparentEntityName = grandparentBlueprint.parent.entity.entityName\n\t\t\trelationFromParent = grandparentBlueprint.marker.parameters.field\n\t\t\tparent = grandparentBlueprint.parent\n\t\t} else {\n\t\t\treturn assertNever(blueprint)\n\t\t}\n\n\t\tconst relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent)\n\t\tconst fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null\n\n\t\t// console.log(parentEntityName, relationFromParent, entityRealm.entity.entityName, fieldBack)\n\t\tif (fieldBack === null) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tfieldBackToParent: fieldBack,\n\t\t}\n\t}\n\n\tpublic getSubTreeState(\n\t\tmode: 'entity',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): EntityRealmState\n\tpublic getSubTreeState(\n\t\tmode: 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): EntityListState\n\tpublic getSubTreeState(\n\t\tmode: 'entity' | 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters:\n\t\t\t| Alias\n\t\t\t| SugaredQualifiedSingleEntity\n\t\t\t| SugaredUnconstrainedQualifiedSingleEntity\n\t\t\t| SugaredQualifiedEntityList\n\t\t\t| SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): RootStateNode {\n\t\tconst markerRoot = this.markerTrees.get(treeRootId)\n\t\tconst subTreeStates = this.subTreeStatesByRoot.get(treeRootId)\n\n\t\tif (subTreeStates === undefined || markerRoot === undefined) {\n\t\t\tif (treeRootId) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow new BindingError(`Failed to retrieve a sub tree.`)\n\t\t}\n\n\t\tlet placeholderName: string\n\n\t\tif (typeof aliasOrParameters === 'string') {\n\t\t\tconst placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters)\n\n\t\t\tif (placeholderByAlias === undefined) {\n\t\t\t\tthrow new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`)\n\t\t\t}\n\t\t\tplaceholderName = placeholderByAlias\n\t\t} else if (mode === 'entityList') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedEntityList(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedEntityList,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedEntityList(aliasOrParameters as SugaredQualifiedEntityList, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else if (mode === 'entity') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters as SugaredQualifiedSingleEntity, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tconst subTreeState = subTreeStates.get(placeholderName)\n\n\t\tif (subTreeState === undefined) {\n\t\t\tthrow new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`)\n\t\t}\n\t\treturn subTreeState\n\t}\n\n\tpublic getEntityListPersistedIds(state: EntityListState): ReadonlySet<EntityId> {\n\t\tconst blueprint = state.blueprint\n\n\t\tif (blueprint.parent) {\n\t\t\tconst entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue)\n\t\t\treturn (entityData?.get(blueprint.marker.placeholderName) as Set<string> | undefined) ?? emptyEntityIdSet\n\t\t} else {\n\t\t\treturn (this.subTreePersistedData.get(blueprint.marker.placeholderName) as Set<string>) ?? emptyEntityIdSet\n\t\t}\n\t}\n\n\tpublic disposeOfRealm(realmToDisposeOf: EntityRealmState | EntityRealmStateStub) {\n\t\tthis.entityRealmStore.delete(realmToDisposeOf.realmKey)\n\t\trealmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey)\n\n\t\tif (realmToDisposeOf.type === 'entityRealm') {\n\t\t\trealmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf)\n\n\t\t\tfor (const child of realmToDisposeOf.children.values()) {\n\t\t\t\tswitch (child.type) {\n\t\t\t\t\tcase 'field':\n\t\t\t\t\t\tcontinue\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\tcase 'entityRealmStub': {\n\t\t\t\t\t\tthis.disposeOfRealm(child)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tfor (const listChild of child.children.values()) {\n\t\t\t\t\t\t\tthis.disposeOfRealm(listChild)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst entity = realmToDisposeOf.entity\n\t\tif (entity.realms.size === 0) {\n\t\t\tthis.disposeOfEntity(entity)\n\t\t}\n\t}\n\n\tpublic disposeOfEntity(entity: EntityState) {\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.disposeOfRealm(realm)\n\t\t}\n\t\tthis.entityStore.delete(entity.id.uniqueValue)\n\t\tthis.persistedEntityData.delete(entity.id.uniqueValue)\n\t}\n\n\tpublic effectivelyHasTreeRoot(candidateRoot: MarkerTreeRoot): boolean {\n\t\tcandidateRoots: for (const candidateSubTree of candidateRoot.subTrees.values()) {\n\t\t\tif (candidateSubTree.parameters.isCreating) {\n\t\t\t\t// This, by definition, won't trigger a query.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const root of this.markerTrees.values()) {\n\t\t\t\tfor (const alreadyPresentSubTree of root.subTrees.values()) {\n\t\t\t\t\tconst isSubset = MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree)\n\t\t\t\t\tif (isSubset) {\n\t\t\t\t\t\tcontinue candidateRoots\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n}\n"],"names":["NormalizedPersistedData","RequestResponseNormalizer","assertNever","BindingError","PlaceholderGenerator","QueryLanguage","MarkerComparator"],"mappings":"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"}
@@ -8,9 +8,9 @@ import { BindingError } from "../BindingError.js";
8
8
  import { MarkerComparator } from "./MarkerComparator.js";
9
9
  import { RequestResponseNormalizer } from "./RequestResponseNormalizer.js";
10
10
  import { NormalizedPersistedData } from "../accessorTree/NormalizedPersistedData.js";
11
- import { assertNever } from "../utils/assertNever.js";
12
11
  import { PlaceholderGenerator } from "../markers/PlaceholderGenerator.js";
13
12
  import { QueryLanguage } from "../queryLanguage/QueryLanguage.js";
13
+ import { assertNever } from "../utils/assertNever.js";
14
14
  const emptyEntityIdSet = /* @__PURE__ */ new Set();
15
15
  class TreeStore {
16
16
  constructor(_schema) {
@@ -1 +1 @@
1
- {"version":3,"file":"TreeStore.js","sources":["../../../src/core/TreeStore.ts"],"sourcesContent":["import {\n\tNormalizedPersistedData,\n\tPersistedEntityDataStore,\n\tReceivedDataTree,\n\tSubTreeDataStore,\n\tUniqueEntityId,\n} from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { Environment } from '../dao'\nimport { MarkerTreeRoot, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tAlias,\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tPlaceholderName,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MarkerComparator } from './MarkerComparator'\nimport { RequestResponseNormalizer } from './RequestResponseNormalizer'\nimport type { Schema } from './schema'\nimport type { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, RootStateNode } from './state'\nimport { SubMutationOperation } from './MutationGenerator'\n\nconst emptyEntityIdSet: ReadonlySet<EntityId> = new Set()\n\nexport class TreeStore {\n\tpublic readonly entityStore: Map<UniqueEntityId, EntityState> = new Map()\n\tpublic readonly entityRealmStore: Map<EntityRealmKey, EntityRealmState | EntityRealmStateStub> = new Map()\n\n\t// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.\n\t// This is useful when the tree is extended to contain a sub-tree with the same placeholder.\n\tpublic readonly markerTrees: Map<TreeRootId | undefined, MarkerTreeRoot> = new Map()\n\tpublic readonly subTreeStatesByRoot: Map<TreeRootId | undefined, Map<PlaceholderName, RootStateNode>> = new Map()\n\n\tpublic readonly persistedData: NormalizedPersistedData = new NormalizedPersistedData(new Map(), new Map())\n\n\tpublic constructor(\n\t\tprivate readonly _schema: Schema,\n\t) {}\n\n\tpublic mergeInQueryResponse(response: ReceivedDataTree, markerTree: MarkerTreeRoot): void {\n\t\tRequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree)\n\t}\n\n\tpublic mergeInMutationResponse(response: ReceivedDataTree, operations: SubMutationOperation[]): void {\n\t\tRequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations)\n\t}\n\n\tpublic get persistedEntityData(): PersistedEntityDataStore {\n\t\treturn this.persistedData.persistedEntityDataStore\n\t}\n\n\tpublic get subTreePersistedData(): SubTreeDataStore {\n\t\treturn this.persistedData.subTreeDataStore\n\t}\n\n\tpublic get schema(): Schema {\n\t\treturn this._schema\n\t}\n\n\tpublic getPathBackToParent(entityRealm: EntityRealmState | EntityRealmStateStub):\n\t\t| {\n\t\t\t\tfieldBackToParent: FieldName\n\t\t\t\tparent: EntityRealmState\n\t\t }\n\t\t| undefined {\n\t\tconst blueprint = entityRealm.blueprint\n\t\tif (blueprint.parent === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tlet parentEntityName: EntityName\n\t\tlet relationFromParent: FieldName\n\t\tlet parent: EntityRealmState\n\n\t\tif (blueprint.type === 'hasOne') {\n\t\t\tparentEntityName = blueprint.parent.entity.entityName\n\t\t\trelationFromParent = blueprint.marker.parameters.field\n\t\t\tparent = blueprint.parent\n\t\t} else if (blueprint.type === 'listEntity') {\n\t\t\tconst grandparentBlueprint = blueprint.parent.blueprint\n\n\t\t\tif (grandparentBlueprint.parent === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tparentEntityName = grandparentBlueprint.parent.entity.entityName\n\t\t\trelationFromParent = grandparentBlueprint.marker.parameters.field\n\t\t\tparent = grandparentBlueprint.parent\n\t\t} else {\n\t\t\treturn assertNever(blueprint)\n\t\t}\n\n\t\tconst relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent)\n\t\tconst fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null\n\n\t\t// console.log(parentEntityName, relationFromParent, entityRealm.entity.entityName, fieldBack)\n\t\tif (fieldBack === null) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tfieldBackToParent: fieldBack,\n\t\t}\n\t}\n\n\tpublic getSubTreeState(\n\t\tmode: 'entity',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): EntityRealmState\n\tpublic getSubTreeState(\n\t\tmode: 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): EntityListState\n\tpublic getSubTreeState(\n\t\tmode: 'entity' | 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters:\n\t\t\t| Alias\n\t\t\t| SugaredQualifiedSingleEntity\n\t\t\t| SugaredUnconstrainedQualifiedSingleEntity\n\t\t\t| SugaredQualifiedEntityList\n\t\t\t| SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): RootStateNode {\n\t\tconst markerRoot = this.markerTrees.get(treeRootId)\n\t\tconst subTreeStates = this.subTreeStatesByRoot.get(treeRootId)\n\n\t\tif (subTreeStates === undefined || markerRoot === undefined) {\n\t\t\tif (treeRootId) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow new BindingError(`Failed to retrieve a sub tree.`)\n\t\t}\n\n\t\tlet placeholderName: string\n\n\t\tif (typeof aliasOrParameters === 'string') {\n\t\t\tconst placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters)\n\n\t\t\tif (placeholderByAlias === undefined) {\n\t\t\t\tthrow new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`)\n\t\t\t}\n\t\t\tplaceholderName = placeholderByAlias\n\t\t} else if (mode === 'entityList') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedEntityList(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedEntityList,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedEntityList(aliasOrParameters as SugaredQualifiedEntityList, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else if (mode === 'entity') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters as SugaredQualifiedSingleEntity, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tconst subTreeState = subTreeStates.get(placeholderName)\n\n\t\tif (subTreeState === undefined) {\n\t\t\tthrow new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`)\n\t\t}\n\t\treturn subTreeState\n\t}\n\n\tpublic getEntityListPersistedIds(state: EntityListState): ReadonlySet<EntityId> {\n\t\tconst blueprint = state.blueprint\n\n\t\tif (blueprint.parent) {\n\t\t\tconst entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue)\n\t\t\treturn (entityData?.get(blueprint.marker.placeholderName) as Set<string> | undefined) ?? emptyEntityIdSet\n\t\t} else {\n\t\t\treturn (this.subTreePersistedData.get(blueprint.marker.placeholderName) as Set<string>) ?? emptyEntityIdSet\n\t\t}\n\t}\n\n\tpublic disposeOfRealm(realmToDisposeOf: EntityRealmState | EntityRealmStateStub) {\n\t\tthis.entityRealmStore.delete(realmToDisposeOf.realmKey)\n\t\trealmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey)\n\n\t\tif (realmToDisposeOf.type === 'entityRealm') {\n\t\t\trealmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf)\n\n\t\t\tfor (const child of realmToDisposeOf.children.values()) {\n\t\t\t\tswitch (child.type) {\n\t\t\t\t\tcase 'field':\n\t\t\t\t\t\tcontinue\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\tcase 'entityRealmStub': {\n\t\t\t\t\t\tthis.disposeOfRealm(child)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tfor (const listChild of child.children.values()) {\n\t\t\t\t\t\t\tthis.disposeOfRealm(listChild)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst entity = realmToDisposeOf.entity\n\t\tif (entity.realms.size === 0) {\n\t\t\tthis.disposeOfEntity(entity)\n\t\t}\n\t}\n\n\tpublic disposeOfEntity(entity: EntityState) {\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.disposeOfRealm(realm)\n\t\t}\n\t\tthis.entityStore.delete(entity.id.uniqueValue)\n\t\tthis.persistedEntityData.delete(entity.id.uniqueValue)\n\t}\n\n\tpublic effectivelyHasTreeRoot(candidateRoot: MarkerTreeRoot): boolean {\n\t\tcandidateRoots: for (const candidateSubTree of candidateRoot.subTrees.values()) {\n\t\t\tif (candidateSubTree.parameters.isCreating) {\n\t\t\t\t// This, by definition, won't trigger a query.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const root of this.markerTrees.values()) {\n\t\t\t\tfor (const alreadyPresentSubTree of root.subTrees.values()) {\n\t\t\t\t\tconst isSubset = MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree)\n\t\t\t\t\tif (isSubset) {\n\t\t\t\t\t\tcontinue candidateRoots\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"TreeStore.js","sources":["../../../src/core/TreeStore.ts"],"sourcesContent":["import {\n\tNormalizedPersistedData,\n\tPersistedEntityDataStore,\n\tReceivedDataTree,\n\tSubTreeDataStore,\n\tUniqueEntityId,\n} from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { Environment } from '../dao'\nimport { MarkerTreeRoot, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tAlias,\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tPlaceholderName,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MarkerComparator } from './MarkerComparator'\nimport { RequestResponseNormalizer } from './RequestResponseNormalizer'\nimport type { Schema } from './schema'\nimport type { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, RootStateNode } from './state'\nimport { SubMutationOperation } from './MutationGenerator'\n\nconst emptyEntityIdSet: ReadonlySet<EntityId> = new Set()\n\nexport class TreeStore {\n\tpublic readonly entityStore: Map<UniqueEntityId, EntityState> = new Map()\n\tpublic readonly entityRealmStore: Map<EntityRealmKey, EntityRealmState | EntityRealmStateStub> = new Map()\n\n\t// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.\n\t// This is useful when the tree is extended to contain a sub-tree with the same placeholder.\n\tpublic readonly markerTrees: Map<TreeRootId | undefined, MarkerTreeRoot> = new Map()\n\tpublic readonly subTreeStatesByRoot: Map<TreeRootId | undefined, Map<PlaceholderName, RootStateNode>> = new Map()\n\n\tpublic readonly persistedData: NormalizedPersistedData = new NormalizedPersistedData(new Map(), new Map())\n\n\tpublic constructor(\n\t\tprivate readonly _schema: Schema,\n\t) {}\n\n\tpublic mergeInQueryResponse(response: ReceivedDataTree, markerTree: MarkerTreeRoot): void {\n\t\tRequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree)\n\t}\n\n\tpublic mergeInMutationResponse(response: ReceivedDataTree, operations: SubMutationOperation[]): void {\n\t\tRequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations)\n\t}\n\n\tpublic get persistedEntityData(): PersistedEntityDataStore {\n\t\treturn this.persistedData.persistedEntityDataStore\n\t}\n\n\tpublic get subTreePersistedData(): SubTreeDataStore {\n\t\treturn this.persistedData.subTreeDataStore\n\t}\n\n\tpublic get schema(): Schema {\n\t\treturn this._schema\n\t}\n\n\tpublic getPathBackToParent(entityRealm: EntityRealmState | EntityRealmStateStub):\n\t\t| {\n\t\t\t\tfieldBackToParent: FieldName\n\t\t\t\tparent: EntityRealmState\n\t\t }\n\t\t| undefined {\n\t\tconst blueprint = entityRealm.blueprint\n\t\tif (blueprint.parent === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tlet parentEntityName: EntityName\n\t\tlet relationFromParent: FieldName\n\t\tlet parent: EntityRealmState\n\n\t\tif (blueprint.type === 'hasOne') {\n\t\t\tparentEntityName = blueprint.parent.entity.entityName\n\t\t\trelationFromParent = blueprint.marker.parameters.field\n\t\t\tparent = blueprint.parent\n\t\t} else if (blueprint.type === 'listEntity') {\n\t\t\tconst grandparentBlueprint = blueprint.parent.blueprint\n\n\t\t\tif (grandparentBlueprint.parent === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tparentEntityName = grandparentBlueprint.parent.entity.entityName\n\t\t\trelationFromParent = grandparentBlueprint.marker.parameters.field\n\t\t\tparent = grandparentBlueprint.parent\n\t\t} else {\n\t\t\treturn assertNever(blueprint)\n\t\t}\n\n\t\tconst relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent)\n\t\tconst fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null\n\n\t\t// console.log(parentEntityName, relationFromParent, entityRealm.entity.entityName, fieldBack)\n\t\tif (fieldBack === null) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tfieldBackToParent: fieldBack,\n\t\t}\n\t}\n\n\tpublic getSubTreeState(\n\t\tmode: 'entity',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): EntityRealmState\n\tpublic getSubTreeState(\n\t\tmode: 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): EntityListState\n\tpublic getSubTreeState(\n\t\tmode: 'entity' | 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters:\n\t\t\t| Alias\n\t\t\t| SugaredQualifiedSingleEntity\n\t\t\t| SugaredUnconstrainedQualifiedSingleEntity\n\t\t\t| SugaredQualifiedEntityList\n\t\t\t| SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): RootStateNode {\n\t\tconst markerRoot = this.markerTrees.get(treeRootId)\n\t\tconst subTreeStates = this.subTreeStatesByRoot.get(treeRootId)\n\n\t\tif (subTreeStates === undefined || markerRoot === undefined) {\n\t\t\tif (treeRootId) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow new BindingError(`Failed to retrieve a sub tree.`)\n\t\t}\n\n\t\tlet placeholderName: string\n\n\t\tif (typeof aliasOrParameters === 'string') {\n\t\t\tconst placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters)\n\n\t\t\tif (placeholderByAlias === undefined) {\n\t\t\t\tthrow new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`)\n\t\t\t}\n\t\t\tplaceholderName = placeholderByAlias\n\t\t} else if (mode === 'entityList') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedEntityList(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedEntityList,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedEntityList(aliasOrParameters as SugaredQualifiedEntityList, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else if (mode === 'entity') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters as SugaredQualifiedSingleEntity, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tconst subTreeState = subTreeStates.get(placeholderName)\n\n\t\tif (subTreeState === undefined) {\n\t\t\tthrow new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`)\n\t\t}\n\t\treturn subTreeState\n\t}\n\n\tpublic getEntityListPersistedIds(state: EntityListState): ReadonlySet<EntityId> {\n\t\tconst blueprint = state.blueprint\n\n\t\tif (blueprint.parent) {\n\t\t\tconst entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue)\n\t\t\treturn (entityData?.get(blueprint.marker.placeholderName) as Set<string> | undefined) ?? emptyEntityIdSet\n\t\t} else {\n\t\t\treturn (this.subTreePersistedData.get(blueprint.marker.placeholderName) as Set<string>) ?? emptyEntityIdSet\n\t\t}\n\t}\n\n\tpublic disposeOfRealm(realmToDisposeOf: EntityRealmState | EntityRealmStateStub) {\n\t\tthis.entityRealmStore.delete(realmToDisposeOf.realmKey)\n\t\trealmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey)\n\n\t\tif (realmToDisposeOf.type === 'entityRealm') {\n\t\t\trealmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf)\n\n\t\t\tfor (const child of realmToDisposeOf.children.values()) {\n\t\t\t\tswitch (child.type) {\n\t\t\t\t\tcase 'field':\n\t\t\t\t\t\tcontinue\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\tcase 'entityRealmStub': {\n\t\t\t\t\t\tthis.disposeOfRealm(child)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tfor (const listChild of child.children.values()) {\n\t\t\t\t\t\t\tthis.disposeOfRealm(listChild)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst entity = realmToDisposeOf.entity\n\t\tif (entity.realms.size === 0) {\n\t\t\tthis.disposeOfEntity(entity)\n\t\t}\n\t}\n\n\tpublic disposeOfEntity(entity: EntityState) {\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.disposeOfRealm(realm)\n\t\t}\n\t\tthis.entityStore.delete(entity.id.uniqueValue)\n\t\tthis.persistedEntityData.delete(entity.id.uniqueValue)\n\t}\n\n\tpublic effectivelyHasTreeRoot(candidateRoot: MarkerTreeRoot): boolean {\n\t\tcandidateRoots: for (const candidateSubTree of candidateRoot.subTrees.values()) {\n\t\t\tif (candidateSubTree.parameters.isCreating) {\n\t\t\t\t// This, by definition, won't trigger a query.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const root of this.markerTrees.values()) {\n\t\t\t\tfor (const alreadyPresentSubTree of root.subTrees.values()) {\n\t\t\t\t\tconst isSubset = MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree)\n\t\t\t\t\tif (isSubset) {\n\t\t\t\t\t\tcontinue candidateRoots\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,uCAA8C;AAE7C,MAAM,UAAU;AAAA,EAWf,YACW,SAChB;AAZc,2DAAoD;AACpD,gEAAqF;AAIrF;AAAA;AAAA,2DAA+D;AAC/D,mEAA4F;AAE5F,yCAAyC,IAAI,wBAAwB,oBAAI,OAAO,oBAAI,KAAK;AAGvF,SAAA,UAAA;AAAA,EACf;AAAA,EAEI,qBAAqB,UAA4B,YAAkC;AACzF,8BAA0B,qBAAqB,KAAK,eAAe,UAAU,UAAU;AAAA,EACxF;AAAA,EAEO,wBAAwB,UAA4B,YAA0C;AACpG,8BAA0B,wBAAwB,KAAK,eAAe,UAAU,UAAU;AAAA,EAC3F;AAAA,EAEA,IAAW,sBAAgD;AAC1D,WAAO,KAAK,cAAc;AAAA,EAC3B;AAAA,EAEA,IAAW,uBAAyC;AACnD,WAAO,KAAK,cAAc;AAAA,EAC3B;AAAA,EAEA,IAAW,SAAiB;AAC3B,WAAO,KAAK;AAAA,EACb;AAAA,EAEO,oBAAoB,aAKd;AACZ,UAAM,YAAY,YAAY;AAC1B,QAAA,UAAU,WAAW,QAAW;AAC5B,aAAA;AAAA,IACR;AACI,QAAA;AACA,QAAA;AACA,QAAA;AAEA,QAAA,UAAU,SAAS,UAAU;AACb,yBAAA,UAAU,OAAO,OAAO;AACtB,2BAAA,UAAU,OAAO,WAAW;AACjD,eAAS,UAAU;AAAA,IAAA,WACT,UAAU,SAAS,cAAc;AACrC,YAAA,uBAAuB,UAAU,OAAO;AAE1C,UAAA,qBAAqB,WAAW,QAAW;AACvC,eAAA;AAAA,MACR;AACmB,yBAAA,qBAAqB,OAAO,OAAO;AACjC,2BAAA,qBAAqB,OAAO,WAAW;AAC5D,eAAS,qBAAqB;AAAA,IAAA,OACxB;AACN,aAAO,YAAqB;AAAA,IAC7B;AAEA,UAAM,iBAAiB,KAAK,OAAO,kBAAkB,kBAAkB,kBAAkB;AACzF,UAAM,aAAa,eAAe,WAAW,eAAe,eAAe;AAG3E,QAAI,cAAc,MAAM;AAChB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,MACN;AAAA,MACA,mBAAmB;AAAA,IAAA;AAAA,EAErB;AAAA,EAcO,gBACN,MACA,YACA,mBAMA,aACgB;AAChB,UAAM,aAAa,KAAK,YAAY,IAAI,UAAU;AAClD,UAAM,gBAAgB,KAAK,oBAAoB,IAAI,UAAU;AAEzD,QAAA,kBAAkB,UAAa,eAAe,QAAW;AAC5D,UAAI,YAAY;AACf,cAAM,IAAI;AAAA,UACT,oBAAoB,UAAU;AAAA,QAAA;AAAA,MAEhC;AACM,YAAA,IAAI,aAAa,gCAAgC;AAAA,IACxD;AAEI,QAAA;AAEA,QAAA,OAAO,sBAAsB,UAAU;AAC1C,YAAM,qBAAqB,WAAW,sBAAsB,IAAI,iBAAiB;AAEjF,UAAI,uBAAuB,QAAW;AACrC,cAAM,IAAI,aAAa,6BAA6B,iBAAiB,IAAI;AAAA,MAC1E;AACkB,wBAAA;AAAA,IAAA,WACR,SAAS,cAAc;AACjC,wBAAkB,qBAAqB;AAAA,QACtC,kBAAkB,aACf,cAAc;AAAA,UACd;AAAA,UACA;AAAA,QAEA,IAAA,cAAc,2BAA2B,mBAAiD,WAAW;AAAA,QACxG;AAAA,MAAA;AAAA,IACD,WACU,SAAS,UAAU;AAC7B,wBAAkB,qBAAqB;AAAA,QACtC,kBAAkB,aACf,cAAc;AAAA,UACd;AAAA,UACA;AAAA,QAEA,IAAA,cAAc,6BAA6B,mBAAmD,WAAW;AAAA,QAC5G;AAAA,MAAA;AAAA,IACD,OACM;AACN,YAAM,IAAI,aAAa;AAAA,IACxB;AACM,UAAA,eAAe,cAAc,IAAI,eAAe;AAEtD,QAAI,iBAAiB,QAAW;AAC/B,YAAM,IAAI,aAAa,+CAA+C,eAAe,IAAI;AAAA,IAC1F;AACO,WAAA;AAAA,EACR;AAAA,EAEO,0BAA0B,OAA+C;AAC/E,UAAM,YAAY,MAAM;AAExB,QAAI,UAAU,QAAQ;AACf,YAAA,aAAa,KAAK,oBAAoB,IAAI,UAAU,OAAO,OAAO,GAAG,WAAW;AACtF,aAAQ,YAAY,IAAI,UAAU,OAAO,eAAe,KAAiC;AAAA,IAAA,OACnF;AACN,aAAQ,KAAK,qBAAqB,IAAI,UAAU,OAAO,eAAe,KAAqB;AAAA,IAC5F;AAAA,EACD;AAAA,EAEO,eAAe,kBAA2D;AAC3E,SAAA,iBAAiB,OAAO,iBAAiB,QAAQ;AACtD,qBAAiB,OAAO,OAAO,OAAO,iBAAiB,QAAQ;AAE3D,QAAA,iBAAiB,SAAS,eAAe;AAC5C,uBAAiB,UAAU,QAAQ,4BAA4B,OAAO,gBAAgB;AAEtF,iBAAW,SAAS,iBAAiB,SAAS,OAAA,GAAU;AACvD,gBAAQ,MAAM,MAAM;AAAA,UACnB,KAAK;AACJ;AAAA,UACD,KAAK;AAAA,UACL,KAAK,mBAAmB;AACvB,iBAAK,eAAe,KAAK;AACzB;AAAA,UACD;AAAA,UACA,KAAK,cAAc;AAClB,uBAAW,aAAa,MAAM,SAAS,OAAA,GAAU;AAChD,mBAAK,eAAe,SAAS;AAAA,YAC9B;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,UAAM,SAAS,iBAAiB;AAC5B,QAAA,OAAO,OAAO,SAAS,GAAG;AAC7B,WAAK,gBAAgB,MAAM;AAAA,IAC5B;AAAA,EACD;AAAA,EAEO,gBAAgB,QAAqB;AAC3C,eAAW,SAAS,OAAO,OAAO,OAAA,GAAU;AAC3C,WAAK,eAAe,KAAK;AAAA,IAC1B;AACA,SAAK,YAAY,OAAO,OAAO,GAAG,WAAW;AAC7C,SAAK,oBAAoB,OAAO,OAAO,GAAG,WAAW;AAAA,EACtD;AAAA,EAEO,uBAAuB,eAAwC;AACrE;AAAgB,iBAAW,oBAAoB,cAAc,SAAS,OAAA,GAAU;AAC3E,YAAA,iBAAiB,WAAW,YAAY;AAE3C;AAAA,QACD;AACA,mBAAW,QAAQ,KAAK,YAAY,OAAA,GAAU;AAC7C,qBAAW,yBAAyB,KAAK,SAAS,OAAA,GAAU;AAC3D,kBAAM,WAAW,iBAAiB,kBAAkB,kBAAkB,qBAAqB;AAC3F,gBAAI,UAAU;AACJ,uBAAA;AAAA,YACV;AAAA,UACD;AAAA,QACD;AACO,eAAA;AAAA,MACR;AACO,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const BindingError = require("../BindingError.cjs");
4
+ const VariableFieldValue = require("../dao/VariableFieldValue.cjs");
5
+ class VariableInputTransformer {
6
+ static transformValue(value, environment) {
7
+ if (value instanceof VariableFieldValue.VariableFieldValue) {
8
+ return VariableInputTransformer.transformVariableFieldValue(value, environment);
9
+ }
10
+ return value;
11
+ }
12
+ static transformVariableFieldValue(variableFieldValue, environment) {
13
+ const value = environment.getVariableOrElse(variableFieldValue.variableName, void 0) ?? environment.getParameterOrElse(variableFieldValue.variableName, void 0);
14
+ if (value === void 0) {
15
+ throw new BindingError.BindingError(`Variable '${variableFieldValue.variableName}' not found.`);
16
+ }
17
+ if (typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number" && value !== null) {
18
+ throw new BindingError.BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`);
19
+ }
20
+ return value;
21
+ }
22
+ }
23
+ exports.VariableInputTransformer = VariableInputTransformer;
24
+ //# sourceMappingURL=VariableInputTransformer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariableInputTransformer.cjs","sources":["../../../src/core/VariableInputTransformer.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport { Environment, VariableFieldValue } from '../dao'\nimport type { FieldValue, OptionallyVariableFieldValue } from '../treeParameters'\n\nexport class VariableInputTransformer {\n\tpublic static transformValue(value: OptionallyVariableFieldValue, environment: Environment): FieldValue {\n\t\tif (value instanceof VariableFieldValue) {\n\t\t\treturn VariableInputTransformer.transformVariableFieldValue(value, environment)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic static transformVariableFieldValue(variableFieldValue: VariableFieldValue, environment: Environment): FieldValue {\n\t\tconst value = environment.getVariableOrElse(variableFieldValue.variableName, undefined)\n\t\t\t?? environment.getParameterOrElse(variableFieldValue.variableName, undefined)\n\n\t\tif (value === undefined) {\n\t\t\tthrow new BindingError(`Variable '${variableFieldValue.variableName}' not found.`)\n\t\t}\n\n\t\tif (typeof value !== 'string' && typeof value !== 'boolean' && typeof value !== 'number' && value !== null) {\n\t\t\tthrow new BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`)\n\t\t}\n\t\treturn value\n\t}\n}\n"],"names":["VariableFieldValue","BindingError"],"mappings":";;;;AAIO,MAAM,yBAAyB;AAAA,EACrC,OAAc,eAAe,OAAqC,aAAsC;AACvG,QAAI,iBAAiBA,mBAAAA,oBAAoB;AACjC,aAAA,yBAAyB,4BAA4B,OAAO,WAAW;AAAA,IAC/E;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,4BAA4B,oBAAwC,aAAsC;AACjH,UAAA,QAAQ,YAAY,kBAAkB,mBAAmB,cAAc,MAAS,KAClF,YAAY,mBAAmB,mBAAmB,cAAc,MAAS;AAE7E,QAAI,UAAU,QAAW;AACxB,YAAM,IAAIC,aAAA,aAAa,aAAa,mBAAmB,YAAY,cAAc;AAAA,IAClF;AAEI,QAAA,OAAO,UAAU,YAAY,OAAO,UAAU,aAAa,OAAO,UAAU,YAAY,UAAU,MAAM;AACrG,YAAA,IAAIA,aAAAA,aAAa,qBAAqB,mBAAmB,YAAY,oCAAoC,OAAO,KAAK,IAAI;AAAA,IAChI;AACO,WAAA;AAAA,EACR;AACD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VariableInputTransformer.js","sources":["../../../src/core/VariableInputTransformer.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport { Environment, VariableFieldValue } from '../dao'\nimport type { FieldValue, OptionallyVariableFieldValue } from '../treeParameters'\n\nexport class VariableInputTransformer {\n\tpublic static transformValue(value: OptionallyVariableFieldValue, environment: Environment): FieldValue {\n\t\tif (value instanceof VariableFieldValue) {\n\t\t\treturn VariableInputTransformer.transformVariableFieldValue(value, environment)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic static transformVariableFieldValue(variableFieldValue: VariableFieldValue, environment: Environment): FieldValue {\n\t\tconst value = environment.getVariableOrElse(variableFieldValue.variableName, undefined)\n\t\t\t?? environment.getParameterOrElse(variableFieldValue.variableName, undefined)\n\n\t\tif (value === undefined) {\n\t\t\tthrow new BindingError(`Variable '${variableFieldValue.variableName}' not found.`)\n\t\t}\n\n\t\tif (typeof value !== 'string' && typeof value !== 'boolean' && typeof value !== 'number' && value !== null) {\n\t\t\tthrow new BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`)\n\t\t}\n\t\treturn value\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,yBAAyB;AAAA,EACrC,OAAc,eAAe,OAAqC,aAAsC;AACvG,QAAI,iBAAiB,oBAAoB;AACjC,aAAA,yBAAyB,4BAA4B,OAAO,WAAW;AAAA,IAC/E;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,4BAA4B,oBAAwC,aAAsC;AACjH,UAAA,QAAQ,YAAY,kBAAkB,mBAAmB,cAAc,MAAS,KAClF,YAAY,mBAAmB,mBAAmB,cAAc,MAAS;AAE7E,QAAI,UAAU,QAAW;AACxB,YAAM,IAAI,aAAa,aAAa,mBAAmB,0BAA0B;AAAA,IAClF;AAEI,QAAA,OAAO,UAAU,YAAY,OAAO,UAAU,aAAa,OAAO,UAAU,YAAY,UAAU,MAAM;AAC3G,YAAM,IAAI,aAAa,qBAAqB,mBAAmB,gDAAgD,OAAO,SAAS;AAAA,IAChI;AACO,WAAA;AAAA,EACR;AACD;"}
1
+ {"version":3,"file":"VariableInputTransformer.js","sources":["../../../src/core/VariableInputTransformer.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport { Environment, VariableFieldValue } from '../dao'\nimport type { FieldValue, OptionallyVariableFieldValue } from '../treeParameters'\n\nexport class VariableInputTransformer {\n\tpublic static transformValue(value: OptionallyVariableFieldValue, environment: Environment): FieldValue {\n\t\tif (value instanceof VariableFieldValue) {\n\t\t\treturn VariableInputTransformer.transformVariableFieldValue(value, environment)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic static transformVariableFieldValue(variableFieldValue: VariableFieldValue, environment: Environment): FieldValue {\n\t\tconst value = environment.getVariableOrElse(variableFieldValue.variableName, undefined)\n\t\t\t?? environment.getParameterOrElse(variableFieldValue.variableName, undefined)\n\n\t\tif (value === undefined) {\n\t\t\tthrow new BindingError(`Variable '${variableFieldValue.variableName}' not found.`)\n\t\t}\n\n\t\tif (typeof value !== 'string' && typeof value !== 'boolean' && typeof value !== 'number' && value !== null) {\n\t\t\tthrow new BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`)\n\t\t}\n\t\treturn value\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,yBAAyB;AAAA,EACrC,OAAc,eAAe,OAAqC,aAAsC;AACvG,QAAI,iBAAiB,oBAAoB;AACjC,aAAA,yBAAyB,4BAA4B,OAAO,WAAW;AAAA,IAC/E;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,4BAA4B,oBAAwC,aAAsC;AACjH,UAAA,QAAQ,YAAY,kBAAkB,mBAAmB,cAAc,MAAS,KAClF,YAAY,mBAAmB,mBAAmB,cAAc,MAAS;AAE7E,QAAI,UAAU,QAAW;AACxB,YAAM,IAAI,aAAa,aAAa,mBAAmB,YAAY,cAAc;AAAA,IAClF;AAEI,QAAA,OAAO,UAAU,YAAY,OAAO,UAAU,aAAa,OAAO,UAAU,YAAY,UAAU,MAAM;AACrG,YAAA,IAAI,aAAa,qBAAqB,mBAAmB,YAAY,oCAAoC,OAAO,KAAK,IAAI;AAAA,IAChI;AACO,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => {
5
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
+ return value;
7
+ };
8
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
+ const MarkerSugarer = require("./MarkerSugarer.cjs");
10
+ const TreeParameterSugarer = require("./TreeParameterSugarer.cjs");
11
+ const assertNever = require("../../utils/assertNever.cjs");
12
+ class ErrorLocator {
13
+ static locateMarkerPath(path) {
14
+ return path.map((marker) => MarkerSugarer.MarkerSugarer.sugarMarker(marker)).join(this.GLUE);
15
+ }
16
+ static locateInternalState(state) {
17
+ function stateToPath(state2) {
18
+ if (state2 === void 0) {
19
+ return [];
20
+ }
21
+ switch (state2.type) {
22
+ case "field":
23
+ return [...stateToPath(state2.parent), TreeParameterSugarer.TreeParameterSugarer.sugarField(state2.fieldMarker.fieldName)];
24
+ case "entityRealm": {
25
+ const blueprint = state2.blueprint;
26
+ if (blueprint.type === "subTree") {
27
+ return [
28
+ TreeParameterSugarer.TreeParameterSugarer.sugarRootEntity(
29
+ state2.entity.entityName,
30
+ blueprint.marker.parameters.isCreating ? void 0 : blueprint.marker.parameters.where
31
+ )
32
+ ];
33
+ }
34
+ if (blueprint.type === "listEntity") {
35
+ return [...stateToPath(blueprint.parent)];
36
+ }
37
+ if (blueprint.type === "hasOne") {
38
+ return [...stateToPath(blueprint.parent), MarkerSugarer.MarkerSugarer.sugarHasOneRelationMarker(blueprint.marker)];
39
+ }
40
+ return assertNever.assertNever();
41
+ }
42
+ case "entityList": {
43
+ const blueprint = state2.blueprint;
44
+ if (blueprint.parent === void 0) {
45
+ return [
46
+ TreeParameterSugarer.TreeParameterSugarer.sugarRootEntityList(
47
+ state2.entityName,
48
+ blueprint.marker.parameters.isCreating ? void 0 : blueprint.marker.parameters.filter
49
+ )
50
+ ];
51
+ }
52
+ const hasMany = blueprint.marker;
53
+ return [...stateToPath(blueprint.parent), MarkerSugarer.MarkerSugarer.sugarHasManyRelationMarker(hasMany)];
54
+ }
55
+ }
56
+ }
57
+ return stateToPath(state).join(this.GLUE);
58
+ }
59
+ }
60
+ __publicField(ErrorLocator, "GLUE", ".");
61
+ exports.ErrorLocator = ErrorLocator;
62
+ //# sourceMappingURL=ErrorLocator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorLocator.cjs","sources":["../../../../src/core/exceptions/ErrorLocator.ts"],"sourcesContent":["import { assertNever } from '../../utils'\nimport type { StateNode } from '../state'\nimport { MarkerSugarer } from './MarkerSugarer'\nimport type { RawMarkerPath } from './RawMarkerPath'\nimport { TreeParameterSugarer } from './TreeParameterSugarer'\n\nexport class ErrorLocator {\n\tprivate static readonly GLUE = '.'\n\n\tpublic static locateMarkerPath(path: RawMarkerPath): string {\n\t\treturn path.map(marker => MarkerSugarer.sugarMarker(marker)).join(this.GLUE)\n\t}\n\n\tpublic static locateInternalState(state: StateNode): string {\n\t\tfunction stateToPath(state: StateNode | undefined): string[] {\n\t\t\tif (state === undefined) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tswitch (state.type) {\n\t\t\t\tcase 'field':\n\t\t\t\t\treturn [...stateToPath(state.parent), TreeParameterSugarer.sugarField(state.fieldMarker.fieldName)]\n\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\tconst blueprint = state.blueprint\n\t\t\t\t\tif (blueprint.type === 'subTree') {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tTreeParameterSugarer.sugarRootEntity(\n\t\t\t\t\t\t\t\tstate.entity.entityName,\n\t\t\t\t\t\t\t\tblueprint.marker.parameters.isCreating ? undefined : blueprint.marker.parameters.where,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t\tif (blueprint.type === 'listEntity') {\n\t\t\t\t\t\treturn [...stateToPath(blueprint.parent)]\n\t\t\t\t\t}\n\t\t\t\t\tif (blueprint.type === 'hasOne') {\n\t\t\t\t\t\treturn [...stateToPath(blueprint.parent), MarkerSugarer.sugarHasOneRelationMarker(blueprint.marker)]\n\t\t\t\t\t}\n\t\t\t\t\treturn assertNever(blueprint)\n\t\t\t\t}\n\t\t\t\tcase 'entityList': {\n\t\t\t\t\tconst blueprint = state.blueprint\n\n\t\t\t\t\tif (blueprint.parent === undefined) {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tTreeParameterSugarer.sugarRootEntityList(\n\t\t\t\t\t\t\t\tstate.entityName,\n\t\t\t\t\t\t\t\tblueprint.marker.parameters.isCreating ? undefined : blueprint.marker.parameters.filter,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t\tconst hasMany = blueprint.marker\n\t\t\t\t\treturn [...stateToPath(blueprint.parent), MarkerSugarer.sugarHasManyRelationMarker(hasMany)]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn stateToPath(state).join(this.GLUE)\n\t}\n}\n"],"names":["MarkerSugarer","state","TreeParameterSugarer","assertNever"],"mappings":";;;;;;;;;;;AAMO,MAAM,aAAa;AAAA,EAGzB,OAAc,iBAAiB,MAA6B;AACpD,WAAA,KAAK,IAAI,CAAA,WAAUA,cAAAA,cAAc,YAAY,MAAM,CAAC,EAAE,KAAK,KAAK,IAAI;AAAA,EAC5E;AAAA,EAEA,OAAc,oBAAoB,OAA0B;AAC3D,aAAS,YAAYC,QAAwC;AAC5D,UAAIA,WAAU,QAAW;AACxB,eAAO;MACR;AACA,cAAQA,OAAM,MAAM;AAAA,QACnB,KAAK;AACG,iBAAA,CAAC,GAAG,YAAYA,OAAM,MAAM,GAAGC,0CAAqB,WAAWD,OAAM,YAAY,SAAS,CAAC;AAAA,QACnG,KAAK,eAAe;AACnB,gBAAM,YAAYA,OAAM;AACpB,cAAA,UAAU,SAAS,WAAW;AAC1B,mBAAA;AAAA,cACNC,qBAAAA,qBAAqB;AAAA,gBACpBD,OAAM,OAAO;AAAA,gBACb,UAAU,OAAO,WAAW,aAAa,SAAY,UAAU,OAAO,WAAW;AAAA,cAClF;AAAA,YAAA;AAAA,UAEF;AACI,cAAA,UAAU,SAAS,cAAc;AACpC,mBAAO,CAAC,GAAG,YAAY,UAAU,MAAM,CAAC;AAAA,UACzC;AACI,cAAA,UAAU,SAAS,UAAU;AACzB,mBAAA,CAAC,GAAG,YAAY,UAAU,MAAM,GAAGD,cAAc,cAAA,0BAA0B,UAAU,MAAM,CAAC;AAAA,UACpG;AACA,iBAAOG,YAAAA,YAAqB;AAAA,QAC7B;AAAA,QACA,KAAK,cAAc;AAClB,gBAAM,YAAYF,OAAM;AAEpB,cAAA,UAAU,WAAW,QAAW;AAC5B,mBAAA;AAAA,cACNC,qBAAAA,qBAAqB;AAAA,gBACpBD,OAAM;AAAA,gBACN,UAAU,OAAO,WAAW,aAAa,SAAY,UAAU,OAAO,WAAW;AAAA,cAClF;AAAA,YAAA;AAAA,UAEF;AACA,gBAAM,UAAU,UAAU;AACnB,iBAAA,CAAC,GAAG,YAAY,UAAU,MAAM,GAAGD,4BAAc,2BAA2B,OAAO,CAAC;AAAA,QAC5F;AAAA,MACD;AAAA,IACD;AACA,WAAO,YAAY,KAAK,EAAE,KAAK,KAAK,IAAI;AAAA,EACzC;AACD;AAlDC,cADY,cACY,QAAO;;"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const BindingError = require("../../BindingError.cjs");
4
+ class LocalizedBindingError extends BindingError.BindingError {
5
+ constructor(message, markerPath) {
6
+ super(message);
7
+ this.markerPath = markerPath;
8
+ }
9
+ nestedIn(wrapper) {
10
+ return new LocalizedBindingError(this.message, [wrapper, ...this.markerPath]);
11
+ }
12
+ }
13
+ exports.LocalizedBindingError = LocalizedBindingError;
14
+ //# sourceMappingURL=LocalizedBindingError.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalizedBindingError.cjs","sources":["../../../../src/core/exceptions/LocalizedBindingError.ts"],"sourcesContent":["import { BindingError } from '../../BindingError'\nimport type {\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '../../markers'\nimport type { RawMarkerPath } from './RawMarkerPath'\n\nexport class LocalizedBindingError extends BindingError {\n\tpublic constructor(message: string, public readonly markerPath: RawMarkerPath) {\n\t\tsuper(message)\n\t}\n\n\tpublic nestedIn(\n\t\twrapper: EntitySubTreeMarker | EntityListSubTreeMarker | HasOneRelationMarker | HasManyRelationMarker,\n\t): LocalizedBindingError {\n\t\treturn new LocalizedBindingError(this.message, [wrapper, ...this.markerPath])\n\t}\n}\n"],"names":["BindingError"],"mappings":";;;AASO,MAAM,8BAA8BA,aAAAA,aAAa;AAAA,EAChD,YAAY,SAAiC,YAA2B;AAC9E,UAAM,OAAO;AADsC,SAAA,aAAA;AAAA,EAEpD;AAAA,EAEO,SACN,SACwB;AACjB,WAAA,IAAI,sBAAsB,KAAK,SAAS,CAAC,SAAS,GAAG,KAAK,UAAU,CAAC;AAAA,EAC7E;AACD;;"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const TreeParameterSugarer = require("./TreeParameterSugarer.cjs");
4
+ const FieldMarker = require("../../markers/FieldMarker.cjs");
5
+ const HasOneRelationMarker = require("../../markers/HasOneRelationMarker.cjs");
6
+ const HasManyRelationMarker = require("../../markers/HasManyRelationMarker.cjs");
7
+ const EntityListSubTreeMarker = require("../../markers/EntityListSubTreeMarker.cjs");
8
+ const EntitySubTreeMarker = require("../../markers/EntitySubTreeMarker.cjs");
9
+ const assertNever = require("../../utils/assertNever.cjs");
10
+ class MarkerSugarer {
11
+ static sugarMarker(marker) {
12
+ if (marker instanceof FieldMarker.FieldMarker) {
13
+ return this.sugarFieldMarker(marker);
14
+ }
15
+ if (marker instanceof HasOneRelationMarker.HasOneRelationMarker) {
16
+ return this.sugarHasOneRelationMarker(marker);
17
+ }
18
+ if (marker instanceof HasManyRelationMarker.HasManyRelationMarker) {
19
+ return this.sugarHasManyRelationMarker(marker);
20
+ }
21
+ if (marker instanceof EntityListSubTreeMarker.EntityListSubTreeMarker) {
22
+ return this.sugarEntityListSubTreeMarker(marker);
23
+ }
24
+ if (marker instanceof EntitySubTreeMarker.EntitySubTreeMarker) {
25
+ return this.sugarEntitySubTreeMarker(marker);
26
+ }
27
+ return assertNever.assertNever();
28
+ }
29
+ static sugarFieldMarker(field) {
30
+ return TreeParameterSugarer.TreeParameterSugarer.sugarField(field.fieldName);
31
+ }
32
+ static sugarHasOneRelationMarker(hasOne) {
33
+ return TreeParameterSugarer.TreeParameterSugarer.sugarHasOneRelation(
34
+ hasOne.parameters.field,
35
+ hasOne.parameters.reducedBy,
36
+ hasOne.parameters.filter
37
+ );
38
+ }
39
+ static sugarHasManyRelationMarker(hasMany) {
40
+ return TreeParameterSugarer.TreeParameterSugarer.sugarHasManyRelation(hasMany.parameters.field, hasMany.parameters.filter);
41
+ }
42
+ static sugarEntitySubTreeMarker(subTree) {
43
+ if (subTree.parameters.isCreating) {
44
+ return TreeParameterSugarer.TreeParameterSugarer.sugarRootEntity(subTree.entityName, void 0);
45
+ }
46
+ return TreeParameterSugarer.TreeParameterSugarer.sugarRootEntity(subTree.entityName, subTree.parameters.where);
47
+ }
48
+ static sugarEntityListSubTreeMarker(subTree) {
49
+ if (subTree.parameters.isCreating) {
50
+ return TreeParameterSugarer.TreeParameterSugarer.sugarRootEntityList(subTree.entityName, void 0);
51
+ }
52
+ return TreeParameterSugarer.TreeParameterSugarer.sugarRootEntityList(subTree.entityName, subTree.parameters.filter);
53
+ }
54
+ }
55
+ exports.MarkerSugarer = MarkerSugarer;
56
+ //# sourceMappingURL=MarkerSugarer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkerSugarer.cjs","sources":["../../../../src/core/exceptions/MarkerSugarer.ts"],"sourcesContent":["import {\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n\tMeaningfulMarker,\n} from '../../markers'\nimport { assertNever } from '../../utils'\nimport { TreeParameterSugarer } from './TreeParameterSugarer'\n\nexport class MarkerSugarer {\n\tpublic static sugarMarker(marker: MeaningfulMarker): string {\n\t\tif (marker instanceof FieldMarker) {\n\t\t\treturn this.sugarFieldMarker(marker)\n\t\t}\n\t\tif (marker instanceof HasOneRelationMarker) {\n\t\t\treturn this.sugarHasOneRelationMarker(marker)\n\t\t}\n\t\tif (marker instanceof HasManyRelationMarker) {\n\t\t\treturn this.sugarHasManyRelationMarker(marker)\n\t\t}\n\t\tif (marker instanceof EntityListSubTreeMarker) {\n\t\t\treturn this.sugarEntityListSubTreeMarker(marker)\n\t\t}\n\t\tif (marker instanceof EntitySubTreeMarker) {\n\t\t\treturn this.sugarEntitySubTreeMarker(marker)\n\t\t}\n\t\treturn assertNever(marker)\n\t}\n\n\tpublic static sugarFieldMarker(field: FieldMarker) {\n\t\treturn TreeParameterSugarer.sugarField(field.fieldName)\n\t}\n\n\tpublic static sugarHasOneRelationMarker(hasOne: HasOneRelationMarker) {\n\t\treturn TreeParameterSugarer.sugarHasOneRelation(\n\t\t\thasOne.parameters.field,\n\t\t\thasOne.parameters.reducedBy,\n\t\t\thasOne.parameters.filter,\n\t\t)\n\t}\n\n\tpublic static sugarHasManyRelationMarker(hasMany: HasManyRelationMarker) {\n\t\treturn TreeParameterSugarer.sugarHasManyRelation(hasMany.parameters.field, hasMany.parameters.filter)\n\t}\n\n\tpublic static sugarEntitySubTreeMarker(subTree: EntitySubTreeMarker) {\n\t\tif (subTree.parameters.isCreating) {\n\t\t\treturn TreeParameterSugarer.sugarRootEntity(subTree.entityName, undefined)\n\t\t}\n\t\treturn TreeParameterSugarer.sugarRootEntity(subTree.entityName, subTree.parameters.where)\n\t}\n\n\tpublic static sugarEntityListSubTreeMarker(subTree: EntityListSubTreeMarker) {\n\t\tif (subTree.parameters.isCreating) {\n\t\t\treturn TreeParameterSugarer.sugarRootEntityList(subTree.entityName, undefined)\n\t\t}\n\t\treturn TreeParameterSugarer.sugarRootEntityList(subTree.entityName, subTree.parameters.filter)\n\t}\n}\n"],"names":["FieldMarker","HasOneRelationMarker","HasManyRelationMarker","EntityListSubTreeMarker","EntitySubTreeMarker","assertNever","TreeParameterSugarer"],"mappings":";;;;;;;;;AAWO,MAAM,cAAc;AAAA,EAC1B,OAAc,YAAY,QAAkC;AAC3D,QAAI,kBAAkBA,YAAAA,aAAa;AAC3B,aAAA,KAAK,iBAAiB,MAAM;AAAA,IACpC;AACA,QAAI,kBAAkBC,qBAAAA,sBAAsB;AACpC,aAAA,KAAK,0BAA0B,MAAM;AAAA,IAC7C;AACA,QAAI,kBAAkBC,sBAAAA,uBAAuB;AACrC,aAAA,KAAK,2BAA2B,MAAM;AAAA,IAC9C;AACA,QAAI,kBAAkBC,wBAAAA,yBAAyB;AACvC,aAAA,KAAK,6BAA6B,MAAM;AAAA,IAChD;AACA,QAAI,kBAAkBC,oBAAAA,qBAAqB;AACnC,aAAA,KAAK,yBAAyB,MAAM;AAAA,IAC5C;AACA,WAAOC,YAAAA,YAAkB;AAAA,EAC1B;AAAA,EAEA,OAAc,iBAAiB,OAAoB;AAC3C,WAAAC,0CAAqB,WAAW,MAAM,SAAS;AAAA,EACvD;AAAA,EAEA,OAAc,0BAA0B,QAA8B;AACrE,WAAOA,qBAAqB,qBAAA;AAAA,MAC3B,OAAO,WAAW;AAAA,MAClB,OAAO,WAAW;AAAA,MAClB,OAAO,WAAW;AAAA,IAAA;AAAA,EAEpB;AAAA,EAEA,OAAc,2BAA2B,SAAgC;AACxE,WAAOA,0CAAqB,qBAAqB,QAAQ,WAAW,OAAO,QAAQ,WAAW,MAAM;AAAA,EACrG;AAAA,EAEA,OAAc,yBAAyB,SAA8B;AAChE,QAAA,QAAQ,WAAW,YAAY;AAClC,aAAOA,qBAAAA,qBAAqB,gBAAgB,QAAQ,YAAY,MAAS;AAAA,IAC1E;AACA,WAAOA,qBAAAA,qBAAqB,gBAAgB,QAAQ,YAAY,QAAQ,WAAW,KAAK;AAAA,EACzF;AAAA,EAEA,OAAc,6BAA6B,SAAkC;AACxE,QAAA,QAAQ,WAAW,YAAY;AAClC,aAAOA,qBAAAA,qBAAqB,oBAAoB,QAAQ,YAAY,MAAS;AAAA,IAC9E;AACA,WAAOA,qBAAAA,qBAAqB,oBAAoB,QAAQ,YAAY,QAAQ,WAAW,MAAM;AAAA,EAC9F;AACD;;"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class TreeParameterSugarer {
4
+ static sugarField(fieldName) {
5
+ return fieldName;
6
+ }
7
+ static sugarHasOneRelation(fieldName, reducedBy, filter) {
8
+ return `${fieldName}${this.sugarUniqueWhere(reducedBy)}${this.sugarFilter(filter)}`;
9
+ }
10
+ static sugarHasManyRelation(fieldName, filter) {
11
+ return `${fieldName}${this.sugarFilter(filter)}`;
12
+ }
13
+ static sugarRootEntity(entityName, where) {
14
+ return `${entityName}${this.sugarUniqueWhere(where)}`;
15
+ }
16
+ static sugarRootEntityList(entityName, filter) {
17
+ return `${entityName}${this.sugarFilter(filter)}`;
18
+ }
19
+ static sugarUniqueWhere(where) {
20
+ if (where === void 0) {
21
+ return "";
22
+ }
23
+ return `(…)`;
24
+ }
25
+ static sugarFilter(filter) {
26
+ if (filter === void 0) {
27
+ return "";
28
+ }
29
+ return `[…]`;
30
+ }
31
+ }
32
+ exports.TreeParameterSugarer = TreeParameterSugarer;
33
+ //# sourceMappingURL=TreeParameterSugarer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeParameterSugarer.cjs","sources":["../../../../src/core/exceptions/TreeParameterSugarer.ts"],"sourcesContent":["import type { EntityName, FieldName, Filter, UniqueWhere } from '../../treeParameters'\n\nexport class TreeParameterSugarer {\n\tpublic static sugarField(fieldName: FieldName) {\n\t\treturn fieldName\n\t}\n\n\tpublic static sugarHasOneRelation(\n\t\tfieldName: FieldName,\n\t\treducedBy: UniqueWhere | undefined,\n\t\tfilter: Filter | undefined,\n\t) {\n\t\treturn `${fieldName}${this.sugarUniqueWhere(reducedBy)}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarHasManyRelation(fieldName: FieldName, filter: Filter | undefined) {\n\t\treturn `${fieldName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarRootEntity(entityName: EntityName, where: UniqueWhere | undefined) {\n\t\treturn `${entityName}${this.sugarUniqueWhere(where)}`\n\t}\n\n\tpublic static sugarRootEntityList(entityName: EntityName, filter: Filter | undefined) {\n\t\treturn `${entityName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarUniqueWhere(where: UniqueWhere | undefined): string {\n\t\tif (where === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `(…)` // TODO\n\t}\n\n\tpublic static sugarFilter(filter: Filter | undefined): string {\n\t\tif (filter === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `[…]` // TODO\n\t}\n}\n"],"names":[],"mappings":";;AAEO,MAAM,qBAAqB;AAAA,EACjC,OAAc,WAAW,WAAsB;AACvC,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,oBACb,WACA,WACA,QACC;AACM,WAAA,GAAG,SAAS,GAAG,KAAK,iBAAiB,SAAS,CAAC,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAClF;AAAA,EAEA,OAAc,qBAAqB,WAAsB,QAA4B;AACpF,WAAO,GAAG,SAAS,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAC/C;AAAA,EAEA,OAAc,gBAAgB,YAAwB,OAAgC;AACrF,WAAO,GAAG,UAAU,GAAG,KAAK,iBAAiB,KAAK,CAAC;AAAA,EACpD;AAAA,EAEA,OAAc,oBAAoB,YAAwB,QAA4B;AACrF,WAAO,GAAG,UAAU,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAChD;AAAA,EAEA,OAAc,iBAAiB,OAAwC;AACtE,QAAI,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,YAAY,QAAoC;AAC7D,QAAI,WAAW,QAAW;AAClB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AACD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeParameterSugarer.js","sources":["../../../../src/core/exceptions/TreeParameterSugarer.ts"],"sourcesContent":["import type { EntityName, FieldName, Filter, UniqueWhere } from '../../treeParameters'\n\nexport class TreeParameterSugarer {\n\tpublic static sugarField(fieldName: FieldName) {\n\t\treturn fieldName\n\t}\n\n\tpublic static sugarHasOneRelation(\n\t\tfieldName: FieldName,\n\t\treducedBy: UniqueWhere | undefined,\n\t\tfilter: Filter | undefined,\n\t) {\n\t\treturn `${fieldName}${this.sugarUniqueWhere(reducedBy)}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarHasManyRelation(fieldName: FieldName, filter: Filter | undefined) {\n\t\treturn `${fieldName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarRootEntity(entityName: EntityName, where: UniqueWhere | undefined) {\n\t\treturn `${entityName}${this.sugarUniqueWhere(where)}`\n\t}\n\n\tpublic static sugarRootEntityList(entityName: EntityName, filter: Filter | undefined) {\n\t\treturn `${entityName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarUniqueWhere(where: UniqueWhere | undefined): string {\n\t\tif (where === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `(…)` // TODO\n\t}\n\n\tpublic static sugarFilter(filter: Filter | undefined): string {\n\t\tif (filter === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `[…]` // TODO\n\t}\n}\n"],"names":[],"mappings":"AAEO,MAAM,qBAAqB;AAAA,EACjC,OAAc,WAAW,WAAsB;AACvC,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,oBACb,WACA,WACA,QACC;AACM,WAAA,GAAG,YAAY,KAAK,iBAAiB,SAAS,IAAI,KAAK,YAAY,MAAM;AAAA,EACjF;AAAA,EAEA,OAAc,qBAAqB,WAAsB,QAA4B;AACpF,WAAO,GAAG,YAAY,KAAK,YAAY,MAAM;AAAA,EAC9C;AAAA,EAEA,OAAc,gBAAgB,YAAwB,OAAgC;AACrF,WAAO,GAAG,aAAa,KAAK,iBAAiB,KAAK;AAAA,EACnD;AAAA,EAEA,OAAc,oBAAoB,YAAwB,QAA4B;AACrF,WAAO,GAAG,aAAa,KAAK,YAAY,MAAM;AAAA,EAC/C;AAAA,EAEA,OAAc,iBAAiB,OAAwC;AACtE,QAAI,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,YAAY,QAAoC;AAC7D,QAAI,WAAW,QAAW;AAClB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AACD;"}
1
+ {"version":3,"file":"TreeParameterSugarer.js","sources":["../../../../src/core/exceptions/TreeParameterSugarer.ts"],"sourcesContent":["import type { EntityName, FieldName, Filter, UniqueWhere } from '../../treeParameters'\n\nexport class TreeParameterSugarer {\n\tpublic static sugarField(fieldName: FieldName) {\n\t\treturn fieldName\n\t}\n\n\tpublic static sugarHasOneRelation(\n\t\tfieldName: FieldName,\n\t\treducedBy: UniqueWhere | undefined,\n\t\tfilter: Filter | undefined,\n\t) {\n\t\treturn `${fieldName}${this.sugarUniqueWhere(reducedBy)}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarHasManyRelation(fieldName: FieldName, filter: Filter | undefined) {\n\t\treturn `${fieldName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarRootEntity(entityName: EntityName, where: UniqueWhere | undefined) {\n\t\treturn `${entityName}${this.sugarUniqueWhere(where)}`\n\t}\n\n\tpublic static sugarRootEntityList(entityName: EntityName, filter: Filter | undefined) {\n\t\treturn `${entityName}${this.sugarFilter(filter)}`\n\t}\n\n\tpublic static sugarUniqueWhere(where: UniqueWhere | undefined): string {\n\t\tif (where === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `(…)` // TODO\n\t}\n\n\tpublic static sugarFilter(filter: Filter | undefined): string {\n\t\tif (filter === undefined) {\n\t\t\treturn ''\n\t\t}\n\t\treturn `[…]` // TODO\n\t}\n}\n"],"names":[],"mappings":"AAEO,MAAM,qBAAqB;AAAA,EACjC,OAAc,WAAW,WAAsB;AACvC,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,oBACb,WACA,WACA,QACC;AACM,WAAA,GAAG,SAAS,GAAG,KAAK,iBAAiB,SAAS,CAAC,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAClF;AAAA,EAEA,OAAc,qBAAqB,WAAsB,QAA4B;AACpF,WAAO,GAAG,SAAS,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAC/C;AAAA,EAEA,OAAc,gBAAgB,YAAwB,OAAgC;AACrF,WAAO,GAAG,UAAU,GAAG,KAAK,iBAAiB,KAAK,CAAC;AAAA,EACpD;AAAA,EAEA,OAAc,oBAAoB,YAAwB,QAA4B;AACrF,WAAO,GAAG,UAAU,GAAG,KAAK,YAAY,MAAM,CAAC;AAAA,EAChD;AAAA,EAEA,OAAc,iBAAiB,OAAwC;AACtE,QAAI,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,YAAY,QAAoC;AAC7D,QAAI,WAAW,QAAW;AAClB,aAAA;AAAA,IACR;AACO,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const BindingError = require("../../BindingError.cjs");
4
+ const createBatchUpdatesOptions = (rootEnvironment, treeStore) => Object.freeze({
5
+ getEntityByKey: (key) => {
6
+ const realm = treeStore.entityRealmStore.get(key);
7
+ if (realm === void 0) {
8
+ throw new BindingError.BindingError(`Trying to retrieve a non-existent entity: key '${key}' was not found.`);
9
+ }
10
+ return realm.getAccessor();
11
+ },
12
+ getEntityListSubTree: (aliasOrParameters, treeId, environment = rootEnvironment) => {
13
+ return treeStore.getSubTreeState("entityList", treeId, aliasOrParameters, environment).getAccessor();
14
+ },
15
+ getEntitySubTree: (aliasOrParameters, treeId, environment = rootEnvironment) => {
16
+ return treeStore.getSubTreeState("entity", treeId, aliasOrParameters, environment).getAccessor();
17
+ }
18
+ });
19
+ exports.createBatchUpdatesOptions = createBatchUpdatesOptions;
20
+ //# sourceMappingURL=createBatchUpdatesOptions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createBatchUpdatesOptions.cjs","sources":["../../../../src/core/factories/createBatchUpdatesOptions.ts"],"sourcesContent":["import type { BatchUpdatesOptions, EntityAccessor, EntityListAccessor } from '../../accessors'\nimport { BindingError } from '../../BindingError'\nimport type { Environment } from '../../dao'\nimport type {\n\tAlias,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../../treeParameters'\nimport type { TreeStore } from '../TreeStore'\n\nexport const createBatchUpdatesOptions = (rootEnvironment: Environment, treeStore: TreeStore): BatchUpdatesOptions =>\n\tObject.freeze({\n\t\tgetEntityByKey: (key: string) => {\n\t\t\tconst realm = treeStore.entityRealmStore.get(key)\n\n\t\t\tif (realm === undefined) {\n\t\t\t\tthrow new BindingError(`Trying to retrieve a non-existent entity: key '${key}' was not found.`)\n\t\t\t}\n\t\t\treturn realm.getAccessor()\n\t\t},\n\t\tgetEntityListSubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityListAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entityList', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t\tgetEntitySubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entity', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t})\n"],"names":["BindingError"],"mappings":";;;AAaO,MAAM,4BAA4B,CAAC,iBAA8B,cACvE,OAAO,OAAO;AAAA,EACb,gBAAgB,CAAC,QAAgB;AAChC,UAAM,QAAQ,UAAU,iBAAiB,IAAI,GAAG;AAEhD,QAAI,UAAU,QAAW;AACxB,YAAM,IAAIA,aAAA,aAAa,kDAAkD,GAAG,kBAAkB;AAAA,IAC/F;AACA,WAAO,MAAM;EACd;AAAA,EACA,sBAAsB,CACrB,mBACA,QACA,cAAc,oBACU;AACxB,WAAO,UAAU,gBAAgB,cAAc,QAAQ,mBAAmB,WAAW,EAAE;EACxF;AAAA,EACA,kBAAkB,CACjB,mBACA,QACA,cAAc,oBACM;AACpB,WAAO,UAAU,gBAAgB,UAAU,QAAQ,mBAAmB,WAAW,EAAE;EACpF;AACD,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createBatchUpdatesOptions.js","sources":["../../../../src/core/factories/createBatchUpdatesOptions.ts"],"sourcesContent":["import type { BatchUpdatesOptions, EntityAccessor, EntityListAccessor } from '../../accessors'\nimport { BindingError } from '../../BindingError'\nimport type { Environment } from '../../dao'\nimport type {\n\tAlias,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../../treeParameters'\nimport type { TreeStore } from '../TreeStore'\n\nexport const createBatchUpdatesOptions = (rootEnvironment: Environment, treeStore: TreeStore): BatchUpdatesOptions =>\n\tObject.freeze({\n\t\tgetEntityByKey: (key: string) => {\n\t\t\tconst realm = treeStore.entityRealmStore.get(key)\n\n\t\t\tif (realm === undefined) {\n\t\t\t\tthrow new BindingError(`Trying to retrieve a non-existent entity: key '${key}' was not found.`)\n\t\t\t}\n\t\t\treturn realm.getAccessor()\n\t\t},\n\t\tgetEntityListSubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityListAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entityList', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t\tgetEntitySubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entity', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t})\n"],"names":[],"mappings":";AAaO,MAAM,4BAA4B,CAAC,iBAA8B,cACvE,OAAO,OAAO;AAAA,EACb,gBAAgB,CAAC,QAAgB;AAChC,UAAM,QAAQ,UAAU,iBAAiB,IAAI,GAAG;AAEhD,QAAI,UAAU,QAAW;AAClB,YAAA,IAAI,aAAa,kDAAkD,qBAAqB;AAAA,IAC/F;AACA,WAAO,MAAM;EACd;AAAA,EACA,sBAAsB,CACrB,mBACA,QACA,cAAc,oBACU;AACxB,WAAO,UAAU,gBAAgB,cAAc,QAAQ,mBAAmB,WAAW,EAAE;EACxF;AAAA,EACA,kBAAkB,CACjB,mBACA,QACA,cAAc,oBACM;AACpB,WAAO,UAAU,gBAAgB,UAAU,QAAQ,mBAAmB,WAAW,EAAE;EACpF;AACD,CAAC;"}
1
+ {"version":3,"file":"createBatchUpdatesOptions.js","sources":["../../../../src/core/factories/createBatchUpdatesOptions.ts"],"sourcesContent":["import type { BatchUpdatesOptions, EntityAccessor, EntityListAccessor } from '../../accessors'\nimport { BindingError } from '../../BindingError'\nimport type { Environment } from '../../dao'\nimport type {\n\tAlias,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../../treeParameters'\nimport type { TreeStore } from '../TreeStore'\n\nexport const createBatchUpdatesOptions = (rootEnvironment: Environment, treeStore: TreeStore): BatchUpdatesOptions =>\n\tObject.freeze({\n\t\tgetEntityByKey: (key: string) => {\n\t\t\tconst realm = treeStore.entityRealmStore.get(key)\n\n\t\t\tif (realm === undefined) {\n\t\t\t\tthrow new BindingError(`Trying to retrieve a non-existent entity: key '${key}' was not found.`)\n\t\t\t}\n\t\t\treturn realm.getAccessor()\n\t\t},\n\t\tgetEntityListSubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityListAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entityList', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t\tgetEntitySubTree: (\n\t\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\ttreeId: TreeRootId | undefined,\n\t\t\tenvironment = rootEnvironment,\n\t\t): EntityAccessor => {\n\t\t\treturn treeStore.getSubTreeState('entity', treeId, aliasOrParameters, environment).getAccessor()\n\t\t},\n\t})\n"],"names":[],"mappings":";AAaO,MAAM,4BAA4B,CAAC,iBAA8B,cACvE,OAAO,OAAO;AAAA,EACb,gBAAgB,CAAC,QAAgB;AAChC,UAAM,QAAQ,UAAU,iBAAiB,IAAI,GAAG;AAEhD,QAAI,UAAU,QAAW;AACxB,YAAM,IAAI,aAAa,kDAAkD,GAAG,kBAAkB;AAAA,IAC/F;AACA,WAAO,MAAM;EACd;AAAA,EACA,sBAAsB,CACrB,mBACA,QACA,cAAc,oBACU;AACxB,WAAO,UAAU,gBAAgB,cAAc,QAAQ,mBAAmB,WAAW,EAAE;EACxF;AAAA,EACA,kBAAkB,CACjB,mBACA,QACA,cAAc,oBACM;AACpB,WAAO,UAAU,gBAAgB,UAAU,QAAQ,mBAAmB,WAAW,EAAE;EACpF;AACD,CAAC;"}