@contember/binding 1.2.6 → 1.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1055) 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/accessors/EntityAccessor.cjs +169 -0
  8. package/dist/development/accessors/EntityAccessor.cjs.map +1 -0
  9. package/dist/development/accessors/EntityAccessor.js +1 -1
  10. package/dist/development/accessors/EntityListAccessor.cjs +101 -0
  11. package/dist/development/accessors/EntityListAccessor.cjs.map +1 -0
  12. package/dist/development/accessors/ErrorAccessor.cjs +16 -0
  13. package/dist/development/accessors/ErrorAccessor.cjs.map +1 -0
  14. package/dist/development/accessors/FieldAccessor.cjs +59 -0
  15. package/dist/development/accessors/FieldAccessor.cjs.map +1 -0
  16. package/dist/development/accessors/TreeRootAccessor.cjs +14 -0
  17. package/dist/development/accessors/TreeRootAccessor.cjs.map +1 -0
  18. package/dist/development/accessors/TreeRootAccessor.js.map +1 -1
  19. package/dist/development/bindingTypes.cjs +9 -0
  20. package/dist/development/bindingTypes.cjs.map +1 -0
  21. package/dist/development/core/AccessorErrorManager.cjs +207 -0
  22. package/dist/development/core/AccessorErrorManager.cjs.map +1 -0
  23. package/dist/development/core/AccessorErrorManager.js +5 -4
  24. package/dist/development/core/AccessorErrorManager.js.map +1 -1
  25. package/dist/development/core/Config.cjs +32 -0
  26. package/dist/development/core/Config.cjs.map +1 -0
  27. package/dist/development/core/DataBinding.cjs +352 -0
  28. package/dist/development/core/DataBinding.cjs.map +1 -0
  29. package/dist/development/core/DataBinding.js +53 -46
  30. package/dist/development/core/DataBinding.js.map +1 -1
  31. package/dist/development/core/DirtinessTracker.cjs +29 -0
  32. package/dist/development/core/DirtinessTracker.cjs.map +1 -0
  33. package/dist/development/core/ErrorsPreprocessor.cjs +181 -0
  34. package/dist/development/core/ErrorsPreprocessor.cjs.map +1 -0
  35. package/dist/development/core/ErrorsPreprocessor.js +16 -16
  36. package/dist/development/core/ErrorsPreprocessor.js.map +1 -1
  37. package/dist/development/core/EventManager.cjs +440 -0
  38. package/dist/development/core/EventManager.cjs.map +1 -0
  39. package/dist/development/core/EventManager.js +7 -5
  40. package/dist/development/core/EventManager.js.map +1 -1
  41. package/dist/development/core/MarkerComparator.cjs +79 -0
  42. package/dist/development/core/MarkerComparator.cjs.map +1 -0
  43. package/dist/development/core/MarkerMerger.cjs +252 -0
  44. package/dist/development/core/MarkerMerger.cjs.map +1 -0
  45. package/dist/development/core/MarkerMerger.js +2 -2
  46. package/dist/development/core/MutationGenerator.cjs +635 -0
  47. package/dist/development/core/MutationGenerator.cjs.map +1 -0
  48. package/dist/development/core/MutationGenerator.js +341 -294
  49. package/dist/development/core/MutationGenerator.js.map +1 -1
  50. package/dist/development/core/QueryGenerator.cjs +113 -0
  51. package/dist/development/core/QueryGenerator.cjs.map +1 -0
  52. package/dist/development/core/QueryGenerator.js +62 -75
  53. package/dist/development/core/QueryGenerator.js.map +1 -1
  54. package/dist/development/core/RealmKeyGenerator.cjs +47 -0
  55. package/dist/development/core/RealmKeyGenerator.cjs.map +1 -0
  56. package/dist/development/core/RequestResponseNormalizer.cjs +125 -0
  57. package/dist/development/core/RequestResponseNormalizer.cjs.map +1 -0
  58. package/dist/development/core/StateInitializer.cjs +389 -0
  59. package/dist/development/core/StateInitializer.cjs.map +1 -0
  60. package/dist/development/core/StateInitializer.js +2 -2
  61. package/dist/development/core/StateInitializer.js.map +1 -1
  62. package/dist/development/core/TreeAugmenter.cjs +213 -0
  63. package/dist/development/core/TreeAugmenter.cjs.map +1 -0
  64. package/dist/development/core/TreeFilterGenerator.cjs +83 -0
  65. package/dist/development/core/TreeFilterGenerator.cjs.map +1 -0
  66. package/dist/development/core/TreeParameterMerger.cjs +304 -0
  67. package/dist/development/core/TreeParameterMerger.cjs.map +1 -0
  68. package/dist/development/core/TreeParameterMerger.js +8 -0
  69. package/dist/development/core/TreeParameterMerger.js.map +1 -1
  70. package/dist/development/core/TreeStore.cjs +182 -0
  71. package/dist/development/core/TreeStore.cjs.map +1 -0
  72. package/dist/development/core/TreeStore.js +1 -1
  73. package/dist/development/core/VariableInputTransformer.cjs +24 -0
  74. package/dist/development/core/VariableInputTransformer.cjs.map +1 -0
  75. package/dist/development/core/exceptions/ErrorLocator.cjs +62 -0
  76. package/dist/development/core/exceptions/ErrorLocator.cjs.map +1 -0
  77. package/dist/development/core/exceptions/LocalizedBindingError.cjs +14 -0
  78. package/dist/development/core/exceptions/LocalizedBindingError.cjs.map +1 -0
  79. package/dist/development/core/exceptions/MarkerSugarer.cjs +56 -0
  80. package/dist/development/core/exceptions/MarkerSugarer.cjs.map +1 -0
  81. package/dist/development/core/exceptions/TreeParameterSugarer.cjs +33 -0
  82. package/dist/development/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  83. package/dist/development/core/factories/createBatchUpdatesOptions.cjs +20 -0
  84. package/dist/development/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  85. package/dist/development/core/operations/EntityOperations.cjs +238 -0
  86. package/dist/development/core/operations/EntityOperations.cjs.map +1 -0
  87. package/dist/development/core/operations/EntityOperations.js +1 -1
  88. package/dist/development/core/operations/FieldOperations.cjs +96 -0
  89. package/dist/development/core/operations/FieldOperations.cjs.map +1 -0
  90. package/dist/development/core/operations/FieldOperations.js +1 -1
  91. package/dist/development/core/operations/ListOperations.cjs +159 -0
  92. package/dist/development/core/operations/ListOperations.cjs.map +1 -0
  93. package/dist/development/core/operations/OperationsHelpers.cjs +85 -0
  94. package/dist/development/core/operations/OperationsHelpers.cjs.map +1 -0
  95. package/dist/development/core/requestAliases/MutationAlias.cjs +14 -0
  96. package/dist/development/core/requestAliases/MutationAlias.cjs.map +1 -0
  97. package/dist/development/core/schema/Schema.cjs +39 -0
  98. package/dist/development/core/schema/Schema.cjs.map +1 -0
  99. package/dist/development/core/schema/SchemaLoader.cjs +28 -0
  100. package/dist/development/core/schema/SchemaLoader.cjs.map +1 -0
  101. package/dist/development/core/schema/SchemaLoader.js +2 -2
  102. package/dist/development/core/schema/SchemaLoader.js.map +1 -1
  103. package/dist/development/core/schema/SchemaPreprocessor.cjs +38 -0
  104. package/dist/development/core/schema/SchemaPreprocessor.cjs.map +1 -0
  105. package/dist/development/core/state/StateIterator.cjs +100 -0
  106. package/dist/development/core/state/StateIterator.cjs.map +1 -0
  107. package/dist/development/core/state/getEntityMarker.cjs +5 -0
  108. package/dist/development/core/state/getEntityMarker.cjs.map +1 -0
  109. package/dist/development/core/utils/createQueryBuilder.cjs +32 -0
  110. package/dist/development/core/utils/createQueryBuilder.cjs.map +1 -0
  111. package/dist/development/core/utils/createQueryBuilder.js +32 -0
  112. package/dist/development/core/utils/createQueryBuilder.js.map +1 -0
  113. package/dist/development/core/utils/getCombinedSignal.cjs +33 -0
  114. package/dist/development/core/utils/getCombinedSignal.cjs.map +1 -0
  115. package/dist/development/dao/Environment.cjs +213 -0
  116. package/dist/development/dao/Environment.cjs.map +1 -0
  117. package/dist/development/dao/Environment.js.map +1 -1
  118. package/dist/development/dao/TreeNodeEnvironmentFactory.cjs +89 -0
  119. package/dist/development/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
  120. package/dist/development/dao/VariableFieldValue.cjs +9 -0
  121. package/dist/development/dao/VariableFieldValue.cjs.map +1 -0
  122. package/dist/development/fieldHelpers/helpers/FieldHelper.cjs +17 -0
  123. package/dist/development/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  124. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  125. package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  126. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  127. package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  128. package/dist/development/index.cjs +124 -0
  129. package/dist/development/index.cjs.map +1 -0
  130. package/dist/development/index.js +18 -135
  131. package/dist/development/index.js.map +1 -1
  132. package/dist/development/markers/EntityFieldMarkersContainer.cjs +41 -0
  133. package/dist/development/markers/EntityFieldMarkersContainer.cjs.map +1 -0
  134. package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs +11 -0
  135. package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
  136. package/dist/development/markers/EntityListSubTreeMarker.cjs +23 -0
  137. package/dist/development/markers/EntityListSubTreeMarker.cjs.map +1 -0
  138. package/dist/development/markers/EntitySubTreeMarker.cjs +23 -0
  139. package/dist/development/markers/EntitySubTreeMarker.cjs.map +1 -0
  140. package/dist/development/markers/FieldMarker.cjs +20 -0
  141. package/dist/development/markers/FieldMarker.cjs.map +1 -0
  142. package/dist/development/markers/HasManyRelationMarker.cjs +29 -0
  143. package/dist/development/markers/HasManyRelationMarker.cjs.map +1 -0
  144. package/dist/development/markers/HasOneRelationMarker.cjs +23 -0
  145. package/dist/development/markers/HasOneRelationMarker.cjs.map +1 -0
  146. package/dist/development/markers/MarkerTreeRoot.cjs +10 -0
  147. package/dist/development/markers/MarkerTreeRoot.cjs.map +1 -0
  148. package/dist/development/markers/ParentEntityMarker.cjs +10 -0
  149. package/dist/development/markers/ParentEntityMarker.cjs.map +1 -0
  150. package/dist/development/markers/PlaceholderGenerator.cjs +23 -0
  151. package/dist/development/markers/PlaceholderGenerator.cjs.map +1 -0
  152. package/dist/development/markers/PlaceholderParametersGenerator.cjs +62 -0
  153. package/dist/development/markers/PlaceholderParametersGenerator.cjs.map +1 -0
  154. package/dist/development/queryLanguage/CacheStore.cjs +47 -0
  155. package/dist/development/queryLanguage/CacheStore.cjs.map +1 -0
  156. package/dist/development/queryLanguage/CacheStore.js +2 -1
  157. package/dist/development/queryLanguage/CacheStore.js.map +1 -1
  158. package/dist/development/queryLanguage/MarkerFactory.cjs +200 -0
  159. package/dist/development/queryLanguage/MarkerFactory.cjs.map +1 -0
  160. package/dist/development/queryLanguage/MarkerFactory.js +1 -1
  161. package/dist/development/queryLanguage/Parser.cjs +728 -0
  162. package/dist/development/queryLanguage/Parser.cjs.map +1 -0
  163. package/dist/development/queryLanguage/Parser.js +64 -23
  164. package/dist/development/queryLanguage/Parser.js.map +1 -1
  165. package/dist/development/queryLanguage/QueryLanguage.cjs +520 -0
  166. package/dist/development/queryLanguage/QueryLanguage.cjs.map +1 -0
  167. package/dist/development/queryLanguage/QueryLanguage.js +3 -1
  168. package/dist/development/queryLanguage/QueryLanguage.js.map +1 -1
  169. package/dist/development/queryLanguage/QueryLanguageError.cjs +6 -0
  170. package/dist/development/queryLanguage/QueryLanguageError.cjs.map +1 -0
  171. package/dist/development/queryLanguage/tokenList.cjs +150 -0
  172. package/dist/development/queryLanguage/tokenList.cjs.map +1 -0
  173. package/dist/development/queryLanguage/tokenList.js +1 -1
  174. package/dist/development/queryLanguage/tokenList.js.map +1 -1
  175. package/dist/development/structures/BijectiveIndexedMap.cjs +120 -0
  176. package/dist/development/structures/BijectiveIndexedMap.cjs.map +1 -0
  177. package/dist/development/structures/LRUCache.cjs +35 -0
  178. package/dist/development/structures/LRUCache.cjs.map +1 -0
  179. package/dist/development/structures/WeakIdCache.cjs +33 -0
  180. package/dist/development/structures/WeakIdCache.cjs.map +1 -0
  181. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs +22 -0
  182. package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
  183. package/dist/development/treeParameters/EntityCreationParameters.cjs +8 -0
  184. package/dist/development/treeParameters/EntityCreationParameters.cjs.map +1 -0
  185. package/dist/development/treeParameters/EntityListPreferences.cjs +7 -0
  186. package/dist/development/treeParameters/EntityListPreferences.cjs.map +1 -0
  187. package/dist/development/treeParameters/EventListenersStore.cjs +70 -0
  188. package/dist/development/treeParameters/EventListenersStore.cjs.map +1 -0
  189. package/dist/development/treeParameters/LeafField.cjs +7 -0
  190. package/dist/development/treeParameters/LeafField.cjs.map +1 -0
  191. package/dist/development/treeParameters/QualifiedEntityParameters.cjs +7 -0
  192. package/dist/development/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
  193. package/dist/development/treeParameters/Relation.cjs +7 -0
  194. package/dist/development/treeParameters/Relation.cjs.map +1 -0
  195. package/dist/development/utils/Hashing.cjs +22 -0
  196. package/dist/development/utils/Hashing.cjs.map +1 -0
  197. package/dist/development/utils/TreeNodeUtils.cjs +77 -0
  198. package/dist/development/utils/TreeNodeUtils.cjs.map +1 -0
  199. package/dist/development/utils/assert.cjs +11 -0
  200. package/dist/development/utils/assert.cjs.map +1 -0
  201. package/dist/development/utils/assertNever.cjs +10 -0
  202. package/dist/development/utils/assertNever.cjs.map +1 -0
  203. package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  204. package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  205. package/dist/development/utils/isEmptyObject.cjs +12 -0
  206. package/dist/development/utils/isEmptyObject.cjs.map +1 -0
  207. package/dist/development/utils/ucfirst.cjs +5 -0
  208. package/dist/development/utils/ucfirst.cjs.map +1 -0
  209. package/dist/production/BindingError.cjs +10 -0
  210. package/dist/production/BindingError.cjs.map +1 -0
  211. package/dist/production/accessorTree/NormalizedPersistedData.cjs +10 -0
  212. package/dist/production/accessorTree/NormalizedPersistedData.cjs.map +1 -0
  213. package/dist/production/accessorTree/RuntimeId.cjs +64 -0
  214. package/dist/production/accessorTree/RuntimeId.cjs.map +1 -0
  215. package/dist/production/accessors/EntityAccessor.cjs +169 -0
  216. package/dist/production/accessors/EntityAccessor.cjs.map +1 -0
  217. package/dist/production/accessors/EntityAccessor.js +1 -1
  218. package/dist/production/accessors/EntityListAccessor.cjs +101 -0
  219. package/dist/production/accessors/EntityListAccessor.cjs.map +1 -0
  220. package/dist/production/accessors/ErrorAccessor.cjs +16 -0
  221. package/dist/production/accessors/ErrorAccessor.cjs.map +1 -0
  222. package/dist/production/accessors/FieldAccessor.cjs +59 -0
  223. package/dist/production/accessors/FieldAccessor.cjs.map +1 -0
  224. package/dist/production/accessors/TreeRootAccessor.cjs +14 -0
  225. package/dist/production/accessors/TreeRootAccessor.cjs.map +1 -0
  226. package/dist/production/accessors/TreeRootAccessor.js.map +1 -1
  227. package/dist/production/bindingTypes.cjs +9 -0
  228. package/dist/production/bindingTypes.cjs.map +1 -0
  229. package/dist/production/core/AccessorErrorManager.cjs +207 -0
  230. package/dist/production/core/AccessorErrorManager.cjs.map +1 -0
  231. package/dist/production/core/AccessorErrorManager.js +5 -4
  232. package/dist/production/core/AccessorErrorManager.js.map +1 -1
  233. package/dist/production/core/Config.cjs +32 -0
  234. package/dist/production/core/Config.cjs.map +1 -0
  235. package/dist/production/core/DataBinding.cjs +352 -0
  236. package/dist/production/core/DataBinding.cjs.map +1 -0
  237. package/dist/production/core/DataBinding.js +53 -46
  238. package/dist/production/core/DataBinding.js.map +1 -1
  239. package/dist/production/core/DirtinessTracker.cjs +29 -0
  240. package/dist/production/core/DirtinessTracker.cjs.map +1 -0
  241. package/dist/production/core/ErrorsPreprocessor.cjs +181 -0
  242. package/dist/production/core/ErrorsPreprocessor.cjs.map +1 -0
  243. package/dist/production/core/ErrorsPreprocessor.js +16 -16
  244. package/dist/production/core/ErrorsPreprocessor.js.map +1 -1
  245. package/dist/production/core/EventManager.cjs +414 -0
  246. package/dist/production/core/EventManager.cjs.map +1 -0
  247. package/dist/production/core/EventManager.js +7 -5
  248. package/dist/production/core/EventManager.js.map +1 -1
  249. package/dist/production/core/MarkerComparator.cjs +79 -0
  250. package/dist/production/core/MarkerComparator.cjs.map +1 -0
  251. package/dist/production/core/MarkerMerger.cjs +252 -0
  252. package/dist/production/core/MarkerMerger.cjs.map +1 -0
  253. package/dist/production/core/MarkerMerger.js +2 -2
  254. package/dist/production/core/MutationGenerator.cjs +635 -0
  255. package/dist/production/core/MutationGenerator.cjs.map +1 -0
  256. package/dist/production/core/MutationGenerator.js +341 -294
  257. package/dist/production/core/MutationGenerator.js.map +1 -1
  258. package/dist/production/core/QueryGenerator.cjs +113 -0
  259. package/dist/production/core/QueryGenerator.cjs.map +1 -0
  260. package/dist/production/core/QueryGenerator.js +62 -75
  261. package/dist/production/core/QueryGenerator.js.map +1 -1
  262. package/dist/production/core/RealmKeyGenerator.cjs +47 -0
  263. package/dist/production/core/RealmKeyGenerator.cjs.map +1 -0
  264. package/dist/production/core/RequestResponseNormalizer.cjs +125 -0
  265. package/dist/production/core/RequestResponseNormalizer.cjs.map +1 -0
  266. package/dist/production/core/StateInitializer.cjs +389 -0
  267. package/dist/production/core/StateInitializer.cjs.map +1 -0
  268. package/dist/production/core/StateInitializer.js +2 -2
  269. package/dist/production/core/StateInitializer.js.map +1 -1
  270. package/dist/production/core/TreeAugmenter.cjs +213 -0
  271. package/dist/production/core/TreeAugmenter.cjs.map +1 -0
  272. package/dist/production/core/TreeFilterGenerator.cjs +83 -0
  273. package/dist/production/core/TreeFilterGenerator.cjs.map +1 -0
  274. package/dist/production/core/TreeParameterMerger.cjs +304 -0
  275. package/dist/production/core/TreeParameterMerger.cjs.map +1 -0
  276. package/dist/production/core/TreeParameterMerger.js +8 -0
  277. package/dist/production/core/TreeParameterMerger.js.map +1 -1
  278. package/dist/production/core/TreeStore.cjs +182 -0
  279. package/dist/production/core/TreeStore.cjs.map +1 -0
  280. package/dist/production/core/TreeStore.js +1 -1
  281. package/dist/production/core/VariableInputTransformer.cjs +24 -0
  282. package/dist/production/core/VariableInputTransformer.cjs.map +1 -0
  283. package/dist/production/core/exceptions/ErrorLocator.cjs +62 -0
  284. package/dist/production/core/exceptions/ErrorLocator.cjs.map +1 -0
  285. package/dist/production/core/exceptions/LocalizedBindingError.cjs +14 -0
  286. package/dist/production/core/exceptions/LocalizedBindingError.cjs.map +1 -0
  287. package/dist/production/core/exceptions/MarkerSugarer.cjs +56 -0
  288. package/dist/production/core/exceptions/MarkerSugarer.cjs.map +1 -0
  289. package/dist/production/core/exceptions/TreeParameterSugarer.cjs +33 -0
  290. package/dist/production/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  291. package/dist/production/core/factories/createBatchUpdatesOptions.cjs +20 -0
  292. package/dist/production/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  293. package/dist/production/core/operations/EntityOperations.cjs +238 -0
  294. package/dist/production/core/operations/EntityOperations.cjs.map +1 -0
  295. package/dist/production/core/operations/EntityOperations.js +1 -1
  296. package/dist/production/core/operations/FieldOperations.cjs +76 -0
  297. package/dist/production/core/operations/FieldOperations.cjs.map +1 -0
  298. package/dist/production/core/operations/FieldOperations.js +1 -1
  299. package/dist/production/core/operations/ListOperations.cjs +159 -0
  300. package/dist/production/core/operations/ListOperations.cjs.map +1 -0
  301. package/dist/production/core/operations/OperationsHelpers.cjs +85 -0
  302. package/dist/production/core/operations/OperationsHelpers.cjs.map +1 -0
  303. package/dist/production/core/requestAliases/MutationAlias.cjs +14 -0
  304. package/dist/production/core/requestAliases/MutationAlias.cjs.map +1 -0
  305. package/dist/production/core/schema/Schema.cjs +39 -0
  306. package/dist/production/core/schema/Schema.cjs.map +1 -0
  307. package/dist/production/core/schema/SchemaLoader.cjs +28 -0
  308. package/dist/production/core/schema/SchemaLoader.cjs.map +1 -0
  309. package/dist/production/core/schema/SchemaLoader.js +2 -2
  310. package/dist/production/core/schema/SchemaLoader.js.map +1 -1
  311. package/dist/production/core/schema/SchemaPreprocessor.cjs +38 -0
  312. package/dist/production/core/schema/SchemaPreprocessor.cjs.map +1 -0
  313. package/dist/production/core/state/StateIterator.cjs +100 -0
  314. package/dist/production/core/state/StateIterator.cjs.map +1 -0
  315. package/dist/production/core/state/getEntityMarker.cjs +5 -0
  316. package/dist/production/core/state/getEntityMarker.cjs.map +1 -0
  317. package/dist/production/core/utils/createQueryBuilder.cjs +32 -0
  318. package/dist/production/core/utils/createQueryBuilder.cjs.map +1 -0
  319. package/dist/production/core/utils/createQueryBuilder.js +32 -0
  320. package/dist/production/core/utils/createQueryBuilder.js.map +1 -0
  321. package/dist/production/core/utils/getCombinedSignal.cjs +33 -0
  322. package/dist/production/core/utils/getCombinedSignal.cjs.map +1 -0
  323. package/dist/production/dao/Environment.cjs +213 -0
  324. package/dist/production/dao/Environment.cjs.map +1 -0
  325. package/dist/production/dao/Environment.js.map +1 -1
  326. package/dist/production/dao/TreeNodeEnvironmentFactory.cjs +89 -0
  327. package/dist/production/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
  328. package/dist/production/dao/VariableFieldValue.cjs +9 -0
  329. package/dist/production/dao/VariableFieldValue.cjs.map +1 -0
  330. package/dist/production/fieldHelpers/helpers/FieldHelper.cjs +17 -0
  331. package/dist/production/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  332. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  333. package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  334. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  335. package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  336. package/dist/production/index.cjs +124 -0
  337. package/dist/production/index.cjs.map +1 -0
  338. package/dist/production/index.js +18 -135
  339. package/dist/production/index.js.map +1 -1
  340. package/dist/production/markers/EntityFieldMarkersContainer.cjs +41 -0
  341. package/dist/production/markers/EntityFieldMarkersContainer.cjs.map +1 -0
  342. package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs +11 -0
  343. package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
  344. package/dist/production/markers/EntityListSubTreeMarker.cjs +23 -0
  345. package/dist/production/markers/EntityListSubTreeMarker.cjs.map +1 -0
  346. package/dist/production/markers/EntitySubTreeMarker.cjs +23 -0
  347. package/dist/production/markers/EntitySubTreeMarker.cjs.map +1 -0
  348. package/dist/production/markers/FieldMarker.cjs +20 -0
  349. package/dist/production/markers/FieldMarker.cjs.map +1 -0
  350. package/dist/production/markers/HasManyRelationMarker.cjs +23 -0
  351. package/dist/production/markers/HasManyRelationMarker.cjs.map +1 -0
  352. package/dist/production/markers/HasOneRelationMarker.cjs +23 -0
  353. package/dist/production/markers/HasOneRelationMarker.cjs.map +1 -0
  354. package/dist/production/markers/MarkerTreeRoot.cjs +10 -0
  355. package/dist/production/markers/MarkerTreeRoot.cjs.map +1 -0
  356. package/dist/production/markers/ParentEntityMarker.cjs +10 -0
  357. package/dist/production/markers/ParentEntityMarker.cjs.map +1 -0
  358. package/dist/production/markers/PlaceholderGenerator.cjs +23 -0
  359. package/dist/production/markers/PlaceholderGenerator.cjs.map +1 -0
  360. package/dist/production/markers/PlaceholderParametersGenerator.cjs +62 -0
  361. package/dist/production/markers/PlaceholderParametersGenerator.cjs.map +1 -0
  362. package/dist/production/queryLanguage/CacheStore.cjs +47 -0
  363. package/dist/production/queryLanguage/CacheStore.cjs.map +1 -0
  364. package/dist/production/queryLanguage/CacheStore.js +2 -1
  365. package/dist/production/queryLanguage/CacheStore.js.map +1 -1
  366. package/dist/production/queryLanguage/MarkerFactory.cjs +200 -0
  367. package/dist/production/queryLanguage/MarkerFactory.cjs.map +1 -0
  368. package/dist/production/queryLanguage/MarkerFactory.js +1 -1
  369. package/dist/production/queryLanguage/Parser.cjs +725 -0
  370. package/dist/production/queryLanguage/Parser.cjs.map +1 -0
  371. package/dist/production/queryLanguage/Parser.js +64 -23
  372. package/dist/production/queryLanguage/Parser.js.map +1 -1
  373. package/dist/production/queryLanguage/QueryLanguage.cjs +517 -0
  374. package/dist/production/queryLanguage/QueryLanguage.cjs.map +1 -0
  375. package/dist/production/queryLanguage/QueryLanguage.js +3 -1
  376. package/dist/production/queryLanguage/QueryLanguage.js.map +1 -1
  377. package/dist/production/queryLanguage/QueryLanguageError.cjs +6 -0
  378. package/dist/production/queryLanguage/QueryLanguageError.cjs.map +1 -0
  379. package/dist/production/queryLanguage/tokenList.cjs +150 -0
  380. package/dist/production/queryLanguage/tokenList.cjs.map +1 -0
  381. package/dist/production/queryLanguage/tokenList.js +1 -1
  382. package/dist/production/queryLanguage/tokenList.js.map +1 -1
  383. package/dist/production/structures/BijectiveIndexedMap.cjs +120 -0
  384. package/dist/production/structures/BijectiveIndexedMap.cjs.map +1 -0
  385. package/dist/production/structures/LRUCache.cjs +35 -0
  386. package/dist/production/structures/LRUCache.cjs.map +1 -0
  387. package/dist/production/structures/WeakIdCache.cjs +33 -0
  388. package/dist/production/structures/WeakIdCache.cjs.map +1 -0
  389. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs +22 -0
  390. package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
  391. package/dist/production/treeParameters/EntityCreationParameters.cjs +8 -0
  392. package/dist/production/treeParameters/EntityCreationParameters.cjs.map +1 -0
  393. package/dist/production/treeParameters/EntityListPreferences.cjs +7 -0
  394. package/dist/production/treeParameters/EntityListPreferences.cjs.map +1 -0
  395. package/dist/production/treeParameters/EventListenersStore.cjs +70 -0
  396. package/dist/production/treeParameters/EventListenersStore.cjs.map +1 -0
  397. package/dist/production/treeParameters/LeafField.cjs +7 -0
  398. package/dist/production/treeParameters/LeafField.cjs.map +1 -0
  399. package/dist/production/treeParameters/QualifiedEntityParameters.cjs +7 -0
  400. package/dist/production/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
  401. package/dist/production/treeParameters/Relation.cjs +7 -0
  402. package/dist/production/treeParameters/Relation.cjs.map +1 -0
  403. package/dist/production/utils/Hashing.cjs +22 -0
  404. package/dist/production/utils/Hashing.cjs.map +1 -0
  405. package/dist/production/utils/TreeNodeUtils.cjs +77 -0
  406. package/dist/production/utils/TreeNodeUtils.cjs.map +1 -0
  407. package/dist/production/utils/assert.cjs +11 -0
  408. package/dist/production/utils/assert.cjs.map +1 -0
  409. package/dist/production/utils/assertNever.cjs +10 -0
  410. package/dist/production/utils/assertNever.cjs.map +1 -0
  411. package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  412. package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  413. package/dist/production/utils/isEmptyObject.cjs +12 -0
  414. package/dist/production/utils/isEmptyObject.cjs.map +1 -0
  415. package/dist/production/utils/ucfirst.cjs +5 -0
  416. package/dist/production/utils/ucfirst.cjs.map +1 -0
  417. package/dist/types/accessorTree/PersistResult.d.ts +1 -2
  418. package/dist/types/accessorTree/PersistResult.d.ts.map +1 -1
  419. package/dist/types/accessorTree/index.d.ts +0 -15
  420. package/dist/types/accessorTree/index.d.ts.map +1 -1
  421. package/dist/types/accessors/BindingOperations.d.ts +2 -2
  422. package/dist/types/accessors/BindingOperations.d.ts.map +1 -1
  423. package/dist/types/accessors/ExtendTree.d.ts +1 -2
  424. package/dist/types/accessors/ExtendTree.d.ts.map +1 -1
  425. package/dist/types/accessors/TreeRootAccessor.d.ts +3 -3
  426. package/dist/types/accessors/TreeRootAccessor.d.ts.map +1 -1
  427. package/dist/types/core/AccessorErrorManager.d.ts +2 -2
  428. package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
  429. package/dist/types/core/DataBinding.d.ts +11 -6
  430. package/dist/types/core/DataBinding.d.ts.map +1 -1
  431. package/dist/types/core/ErrorsPreprocessor.d.ts +2 -2
  432. package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -1
  433. package/dist/types/core/EventManager.d.ts +2 -1
  434. package/dist/types/core/EventManager.d.ts.map +1 -1
  435. package/dist/types/core/MutationGenerator.d.ts +16 -13
  436. package/dist/types/core/MutationGenerator.d.ts.map +1 -1
  437. package/dist/types/core/QueryGenerator.d.ts +6 -8
  438. package/dist/types/core/QueryGenerator.d.ts.map +1 -1
  439. package/dist/types/core/TreeParameterMerger.d.ts.map +1 -1
  440. package/dist/types/core/index.d.ts +7 -1
  441. package/dist/types/core/index.d.ts.map +1 -1
  442. package/dist/types/core/schema/index.d.ts +2 -0
  443. package/dist/types/core/schema/index.d.ts.map +1 -1
  444. package/dist/types/core/state/EntityListState.d.ts +2 -0
  445. package/dist/types/core/state/EntityListState.d.ts.map +1 -1
  446. package/dist/types/core/utils/createQueryBuilder.d.ts +4 -0
  447. package/dist/types/core/utils/createQueryBuilder.d.ts.map +1 -0
  448. package/dist/types/dao/Environment.d.ts +5 -2
  449. package/dist/types/dao/Environment.d.ts.map +1 -1
  450. package/dist/types/dao/index.d.ts +1 -0
  451. package/dist/types/dao/index.d.ts.map +1 -1
  452. package/dist/types/index.d.ts +0 -5
  453. package/dist/types/index.d.ts.map +1 -1
  454. package/dist/types/queryLanguage/CacheStore.d.ts.map +1 -1
  455. package/dist/types/queryLanguage/Parser.d.ts +3 -2
  456. package/dist/types/queryLanguage/Parser.d.ts.map +1 -1
  457. package/dist/types/queryLanguage/QueryLanguage.d.ts.map +1 -1
  458. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts +2 -0
  459. package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +1 -1
  460. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts +2 -0
  461. package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +1 -1
  462. package/dist/types/tsconfig.tsbuildinfo +1 -1
  463. package/package.json +11 -13
  464. package/src/accessorTree/PersistResult.ts +1 -2
  465. package/src/accessorTree/index.ts +0 -15
  466. package/src/accessors/BindingOperations.ts +2 -2
  467. package/src/accessors/ExtendTree.ts +1 -2
  468. package/src/accessors/TreeRootAccessor.ts +2 -2
  469. package/src/core/AccessorErrorManager.ts +11 -9
  470. package/src/core/DataBinding.ts +76 -75
  471. package/src/core/ErrorsPreprocessor.ts +24 -23
  472. package/src/core/EventManager.ts +6 -3
  473. package/src/core/MutationGenerator.ts +411 -412
  474. package/src/core/QueryGenerator.ts +66 -117
  475. package/src/core/StateInitializer.ts +2 -2
  476. package/src/core/TreeParameterMerger.ts +8 -0
  477. package/src/core/index.ts +7 -1
  478. package/src/core/schema/SchemaLoader.ts +2 -2
  479. package/src/core/schema/index.ts +2 -0
  480. package/src/core/state/EntityListState.ts +2 -0
  481. package/src/core/utils/createQueryBuilder.ts +31 -0
  482. package/src/dao/Environment.ts +6 -2
  483. package/src/dao/index.ts +1 -0
  484. package/src/index.ts +0 -5
  485. package/src/queryLanguage/CacheStore.ts +1 -0
  486. package/src/queryLanguage/Parser.ts +76 -37
  487. package/src/queryLanguage/QueryLanguage.ts +4 -1
  488. package/src/queryLanguage/tokenList.ts +1 -1
  489. package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +2 -0
  490. package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +2 -0
  491. package/src/tsconfig.json +1 -4
  492. package/dist/development/accessorPropagation/AccessorProvider.js +0 -18
  493. package/dist/development/accessorPropagation/AccessorProvider.js.map +0 -1
  494. package/dist/development/accessorPropagation/BindingOperationsContext.js +0 -31
  495. package/dist/development/accessorPropagation/BindingOperationsContext.js.map +0 -1
  496. package/dist/development/accessorPropagation/BindingOperationsProvider.js +0 -13
  497. package/dist/development/accessorPropagation/BindingOperationsProvider.js.map +0 -1
  498. package/dist/development/accessorPropagation/EntityKeyContext.js +0 -7
  499. package/dist/development/accessorPropagation/EntityKeyContext.js.map +0 -1
  500. package/dist/development/accessorPropagation/EntityKeyProvider.js +0 -13
  501. package/dist/development/accessorPropagation/EntityKeyProvider.js.map +0 -1
  502. package/dist/development/accessorPropagation/EnvironmentContext.js +0 -53
  503. package/dist/development/accessorPropagation/EnvironmentContext.js.map +0 -1
  504. package/dist/development/accessorPropagation/TreeRootIdContext.js +0 -7
  505. package/dist/development/accessorPropagation/TreeRootIdContext.js.map +0 -1
  506. package/dist/development/accessorPropagation/TreeRootIdProvider.js +0 -13
  507. package/dist/development/accessorPropagation/TreeRootIdProvider.js.map +0 -1
  508. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js +0 -55
  509. package/dist/development/accessorPropagation/useAccessorUpdateSubscription.js.map +0 -1
  510. package/dist/development/accessorPropagation/useBindingOperations.js +0 -7
  511. package/dist/development/accessorPropagation/useBindingOperations.js.map +0 -1
  512. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js +0 -47
  513. package/dist/development/accessorPropagation/useDesugaredRelativeEntityList.js.map +0 -1
  514. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js +0 -35
  515. package/dist/development/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +0 -1
  516. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js +0 -35
  517. package/dist/development/accessorPropagation/useDesugaredRelativeSingleField.js.map +0 -1
  518. package/dist/development/accessorPropagation/useEntity.js +0 -38
  519. package/dist/development/accessorPropagation/useEntity.js.map +0 -1
  520. package/dist/development/accessorPropagation/useEntityKey.js +0 -16
  521. package/dist/development/accessorPropagation/useEntityKey.js.map +0 -1
  522. package/dist/development/accessorPropagation/useEntityList.js +0 -36
  523. package/dist/development/accessorPropagation/useEntityList.js.map +0 -1
  524. package/dist/development/accessorPropagation/useEntityListSubTree.js +0 -19
  525. package/dist/development/accessorPropagation/useEntityListSubTree.js.map +0 -1
  526. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js +0 -69
  527. package/dist/development/accessorPropagation/useEntityListSubTreeParameters.js.map +0 -1
  528. package/dist/development/accessorPropagation/useEntitySubTree.js +0 -19
  529. package/dist/development/accessorPropagation/useEntitySubTree.js.map +0 -1
  530. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js +0 -47
  531. package/dist/development/accessorPropagation/useEntitySubTreeParameters.js.map +0 -1
  532. package/dist/development/accessorPropagation/useEnvironment.js +0 -9
  533. package/dist/development/accessorPropagation/useEnvironment.js.map +0 -1
  534. package/dist/development/accessorPropagation/useExtendTree.js +0 -32
  535. package/dist/development/accessorPropagation/useExtendTree.js.map +0 -1
  536. package/dist/development/accessorPropagation/useField.js +0 -36
  537. package/dist/development/accessorPropagation/useField.js.map +0 -1
  538. package/dist/development/accessorPropagation/useGetEntityByKey.js +0 -6
  539. package/dist/development/accessorPropagation/useGetEntityByKey.js.map +0 -1
  540. package/dist/development/accessorPropagation/useGetEntityListSubTree.js +0 -17
  541. package/dist/development/accessorPropagation/useGetEntityListSubTree.js.map +0 -1
  542. package/dist/development/accessorPropagation/useGetEntitySubTree.js +0 -17
  543. package/dist/development/accessorPropagation/useGetEntitySubTree.js.map +0 -1
  544. package/dist/development/accessorPropagation/useGetTreeFilters.js +0 -6
  545. package/dist/development/accessorPropagation/useGetTreeFilters.js.map +0 -1
  546. package/dist/development/accessorPropagation/useHasEntity.js +0 -9
  547. package/dist/development/accessorPropagation/useHasEntity.js.map +0 -1
  548. package/dist/development/accessorPropagation/usePersist.js +0 -6
  549. package/dist/development/accessorPropagation/usePersist.js.map +0 -1
  550. package/dist/development/accessorPropagation/useTreeRootId.js +0 -7
  551. package/dist/development/accessorPropagation/useTreeRootId.js.map +0 -1
  552. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js +0 -118
  553. package/dist/development/accessorSorting/SetOrderFieldOnCreate.js.map +0 -1
  554. package/dist/development/accessorSorting/addEntityAtIndex.js +0 -18
  555. package/dist/development/accessorSorting/addEntityAtIndex.js.map +0 -1
  556. package/dist/development/accessorSorting/errors.js +0 -10
  557. package/dist/development/accessorSorting/errors.js.map +0 -1
  558. package/dist/development/accessorSorting/moveEntity.js +0 -42
  559. package/dist/development/accessorSorting/moveEntity.js.map +0 -1
  560. package/dist/development/accessorSorting/repairEntitiesOrder.js +0 -13
  561. package/dist/development/accessorSorting/repairEntitiesOrder.js.map +0 -1
  562. package/dist/development/accessorSorting/sortEntities.js +0 -17
  563. package/dist/development/accessorSorting/sortEntities.js.map +0 -1
  564. package/dist/development/accessorSorting/useSortedEntities.js +0 -80
  565. package/dist/development/accessorSorting/useSortedEntities.js.map +0 -1
  566. package/dist/development/accessorTree/AccessorTree.js +0 -39
  567. package/dist/development/accessorTree/AccessorTree.js.map +0 -1
  568. package/dist/development/accessorTree/AccessorTreeStateContext.js +0 -6
  569. package/dist/development/accessorTree/AccessorTreeStateContext.js.map +0 -1
  570. package/dist/development/accessorTree/DirtinessContext.js +0 -7
  571. package/dist/development/accessorTree/DirtinessContext.js.map +0 -1
  572. package/dist/development/accessorTree/MutationStateContext.js +0 -7
  573. package/dist/development/accessorTree/MutationStateContext.js.map +0 -1
  574. package/dist/development/accessorTree/accessorTreeStateReducer.js +0 -34
  575. package/dist/development/accessorTree/accessorTreeStateReducer.js.map +0 -1
  576. package/dist/development/accessorTree/metadataToRequestError.js +0 -15
  577. package/dist/development/accessorTree/metadataToRequestError.js.map +0 -1
  578. package/dist/development/accessorTree/useAccessorTreeState.js +0 -14
  579. package/dist/development/accessorTree/useAccessorTreeState.js.map +0 -1
  580. package/dist/development/accessorTree/useDataBinding.js +0 -84
  581. package/dist/development/accessorTree/useDataBinding.js.map +0 -1
  582. package/dist/development/accessorTree/useDirtinessState.js +0 -7
  583. package/dist/development/accessorTree/useDirtinessState.js.map +0 -1
  584. package/dist/development/accessorTree/useMutationState.js +0 -7
  585. package/dist/development/accessorTree/useMutationState.js.map +0 -1
  586. package/dist/development/core/IncrementalMarkerBuilder.js +0 -70
  587. package/dist/development/core/IncrementalMarkerBuilder.js.map +0 -1
  588. package/dist/development/core/MarkerTreeGenerator.js +0 -95
  589. package/dist/development/core/MarkerTreeGenerator.js.map +0 -1
  590. package/dist/development/coreComponents/Component.js +0 -33
  591. package/dist/development/coreComponents/Component.js.map +0 -1
  592. package/dist/development/coreComponents/DataBindingProvider.js +0 -24
  593. package/dist/development/coreComponents/DataBindingProvider.js.map +0 -1
  594. package/dist/development/coreComponents/Entity.js +0 -20
  595. package/dist/development/coreComponents/Entity.js.map +0 -1
  596. package/dist/development/coreComponents/EntityList.js +0 -45
  597. package/dist/development/coreComponents/EntityList.js.map +0 -1
  598. package/dist/development/coreComponents/EntityListSubTree.js +0 -58
  599. package/dist/development/coreComponents/EntityListSubTree.js.map +0 -1
  600. package/dist/development/coreComponents/EntitySubTree.js +0 -81
  601. package/dist/development/coreComponents/EntitySubTree.js.map +0 -1
  602. package/dist/development/coreComponents/Field.js +0 -37
  603. package/dist/development/coreComponents/Field.js.map +0 -1
  604. package/dist/development/coreComponents/HasMany.js +0 -42
  605. package/dist/development/coreComponents/HasMany.js.map +0 -1
  606. package/dist/development/coreComponents/HasOne.js +0 -42
  607. package/dist/development/coreComponents/HasOne.js.map +0 -1
  608. package/dist/development/coreComponents/ParentEntity.js +0 -18
  609. package/dist/development/coreComponents/ParentEntity.js.map +0 -1
  610. package/dist/development/entityEvents/useDerivedField.js +0 -42
  611. package/dist/development/entityEvents/useDerivedField.js.map +0 -1
  612. package/dist/development/entityEvents/useEntityBeforePersist.js +0 -8
  613. package/dist/development/entityEvents/useEntityBeforePersist.js.map +0 -1
  614. package/dist/development/entityEvents/useEntityBeforeUpdate.js +0 -8
  615. package/dist/development/entityEvents/useEntityBeforeUpdate.js.map +0 -1
  616. package/dist/development/entityEvents/useEntityEvent.js +0 -32
  617. package/dist/development/entityEvents/useEntityEvent.js.map +0 -1
  618. package/dist/development/entityEvents/useEntityPersistError.js +0 -8
  619. package/dist/development/entityEvents/useEntityPersistError.js.map +0 -1
  620. package/dist/development/entityEvents/useEntityPersistSuccess.js +0 -8
  621. package/dist/development/entityEvents/useEntityPersistSuccess.js.map +0 -1
  622. package/dist/development/entityEvents/useOnConnectionUpdate.js +0 -8
  623. package/dist/development/entityEvents/useOnConnectionUpdate.js.map +0 -1
  624. package/dist/development/helperComponents/DeferredSubTrees.js +0 -105
  625. package/dist/development/helperComponents/DeferredSubTrees.js.map +0 -1
  626. package/dist/development/helperComponents/EntityView.js +0 -14
  627. package/dist/development/helperComponents/EntityView.js.map +0 -1
  628. package/dist/development/helperComponents/FieldView.js +0 -61
  629. package/dist/development/helperComponents/FieldView.js.map +0 -1
  630. package/dist/development/helperComponents/If.js +0 -84
  631. package/dist/development/helperComponents/If.js.map +0 -1
  632. package/dist/development/helperComponents/StaticRender.js +0 -15
  633. package/dist/development/helperComponents/StaticRender.js.map +0 -1
  634. package/dist/development/helperComponents/SugaredField.js +0 -21
  635. package/dist/development/helperComponents/SugaredField.js.map +0 -1
  636. package/dist/development/helperComponents/helpers/FilterEvaluator.js +0 -37
  637. package/dist/development/helperComponents/helpers/FilterEvaluator.js.map +0 -1
  638. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js +0 -40
  639. package/dist/development/helperComponents/helpers/FilterFieldsCollector.js.map +0 -1
  640. package/dist/development/helperComponents/helpers/evaluateCondition.js +0 -49
  641. package/dist/development/helperComponents/helpers/evaluateCondition.js.map +0 -1
  642. package/dist/production/accessorPropagation/AccessorProvider.js +0 -10
  643. package/dist/production/accessorPropagation/AccessorProvider.js.map +0 -1
  644. package/dist/production/accessorPropagation/BindingOperationsContext.js +0 -31
  645. package/dist/production/accessorPropagation/BindingOperationsContext.js.map +0 -1
  646. package/dist/production/accessorPropagation/BindingOperationsProvider.js +0 -9
  647. package/dist/production/accessorPropagation/BindingOperationsProvider.js.map +0 -1
  648. package/dist/production/accessorPropagation/EntityKeyContext.js +0 -7
  649. package/dist/production/accessorPropagation/EntityKeyContext.js.map +0 -1
  650. package/dist/production/accessorPropagation/EntityKeyProvider.js +0 -9
  651. package/dist/production/accessorPropagation/EntityKeyProvider.js.map +0 -1
  652. package/dist/production/accessorPropagation/EnvironmentContext.js +0 -37
  653. package/dist/production/accessorPropagation/EnvironmentContext.js.map +0 -1
  654. package/dist/production/accessorPropagation/TreeRootIdContext.js +0 -7
  655. package/dist/production/accessorPropagation/TreeRootIdContext.js.map +0 -1
  656. package/dist/production/accessorPropagation/TreeRootIdProvider.js +0 -9
  657. package/dist/production/accessorPropagation/TreeRootIdProvider.js.map +0 -1
  658. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js +0 -55
  659. package/dist/production/accessorPropagation/useAccessorUpdateSubscription.js.map +0 -1
  660. package/dist/production/accessorPropagation/useBindingOperations.js +0 -7
  661. package/dist/production/accessorPropagation/useBindingOperations.js.map +0 -1
  662. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js +0 -47
  663. package/dist/production/accessorPropagation/useDesugaredRelativeEntityList.js.map +0 -1
  664. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js +0 -35
  665. package/dist/production/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +0 -1
  666. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js +0 -35
  667. package/dist/production/accessorPropagation/useDesugaredRelativeSingleField.js.map +0 -1
  668. package/dist/production/accessorPropagation/useEntity.js +0 -38
  669. package/dist/production/accessorPropagation/useEntity.js.map +0 -1
  670. package/dist/production/accessorPropagation/useEntityKey.js +0 -16
  671. package/dist/production/accessorPropagation/useEntityKey.js.map +0 -1
  672. package/dist/production/accessorPropagation/useEntityList.js +0 -36
  673. package/dist/production/accessorPropagation/useEntityList.js.map +0 -1
  674. package/dist/production/accessorPropagation/useEntityListSubTree.js +0 -19
  675. package/dist/production/accessorPropagation/useEntityListSubTree.js.map +0 -1
  676. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js +0 -69
  677. package/dist/production/accessorPropagation/useEntityListSubTreeParameters.js.map +0 -1
  678. package/dist/production/accessorPropagation/useEntitySubTree.js +0 -19
  679. package/dist/production/accessorPropagation/useEntitySubTree.js.map +0 -1
  680. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js +0 -47
  681. package/dist/production/accessorPropagation/useEntitySubTreeParameters.js.map +0 -1
  682. package/dist/production/accessorPropagation/useEnvironment.js +0 -9
  683. package/dist/production/accessorPropagation/useEnvironment.js.map +0 -1
  684. package/dist/production/accessorPropagation/useExtendTree.js +0 -32
  685. package/dist/production/accessorPropagation/useExtendTree.js.map +0 -1
  686. package/dist/production/accessorPropagation/useField.js +0 -36
  687. package/dist/production/accessorPropagation/useField.js.map +0 -1
  688. package/dist/production/accessorPropagation/useGetEntityByKey.js +0 -6
  689. package/dist/production/accessorPropagation/useGetEntityByKey.js.map +0 -1
  690. package/dist/production/accessorPropagation/useGetEntityListSubTree.js +0 -17
  691. package/dist/production/accessorPropagation/useGetEntityListSubTree.js.map +0 -1
  692. package/dist/production/accessorPropagation/useGetEntitySubTree.js +0 -17
  693. package/dist/production/accessorPropagation/useGetEntitySubTree.js.map +0 -1
  694. package/dist/production/accessorPropagation/useGetTreeFilters.js +0 -6
  695. package/dist/production/accessorPropagation/useGetTreeFilters.js.map +0 -1
  696. package/dist/production/accessorPropagation/useHasEntity.js +0 -9
  697. package/dist/production/accessorPropagation/useHasEntity.js.map +0 -1
  698. package/dist/production/accessorPropagation/usePersist.js +0 -6
  699. package/dist/production/accessorPropagation/usePersist.js.map +0 -1
  700. package/dist/production/accessorPropagation/useTreeRootId.js +0 -7
  701. package/dist/production/accessorPropagation/useTreeRootId.js.map +0 -1
  702. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js +0 -74
  703. package/dist/production/accessorSorting/SetOrderFieldOnCreate.js.map +0 -1
  704. package/dist/production/accessorSorting/addEntityAtIndex.js +0 -18
  705. package/dist/production/accessorSorting/addEntityAtIndex.js.map +0 -1
  706. package/dist/production/accessorSorting/errors.js +0 -10
  707. package/dist/production/accessorSorting/errors.js.map +0 -1
  708. package/dist/production/accessorSorting/moveEntity.js +0 -42
  709. package/dist/production/accessorSorting/moveEntity.js.map +0 -1
  710. package/dist/production/accessorSorting/repairEntitiesOrder.js +0 -13
  711. package/dist/production/accessorSorting/repairEntitiesOrder.js.map +0 -1
  712. package/dist/production/accessorSorting/sortEntities.js +0 -17
  713. package/dist/production/accessorSorting/sortEntities.js.map +0 -1
  714. package/dist/production/accessorSorting/useSortedEntities.js +0 -80
  715. package/dist/production/accessorSorting/useSortedEntities.js.map +0 -1
  716. package/dist/production/accessorTree/AccessorTree.js +0 -19
  717. package/dist/production/accessorTree/AccessorTree.js.map +0 -1
  718. package/dist/production/accessorTree/AccessorTreeStateContext.js +0 -6
  719. package/dist/production/accessorTree/AccessorTreeStateContext.js.map +0 -1
  720. package/dist/production/accessorTree/DirtinessContext.js +0 -7
  721. package/dist/production/accessorTree/DirtinessContext.js.map +0 -1
  722. package/dist/production/accessorTree/MutationStateContext.js +0 -7
  723. package/dist/production/accessorTree/MutationStateContext.js.map +0 -1
  724. package/dist/production/accessorTree/accessorTreeStateReducer.js +0 -34
  725. package/dist/production/accessorTree/accessorTreeStateReducer.js.map +0 -1
  726. package/dist/production/accessorTree/metadataToRequestError.js +0 -15
  727. package/dist/production/accessorTree/metadataToRequestError.js.map +0 -1
  728. package/dist/production/accessorTree/useAccessorTreeState.js +0 -14
  729. package/dist/production/accessorTree/useAccessorTreeState.js.map +0 -1
  730. package/dist/production/accessorTree/useDataBinding.js +0 -84
  731. package/dist/production/accessorTree/useDataBinding.js.map +0 -1
  732. package/dist/production/accessorTree/useDirtinessState.js +0 -7
  733. package/dist/production/accessorTree/useDirtinessState.js.map +0 -1
  734. package/dist/production/accessorTree/useMutationState.js +0 -7
  735. package/dist/production/accessorTree/useMutationState.js.map +0 -1
  736. package/dist/production/core/IncrementalMarkerBuilder.js +0 -70
  737. package/dist/production/core/IncrementalMarkerBuilder.js.map +0 -1
  738. package/dist/production/core/MarkerTreeGenerator.js +0 -95
  739. package/dist/production/core/MarkerTreeGenerator.js.map +0 -1
  740. package/dist/production/coreComponents/Component.js +0 -33
  741. package/dist/production/coreComponents/Component.js.map +0 -1
  742. package/dist/production/coreComponents/DataBindingProvider.js +0 -20
  743. package/dist/production/coreComponents/DataBindingProvider.js.map +0 -1
  744. package/dist/production/coreComponents/Entity.js +0 -16
  745. package/dist/production/coreComponents/Entity.js.map +0 -1
  746. package/dist/production/coreComponents/EntityList.js +0 -33
  747. package/dist/production/coreComponents/EntityList.js.map +0 -1
  748. package/dist/production/coreComponents/EntityListSubTree.js +0 -46
  749. package/dist/production/coreComponents/EntityListSubTree.js.map +0 -1
  750. package/dist/production/coreComponents/EntitySubTree.js +0 -57
  751. package/dist/production/coreComponents/EntitySubTree.js.map +0 -1
  752. package/dist/production/coreComponents/Field.js +0 -29
  753. package/dist/production/coreComponents/Field.js.map +0 -1
  754. package/dist/production/coreComponents/HasMany.js +0 -30
  755. package/dist/production/coreComponents/HasMany.js.map +0 -1
  756. package/dist/production/coreComponents/HasOne.js +0 -30
  757. package/dist/production/coreComponents/HasOne.js.map +0 -1
  758. package/dist/production/coreComponents/ParentEntity.js +0 -14
  759. package/dist/production/coreComponents/ParentEntity.js.map +0 -1
  760. package/dist/production/entityEvents/useDerivedField.js +0 -42
  761. package/dist/production/entityEvents/useDerivedField.js.map +0 -1
  762. package/dist/production/entityEvents/useEntityBeforePersist.js +0 -8
  763. package/dist/production/entityEvents/useEntityBeforePersist.js.map +0 -1
  764. package/dist/production/entityEvents/useEntityBeforeUpdate.js +0 -8
  765. package/dist/production/entityEvents/useEntityBeforeUpdate.js.map +0 -1
  766. package/dist/production/entityEvents/useEntityEvent.js +0 -32
  767. package/dist/production/entityEvents/useEntityEvent.js.map +0 -1
  768. package/dist/production/entityEvents/useEntityPersistError.js +0 -8
  769. package/dist/production/entityEvents/useEntityPersistError.js.map +0 -1
  770. package/dist/production/entityEvents/useEntityPersistSuccess.js +0 -8
  771. package/dist/production/entityEvents/useEntityPersistSuccess.js.map +0 -1
  772. package/dist/production/entityEvents/useOnConnectionUpdate.js +0 -8
  773. package/dist/production/entityEvents/useOnConnectionUpdate.js.map +0 -1
  774. package/dist/production/helperComponents/DeferredSubTrees.js +0 -89
  775. package/dist/production/helperComponents/DeferredSubTrees.js.map +0 -1
  776. package/dist/production/helperComponents/EntityView.js +0 -10
  777. package/dist/production/helperComponents/EntityView.js.map +0 -1
  778. package/dist/production/helperComponents/FieldView.js +0 -49
  779. package/dist/production/helperComponents/FieldView.js.map +0 -1
  780. package/dist/production/helperComponents/If.js +0 -52
  781. package/dist/production/helperComponents/If.js.map +0 -1
  782. package/dist/production/helperComponents/StaticRender.js +0 -11
  783. package/dist/production/helperComponents/StaticRender.js.map +0 -1
  784. package/dist/production/helperComponents/SugaredField.js +0 -13
  785. package/dist/production/helperComponents/SugaredField.js.map +0 -1
  786. package/dist/production/helperComponents/helpers/FilterEvaluator.js +0 -37
  787. package/dist/production/helperComponents/helpers/FilterEvaluator.js.map +0 -1
  788. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js +0 -40
  789. package/dist/production/helperComponents/helpers/FilterFieldsCollector.js.map +0 -1
  790. package/dist/production/helperComponents/helpers/evaluateCondition.js +0 -49
  791. package/dist/production/helperComponents/helpers/evaluateCondition.js.map +0 -1
  792. package/dist/types/accessorPropagation/AccessorProvider.d.ts +0 -8
  793. package/dist/types/accessorPropagation/AccessorProvider.d.ts.map +0 -1
  794. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +0 -4
  795. package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +0 -1
  796. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts +0 -8
  797. package/dist/types/accessorPropagation/BindingOperationsProvider.d.ts.map +0 -1
  798. package/dist/types/accessorPropagation/EntityKeyContext.d.ts +0 -2
  799. package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +0 -1
  800. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts +0 -7
  801. package/dist/types/accessorPropagation/EntityKeyProvider.d.ts.map +0 -1
  802. package/dist/types/accessorPropagation/EnvironmentContext.d.ts +0 -15
  803. package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +0 -1
  804. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +0 -2
  805. package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +0 -1
  806. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts +0 -8
  807. package/dist/types/accessorPropagation/TreeRootIdProvider.d.ts.map +0 -1
  808. package/dist/types/accessorPropagation/index.d.ts +0 -28
  809. package/dist/types/accessorPropagation/index.d.ts.map +0 -1
  810. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts +0 -16
  811. package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +0 -1
  812. package/dist/types/accessorPropagation/useBindingOperations.d.ts +0 -3
  813. package/dist/types/accessorPropagation/useBindingOperations.d.ts.map +0 -1
  814. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts +0 -11
  815. package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +0 -1
  816. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts +0 -11
  817. package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +0 -1
  818. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts +0 -11
  819. package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +0 -1
  820. package/dist/types/accessorPropagation/useEntity.d.ts +0 -7
  821. package/dist/types/accessorPropagation/useEntity.d.ts.map +0 -1
  822. package/dist/types/accessorPropagation/useEntityKey.d.ts +0 -2
  823. package/dist/types/accessorPropagation/useEntityKey.d.ts.map +0 -1
  824. package/dist/types/accessorPropagation/useEntityList.d.ts +0 -6
  825. package/dist/types/accessorPropagation/useEntityList.d.ts.map +0 -1
  826. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts +0 -6
  827. package/dist/types/accessorPropagation/useEntityListSubTree.d.ts.map +0 -1
  828. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts +0 -5
  829. package/dist/types/accessorPropagation/useEntityListSubTreeParameters.d.ts.map +0 -1
  830. package/dist/types/accessorPropagation/useEntitySubTree.d.ts +0 -6
  831. package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +0 -1
  832. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts +0 -5
  833. package/dist/types/accessorPropagation/useEntitySubTreeParameters.d.ts.map +0 -1
  834. package/dist/types/accessorPropagation/useEnvironment.d.ts +0 -3
  835. package/dist/types/accessorPropagation/useEnvironment.d.ts.map +0 -1
  836. package/dist/types/accessorPropagation/useExtendTree.d.ts +0 -5
  837. package/dist/types/accessorPropagation/useExtendTree.d.ts.map +0 -1
  838. package/dist/types/accessorPropagation/useField.d.ts +0 -6
  839. package/dist/types/accessorPropagation/useField.d.ts.map +0 -1
  840. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts +0 -3
  841. package/dist/types/accessorPropagation/useGetEntityByKey.d.ts.map +0 -1
  842. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +0 -5
  843. package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +0 -1
  844. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +0 -5
  845. package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +0 -1
  846. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts +0 -3
  847. package/dist/types/accessorPropagation/useGetTreeFilters.d.ts.map +0 -1
  848. package/dist/types/accessorPropagation/useHasEntity.d.ts +0 -2
  849. package/dist/types/accessorPropagation/useHasEntity.d.ts.map +0 -1
  850. package/dist/types/accessorPropagation/usePersist.d.ts +0 -3
  851. package/dist/types/accessorPropagation/usePersist.d.ts.map +0 -1
  852. package/dist/types/accessorPropagation/useTreeRootId.d.ts +0 -3
  853. package/dist/types/accessorPropagation/useTreeRootId.d.ts.map +0 -1
  854. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +0 -9
  855. package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +0 -1
  856. package/dist/types/accessorSorting/SortedEntities.d.ts +0 -9
  857. package/dist/types/accessorSorting/SortedEntities.d.ts.map +0 -1
  858. package/dist/types/accessorSorting/addEntityAtIndex.d.ts +0 -4
  859. package/dist/types/accessorSorting/addEntityAtIndex.d.ts.map +0 -1
  860. package/dist/types/accessorSorting/errors.d.ts +0 -3
  861. package/dist/types/accessorSorting/errors.d.ts.map +0 -1
  862. package/dist/types/accessorSorting/index.d.ts +0 -8
  863. package/dist/types/accessorSorting/index.d.ts.map +0 -1
  864. package/dist/types/accessorSorting/moveEntity.d.ts +0 -5
  865. package/dist/types/accessorSorting/moveEntity.d.ts.map +0 -1
  866. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts +0 -4
  867. package/dist/types/accessorSorting/repairEntitiesOrder.d.ts.map +0 -1
  868. package/dist/types/accessorSorting/sortEntities.d.ts +0 -4
  869. package/dist/types/accessorSorting/sortEntities.d.ts.map +0 -1
  870. package/dist/types/accessorSorting/useSortedEntities.d.ts +0 -5
  871. package/dist/types/accessorSorting/useSortedEntities.d.ts.map +0 -1
  872. package/dist/types/accessorTree/AccessorTree.d.ts +0 -14
  873. package/dist/types/accessorTree/AccessorTree.d.ts.map +0 -1
  874. package/dist/types/accessorTree/AccessorTreeState.d.ts +0 -23
  875. package/dist/types/accessorTree/AccessorTreeState.d.ts.map +0 -1
  876. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts +0 -18
  877. package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +0 -1
  878. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +0 -3
  879. package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +0 -1
  880. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts +0 -4
  881. package/dist/types/accessorTree/AccessorTreeStateMetadata.d.ts.map +0 -1
  882. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts +0 -7
  883. package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +0 -1
  884. package/dist/types/accessorTree/DirtinessContext.d.ts +0 -2
  885. package/dist/types/accessorTree/DirtinessContext.d.ts.map +0 -1
  886. package/dist/types/accessorTree/MutationRequestResponse.d.ts +0 -52
  887. package/dist/types/accessorTree/MutationRequestResponse.d.ts.map +0 -1
  888. package/dist/types/accessorTree/MutationStateContext.d.ts +0 -2
  889. package/dist/types/accessorTree/MutationStateContext.d.ts.map +0 -1
  890. package/dist/types/accessorTree/RequestError.d.ts +0 -21
  891. package/dist/types/accessorTree/RequestError.d.ts.map +0 -1
  892. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts +0 -4
  893. package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +0 -1
  894. package/dist/types/accessorTree/metadataToRequestError.d.ts +0 -4
  895. package/dist/types/accessorTree/metadataToRequestError.d.ts.map +0 -1
  896. package/dist/types/accessorTree/useAccessorTreeState.d.ts +0 -2
  897. package/dist/types/accessorTree/useAccessorTreeState.d.ts.map +0 -1
  898. package/dist/types/accessorTree/useDataBinding.d.ts +0 -4
  899. package/dist/types/accessorTree/useDataBinding.d.ts.map +0 -1
  900. package/dist/types/accessorTree/useDirtinessState.d.ts +0 -2
  901. package/dist/types/accessorTree/useDirtinessState.d.ts.map +0 -1
  902. package/dist/types/accessorTree/useMutationState.d.ts +0 -2
  903. package/dist/types/accessorTree/useMutationState.d.ts.map +0 -1
  904. package/dist/types/core/IncrementalMarkerBuilder.d.ts +0 -7
  905. package/dist/types/core/IncrementalMarkerBuilder.d.ts.map +0 -1
  906. package/dist/types/core/MarkerTreeGenerator.d.ts +0 -14
  907. package/dist/types/core/MarkerTreeGenerator.d.ts.map +0 -1
  908. package/dist/types/coreComponents/Component.d.ts +0 -13
  909. package/dist/types/coreComponents/Component.d.ts.map +0 -1
  910. package/dist/types/coreComponents/DataBindingProvider.d.ts +0 -27
  911. package/dist/types/coreComponents/DataBindingProvider.d.ts.map +0 -1
  912. package/dist/types/coreComponents/Entity.d.ts +0 -12
  913. package/dist/types/coreComponents/Entity.d.ts.map +0 -1
  914. package/dist/types/coreComponents/EntityList.d.ts +0 -15
  915. package/dist/types/coreComponents/EntityList.d.ts.map +0 -1
  916. package/dist/types/coreComponents/EntityListSubTree.d.ts +0 -26
  917. package/dist/types/coreComponents/EntityListSubTree.d.ts.map +0 -1
  918. package/dist/types/coreComponents/EntitySubTree.d.ts +0 -24
  919. package/dist/types/coreComponents/EntitySubTree.d.ts.map +0 -1
  920. package/dist/types/coreComponents/Field.d.ts +0 -14
  921. package/dist/types/coreComponents/Field.d.ts.map +0 -1
  922. package/dist/types/coreComponents/HasMany.d.ts +0 -16
  923. package/dist/types/coreComponents/HasMany.d.ts.map +0 -1
  924. package/dist/types/coreComponents/HasOne.d.ts +0 -12
  925. package/dist/types/coreComponents/HasOne.d.ts.map +0 -1
  926. package/dist/types/coreComponents/MarkerProvider.d.ts +0 -21
  927. package/dist/types/coreComponents/MarkerProvider.d.ts.map +0 -1
  928. package/dist/types/coreComponents/ParentEntity.d.ts +0 -10
  929. package/dist/types/coreComponents/ParentEntity.d.ts.map +0 -1
  930. package/dist/types/coreComponents/index.d.ts +0 -12
  931. package/dist/types/coreComponents/index.d.ts.map +0 -1
  932. package/dist/types/entityEvents/index.d.ts +0 -8
  933. package/dist/types/entityEvents/index.d.ts.map +0 -1
  934. package/dist/types/entityEvents/useDerivedField.d.ts +0 -9
  935. package/dist/types/entityEvents/useDerivedField.d.ts.map +0 -1
  936. package/dist/types/entityEvents/useEntityBeforePersist.d.ts +0 -3
  937. package/dist/types/entityEvents/useEntityBeforePersist.d.ts.map +0 -1
  938. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts +0 -3
  939. package/dist/types/entityEvents/useEntityBeforeUpdate.d.ts.map +0 -1
  940. package/dist/types/entityEvents/useEntityEvent.d.ts +0 -9
  941. package/dist/types/entityEvents/useEntityEvent.d.ts.map +0 -1
  942. package/dist/types/entityEvents/useEntityPersistError.d.ts +0 -3
  943. package/dist/types/entityEvents/useEntityPersistError.d.ts.map +0 -1
  944. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts +0 -3
  945. package/dist/types/entityEvents/useEntityPersistSuccess.d.ts.map +0 -1
  946. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts +0 -4
  947. package/dist/types/entityEvents/useOnConnectionUpdate.d.ts.map +0 -1
  948. package/dist/types/helperComponents/DeferredSubTrees.d.ts +0 -10
  949. package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +0 -1
  950. package/dist/types/helperComponents/EntityView.d.ts +0 -12
  951. package/dist/types/helperComponents/EntityView.d.ts.map +0 -1
  952. package/dist/types/helperComponents/FieldView.d.ts +0 -59
  953. package/dist/types/helperComponents/FieldView.d.ts.map +0 -1
  954. package/dist/types/helperComponents/If.d.ts +0 -17
  955. package/dist/types/helperComponents/If.d.ts.map +0 -1
  956. package/dist/types/helperComponents/StaticRender.d.ts +0 -9
  957. package/dist/types/helperComponents/StaticRender.d.ts.map +0 -1
  958. package/dist/types/helperComponents/SugaredField.d.ts +0 -12
  959. package/dist/types/helperComponents/SugaredField.d.ts.map +0 -1
  960. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts +0 -9
  961. package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +0 -1
  962. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts +0 -10
  963. package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +0 -1
  964. package/dist/types/helperComponents/helpers/evaluateCondition.d.ts +0 -4
  965. package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +0 -1
  966. package/dist/types/helperComponents/index.d.ts +0 -7
  967. package/dist/types/helperComponents/index.d.ts.map +0 -1
  968. package/src/accessorPropagation/AccessorProvider.tsx +0 -17
  969. package/src/accessorPropagation/BindingOperationsContext.ts +0 -32
  970. package/src/accessorPropagation/BindingOperationsProvider.tsx +0 -16
  971. package/src/accessorPropagation/EntityKeyContext.ts +0 -4
  972. package/src/accessorPropagation/EntityKeyProvider.tsx +0 -11
  973. package/src/accessorPropagation/EnvironmentContext.tsx +0 -44
  974. package/src/accessorPropagation/TreeRootIdContext.ts +0 -5
  975. package/src/accessorPropagation/TreeRootIdProvider.tsx +0 -12
  976. package/src/accessorPropagation/index.ts +0 -30
  977. package/src/accessorPropagation/useAccessorUpdateSubscription.ts +0 -107
  978. package/src/accessorPropagation/useBindingOperations.ts +0 -5
  979. package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +0 -70
  980. package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +0 -58
  981. package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +0 -58
  982. package/src/accessorPropagation/useEntity.ts +0 -56
  983. package/src/accessorPropagation/useEntityKey.ts +0 -15
  984. package/src/accessorPropagation/useEntityList.ts +0 -49
  985. package/src/accessorPropagation/useEntityListSubTree.ts +0 -27
  986. package/src/accessorPropagation/useEntityListSubTreeParameters.ts +0 -88
  987. package/src/accessorPropagation/useEntitySubTree.ts +0 -26
  988. package/src/accessorPropagation/useEntitySubTreeParameters.ts +0 -66
  989. package/src/accessorPropagation/useEnvironment.ts +0 -7
  990. package/src/accessorPropagation/useExtendTree.ts +0 -30
  991. package/src/accessorPropagation/useField.ts +0 -51
  992. package/src/accessorPropagation/useGetEntityByKey.ts +0 -4
  993. package/src/accessorPropagation/useGetEntityListSubTree.ts +0 -28
  994. package/src/accessorPropagation/useGetEntitySubTree.ts +0 -28
  995. package/src/accessorPropagation/useGetTreeFilters.ts +0 -4
  996. package/src/accessorPropagation/useHasEntity.ts +0 -6
  997. package/src/accessorPropagation/usePersist.ts +0 -4
  998. package/src/accessorPropagation/useTreeRootId.ts +0 -5
  999. package/src/accessorSorting/SetOrderFieldOnCreate.tsx +0 -92
  1000. package/src/accessorSorting/SortedEntities.ts +0 -9
  1001. package/src/accessorSorting/addEntityAtIndex.ts +0 -27
  1002. package/src/accessorSorting/errors.ts +0 -9
  1003. package/src/accessorSorting/index.ts +0 -9
  1004. package/src/accessorSorting/moveEntity.ts +0 -66
  1005. package/src/accessorSorting/repairEntitiesOrder.ts +0 -15
  1006. package/src/accessorSorting/sortEntities.ts +0 -20
  1007. package/src/accessorSorting/useSortedEntities.ts +0 -102
  1008. package/src/accessorTree/AccessorTree.tsx +0 -37
  1009. package/src/accessorTree/AccessorTreeState.ts +0 -29
  1010. package/src/accessorTree/AccessorTreeStateAction.ts +0 -21
  1011. package/src/accessorTree/AccessorTreeStateContext.ts +0 -4
  1012. package/src/accessorTree/AccessorTreeStateMetadata.ts +0 -3
  1013. package/src/accessorTree/AccessorTreeStateOptions.ts +0 -7
  1014. package/src/accessorTree/DirtinessContext.ts +0 -4
  1015. package/src/accessorTree/MutationRequestResponse.ts +0 -64
  1016. package/src/accessorTree/MutationStateContext.ts +0 -4
  1017. package/src/accessorTree/RequestError.ts +0 -22
  1018. package/src/accessorTree/accessorTreeStateReducer.ts +0 -36
  1019. package/src/accessorTree/metadataToRequestError.ts +0 -14
  1020. package/src/accessorTree/useAccessorTreeState.ts +0 -11
  1021. package/src/accessorTree/useDataBinding.ts +0 -104
  1022. package/src/accessorTree/useDirtinessState.ts +0 -4
  1023. package/src/accessorTree/useMutationState.ts +0 -4
  1024. package/src/core/IncrementalMarkerBuilder.ts +0 -60
  1025. package/src/core/MarkerTreeGenerator.ts +0 -121
  1026. package/src/coreComponents/Component.tsx +0 -74
  1027. package/src/coreComponents/DataBindingProvider.tsx +0 -54
  1028. package/src/coreComponents/Entity.tsx +0 -26
  1029. package/src/coreComponents/EntityList.tsx +0 -55
  1030. package/src/coreComponents/EntityListSubTree.tsx +0 -83
  1031. package/src/coreComponents/EntitySubTree.tsx +0 -93
  1032. package/src/coreComponents/Field.tsx +0 -46
  1033. package/src/coreComponents/HasMany.tsx +0 -47
  1034. package/src/coreComponents/HasOne.tsx +0 -41
  1035. package/src/coreComponents/MarkerProvider.ts +0 -59
  1036. package/src/coreComponents/ParentEntity.tsx +0 -20
  1037. package/src/coreComponents/index.ts +0 -11
  1038. package/src/entityEvents/index.ts +0 -7
  1039. package/src/entityEvents/useDerivedField.ts +0 -64
  1040. package/src/entityEvents/useEntityBeforePersist.ts +0 -6
  1041. package/src/entityEvents/useEntityBeforeUpdate.ts +0 -6
  1042. package/src/entityEvents/useEntityEvent.ts +0 -57
  1043. package/src/entityEvents/useEntityPersistError.ts +0 -6
  1044. package/src/entityEvents/useEntityPersistSuccess.ts +0 -6
  1045. package/src/entityEvents/useOnConnectionUpdate.ts +0 -10
  1046. package/src/helperComponents/DeferredSubTrees.tsx +0 -126
  1047. package/src/helperComponents/EntityView.tsx +0 -19
  1048. package/src/helperComponents/FieldView.tsx +0 -142
  1049. package/src/helperComponents/If.tsx +0 -74
  1050. package/src/helperComponents/StaticRender.tsx +0 -15
  1051. package/src/helperComponents/SugaredField.tsx +0 -18
  1052. package/src/helperComponents/helpers/FilterEvaluator.ts +0 -46
  1053. package/src/helperComponents/helpers/FilterFieldsCollector.ts +0 -46
  1054. package/src/helperComponents/helpers/evaluateCondition.ts +0 -52
  1055. package/src/helperComponents/index.ts +0 -6
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uuid = require("uuid");
4
+ const BindingError = require("../../BindingError.cjs");
5
+ const bindingTypes = require("../../bindingTypes.cjs");
6
+ const EventManager = require("../EventManager.cjs");
7
+ const OperationsHelpers = require("./OperationsHelpers.cjs");
8
+ const FieldAccessor = require("../../accessors/FieldAccessor.cjs");
9
+ const EventListenersStore = require("../../treeParameters/EventListenersStore.cjs");
10
+ const RuntimeId = require("../../accessorTree/RuntimeId.cjs");
11
+ const StateIterator = require("../state/StateIterator.cjs");
12
+ const getEntityMarker = require("../state/getEntityMarker.cjs");
13
+ class FieldOperations {
14
+ constructor(accessorErrorManager, eventManager, stateInitializer, treeStore) {
15
+ this.accessorErrorManager = accessorErrorManager;
16
+ this.eventManager = eventManager;
17
+ this.stateInitializer = stateInitializer;
18
+ this.treeStore = treeStore;
19
+ }
20
+ addError(fieldState, error) {
21
+ return this.accessorErrorManager.addError(fieldState, error);
22
+ }
23
+ clearErrors(fieldState) {
24
+ return this.accessorErrorManager.clearErrorsByState(fieldState);
25
+ }
26
+ addEventListener(state, event, listener) {
27
+ if (!state.eventListeners) {
28
+ state.eventListeners = new EventListenersStore.EventListenersStore();
29
+ }
30
+ return state.eventListeners.add(event, listener);
31
+ }
32
+ updateValue(fieldState, newValue, { agent = FieldAccessor.FieldAccessor.userAgent } = {}) {
33
+ this.eventManager.syncOperation(() => {
34
+ const { placeholderName, parent } = fieldState;
35
+ if (placeholderName === bindingTypes.PRIMARY_KEY_NAME) {
36
+ const entity = fieldState.parent.entity;
37
+ {
38
+ if (newValue !== fieldState.value && (fieldState.touchLog !== void 0 || entity.hasIdSetInStone)) {
39
+ throw new BindingError.BindingError(
40
+ `Trying to set the '${bindingTypes.PRIMARY_KEY_NAME}' field for the second time. This is prohibited.
41
+ Once set, it is immutable.`
42
+ );
43
+ }
44
+ if (typeof newValue !== "string" || !uuid.validate(newValue)) {
45
+ throw new BindingError.BindingError(
46
+ `Invalid value supplied for the '${bindingTypes.PRIMARY_KEY_NAME}' field. Expecting a valid uuid but '${newValue}' was given.
47
+ Hint: you may use 'FieldAccessor.asUuid.setToUuid()'.`
48
+ );
49
+ }
50
+ if (this.treeStore.entityStore.has(RuntimeId.ServerId.formatUniqueValue(newValue, entity.entityName))) {
51
+ throw new BindingError.BindingError(
52
+ `Trying to set the '${bindingTypes.PRIMARY_KEY_NAME}' field to '${newValue}' which is a valid uuid but is not unique. It is already in use by an existing entity.`
53
+ );
54
+ }
55
+ }
56
+ if (typeof newValue !== "string") {
57
+ throw new BindingError.BindingError();
58
+ }
59
+ OperationsHelpers.OperationsHelpers.changeEntityId(
60
+ this.treeStore,
61
+ this.eventManager,
62
+ this.stateInitializer,
63
+ entity,
64
+ new RuntimeId.ClientGeneratedUuid(newValue)
65
+ );
66
+ }
67
+ for (const field of StateIterator.StateIterator.eachSiblingRealmChild(this.treeStore, fieldState)) {
68
+ if (newValue === field.value) {
69
+ continue;
70
+ }
71
+ if (field.touchLog === void 0) {
72
+ field.touchLog = /* @__PURE__ */ new Set();
73
+ }
74
+ field.touchLog.add(agent);
75
+ field.value = newValue;
76
+ const resolvedValue = field.fieldMarker.defaultValue === void 0 ? newValue : newValue === null ? field.fieldMarker.defaultValue : newValue;
77
+ const normalizedPersistedValue = field.persistedValue === void 0 ? null : field.persistedValue;
78
+ const hadUnpersistedChangesBefore = field.hasUnpersistedChanges;
79
+ const hasUnpersistedChangesNow = resolvedValue !== normalizedPersistedValue;
80
+ field.hasUnpersistedChanges = hasUnpersistedChangesNow;
81
+ const shouldInfluenceUpdateCount = !getEntityMarker.getEntityMarker(parent).fields.hasAtLeastOneBearingField || !field.fieldMarker.isNonbearing || field.persistedValue !== void 0;
82
+ let changesDelta = EventManager.EventManager.NO_CHANGES_DIFFERENCE;
83
+ if (shouldInfluenceUpdateCount) {
84
+ if (!hadUnpersistedChangesBefore && hasUnpersistedChangesNow) {
85
+ changesDelta++;
86
+ } else if (hadUnpersistedChangesBefore && !hasUnpersistedChangesNow) {
87
+ changesDelta--;
88
+ }
89
+ }
90
+ this.eventManager.registerJustUpdated(field, changesDelta);
91
+ }
92
+ });
93
+ }
94
+ }
95
+ exports.FieldOperations = FieldOperations;
96
+ //# sourceMappingURL=FieldOperations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldOperations.cjs","sources":["../../../../src/core/operations/FieldOperations.ts"],"sourcesContent":["import { validate as uuidValidate } from 'uuid'\nimport { ErrorAccessor, FieldAccessor } from '../../accessors'\nimport { ClientGeneratedUuid, ServerId } from '../../accessorTree'\nimport { BindingError } from '../../BindingError'\nimport { PRIMARY_KEY_NAME } from '../../bindingTypes'\nimport type { FieldValue } from '../../treeParameters'\nimport type { AccessorErrorManager } from '../AccessorErrorManager'\nimport { EventManager } from '../EventManager'\nimport { FieldState, getEntityMarker, StateIterator } from '../state'\nimport type { StateInitializer } from '../StateInitializer'\nimport type { TreeStore } from '../TreeStore'\nimport { OperationsHelpers } from './OperationsHelpers'\nimport { EventListenersStore } from '../../treeParameters'\n\nexport class FieldOperations {\n\tpublic constructor(\n\t\tprivate readonly accessorErrorManager: AccessorErrorManager,\n\t\tprivate readonly eventManager: EventManager,\n\t\tprivate readonly stateInitializer: StateInitializer,\n\t\tprivate readonly treeStore: TreeStore,\n\t) {}\n\n\tpublic addError(fieldState: FieldState<any>, error: ErrorAccessor.Error): () => void {\n\t\treturn this.accessorErrorManager.addError(fieldState, error)\n\t}\n\n\tpublic clearErrors(fieldState: FieldState<any>): void {\n\t\treturn this.accessorErrorManager.clearErrorsByState(fieldState)\n\t}\n\n\tpublic addEventListener<\n\t\tType extends keyof FieldAccessor.FieldEventListenerMap,\n\t\tValue extends FieldValue = FieldValue,\n\t>(\n\t\tstate: FieldState<Value>,\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: FieldAccessor.FieldEventListenerMap<Value>[Type],\n\t): () => void {\n\t\tif (!state.eventListeners) {\n\t\t\tstate.eventListeners = new EventListenersStore()\n\t\t}\n\t\treturn state.eventListeners.add(event, listener)\n\t}\n\n\tpublic updateValue<Value extends FieldValue = FieldValue>(\n\t\tfieldState: FieldState<Value>,\n\t\tnewValue: Value | null,\n\t\t{ agent = FieldAccessor.userAgent }: FieldAccessor.UpdateOptions = {},\n\t) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tconst { placeholderName, parent } = fieldState\n\t\t\tif (placeholderName === PRIMARY_KEY_NAME) {\n\t\t\t\tconst entity = fieldState.parent.entity\n\n\t\t\t\tif (import.meta.env.DEV) {\n\t\t\t\t\tif (newValue !== fieldState.value && (fieldState.touchLog !== undefined || entity.hasIdSetInStone)) {\n\t\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t\t`Trying to set the '${PRIMARY_KEY_NAME}' field for the second time. This is prohibited.\\n` +\n\t\t\t\t\t\t\t\t`Once set, it is immutable.`,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof newValue !== 'string' || !uuidValidate(newValue)) {\n\t\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t\t`Invalid value supplied for the '${PRIMARY_KEY_NAME}' field. ` +\n\t\t\t\t\t\t\t\t`Expecting a valid uuid but '${newValue}' was given.\\n` +\n\t\t\t\t\t\t\t\t`Hint: you may use 'FieldAccessor.asUuid.setToUuid()'.`,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tif (this.treeStore.entityStore.has(ServerId.formatUniqueValue(newValue, entity.entityName))) {\n\t\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t\t`Trying to set the '${PRIMARY_KEY_NAME}' field to '${newValue}' which is a valid uuid but is not unique. ` +\n\t\t\t\t\t\t\t\t`It is already in use by an existing entity.`,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof newValue !== 'string') {\n\t\t\t\t\tthrow new BindingError()\n\t\t\t\t}\n\t\t\t\tOperationsHelpers.changeEntityId(\n\t\t\t\t\tthis.treeStore,\n\t\t\t\t\tthis.eventManager,\n\t\t\t\t\tthis.stateInitializer,\n\t\t\t\t\tentity,\n\t\t\t\t\tnew ClientGeneratedUuid(newValue),\n\t\t\t\t)\n\t\t\t}\n\t\t\tfor (const field of StateIterator.eachSiblingRealmChild(this.treeStore, fieldState)) {\n\t\t\t\tif (newValue === field.value) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (field.touchLog === undefined) {\n\t\t\t\t\tfield.touchLog = new Set()\n\t\t\t\t}\n\t\t\t\tfield.touchLog.add(agent)\n\t\t\t\tfield.value = newValue\n\n\t\t\t\tconst resolvedValue =\n\t\t\t\t\tfield.fieldMarker.defaultValue === undefined\n\t\t\t\t\t\t? newValue\n\t\t\t\t\t\t: newValue === null\n\t\t\t\t\t\t? field.fieldMarker.defaultValue\n\t\t\t\t\t\t: newValue\n\t\t\t\tconst normalizedPersistedValue = field.persistedValue === undefined ? null : field.persistedValue\n\t\t\t\tconst hadUnpersistedChangesBefore = field.hasUnpersistedChanges\n\t\t\t\tconst hasUnpersistedChangesNow = resolvedValue !== normalizedPersistedValue\n\t\t\t\tfield.hasUnpersistedChanges = hasUnpersistedChangesNow\n\n\t\t\t\tconst shouldInfluenceUpdateCount =\n\t\t\t\t\t!getEntityMarker(parent).fields.hasAtLeastOneBearingField ||\n\t\t\t\t\t!field.fieldMarker.isNonbearing ||\n\t\t\t\t\tfield.persistedValue !== undefined\n\n\t\t\t\tlet changesDelta = EventManager.NO_CHANGES_DIFFERENCE\n\n\t\t\t\tif (shouldInfluenceUpdateCount) {\n\t\t\t\t\tif (!hadUnpersistedChangesBefore && hasUnpersistedChangesNow) {\n\t\t\t\t\t\tchangesDelta++\n\t\t\t\t\t} else if (hadUnpersistedChangesBefore && !hasUnpersistedChangesNow) {\n\t\t\t\t\t\tchangesDelta--\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.eventManager.registerJustUpdated(field, changesDelta)\n\t\t\t}\n\t\t})\n\t}\n}\n"],"names":["EventListenersStore","FieldAccessor","PRIMARY_KEY_NAME","BindingError","uuidValidate","ServerId","OperationsHelpers","ClientGeneratedUuid","StateIterator","getEntityMarker","EventManager"],"mappings":";;;;;;;;;;;;AAcO,MAAM,gBAAgB;AAAA,EACrB,YACW,sBACA,cACA,kBACA,WAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,eAAA;AACA,SAAA,mBAAA;AACA,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,SAAS,YAA6B,OAAwC;AACpF,WAAO,KAAK,qBAAqB,SAAS,YAAY,KAAK;AAAA,EAC5D;AAAA,EAEO,YAAY,YAAmC;AAC9C,WAAA,KAAK,qBAAqB,mBAAmB,UAAU;AAAA,EAC/D;AAAA,EAEO,iBAIN,OACA,OACA,UACa;AACT,QAAA,CAAC,MAAM,gBAAgB;AACpB,YAAA,iBAAiB,IAAIA,oBAAAA;IAC5B;AACA,WAAO,MAAM,eAAe,IAAI,OAAO,QAAQ;AAAA,EAChD;AAAA,EAEO,YACN,YACA,UACA,EAAE,QAAQC,4BAAc,UAA2C,IAAA,IAClE;AACI,SAAA,aAAa,cAAc,MAAM;AAC/B,YAAA,EAAE,iBAAiB,OAAW,IAAA;AACpC,UAAI,oBAAoBC,aAAAA,kBAAkB;AACnC,cAAA,SAAS,WAAW,OAAO;AAER;AACxB,cAAI,aAAa,WAAW,UAAU,WAAW,aAAa,UAAa,OAAO,kBAAkB;AACnG,kBAAM,IAAIC,aAAA;AAAA,cACT,sBAAsBD,aAAAA;AAAAA;AAAAA,YAAA;AAAA,UAGxB;AACA,cAAI,OAAO,aAAa,YAAY,CAACE,KAAA,SAAa,QAAQ,GAAG;AAC5D,kBAAM,IAAID,aAAA;AAAA,cACT,mCAAmCD,aAAAA,wDACH;AAAA;AAAA,YAAA;AAAA,UAGlC;AACI,cAAA,KAAK,UAAU,YAAY,IAAIG,UAAAA,SAAS,kBAAkB,UAAU,OAAO,UAAU,CAAC,GAAG;AAC5F,kBAAM,IAAIF,aAAA;AAAA,cACT,sBAAsBD,aAA+B,+BAAA;AAAA,YAAA;AAAA,UAGvD;AAAA,QACD;AACI,YAAA,OAAO,aAAa,UAAU;AACjC,gBAAM,IAAIC,aAAa,aAAA;AAAA,QACxB;AACkBG,0BAAAA,kBAAA;AAAA,UACjB,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL;AAAA,UACA,IAAIC,UAAAA,oBAAoB,QAAQ;AAAA,QAAA;AAAA,MAElC;AACA,iBAAW,SAASC,4BAAc,sBAAsB,KAAK,WAAW,UAAU,GAAG;AAChF,YAAA,aAAa,MAAM,OAAO;AAC7B;AAAA,QACD;AACI,YAAA,MAAM,aAAa,QAAW;AAC3B,gBAAA,+BAAe;QACtB;AACM,cAAA,SAAS,IAAI,KAAK;AACxB,cAAM,QAAQ;AAER,cAAA,gBACL,MAAM,YAAY,iBAAiB,SAChC,WACA,aAAa,OACb,MAAM,YAAY,eAClB;AACJ,cAAM,2BAA2B,MAAM,mBAAmB,SAAY,OAAO,MAAM;AACnF,cAAM,8BAA8B,MAAM;AAC1C,cAAM,2BAA2B,kBAAkB;AACnD,cAAM,wBAAwB;AAE9B,cAAM,6BACL,CAACC,gBAAAA,gBAAgB,MAAM,EAAE,OAAO,6BAChC,CAAC,MAAM,YAAY,gBACnB,MAAM,mBAAmB;AAE1B,YAAI,eAAeC,aAAa,aAAA;AAEhC,YAAI,4BAA4B;AAC3B,cAAA,CAAC,+BAA+B,0BAA0B;AAC7D;AAAA,UAAA,WACU,+BAA+B,CAAC,0BAA0B;AACpE;AAAA,UACD;AAAA,QACD;AAEK,aAAA,aAAa,oBAAoB,OAAO,YAAY;AAAA,MAC1D;AAAA,IAAA,CACA;AAAA,EACF;AACD;;"}
@@ -3,11 +3,11 @@ import { BindingError } from "../../BindingError.js";
3
3
  import { PRIMARY_KEY_NAME } from "../../bindingTypes.js";
4
4
  import { EventManager } from "../EventManager.js";
5
5
  import { OperationsHelpers } from "./OperationsHelpers.js";
6
+ import { FieldAccessor } from "../../accessors/FieldAccessor.js";
6
7
  import { EventListenersStore } from "../../treeParameters/EventListenersStore.js";
7
8
  import { ServerId, ClientGeneratedUuid } from "../../accessorTree/RuntimeId.js";
8
9
  import { StateIterator } from "../state/StateIterator.js";
9
10
  import { getEntityMarker } from "../state/getEntityMarker.js";
10
- import { FieldAccessor } from "../../accessors/FieldAccessor.js";
11
11
  class FieldOperations {
12
12
  constructor(accessorErrorManager, eventManager, stateInitializer, treeStore) {
13
13
  this.accessorErrorManager = accessorErrorManager;
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uuid = require("uuid");
4
+ const BindingError = require("../../BindingError.cjs");
5
+ const EventManager = require("../EventManager.cjs");
6
+ const MarkerComparator = require("../MarkerComparator.cjs");
7
+ const RealmKeyGenerator = require("../RealmKeyGenerator.cjs");
8
+ const OperationsHelpers = require("./OperationsHelpers.cjs");
9
+ const EventListenersStore = require("../../treeParameters/EventListenersStore.cjs");
10
+ const StateIterator = require("../state/StateIterator.cjs");
11
+ const ErrorLocator = require("../exceptions/ErrorLocator.cjs");
12
+ const getEntityMarker = require("../state/getEntityMarker.cjs");
13
+ const LocalizedBindingError = require("../exceptions/LocalizedBindingError.cjs");
14
+ const RuntimeId = require("../../accessorTree/RuntimeId.cjs");
15
+ class ListOperations {
16
+ constructor(accessorErrorManager, batchUpdatesOptions, eventManager, stateInitializer, treeStore) {
17
+ this.accessorErrorManager = accessorErrorManager;
18
+ this.batchUpdatesOptions = batchUpdatesOptions;
19
+ this.eventManager = eventManager;
20
+ this.stateInitializer = stateInitializer;
21
+ this.treeStore = treeStore;
22
+ }
23
+ addError(listState, error) {
24
+ return this.accessorErrorManager.addError(listState, error);
25
+ }
26
+ addEventListener(state, event, listener) {
27
+ if (state.eventListeners === void 0) {
28
+ state.eventListeners = new EventListenersStore.EventListenersStore();
29
+ }
30
+ return state.eventListeners.add(event, listener);
31
+ }
32
+ addChildEventListener(state, event, listener) {
33
+ if (state.childEventListeners === void 0) {
34
+ state.childEventListeners = new EventListenersStore.EventListenersStore();
35
+ }
36
+ return state.childEventListeners.add(event, listener);
37
+ }
38
+ batchUpdates(state, performUpdates) {
39
+ this.eventManager.syncOperation(() => {
40
+ performUpdates(state.getAccessor, this.batchUpdatesOptions);
41
+ });
42
+ }
43
+ connectEntity(outerState, entityToConnect) {
44
+ this.eventManager.syncOperation(() => {
45
+ const persistedEntityIds = this.treeStore.getEntityListPersistedIds(outerState);
46
+ const stateToConnect = OperationsHelpers.OperationsHelpers.resolveAndPrepareEntityToConnect(this.treeStore, entityToConnect);
47
+ const idToConnect = stateToConnect.entity.id;
48
+ for (const state of StateIterator.StateIterator.eachSiblingRealmChild(this.treeStore, outerState)) {
49
+ if (state.entityName !== stateToConnect.entity.entityName) {
50
+ throw new BindingError.BindingError(
51
+ `EntityListAccessor.connectEntity: Attempting to connect at an entity of type '${stateToConnect.entity.entityName}' but '${state.entityName}' is expected.
52
+
53
+ Entity located at: ${ErrorLocator.ErrorLocator.locateInternalState(outerState)}.`
54
+ );
55
+ }
56
+ try {
57
+ MarkerComparator.MarkerComparator.assertEntityMarkersSubsetOf(
58
+ state.blueprint.marker.fields,
59
+ getEntityMarker.getEntityMarker(stateToConnect).fields
60
+ );
61
+ } catch (error) {
62
+ if (error instanceof LocalizedBindingError.LocalizedBindingError) {
63
+ throw new BindingError.BindingError(
64
+ `Entity list: cannot connect entity with key '${entityToConnect.key}' because its fields are incompatible with entities found on this list. Make sure both trees are equivalent.
65
+
66
+ ${error.message}
67
+
68
+ ` + (error.markerPath.length > 1 ? `Incompatibility found at: ${ErrorLocator.ErrorLocator.locateMarkerPath(error.markerPath)}.
69
+
70
+ ` : "") + `Entity list located at: ${ErrorLocator.ErrorLocator.locateInternalState(state)}.`
71
+ );
72
+ }
73
+ throw error;
74
+ }
75
+ if (state.children.has(idToConnect.value)) {
76
+ continue;
77
+ }
78
+ this.stateInitializer.initializeEntityRealm(idToConnect, state.entityName, {
79
+ type: "listEntity",
80
+ parent: state
81
+ }, stateToConnect);
82
+ state.plannedRemovals?.delete(idToConnect.value);
83
+ let changesDelta = 0;
84
+ if (persistedEntityIds.has(idToConnect.value)) {
85
+ changesDelta--;
86
+ } else if (idToConnect.existsOnServer) {
87
+ changesDelta++;
88
+ }
89
+ if (stateToConnect.type === "entityRealm") {
90
+ changesDelta += stateToConnect.unpersistedChangesCount;
91
+ }
92
+ this.eventManager.registerJustUpdated(state, changesDelta);
93
+ }
94
+ });
95
+ }
96
+ disconnectEntity(listState, childEntity, options) {
97
+ this.eventManager.syncOperation(() => {
98
+ const persistedEntityIds = this.treeStore.getEntityListPersistedIds(listState);
99
+ for (const state of StateIterator.StateIterator.eachSiblingRealmChild(this.treeStore, listState)) {
100
+ const disconnectedChildIdValue = childEntity.id;
101
+ const disconnectedChildRealm = state.children.get(disconnectedChildIdValue);
102
+ if (disconnectedChildRealm === void 0) {
103
+ throw new BindingError.BindingError(
104
+ `Entity list doesn't include an entity with id '${disconnectedChildIdValue}' and so it cannot remove it.`
105
+ );
106
+ }
107
+ this.treeStore.disposeOfRealm(disconnectedChildRealm);
108
+ listState.children.delete(disconnectedChildIdValue);
109
+ let changesDelta = 0;
110
+ if (persistedEntityIds.has(disconnectedChildIdValue)) {
111
+ changesDelta++;
112
+ if (state.plannedRemovals === void 0) {
113
+ state.plannedRemovals = /* @__PURE__ */ new Map();
114
+ }
115
+ if (!options.noPersist) {
116
+ state.plannedRemovals.set(disconnectedChildIdValue, "disconnect");
117
+ }
118
+ } else if (disconnectedChildRealm.entity.id.existsOnServer) {
119
+ changesDelta--;
120
+ }
121
+ if (disconnectedChildRealm.type === "entityRealm") {
122
+ changesDelta -= disconnectedChildRealm.unpersistedChangesCount;
123
+ }
124
+ this.eventManager.registerJustUpdated(state, changesDelta);
125
+ }
126
+ });
127
+ }
128
+ createNewEntity(outerState, initialize) {
129
+ return this.eventManager.syncOperation(() => {
130
+ const id = new RuntimeId.UnpersistedEntityDummyId();
131
+ for (const state of StateIterator.StateIterator.eachSiblingRealmChild(this.treeStore, outerState)) {
132
+ const newEntity = this.stateInitializer.initializeEntityRealm(id, state.entityName, {
133
+ type: "listEntity",
134
+ parent: state
135
+ });
136
+ this.stateInitializer.runImmediateUserInitialization(newEntity, initialize);
137
+ this.eventManager.registerJustUpdated(state, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
138
+ }
139
+ return id;
140
+ });
141
+ }
142
+ getChildEntityById(state, id) {
143
+ const realm = state.children.get(id);
144
+ if (realm === void 0) {
145
+ const isRuntimeId = typeof id === "number" || uuid.validate(id) || RuntimeId.UnpersistedEntityDummyId.matchesDummyId(id);
146
+ if (isRuntimeId) {
147
+ throw new BindingError.BindingError(`EntityList: cannot retrieve an entity with id '${id}' as it is not on the list.`);
148
+ }
149
+ const looksLikeKey = typeof id === "string" && (this.treeStore.entityRealmStore.has(id) || RealmKeyGenerator.RealmKeyGenerator.vaguelyAppearsToBeAKey(id));
150
+ throw new BindingError.BindingError(
151
+ `EntityList: cannot retrieve an entity with id '${id}' because it's not a valid id.` + (looksLikeKey ? `
152
+ The supplied value appears to be an entity *key*, not an *id*. List accessors are indexed by ids and you can use \`EntityAccessor.id\` to obtain one. Keys, on the other hand, are globally unique and you can use \`getEntityByKey\` to get its EntityAccessor.` : "")
153
+ );
154
+ }
155
+ return realm.getAccessor();
156
+ }
157
+ }
158
+ exports.ListOperations = ListOperations;
159
+ //# sourceMappingURL=ListOperations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListOperations.cjs","sources":["../../../../src/core/operations/ListOperations.ts"],"sourcesContent":["import { validate as uuidValidate } from 'uuid'\nimport type { BatchUpdatesOptions, EntityAccessor, EntityListAccessor, ErrorAccessor } from '../../accessors'\nimport { RuntimeId, UnpersistedEntityDummyId } from '../../accessorTree'\nimport { BindingError } from '../../BindingError'\nimport type { AccessorErrorManager } from '../AccessorErrorManager'\nimport { EventManager } from '../EventManager'\nimport { ErrorLocator, LocalizedBindingError } from '../exceptions'\nimport { MarkerComparator } from '../MarkerComparator'\nimport { RealmKeyGenerator } from '../RealmKeyGenerator'\nimport { EntityListState, getEntityMarker, StateIterator } from '../state'\nimport type { StateInitializer } from '../StateInitializer'\nimport type { TreeStore } from '../TreeStore'\nimport { OperationsHelpers } from './OperationsHelpers'\nimport { EntityId, EventListenersStore } from '../../treeParameters'\n\nexport class ListOperations {\n\tpublic constructor(\n\t\tprivate readonly accessorErrorManager: AccessorErrorManager,\n\t\tprivate readonly batchUpdatesOptions: BatchUpdatesOptions,\n\t\tprivate readonly eventManager: EventManager,\n\t\tprivate readonly stateInitializer: StateInitializer,\n\t\tprivate readonly treeStore: TreeStore,\n\t) {}\n\n\tpublic addError(listState: EntityListState, error: ErrorAccessor.Error): () => void {\n\t\treturn this.accessorErrorManager.addError(listState, error)\n\t}\n\n\tpublic addEventListener<Type extends keyof EntityListAccessor.RuntimeEntityListEventListenerMap>(\n\t\tstate: EntityListState,\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: EntityListAccessor.RuntimeEntityListEventListenerMap[Type],\n\t) {\n\t\tif (state.eventListeners === undefined) {\n\t\t\tstate.eventListeners = new EventListenersStore()\n\t\t}\n\t\treturn state.eventListeners.add(event, listener)\n\t}\n\n\tpublic addChildEventListener<Type extends keyof EntityAccessor.EntityEventListenerMap>(\n\t\tstate: EntityListState,\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: EntityAccessor.EntityEventListenerMap[Type],\n\t) {\n\t\tif (state.childEventListeners === undefined) {\n\t\t\tstate.childEventListeners = new EventListenersStore()\n\t\t}\n\t\treturn state.childEventListeners.add(event, listener)\n\t}\n\n\tpublic batchUpdates(state: EntityListState, performUpdates: EntityListAccessor.BatchUpdatesHandler) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tperformUpdates(state.getAccessor, this.batchUpdatesOptions)\n\t\t})\n\t}\n\n\tpublic connectEntity(outerState: EntityListState, entityToConnect: EntityAccessor) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tconst persistedEntityIds = this.treeStore.getEntityListPersistedIds(outerState)\n\t\t\tconst stateToConnect = OperationsHelpers.resolveAndPrepareEntityToConnect(this.treeStore, entityToConnect)\n\t\t\tconst idToConnect = stateToConnect.entity.id\n\n\t\t\t// TODO disable this at the top-level.\n\t\t\tfor (const state of StateIterator.eachSiblingRealmChild(this.treeStore, outerState)) {\n\t\t\t\tif (state.entityName !== stateToConnect.entity.entityName) {\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`EntityListAccessor.connectEntity: Attempting to connect at an entity of type ` +\n\t\t\t\t\t\t\t`'${stateToConnect.entity.entityName}' but '${state.entityName}' is expected.\\n\\n` +\n\t\t\t\t\t\t\t`Entity located at: ${ErrorLocator.locateInternalState(outerState)}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tMarkerComparator.assertEntityMarkersSubsetOf(\n\t\t\t\t\t\tstate.blueprint.marker.fields,\n\t\t\t\t\t\tgetEntityMarker(stateToConnect).fields,\n\t\t\t\t\t)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (error instanceof LocalizedBindingError) {\n\t\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t\t`Entity list: cannot connect entity with key '${entityToConnect.key}' because its fields are ` +\n\t\t\t\t\t\t\t\t`incompatible with entities found on this list. Make sure both trees are equivalent.\\n\\n` +\n\t\t\t\t\t\t\t\t`${error.message}\\n\\n` +\n\t\t\t\t\t\t\t\t(error.markerPath.length > 1\n\t\t\t\t\t\t\t\t\t? `Incompatibility found at: ${ErrorLocator.locateMarkerPath(error.markerPath)}.\\n\\n`\n\t\t\t\t\t\t\t\t\t: '') +\n\t\t\t\t\t\t\t\t`Entity list located at: ${ErrorLocator.locateInternalState(state)}.`,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tthrow error\n\t\t\t\t}\n\n\t\t\t\tif (state.children.has(idToConnect.value)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tthis.stateInitializer.initializeEntityRealm(idToConnect, state.entityName, {\n\t\t\t\t\ttype: 'listEntity',\n\t\t\t\t\tparent: state,\n\t\t\t\t}, stateToConnect)\n\n\t\t\t\tstate.plannedRemovals?.delete(idToConnect.value)\n\n\t\t\t\tlet changesDelta = 0\n\n\t\t\t\tif (persistedEntityIds.has(idToConnect.value)) {\n\t\t\t\t\t// It was removed from the list but now we're adding it back.\n\t\t\t\t\tchangesDelta--\n\t\t\t\t} else if (idToConnect.existsOnServer) {\n\t\t\t\t\t// ignoring unpersisted entities\n\t\t\t\t\tchangesDelta++\n\t\t\t\t}\n\t\t\t\tif (stateToConnect.type === 'entityRealm') {\n\t\t\t\t\tchangesDelta += stateToConnect.unpersistedChangesCount\n\t\t\t\t}\n\n\t\t\t\tthis.eventManager.registerJustUpdated(state, changesDelta)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic disconnectEntity(listState: EntityListState, childEntity: EntityAccessor, options: {noPersist?: boolean}) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\t// TODO disable this at the top-level.\n\t\t\tconst persistedEntityIds = this.treeStore.getEntityListPersistedIds(listState)\n\t\t\tfor (const state of StateIterator.eachSiblingRealmChild(this.treeStore, listState)) {\n\t\t\t\tconst disconnectedChildIdValue = childEntity.id\n\t\t\t\tconst disconnectedChildRealm = state.children.get(disconnectedChildIdValue)\n\n\t\t\t\tif (disconnectedChildRealm === undefined) {\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`Entity list doesn't include an entity with id '${disconnectedChildIdValue}' and so it cannot remove it.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\tthis.treeStore.disposeOfRealm(disconnectedChildRealm)\n\t\t\t\tlistState.children.delete(disconnectedChildIdValue)\n\n\t\t\t\tlet changesDelta = 0\n\n\t\t\t\tif (persistedEntityIds.has(disconnectedChildIdValue)) {\n\t\t\t\t\tchangesDelta++\n\n\t\t\t\t\tif (state.plannedRemovals === undefined) {\n\t\t\t\t\t\tstate.plannedRemovals = new Map()\n\t\t\t\t\t}\n\t\t\t\t\tif (!options.noPersist) {\n\t\t\t\t\t\tstate.plannedRemovals.set(disconnectedChildIdValue, 'disconnect')\n\t\t\t\t\t}\n\t\t\t\t} else if (disconnectedChildRealm.entity.id.existsOnServer) {\n\t\t\t\t\t// Disconnecting unpersisted entities doesn't constitute a change.\n\n\t\t\t\t\t// It wasn't on the list, then it was, and now we're removing it again.\n\t\t\t\t\tchangesDelta--\n\t\t\t\t}\n\n\t\t\t\tif (disconnectedChildRealm.type === 'entityRealm') {\n\t\t\t\t\t// Undoing whatever changes this child had caused.\n\t\t\t\t\tchangesDelta -= disconnectedChildRealm.unpersistedChangesCount\n\t\t\t\t}\n\n\t\t\t\tthis.eventManager.registerJustUpdated(state, changesDelta)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic createNewEntity(outerState: EntityListState, initialize: EntityAccessor.BatchUpdatesHandler | undefined): RuntimeId {\n\t\treturn this.eventManager.syncOperation((): RuntimeId => {\n\t\t\t// All siblings need to have the same id.\n\t\t\tconst id = new UnpersistedEntityDummyId()\n\n\t\t\tfor (const state of StateIterator.eachSiblingRealmChild(this.treeStore, outerState)) {\n\t\t\t\tconst newEntity = this.stateInitializer.initializeEntityRealm(id, state.entityName, {\n\t\t\t\t\ttype: 'listEntity',\n\t\t\t\t\tparent: state,\n\t\t\t\t})\n\n\t\t\t\tthis.stateInitializer.runImmediateUserInitialization(newEntity, initialize)\n\n\t\t\t\t// The act of creating the entity doesn't constitute a change unless there's something inside to persist.\n\t\t\t\t// TODO forceCreate\n\t\t\t\t// TODO defaultValue\n\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t}\n\t\t\treturn id\n\t\t})\n\t}\n\n\tpublic getChildEntityById(state: EntityListState, id: EntityId) {\n\t\tconst realm = state.children.get(id)\n\t\tif (realm === undefined) {\n\t\t\tconst isRuntimeId = typeof id === 'number' || uuidValidate(id) || UnpersistedEntityDummyId.matchesDummyId(id)\n\t\t\tif (isRuntimeId) {\n\t\t\t\tthrow new BindingError(`EntityList: cannot retrieve an entity with id '${id}' as it is not on the list.`)\n\t\t\t}\n\t\t\tconst looksLikeKey = typeof id === 'string' && (this.treeStore.entityRealmStore.has(id) || RealmKeyGenerator.vaguelyAppearsToBeAKey(id))\n\t\t\tthrow new BindingError(\n\t\t\t\t`EntityList: cannot retrieve an entity with id '${id}' because it's not a valid id.` +\n\t\t\t\t\t(looksLikeKey\n\t\t\t\t\t\t? `\\nThe supplied value appears to be an entity *key*, not an *id*. List accessors are indexed by ids ` +\n\t\t\t\t\t\t `and you can use \\`EntityAccessor.id\\` to obtain one. Keys, on the other hand, are globally unique and ` +\n\t\t\t\t\t\t `you can use \\`getEntityByKey\\` to get its EntityAccessor.`\n\t\t\t\t\t\t: ''),\n\t\t\t)\n\t\t}\n\t\treturn realm.getAccessor()\n\t}\n}\n"],"names":["EventListenersStore","OperationsHelpers","StateIterator","BindingError","ErrorLocator","MarkerComparator","getEntityMarker","LocalizedBindingError","UnpersistedEntityDummyId","EventManager","uuidValidate","RealmKeyGenerator"],"mappings":";;;;;;;;;;;;;;AAeO,MAAM,eAAe;AAAA,EACpB,YACW,sBACA,qBACA,cACA,kBACA,WAChB;AALgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,eAAA;AACA,SAAA,mBAAA;AACA,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,SAAS,WAA4B,OAAwC;AACnF,WAAO,KAAK,qBAAqB,SAAS,WAAW,KAAK;AAAA,EAC3D;AAAA,EAEO,iBACN,OACA,OACA,UACC;AACG,QAAA,MAAM,mBAAmB,QAAW;AACjC,YAAA,iBAAiB,IAAIA,oBAAAA;IAC5B;AACA,WAAO,MAAM,eAAe,IAAI,OAAO,QAAQ;AAAA,EAChD;AAAA,EAEO,sBACN,OACA,OACA,UACC;AACG,QAAA,MAAM,wBAAwB,QAAW;AACtC,YAAA,sBAAsB,IAAIA,oBAAAA;IACjC;AACA,WAAO,MAAM,oBAAoB,IAAI,OAAO,QAAQ;AAAA,EACrD;AAAA,EAEO,aAAa,OAAwB,gBAAwD;AAC9F,SAAA,aAAa,cAAc,MAAM;AACtB,qBAAA,MAAM,aAAa,KAAK,mBAAmB;AAAA,IAAA,CAC1D;AAAA,EACF;AAAA,EAEO,cAAc,YAA6B,iBAAiC;AAC7E,SAAA,aAAa,cAAc,MAAM;AACrC,YAAM,qBAAqB,KAAK,UAAU,0BAA0B,UAAU;AAC9E,YAAM,iBAAiBC,kBAAAA,kBAAkB,iCAAiC,KAAK,WAAW,eAAe;AACnG,YAAA,cAAc,eAAe,OAAO;AAG1C,iBAAW,SAASC,4BAAc,sBAAsB,KAAK,WAAW,UAAU,GAAG;AACpF,YAAI,MAAM,eAAe,eAAe,OAAO,YAAY;AAC1D,gBAAM,IAAIC,aAAA;AAAA,YACT,iFACK,eAAe,OAAO,oBAAoB,MAAM;AAAA;AAAA,qBAC9BC,0BAAa,oBAAoB,UAAU;AAAA,UAAA;AAAA,QAEpE;AAEI,YAAA;AACcC,2BAAAA,iBAAA;AAAA,YAChB,MAAM,UAAU,OAAO;AAAA,YACvBC,gBAAA,gBAAgB,cAAc,EAAE;AAAA,UAAA;AAAA,iBAEzB;AACR,cAAI,iBAAiBC,sBAAAA,uBAAuB;AAC3C,kBAAM,IAAIJ,aAAA;AAAA,cACT,gDAAgD,gBAAgB;AAAA;AAAA,EAE5D,MAAM;AAAA;AAAA,KACR,MAAM,WAAW,SAAS,IACxB,6BAA6BC,aAAAA,aAAa,iBAAiB,MAAM,UAAU;AAAA;AAAA,IAC3E,MACH,2BAA2BA,aAAa,aAAA,oBAAoB,KAAK;AAAA,YAAA;AAAA,UAEpE;AACM,gBAAA;AAAA,QACP;AAEA,YAAI,MAAM,SAAS,IAAI,YAAY,KAAK,GAAG;AAC1C;AAAA,QACD;AAEA,aAAK,iBAAiB,sBAAsB,aAAa,MAAM,YAAY;AAAA,UAC1E,MAAM;AAAA,UACN,QAAQ;AAAA,WACN,cAAc;AAEX,cAAA,iBAAiB,OAAO,YAAY,KAAK;AAE/C,YAAI,eAAe;AAEnB,YAAI,mBAAmB,IAAI,YAAY,KAAK,GAAG;AAE9C;AAAA,QAAA,WACU,YAAY,gBAAgB;AAEtC;AAAA,QACD;AACI,YAAA,eAAe,SAAS,eAAe;AAC1C,0BAAgB,eAAe;AAAA,QAChC;AAEK,aAAA,aAAa,oBAAoB,OAAO,YAAY;AAAA,MAC1D;AAAA,IAAA,CACA;AAAA,EACF;AAAA,EAEO,iBAAiB,WAA4B,aAA6B,SAAgC;AAC3G,SAAA,aAAa,cAAc,MAAM;AAErC,YAAM,qBAAqB,KAAK,UAAU,0BAA0B,SAAS;AAC7E,iBAAW,SAASF,4BAAc,sBAAsB,KAAK,WAAW,SAAS,GAAG;AACnF,cAAM,2BAA2B,YAAY;AAC7C,cAAM,yBAAyB,MAAM,SAAS,IAAI,wBAAwB;AAE1E,YAAI,2BAA2B,QAAW;AACzC,gBAAM,IAAIC,aAAA;AAAA,YACT,kDAAkD;AAAA,UAAA;AAAA,QAEpD;AAEK,aAAA,UAAU,eAAe,sBAAsB;AAC1C,kBAAA,SAAS,OAAO,wBAAwB;AAElD,YAAI,eAAe;AAEf,YAAA,mBAAmB,IAAI,wBAAwB,GAAG;AACrD;AAEI,cAAA,MAAM,oBAAoB,QAAW;AAClC,kBAAA,sCAAsB;UAC7B;AACI,cAAA,CAAC,QAAQ,WAAW;AACjB,kBAAA,gBAAgB,IAAI,0BAA0B,YAAY;AAAA,UACjE;AAAA,QACU,WAAA,uBAAuB,OAAO,GAAG,gBAAgB;AAI3D;AAAA,QACD;AAEI,YAAA,uBAAuB,SAAS,eAAe;AAElD,0BAAgB,uBAAuB;AAAA,QACxC;AAEK,aAAA,aAAa,oBAAoB,OAAO,YAAY;AAAA,MAC1D;AAAA,IAAA,CACA;AAAA,EACF;AAAA,EAEO,gBAAgB,YAA6B,YAAuE;AACnH,WAAA,KAAK,aAAa,cAAc,MAAiB;AAEjD,YAAA,KAAK,IAAIK,UAAAA;AAEf,iBAAW,SAASN,4BAAc,sBAAsB,KAAK,WAAW,UAAU,GAAG;AACpF,cAAM,YAAY,KAAK,iBAAiB,sBAAsB,IAAI,MAAM,YAAY;AAAA,UACnF,MAAM;AAAA,UACN,QAAQ;AAAA,QAAA,CACR;AAEI,aAAA,iBAAiB,+BAA+B,WAAW,UAAU;AAK1E,aAAK,aAAa,oBAAoB,OAAOO,aAAA,aAAa,qBAAqB;AAAA,MAChF;AACO,aAAA;AAAA,IAAA,CACP;AAAA,EACF;AAAA,EAEO,mBAAmB,OAAwB,IAAc;AAC/D,UAAM,QAAQ,MAAM,SAAS,IAAI,EAAE;AACnC,QAAI,UAAU,QAAW;AAClB,YAAA,cAAc,OAAO,OAAO,YAAYC,KAAAA,SAAa,EAAE,KAAKF,UAAyB,yBAAA,eAAe,EAAE;AAC5G,UAAI,aAAa;AACV,cAAA,IAAIL,aAAa,aAAA,kDAAkD,+BAA+B;AAAA,MACzG;AACA,YAAM,eAAe,OAAO,OAAO,aAAa,KAAK,UAAU,iBAAiB,IAAI,EAAE,KAAKQ,kBAAAA,kBAAkB,uBAAuB,EAAE;AACtI,YAAM,IAAIR,aAAA;AAAA,QACT,kDAAkD,sCAChD,eACE;AAAA,oQAGA;AAAA,MAAA;AAAA,IAEN;AACA,WAAO,MAAM;EACd;AACD;;"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const BindingError = require("../../BindingError.cjs");
4
+ const bindingTypes = require("../../bindingTypes.cjs");
5
+ const EventManager = require("../EventManager.cjs");
6
+ const RealmKeyGenerator = require("../RealmKeyGenerator.cjs");
7
+ class OperationsHelpers {
8
+ static rejectInvalidAccessorTree() {
9
+ throw new BindingError.BindingError(
10
+ `The accessor tree does not correspond to the MarkerTree. This should absolutely never happen.`
11
+ );
12
+ }
13
+ static resolveAndPrepareEntityToConnect(treeStore, entityToConnect) {
14
+ const entityToConnectKey = entityToConnect.key;
15
+ const stateToConnect = treeStore.entityRealmStore.get(entityToConnectKey);
16
+ if (stateToConnect === void 0) {
17
+ throw new BindingError.BindingError(`Attempting to connect an entity with key '${entityToConnectKey}' but it doesn't exist.`);
18
+ }
19
+ return stateToConnect;
20
+ }
21
+ static changeEntityId(treeStore, eventManager, stateInitializer, entity, newId) {
22
+ const previousId = entity.id;
23
+ treeStore.entityStore.delete(previousId.uniqueValue);
24
+ treeStore.entityStore.set(newId.uniqueValue, entity);
25
+ let counter = 0;
26
+ for (const realm of entity.realms.values()) {
27
+ this.changeRealmId(treeStore, eventManager, stateInitializer, realm, newId);
28
+ if (++counter === entity.realms.size) {
29
+ break;
30
+ }
31
+ }
32
+ entity.hasIdSetInStone = true;
33
+ entity.id = newId;
34
+ }
35
+ static changeRealmId(treeStore, eventManager, stateInitializer, realm, newId) {
36
+ const oldEntity = realm.entity;
37
+ const oldRealmKey = realm.realmKey;
38
+ const oldId = oldEntity.id;
39
+ const realmBlueprint = realm.blueprint;
40
+ const newEntity = stateInitializer.initializeEntityState(newId, oldEntity.entityName);
41
+ const newRealmKey = RealmKeyGenerator.RealmKeyGenerator.getRealmKey(newId, realmBlueprint);
42
+ realm.realmKey = newRealmKey;
43
+ realm.entity = newEntity;
44
+ newEntity.id = newId;
45
+ oldEntity.realms.delete(oldRealmKey);
46
+ newEntity.realms.set(newRealmKey, realm);
47
+ if (realm.type === "entityRealm") {
48
+ const childIdState = realm.children.get(bindingTypes.PRIMARY_KEY_NAME);
49
+ if (childIdState?.type === "field") {
50
+ childIdState.value = newId.value;
51
+ eventManager.registerJustUpdated(childIdState, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
52
+ }
53
+ this.purgeStaleListenersAfterIdChange(realm);
54
+ }
55
+ if (oldEntity.realms.size === 0) {
56
+ treeStore.disposeOfEntity(oldEntity);
57
+ }
58
+ treeStore.entityRealmStore.delete(oldRealmKey);
59
+ treeStore.entityRealmStore.set(newRealmKey, realm);
60
+ if (realmBlueprint.type === "listEntity") {
61
+ const list = realmBlueprint.parent;
62
+ list.children.changeKey(oldId.value, newId.value);
63
+ } else if (realmBlueprint.type === "hasOne") {
64
+ eventManager.registerUpdatedConnection(realmBlueprint.parent, realmBlueprint.marker.placeholderName);
65
+ }
66
+ const parent = realmBlueprint.parent;
67
+ if (parent) {
68
+ eventManager.registerJustUpdated(parent, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
69
+ }
70
+ if (realm.type === "entityRealm") {
71
+ eventManager.registerJustUpdated(realm, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
72
+ }
73
+ }
74
+ static purgeStaleListenersAfterIdChange(realm) {
75
+ const listeners = realm.eventListeners;
76
+ if (listeners) {
77
+ if (realm.blueprint.parent) {
78
+ listeners.delete({ type: "update" });
79
+ }
80
+ listeners.deleteByType("connectionUpdate");
81
+ }
82
+ }
83
+ }
84
+ exports.OperationsHelpers = OperationsHelpers;
85
+ //# sourceMappingURL=OperationsHelpers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationsHelpers.cjs","sources":["../../../../src/core/operations/OperationsHelpers.ts"],"sourcesContent":["import type { EntityAccessor } from '../../accessors'\nimport type { RuntimeId } from '../../accessorTree'\nimport { BindingError } from '../../BindingError'\nimport { PRIMARY_KEY_NAME } from '../../bindingTypes'\nimport { EventManager } from '../EventManager'\nimport { RealmKeyGenerator } from '../RealmKeyGenerator'\nimport type { EntityRealmState, EntityRealmStateStub, EntityState } from '../state'\nimport type { StateInitializer } from '../StateInitializer'\nimport type { TreeStore } from '../TreeStore'\n\nexport class OperationsHelpers {\n\tpublic static rejectInvalidAccessorTree(): never {\n\t\tthrow new BindingError(\n\t\t\t`The accessor tree does not correspond to the MarkerTree. This should absolutely never happen.`,\n\t\t)\n\t}\n\n\tpublic static resolveAndPrepareEntityToConnect(\n\t\ttreeStore: TreeStore,\n\t\tentityToConnect: EntityAccessor,\n\t): EntityRealmState | EntityRealmStateStub {\n\t\tconst entityToConnectKey = entityToConnect.key\n\t\tconst stateToConnect = treeStore.entityRealmStore.get(entityToConnectKey)\n\n\t\tif (stateToConnect === undefined) {\n\t\t\tthrow new BindingError(`Attempting to connect an entity with key '${entityToConnectKey}' but it doesn't exist.`)\n\t\t}\n\t\t// TODO This is commented out for now in order to at least somewhat mitigate the limitations of dealing with\n\t\t//\t\tinverse relations. However, once that has been addressed systemically, this code needs to be re-enabled.\n\t\t// if (!stateToConnect.entity.id.existsOnServer) {\n\t\t// \tthrow new BindingError(\n\t\t// \t\t`Attempting to connect an entity with key '${stateToConnect.realmKey}' that ` +\n\t\t// \t\t\t`doesn't exist on server. That is currently impossible.`, // At least for now.\n\t\t// \t)\n\t\t// }\n\n\t\t// TODO\n\t\t// if (stateToConnect.entity.isScheduledForDeletion) {\n\t\t// \t// As far as the other realms are concerned, this entity is deleted. We don't want to just make it re-appear\n\t\t// \t// for them just because some other random relation decided to connect it.\n\t\t// \tstateToConnect.entity.realms.clear()\n\t\t// \tstateToConnect.entity.isScheduledForDeletion = false\n\t\t// }\n\n\t\treturn stateToConnect\n\t}\n\n\tpublic static changeEntityId(\n\t\ttreeStore: TreeStore,\n\t\teventManager: EventManager,\n\t\tstateInitializer: StateInitializer,\n\t\tentity: EntityState,\n\t\tnewId: RuntimeId,\n\t) {\n\t\tconst previousId = entity.id\n\n\t\ttreeStore.entityStore.delete(previousId.uniqueValue)\n\t\ttreeStore.entityStore.set(newId.uniqueValue, entity)\n\n\t\tlet counter = 0\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.changeRealmId(treeStore, eventManager, stateInitializer, realm, newId)\n\n\t\t\tif (++counter === entity.realms.size) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tentity.hasIdSetInStone = true\n\t\tentity.id = newId\n\t}\n\n\tpublic static changeRealmId(\n\t\ttreeStore: TreeStore,\n\t\teventManager: EventManager,\n\t\tstateInitializer: StateInitializer,\n\t\trealm: EntityRealmState | EntityRealmStateStub,\n\t\tnewId: RuntimeId,\n\t) {\n\t\tconst oldEntity = realm.entity\n\t\tconst oldRealmKey = realm.realmKey\n\t\tconst oldId = oldEntity.id\n\n\t\tconst realmBlueprint = realm.blueprint\n\n\t\tconst newEntity = stateInitializer.initializeEntityState(newId, oldEntity.entityName)\n\t\tconst newRealmKey = RealmKeyGenerator.getRealmKey(newId, realmBlueprint)\n\n\t\trealm.realmKey = newRealmKey\n\t\trealm.entity = newEntity\n\n\t\t// This may still actually be necessary if we're going from a client to server generated uuid.\n\t\t// They both may have the same value but still be different.\n\t\tnewEntity.id = newId\n\t\toldEntity.realms.delete(oldRealmKey)\n\t\tnewEntity.realms.set(newRealmKey, realm)\n\n\t\tif (realm.type === 'entityRealm') {\n\t\t\tconst childIdState = realm.children.get(PRIMARY_KEY_NAME)\n\t\t\tif (childIdState?.type === 'field') {\n\t\t\t\tchildIdState.value = newId.value\n\t\t\t\teventManager.registerJustUpdated(childIdState, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t}\n\n\t\t\tthis.purgeStaleListenersAfterIdChange(realm)\n\t\t}\n\n\t\tif (oldEntity.realms.size === 0) {\n\t\t\ttreeStore.disposeOfEntity(oldEntity)\n\t\t}\n\n\t\ttreeStore.entityRealmStore.delete(oldRealmKey)\n\t\ttreeStore.entityRealmStore.set(newRealmKey, realm)\n\n\t\tif (realmBlueprint.type === 'listEntity') {\n\t\t\tconst list = realmBlueprint.parent\n\t\t\tlist.children.changeKey(oldId.value, newId.value) // 😎\n\t\t} else if (realmBlueprint.type === 'hasOne') {\n\t\t\teventManager.registerUpdatedConnection(realmBlueprint.parent, realmBlueprint.marker.placeholderName)\n\t\t}\n\t\tconst parent = realmBlueprint.parent\n\t\tif (parent) {\n\t\t\teventManager.registerJustUpdated(parent, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t}\n\t\tif (realm.type === 'entityRealm') {\n\t\t\teventManager.registerJustUpdated(realm, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t}\n\t}\n\n\tpublic static purgeStaleListenersAfterIdChange(realm: EntityRealmState) {\n\t\t// Version 1.\n\t\t// The listeners subscribed to a particular entity key so we no longer want to call these.\n\t\t// The only positionally associated listeners are in the blueprint so we re-initialize those.\n\t\t//realm.eventListeners = stateInitializer.initializeEntityEventListenerStore(realmBlueprint)\n\n\t\t// Version 2.\n\t\t// This is version two of this terrible hack. We want to preserve e.g. persistSuccess handlers.\n\n\t\t// Version 3.\n\t\t// The saga continues. We add a condition to exempt top-level realms. That way they can start\n\t\t// propagating changes from the top.\n\t\tconst listeners = realm.eventListeners\n\t\tif (listeners) {\n\t\t\tif (realm.blueprint.parent) {\n\t\t\t\tlisteners.delete({ type: 'update' })\n\t\t\t}\n\t\t\tlisteners.deleteByType('connectionUpdate')\n\t\t}\n\t}\n}\n"],"names":["BindingError","RealmKeyGenerator","PRIMARY_KEY_NAME","EventManager"],"mappings":";;;;;;AAUO,MAAM,kBAAkB;AAAA,EAC9B,OAAc,4BAAmC;AAChD,UAAM,IAAIA,aAAA;AAAA,MACT;AAAA,IAAA;AAAA,EAEF;AAAA,EAEA,OAAc,iCACb,WACA,iBAC0C;AAC1C,UAAM,qBAAqB,gBAAgB;AAC3C,UAAM,iBAAiB,UAAU,iBAAiB,IAAI,kBAAkB;AAExE,QAAI,mBAAmB,QAAW;AAC3B,YAAA,IAAIA,aAAa,aAAA,6CAA6C,2CAA2C;AAAA,IAChH;AAkBO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,eACb,WACA,cACA,kBACA,QACA,OACC;AACD,UAAM,aAAa,OAAO;AAEhB,cAAA,YAAY,OAAO,WAAW,WAAW;AACnD,cAAU,YAAY,IAAI,MAAM,aAAa,MAAM;AAEnD,QAAI,UAAU;AACd,eAAW,SAAS,OAAO,OAAO,OAAA,GAAU;AAC3C,WAAK,cAAc,WAAW,cAAc,kBAAkB,OAAO,KAAK;AAE1E,UAAI,EAAE,YAAY,OAAO,OAAO,MAAM;AACrC;AAAA,MACD;AAAA,IACD;AAEA,WAAO,kBAAkB;AACzB,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,OAAc,cACb,WACA,cACA,kBACA,OACA,OACC;AACD,UAAM,YAAY,MAAM;AACxB,UAAM,cAAc,MAAM;AAC1B,UAAM,QAAQ,UAAU;AAExB,UAAM,iBAAiB,MAAM;AAE7B,UAAM,YAAY,iBAAiB,sBAAsB,OAAO,UAAU,UAAU;AACpF,UAAM,cAAcC,kBAAA,kBAAkB,YAAY,OAAO,cAAc;AAEvE,UAAM,WAAW;AACjB,UAAM,SAAS;AAIf,cAAU,KAAK;AACL,cAAA,OAAO,OAAO,WAAW;AACzB,cAAA,OAAO,IAAI,aAAa,KAAK;AAEnC,QAAA,MAAM,SAAS,eAAe;AACjC,YAAM,eAAe,MAAM,SAAS,IAAIC,aAAgB,gBAAA;AACpD,UAAA,cAAc,SAAS,SAAS;AACnC,qBAAa,QAAQ,MAAM;AACd,qBAAA,oBAAoB,cAAcC,aAAA,aAAa,qBAAqB;AAAA,MAClF;AAEA,WAAK,iCAAiC,KAAK;AAAA,IAC5C;AAEI,QAAA,UAAU,OAAO,SAAS,GAAG;AAChC,gBAAU,gBAAgB,SAAS;AAAA,IACpC;AAEU,cAAA,iBAAiB,OAAO,WAAW;AACnC,cAAA,iBAAiB,IAAI,aAAa,KAAK;AAE7C,QAAA,eAAe,SAAS,cAAc;AACzC,YAAM,OAAO,eAAe;AAC5B,WAAK,SAAS,UAAU,MAAM,OAAO,MAAM,KAAK;AAAA,IAAA,WACtC,eAAe,SAAS,UAAU;AAC5C,mBAAa,0BAA0B,eAAe,QAAQ,eAAe,OAAO,eAAe;AAAA,IACpG;AACA,UAAM,SAAS,eAAe;AAC9B,QAAI,QAAQ;AACE,mBAAA,oBAAoB,QAAQA,aAAA,aAAa,qBAAqB;AAAA,IAC5E;AACI,QAAA,MAAM,SAAS,eAAe;AACpB,mBAAA,oBAAoB,OAAOA,aAAA,aAAa,qBAAqB;AAAA,IAC3E;AAAA,EACD;AAAA,EAEA,OAAc,iCAAiC,OAAyB;AAYvE,UAAM,YAAY,MAAM;AACxB,QAAI,WAAW;AACV,UAAA,MAAM,UAAU,QAAQ;AAC3B,kBAAU,OAAO,EAAE,MAAM,SAAU,CAAA;AAAA,MACpC;AACA,gBAAU,aAAa,kBAAkB;AAAA,IAC1C;AAAA,EACD;AACD;;"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class MutationAlias {
4
+ static encodeEntityId(entityId) {
5
+ return `_${String(entityId.value).replace(/-/g, "_")}`;
6
+ }
7
+ static decodeEntityId(alias) {
8
+ const stringId = `${alias.substring(1).replace(/_/g, "-")}`;
9
+ const intId = parseInt(stringId);
10
+ return intId.toString() === stringId ? intId : stringId;
11
+ }
12
+ }
13
+ exports.MutationAlias = MutationAlias;
14
+ //# sourceMappingURL=MutationAlias.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutationAlias.cjs","sources":["../../../../src/core/requestAliases/MutationAlias.ts"],"sourcesContent":["import type { RuntimeId } from '../../accessorTree'\n\nexport class MutationAlias {\n\tpublic static encodeEntityId(entityId: RuntimeId): string {\n\t\treturn `_${String(entityId.value).replace(/-/g, '_')}`\n\t}\n\n\tpublic static decodeEntityId(alias: string): RuntimeId['value'] {\n\t\tconst stringId = `${alias.substring(1).replace(/_/g, '-')}`\n\t\tconst intId = parseInt(stringId)\n\t\treturn intId.toString() === stringId ? intId : stringId\n\t}\n}\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc;AAAA,EAC1B,OAAc,eAAe,UAA6B;AACzD,WAAO,IAAI,OAAO,SAAS,KAAK,EAAE,QAAQ,MAAM,GAAG;AAAA,EACpD;AAAA,EAEA,OAAc,eAAe,OAAmC;AACzD,UAAA,WAAW,GAAG,MAAM,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG;AAClD,UAAA,QAAQ,SAAS,QAAQ;AAC/B,WAAO,MAAM,SAAA,MAAe,WAAW,QAAQ;AAAA,EAChD;AACD;;"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const BindingError = require("../../BindingError.cjs");
4
+ class Schema {
5
+ constructor(store) {
6
+ this.store = store;
7
+ }
8
+ getEnumValues(enumName) {
9
+ return Array.from(this.store.enums.get(enumName) ?? this.throwError(`Missing schema for enum ${enumName}`));
10
+ }
11
+ getEntityOrUndefined(entityName) {
12
+ return this.store.entities.get(entityName);
13
+ }
14
+ getEntityNames() {
15
+ return Array.from(this.store.entities.keys());
16
+ }
17
+ getEntity(entityName) {
18
+ return this.getEntityOrUndefined(entityName) ?? this.throwError(`Missing schema for entity ${entityName}`);
19
+ }
20
+ getEntityFieldOrUndefined(entityName, fieldName) {
21
+ return this.store.entities.get(entityName)?.fields.get(fieldName);
22
+ }
23
+ getEntityField(entityName, fieldName) {
24
+ return this.getEntityFieldOrUndefined(entityName, fieldName) ?? this.throwError(`Missing schema for field ${entityName}.${fieldName}`);
25
+ }
26
+ getEntityColumn(entityName, fieldName) {
27
+ const field = this.getEntityField(entityName, fieldName);
28
+ return field.__typename === "_Column" ? field : this.throwError(`Field ${entityName}.${fieldName} is not of type column`);
29
+ }
30
+ getEntityRelation(entityName, fieldName) {
31
+ const field = this.getEntityField(entityName, fieldName);
32
+ return field.__typename === "_Relation" ? field : this.throwError(`Field ${entityName}.${fieldName} is not of type relation`);
33
+ }
34
+ throwError(message) {
35
+ throw new BindingError.BindingError(message);
36
+ }
37
+ }
38
+ exports.Schema = Schema;
39
+ //# sourceMappingURL=Schema.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.cjs","sources":["../../../../src/core/schema/Schema.ts"],"sourcesContent":["import type { EntityName, FieldName } from '../../treeParameters'\nimport { BindingError } from '../../BindingError'\nimport type { SchemaField } from './SchemaField'\nimport type { SchemaStore } from './SchemaStore'\nimport { SchemaEntity } from './SchemaEntity'\nimport { SchemaColumn } from './SchemaColumn'\nimport { SchemaRelation } from './SchemaRelation'\nimport { SchemaEnumName } from './SchemaEnums'\n\nexport class Schema {\n\tpublic constructor(private readonly store: SchemaStore) {}\n\n\tpublic getEnumValues(enumName: SchemaEnumName): string[] {\n\t\treturn Array.from(this.store.enums.get(enumName) ?? this.throwError(`Missing schema for enum ${enumName}`))\n\t}\n\n\tpublic getEntityOrUndefined(entityName: EntityName): SchemaEntity | undefined {\n\t\treturn this.store.entities.get(entityName)\n\t}\n\n\tpublic getEntityNames(): string[] {\n\t\treturn Array.from(this.store.entities.keys())\n\t}\n\n\tpublic getEntity(entityName: EntityName): SchemaEntity {\n\t\treturn this.getEntityOrUndefined(entityName) ?? this.throwError(`Missing schema for entity ${entityName}`)\n\t}\n\n\tpublic getEntityFieldOrUndefined(entityName: EntityName, fieldName: FieldName): SchemaField | undefined {\n\t\treturn this.store.entities.get(entityName)?.fields.get(fieldName)\n\t}\n\n\tpublic getEntityField(entityName: EntityName, fieldName: FieldName): SchemaField {\n\t\treturn this.getEntityFieldOrUndefined(entityName, fieldName) ?? this.throwError(`Missing schema for field ${entityName}.${fieldName}`)\n\t}\n\n\tpublic getEntityColumn(entityName: EntityName, fieldName: FieldName): SchemaColumn {\n\t\tconst field = this.getEntityField(entityName, fieldName)\n\t\treturn field.__typename === '_Column' ? field : this.throwError(`Field ${entityName}.${fieldName} is not of type column`)\n\t}\n\n\tpublic getEntityRelation(entityName: EntityName, fieldName: FieldName): SchemaRelation {\n\t\tconst field = this.getEntityField(entityName, fieldName)\n\t\treturn field.__typename === '_Relation' ? field : this.throwError(`Field ${entityName}.${fieldName} is not of type relation`)\n\t}\n\n\tprivate throwError(message: string): never {\n\t\tthrow new BindingError(message)\n\t}\n}\n"],"names":["BindingError"],"mappings":";;;AASO,MAAM,OAAO;AAAA,EACZ,YAA6B,OAAoB;AAApB,SAAA,QAAA;AAAA,EAAqB;AAAA,EAElD,cAAc,UAAoC;AACxD,WAAO,MAAM,KAAK,KAAK,MAAM,MAAM,IAAI,QAAQ,KAAK,KAAK,WAAW,2BAA2B,UAAU,CAAC;AAAA,EAC3G;AAAA,EAEO,qBAAqB,YAAkD;AAC7E,WAAO,KAAK,MAAM,SAAS,IAAI,UAAU;AAAA,EAC1C;AAAA,EAEO,iBAA2B;AACjC,WAAO,MAAM,KAAK,KAAK,MAAM,SAAS,MAAM;AAAA,EAC7C;AAAA,EAEO,UAAU,YAAsC;AACtD,WAAO,KAAK,qBAAqB,UAAU,KAAK,KAAK,WAAW,6BAA6B,YAAY;AAAA,EAC1G;AAAA,EAEO,0BAA0B,YAAwB,WAA+C;AAChG,WAAA,KAAK,MAAM,SAAS,IAAI,UAAU,GAAG,OAAO,IAAI,SAAS;AAAA,EACjE;AAAA,EAEO,eAAe,YAAwB,WAAmC;AACzE,WAAA,KAAK,0BAA0B,YAAY,SAAS,KAAK,KAAK,WAAW,4BAA4B,cAAc,WAAW;AAAA,EACtI;AAAA,EAEO,gBAAgB,YAAwB,WAAoC;AAClF,UAAM,QAAQ,KAAK,eAAe,YAAY,SAAS;AAChD,WAAA,MAAM,eAAe,YAAY,QAAQ,KAAK,WAAW,SAAS,cAAc,iCAAiC;AAAA,EACzH;AAAA,EAEO,kBAAkB,YAAwB,WAAsC;AACtF,UAAM,QAAQ,KAAK,eAAe,YAAY,SAAS;AAChD,WAAA,MAAM,eAAe,cAAc,QAAQ,KAAK,WAAW,SAAS,cAAc,mCAAmC;AAAA,EAC7H;AAAA,EAEQ,WAAW,SAAwB;AACpC,UAAA,IAAIA,aAAAA,aAAa,OAAO;AAAA,EAC/B;AACD;;"}
@@ -0,0 +1,28 @@
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 Schema = require("./Schema.cjs");
10
+ const SchemaPreprocessor = require("./SchemaPreprocessor.cjs");
11
+ class SchemaLoader {
12
+ static async loadSchema(client, options) {
13
+ const existing = this.schemaLoadCache.get(client.apiUrl);
14
+ if (existing !== void 0) {
15
+ return existing;
16
+ }
17
+ const schemaPromise = (async () => {
18
+ const raw = await client.execute(this.schemaQuery, options);
19
+ return new Schema.Schema(SchemaPreprocessor.SchemaPreprocessor.processRawSchema(raw.schema));
20
+ })();
21
+ this.schemaLoadCache.set(client.apiUrl, schemaPromise);
22
+ return await schemaPromise;
23
+ }
24
+ }
25
+ __publicField(SchemaLoader, "schemaLoadCache", /* @__PURE__ */ new Map());
26
+ __publicField(SchemaLoader, "schemaQuery", "query {\n schema {\n enums {\n name\n values\n }\n entities {\n name\n customPrimaryAllowed\n unique {\n fields\n }\n fields {\n __typename\n name\n type\n nullable\n ... on _Column {\n enumName\n defaultValue\n }\n ... on _Relation {\n side\n targetEntity\n ownedBy\n inversedBy\n onDelete\n orphanRemoval\n orderBy {\n path\n direction\n }\n }\n }\n }\n }\n}");
27
+ exports.SchemaLoader = SchemaLoader;
28
+ //# sourceMappingURL=SchemaLoader.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaLoader.cjs","sources":["../../../../src/core/schema/SchemaLoader.ts"],"sourcesContent":["import type { GraphQlClient, GraphQlClientRequestOptions } from '@contember/client'\nimport type { RawSchema } from './RawSchema'\nimport { Schema } from './Schema'\nimport { SchemaPreprocessor } from './SchemaPreprocessor'\n\nexport class SchemaLoader {\n\tprivate static readonly schemaLoadCache: Map<string, Promise<Schema>> = new Map()\n\n\tprivate static readonly schemaQuery =\n\t\t'query {\\n' +\n\t\t' schema {\\n' +\n\t\t' enums {\\n' +\n\t\t' name\\n' +\n\t\t' values\\n' +\n\t\t' }\\n' +\n\t\t' entities {\\n' +\n\t\t' name\\n' +\n\t\t' customPrimaryAllowed\\n' +\n\t\t' unique {\\n' +\n\t\t' fields\\n' +\n\t\t' }\\n' +\n\t\t' fields {\\n' +\n\t\t' __typename\\n' +\n\t\t' name\\n' +\n\t\t' type\\n' +\n\t\t' nullable\\n' +\n\t\t' ... on _Column {\\n' +\n\t\t' enumName\\n' +\n\t\t' defaultValue\\n' +\n\t\t' }\\n' +\n\t\t' ... on _Relation {\\n' +\n\t\t' side\\n' +\n\t\t' targetEntity\\n' +\n\t\t' ownedBy\\n' +\n\t\t' inversedBy\\n' +\n\t\t' onDelete\\n' +\n\t\t' orphanRemoval\\n' +\n\t\t' orderBy {\\n' +\n\t\t' path\\n' +\n\t\t' direction\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t'}'\n\n\tpublic static async loadSchema(\n\t\tclient: GraphQlClient,\n\t\toptions?: GraphQlClientRequestOptions,\n\t): Promise<Schema> {\n\n\t\tconst existing = this.schemaLoadCache.get(client.apiUrl)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\t\tconst schemaPromise = (async () => {\n\t\t\tconst raw = await client.execute<{ schema: RawSchema }>(this.schemaQuery, options)\n\t\t\treturn new Schema(SchemaPreprocessor.processRawSchema(raw.schema))\n\t\t})()\n\t\tthis.schemaLoadCache.set(client.apiUrl, schemaPromise)\n\t\treturn await schemaPromise\n\t}\n}\n"],"names":["Schema","SchemaPreprocessor"],"mappings":";;;;;;;;;;AAKO,MAAM,aAAa;AAAA,EA0CzB,aAAoB,WACnB,QACA,SACkB;AAElB,UAAM,WAAW,KAAK,gBAAgB,IAAI,OAAO,MAAM;AACvD,QAAI,aAAa,QAAW;AACpB,aAAA;AAAA,IACR;AACA,UAAM,iBAAiB,YAAY;AAClC,YAAM,MAAM,MAAM,OAAO,QAA+B,KAAK,aAAa,OAAO;AACjF,aAAO,IAAIA,OAAO,OAAAC,mBAAA,mBAAmB,iBAAiB,IAAI,MAAM,CAAC;AAAA,IAAA;AAElE,SAAK,gBAAgB,IAAI,OAAO,QAAQ,aAAa;AACrD,WAAO,MAAM;AAAA,EACd;AACD;AAzDC,cADY,cACY,mBAAgD,oBAAI;AAE5E,cAHY,cAGY,eACvB;;"}
@@ -13,8 +13,8 @@ class SchemaLoader {
13
13
  return existing;
14
14
  }
15
15
  const schemaPromise = (async () => {
16
- const raw = await client.sendRequest(this.schemaQuery, options);
17
- return new Schema(SchemaPreprocessor.processRawSchema(raw.data.schema));
16
+ const raw = await client.execute(this.schemaQuery, options);
17
+ return new Schema(SchemaPreprocessor.processRawSchema(raw.schema));
18
18
  })();
19
19
  this.schemaLoadCache.set(client.apiUrl, schemaPromise);
20
20
  return await schemaPromise;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaLoader.js","sources":["../../../../src/core/schema/SchemaLoader.ts"],"sourcesContent":["import type { GraphQlClient, GraphQlClientRequestOptions } from '@contember/client'\nimport type { RawSchema } from './RawSchema'\nimport { Schema } from './Schema'\nimport { SchemaPreprocessor } from './SchemaPreprocessor'\n\nexport class SchemaLoader {\n\tprivate static readonly schemaLoadCache: Map<string, Promise<Schema>> = new Map()\n\n\tprivate static readonly schemaQuery =\n\t\t'query {\\n' +\n\t\t' schema {\\n' +\n\t\t' enums {\\n' +\n\t\t' name\\n' +\n\t\t' values\\n' +\n\t\t' }\\n' +\n\t\t' entities {\\n' +\n\t\t' name\\n' +\n\t\t' customPrimaryAllowed\\n' +\n\t\t' unique {\\n' +\n\t\t' fields\\n' +\n\t\t' }\\n' +\n\t\t' fields {\\n' +\n\t\t' __typename\\n' +\n\t\t' name\\n' +\n\t\t' type\\n' +\n\t\t' nullable\\n' +\n\t\t' ... on _Column {\\n' +\n\t\t' enumName\\n' +\n\t\t' defaultValue\\n' +\n\t\t' }\\n' +\n\t\t' ... on _Relation {\\n' +\n\t\t' side\\n' +\n\t\t' targetEntity\\n' +\n\t\t' ownedBy\\n' +\n\t\t' inversedBy\\n' +\n\t\t' onDelete\\n' +\n\t\t' orphanRemoval\\n' +\n\t\t' orderBy {\\n' +\n\t\t' path\\n' +\n\t\t' direction\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t'}'\n\n\tpublic static async loadSchema(\n\t\tclient: GraphQlClient,\n\t\toptions?: GraphQlClientRequestOptions,\n\t): Promise<Schema> {\n\n\t\tconst existing = this.schemaLoadCache.get(client.apiUrl)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\t\tconst schemaPromise = (async () => {\n\t\t\tconst raw: { data: { schema: RawSchema } } = await client.sendRequest(this.schemaQuery, options)\n\t\t\treturn new Schema(SchemaPreprocessor.processRawSchema(raw.data.schema))\n\t\t})()\n\t\tthis.schemaLoadCache.set(client.apiUrl, schemaPromise)\n\t\treturn await schemaPromise\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;AAKO,MAAM,aAAa;AAAA,EA0CzB,aAAoB,WACnB,QACA,SACkB;AAElB,UAAM,WAAW,KAAK,gBAAgB,IAAI,OAAO,MAAM;AACvD,QAAI,aAAa,QAAW;AACpB,aAAA;AAAA,IACR;AACA,UAAM,iBAAiB,YAAY;AAClC,YAAM,MAAuC,MAAM,OAAO,YAAY,KAAK,aAAa,OAAO;AAC/F,aAAO,IAAI,OAAO,mBAAmB,iBAAiB,IAAI,KAAK,MAAM,CAAC;AAAA,IAAA;AAEvE,SAAK,gBAAgB,IAAI,OAAO,QAAQ,aAAa;AACrD,WAAO,MAAM;AAAA,EACd;AACD;AAzDC,cADY,cACY,mBAAgD,oBAAI;AAE5E,cAHY,cAGY,eACvB;"}
1
+ {"version":3,"file":"SchemaLoader.js","sources":["../../../../src/core/schema/SchemaLoader.ts"],"sourcesContent":["import type { GraphQlClient, GraphQlClientRequestOptions } from '@contember/client'\nimport type { RawSchema } from './RawSchema'\nimport { Schema } from './Schema'\nimport { SchemaPreprocessor } from './SchemaPreprocessor'\n\nexport class SchemaLoader {\n\tprivate static readonly schemaLoadCache: Map<string, Promise<Schema>> = new Map()\n\n\tprivate static readonly schemaQuery =\n\t\t'query {\\n' +\n\t\t' schema {\\n' +\n\t\t' enums {\\n' +\n\t\t' name\\n' +\n\t\t' values\\n' +\n\t\t' }\\n' +\n\t\t' entities {\\n' +\n\t\t' name\\n' +\n\t\t' customPrimaryAllowed\\n' +\n\t\t' unique {\\n' +\n\t\t' fields\\n' +\n\t\t' }\\n' +\n\t\t' fields {\\n' +\n\t\t' __typename\\n' +\n\t\t' name\\n' +\n\t\t' type\\n' +\n\t\t' nullable\\n' +\n\t\t' ... on _Column {\\n' +\n\t\t' enumName\\n' +\n\t\t' defaultValue\\n' +\n\t\t' }\\n' +\n\t\t' ... on _Relation {\\n' +\n\t\t' side\\n' +\n\t\t' targetEntity\\n' +\n\t\t' ownedBy\\n' +\n\t\t' inversedBy\\n' +\n\t\t' onDelete\\n' +\n\t\t' orphanRemoval\\n' +\n\t\t' orderBy {\\n' +\n\t\t' path\\n' +\n\t\t' direction\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t' }\\n' +\n\t\t'}'\n\n\tpublic static async loadSchema(\n\t\tclient: GraphQlClient,\n\t\toptions?: GraphQlClientRequestOptions,\n\t): Promise<Schema> {\n\n\t\tconst existing = this.schemaLoadCache.get(client.apiUrl)\n\t\tif (existing !== undefined) {\n\t\t\treturn existing\n\t\t}\n\t\tconst schemaPromise = (async () => {\n\t\t\tconst raw = await client.execute<{ schema: RawSchema }>(this.schemaQuery, options)\n\t\t\treturn new Schema(SchemaPreprocessor.processRawSchema(raw.schema))\n\t\t})()\n\t\tthis.schemaLoadCache.set(client.apiUrl, schemaPromise)\n\t\treturn await schemaPromise\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;AAKO,MAAM,aAAa;AAAA,EA0CzB,aAAoB,WACnB,QACA,SACkB;AAElB,UAAM,WAAW,KAAK,gBAAgB,IAAI,OAAO,MAAM;AACvD,QAAI,aAAa,QAAW;AACpB,aAAA;AAAA,IACR;AACA,UAAM,iBAAiB,YAAY;AAClC,YAAM,MAAM,MAAM,OAAO,QAA+B,KAAK,aAAa,OAAO;AACjF,aAAO,IAAI,OAAO,mBAAmB,iBAAiB,IAAI,MAAM,CAAC;AAAA,IAAA;AAElE,SAAK,gBAAgB,IAAI,OAAO,QAAQ,aAAa;AACrD,WAAO,MAAM;AAAA,EACd;AACD;AAzDC,cADY,cACY,mBAAgD,oBAAI;AAE5E,cAHY,cAGY,eACvB;"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class SchemaPreprocessor {
4
+ static processRawSchema(rawSchema) {
5
+ return {
6
+ enums: this.processRawEnums(rawSchema.enums),
7
+ entities: this.processRawEntities(rawSchema.entities)
8
+ };
9
+ }
10
+ static processRawEnums(rawEnums) {
11
+ const enums = /* @__PURE__ */ new Map();
12
+ for (const { name, values } of rawEnums) {
13
+ enums.set(name, new Set(values));
14
+ }
15
+ return enums;
16
+ }
17
+ static processRawEntities(rawEntities) {
18
+ const entities = /* @__PURE__ */ new Map();
19
+ for (const entity of rawEntities) {
20
+ entities.set(entity.name, {
21
+ customPrimaryAllowed: entity.customPrimaryAllowed,
22
+ fields: this.processRawFields(entity.fields),
23
+ name: entity.name,
24
+ unique: entity.unique.map((it) => ({ fields: new Set(it.fields) }))
25
+ });
26
+ }
27
+ return entities;
28
+ }
29
+ static processRawFields(rawFields) {
30
+ const fields = /* @__PURE__ */ new Map();
31
+ for (const field of rawFields) {
32
+ fields.set(field.name, field);
33
+ }
34
+ return fields;
35
+ }
36
+ }
37
+ exports.SchemaPreprocessor = SchemaPreprocessor;
38
+ //# sourceMappingURL=SchemaPreprocessor.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaPreprocessor.cjs","sources":["../../../../src/core/schema/SchemaPreprocessor.ts"],"sourcesContent":["import type { RawSchema } from './RawSchema'\nimport type { RawSchemaEntity, RawSchemaFields } from './RawSchemaEntity'\nimport type { RawSchemaEnum } from './RawSchemaEnum'\nimport type { SchemaEntities } from './SchemaEntities'\nimport type { SchemaEnums } from './SchemaEnums'\nimport type { SchemaFields } from './SchemaFields'\nimport type { SchemaStore } from './SchemaStore'\n\nexport class SchemaPreprocessor {\n\tpublic static processRawSchema(rawSchema: RawSchema): SchemaStore {\n\t\treturn {\n\t\t\tenums: this.processRawEnums(rawSchema.enums),\n\t\t\tentities: this.processRawEntities(rawSchema.entities),\n\t\t}\n\t}\n\n\tprivate static processRawEnums(rawEnums: RawSchemaEnum[]): SchemaEnums {\n\t\tconst enums: SchemaEnums = new Map()\n\n\t\tfor (const { name, values } of rawEnums) {\n\t\t\tenums.set(name, new Set(values))\n\t\t}\n\n\t\treturn enums\n\t}\n\n\tprivate static processRawEntities(rawEntities: RawSchemaEntity[]): SchemaEntities {\n\t\tconst entities: SchemaEntities = new Map()\n\n\t\tfor (const entity of rawEntities) {\n\t\t\tentities.set(entity.name, {\n\t\t\t\tcustomPrimaryAllowed: entity.customPrimaryAllowed,\n\t\t\t\tfields: this.processRawFields(entity.fields),\n\t\t\t\tname: entity.name,\n\t\t\t\tunique: entity.unique.map(it => ({ fields: new Set(it.fields) })),\n\t\t\t})\n\t\t}\n\n\t\treturn entities\n\t}\n\n\tprivate static processRawFields(rawFields: RawSchemaFields): SchemaFields {\n\t\tconst fields: SchemaFields = new Map()\n\n\t\tfor (const field of rawFields) {\n\t\t\tfields.set(field.name, field)\n\t\t}\n\n\t\treturn fields\n\t}\n}\n"],"names":[],"mappings":";;AAQO,MAAM,mBAAmB;AAAA,EAC/B,OAAc,iBAAiB,WAAmC;AAC1D,WAAA;AAAA,MACN,OAAO,KAAK,gBAAgB,UAAU,KAAK;AAAA,MAC3C,UAAU,KAAK,mBAAmB,UAAU,QAAQ;AAAA,IAAA;AAAA,EAEtD;AAAA,EAEA,OAAe,gBAAgB,UAAwC;AAChE,UAAA,4BAAyB;AAE/B,eAAW,EAAE,MAAM,OAAO,KAAK,UAAU;AACxC,YAAM,IAAI,MAAM,IAAI,IAAI,MAAM,CAAC;AAAA,IAChC;AAEO,WAAA;AAAA,EACR;AAAA,EAEA,OAAe,mBAAmB,aAAgD;AAC3E,UAAA,+BAA+B;AAErC,eAAW,UAAU,aAAa;AACxB,eAAA,IAAI,OAAO,MAAM;AAAA,QACzB,sBAAsB,OAAO;AAAA,QAC7B,QAAQ,KAAK,iBAAiB,OAAO,MAAM;AAAA,QAC3C,MAAM,OAAO;AAAA,QACb,QAAQ,OAAO,OAAO,IAAI,CAAO,QAAA,EAAE,QAAQ,IAAI,IAAI,GAAG,MAAM,EAAI,EAAA;AAAA,MAAA,CAChE;AAAA,IACF;AAEO,WAAA;AAAA,EACR;AAAA,EAEA,OAAe,iBAAiB,WAA0C;AACnE,UAAA,6BAA2B;AAEjC,eAAW,SAAS,WAAW;AACvB,aAAA,IAAI,MAAM,MAAM,KAAK;AAAA,IAC7B;AAEO,WAAA;AAAA,EACR;AACD;;"}