@contember/binding 2.0.0-alpha.6 → 2.0.0-alpha.8
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.
- package/api-extractor.json +3 -0
- package/dist/development/index.cjs +49 -49
- package/dist/development/index.js +49 -49
- package/dist/development/src/BindingError.cjs.map +1 -0
- package/dist/development/src/BindingError.js.map +1 -0
- package/dist/development/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
- package/dist/development/src/accessorTree/NormalizedPersistedData.js.map +1 -0
- package/dist/development/src/accessorTree/RuntimeId.cjs +61 -0
- package/dist/development/src/accessorTree/RuntimeId.cjs.map +1 -0
- package/dist/development/src/accessorTree/RuntimeId.js +61 -0
- package/dist/development/src/accessorTree/RuntimeId.js.map +1 -0
- package/dist/development/src/accessors/EntityAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/EntityAccessor.js.map +1 -0
- package/dist/development/src/accessors/EntityListAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/EntityListAccessor.js.map +1 -0
- package/dist/development/src/accessors/ErrorAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/ErrorAccessor.js.map +1 -0
- package/dist/development/src/accessors/FieldAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/FieldAccessor.js.map +1 -0
- package/dist/development/src/accessors/TreeRootAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/TreeRootAccessor.js.map +1 -0
- package/dist/development/src/bindingTypes.cjs.map +1 -0
- package/dist/development/src/bindingTypes.js.map +1 -0
- package/dist/development/src/core/AccessorErrorManager.cjs +204 -0
- package/dist/development/src/core/AccessorErrorManager.cjs.map +1 -0
- package/dist/development/src/core/AccessorErrorManager.js +204 -0
- package/dist/development/src/core/AccessorErrorManager.js.map +1 -0
- package/dist/development/src/core/Config.cjs +29 -0
- package/dist/development/src/core/Config.cjs.map +1 -0
- package/dist/development/src/core/Config.js +29 -0
- package/dist/development/src/core/Config.js.map +1 -0
- package/dist/development/src/core/DataBinding.cjs +348 -0
- package/dist/development/src/core/DataBinding.cjs.map +1 -0
- package/dist/development/src/core/DataBinding.js +348 -0
- package/dist/development/src/core/DataBinding.js.map +1 -0
- package/dist/development/src/core/DirtinessTracker.cjs +26 -0
- package/dist/development/src/core/DirtinessTracker.cjs.map +1 -0
- package/dist/development/src/core/DirtinessTracker.js +26 -0
- package/dist/development/src/core/DirtinessTracker.js.map +1 -0
- package/dist/development/src/core/ErrorsPreprocessor.cjs +180 -0
- package/dist/development/src/core/ErrorsPreprocessor.cjs.map +1 -0
- package/dist/development/src/core/ErrorsPreprocessor.js +180 -0
- package/dist/development/src/core/ErrorsPreprocessor.js.map +1 -0
- package/dist/development/src/core/EventManager.cjs +434 -0
- package/dist/development/src/core/EventManager.cjs.map +1 -0
- package/dist/development/src/core/EventManager.js +434 -0
- package/dist/development/src/core/EventManager.js.map +1 -0
- package/dist/development/src/core/MarkerComparator.cjs.map +1 -0
- package/dist/development/src/core/MarkerComparator.js.map +1 -0
- package/dist/development/src/core/MarkerMerger.cjs +256 -0
- package/dist/development/src/core/MarkerMerger.cjs.map +1 -0
- package/dist/development/src/core/MarkerMerger.js +256 -0
- package/dist/development/src/core/MarkerMerger.js.map +1 -0
- package/dist/development/src/core/MutationGenerator.cjs +662 -0
- package/dist/development/src/core/MutationGenerator.cjs.map +1 -0
- package/dist/development/src/core/MutationGenerator.js +662 -0
- package/dist/development/src/core/MutationGenerator.js.map +1 -0
- package/dist/development/src/core/QueryGenerator.cjs.map +1 -0
- package/dist/development/src/core/QueryGenerator.js.map +1 -0
- package/dist/development/src/core/RealmKeyGenerator.cjs +42 -0
- package/dist/development/src/core/RealmKeyGenerator.cjs.map +1 -0
- package/dist/development/src/core/RealmKeyGenerator.js +42 -0
- package/dist/development/src/core/RealmKeyGenerator.js.map +1 -0
- package/dist/development/src/core/RequestResponseNormalizer.cjs.map +1 -0
- package/dist/development/src/core/RequestResponseNormalizer.js.map +1 -0
- package/dist/development/src/core/StateInitializer.cjs +387 -0
- package/dist/development/src/core/StateInitializer.cjs.map +1 -0
- package/dist/development/src/core/StateInitializer.js +387 -0
- package/dist/development/src/core/StateInitializer.js.map +1 -0
- package/dist/development/src/core/TreeAugmenter.cjs.map +1 -0
- package/dist/development/src/core/TreeAugmenter.js.map +1 -0
- package/dist/development/src/core/TreeFilterGenerator.cjs +82 -0
- package/dist/development/src/core/TreeFilterGenerator.cjs.map +1 -0
- package/dist/development/src/core/TreeFilterGenerator.js +82 -0
- package/dist/development/src/core/TreeFilterGenerator.js.map +1 -0
- package/dist/development/src/core/TreeParameterMerger.cjs.map +1 -0
- package/dist/development/src/core/TreeParameterMerger.js.map +1 -0
- package/dist/development/src/core/TreeStore.cjs +176 -0
- package/dist/development/src/core/TreeStore.cjs.map +1 -0
- package/dist/development/src/core/TreeStore.js +176 -0
- package/dist/development/src/core/TreeStore.js.map +1 -0
- package/dist/development/src/core/VariableInputTransformer.cjs.map +1 -0
- package/dist/development/src/core/VariableInputTransformer.js.map +1 -0
- package/dist/development/src/core/exceptions/ErrorLocator.cjs +59 -0
- package/dist/development/src/core/exceptions/ErrorLocator.cjs.map +1 -0
- package/dist/development/src/core/exceptions/ErrorLocator.js +59 -0
- package/dist/development/src/core/exceptions/ErrorLocator.js.map +1 -0
- package/dist/development/src/core/exceptions/LocalizedBindingError.cjs.map +1 -0
- package/dist/development/src/core/exceptions/LocalizedBindingError.js.map +1 -0
- package/dist/development/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
- package/dist/development/src/core/exceptions/MarkerSugarer.js.map +1 -0
- package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
- package/dist/development/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
- package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
- package/dist/development/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
- package/dist/development/src/core/operations/EntityOperations.cjs +232 -0
- package/dist/development/src/core/operations/EntityOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/EntityOperations.js +232 -0
- package/dist/development/src/core/operations/EntityOperations.js.map +1 -0
- package/dist/development/src/core/operations/FieldOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/FieldOperations.js.map +1 -0
- package/dist/development/src/core/operations/ListOperations.cjs +159 -0
- package/dist/development/src/core/operations/ListOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/ListOperations.js +159 -0
- package/dist/development/src/core/operations/ListOperations.js.map +1 -0
- package/dist/development/src/core/operations/OperationsHelpers.cjs.map +1 -0
- package/dist/development/src/core/operations/OperationsHelpers.js.map +1 -0
- package/dist/development/src/core/requestAliases/MutationAlias.cjs.map +1 -0
- package/dist/development/src/core/requestAliases/MutationAlias.js.map +1 -0
- package/dist/development/src/core/schema/Schema.cjs.map +1 -0
- package/dist/development/src/core/schema/Schema.js.map +1 -0
- package/dist/development/src/core/schema/SchemaLoader.cjs +25 -0
- package/dist/development/src/core/schema/SchemaLoader.cjs.map +1 -0
- package/dist/development/src/core/schema/SchemaLoader.js +25 -0
- package/dist/development/src/core/schema/SchemaLoader.js.map +1 -0
- package/dist/development/src/core/schema/SchemaPreprocessor.cjs.map +1 -0
- package/dist/development/src/core/schema/SchemaPreprocessor.js.map +1 -0
- package/dist/development/src/core/state/StateIterator.cjs.map +1 -0
- package/dist/development/src/core/state/StateIterator.js.map +1 -0
- package/dist/development/src/core/state/getEntityMarker.cjs.map +1 -0
- package/dist/development/src/core/state/getEntityMarker.js.map +1 -0
- package/dist/development/src/core/utils/createQueryBuilder.cjs.map +1 -0
- package/dist/development/src/core/utils/createQueryBuilder.js.map +1 -0
- package/dist/development/src/core/utils/getCombinedSignal.cjs.map +1 -0
- package/dist/development/src/core/utils/getCombinedSignal.js.map +1 -0
- package/dist/development/src/dao/Environment.cjs.map +1 -0
- package/dist/development/src/dao/Environment.js.map +1 -0
- package/dist/development/src/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
- package/dist/development/src/dao/TreeNodeEnvironmentFactory.js.map +1 -0
- package/dist/development/src/dao/VariableFieldValue.cjs.map +1 -0
- package/dist/development/src/dao/VariableFieldValue.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs +14 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.js +14 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
- package/dist/development/src/markers/EntityFieldMarkersContainer.cjs.map +1 -0
- package/dist/development/src/markers/EntityFieldMarkersContainer.js.map +1 -0
- package/dist/development/src/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntityFieldsWithHoistablesMarker.js.map +1 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.cjs +20 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.js +20 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.js.map +1 -0
- package/dist/development/src/markers/EntitySubTreeMarker.cjs +20 -0
- package/dist/development/src/markers/EntitySubTreeMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntitySubTreeMarker.js +20 -0
- package/dist/development/src/markers/EntitySubTreeMarker.js.map +1 -0
- package/dist/development/src/markers/FieldMarker.cjs +17 -0
- package/dist/development/src/markers/FieldMarker.cjs.map +1 -0
- package/dist/development/src/markers/FieldMarker.js +17 -0
- package/dist/development/src/markers/FieldMarker.js.map +1 -0
- package/dist/development/src/markers/HasManyRelationMarker.cjs +26 -0
- package/dist/development/src/markers/HasManyRelationMarker.cjs.map +1 -0
- package/dist/development/src/markers/HasManyRelationMarker.js +26 -0
- package/dist/development/src/markers/HasManyRelationMarker.js.map +1 -0
- package/dist/development/src/markers/HasOneRelationMarker.cjs +20 -0
- package/dist/development/src/markers/HasOneRelationMarker.cjs.map +1 -0
- package/dist/development/src/markers/HasOneRelationMarker.js +20 -0
- package/dist/development/src/markers/HasOneRelationMarker.js.map +1 -0
- package/dist/development/src/markers/MarkerTreeRoot.cjs.map +1 -0
- package/dist/development/src/markers/MarkerTreeRoot.js.map +1 -0
- package/dist/development/src/markers/ParentEntityMarker.cjs.map +1 -0
- package/dist/development/src/markers/ParentEntityMarker.js.map +1 -0
- package/dist/development/src/markers/PlaceholderGenerator.cjs.map +1 -0
- package/dist/development/src/markers/PlaceholderGenerator.js.map +1 -0
- package/dist/development/src/markers/PlaceholderParametersGenerator.cjs.map +1 -0
- package/dist/development/src/markers/PlaceholderParametersGenerator.js.map +1 -0
- package/dist/development/src/queryLanguage/CacheStore.cjs +44 -0
- package/dist/development/src/queryLanguage/CacheStore.cjs.map +1 -0
- package/dist/development/src/queryLanguage/CacheStore.js +44 -0
- package/dist/development/src/queryLanguage/CacheStore.js.map +1 -0
- package/dist/development/src/queryLanguage/MarkerFactory.cjs.map +1 -0
- package/dist/development/src/queryLanguage/MarkerFactory.js.map +1 -0
- package/dist/development/src/queryLanguage/Parser.cjs +724 -0
- package/dist/development/src/queryLanguage/Parser.cjs.map +1 -0
- package/dist/development/src/queryLanguage/Parser.js +724 -0
- package/dist/development/src/queryLanguage/Parser.js.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguage.cjs +543 -0
- package/dist/development/src/queryLanguage/QueryLanguage.cjs.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguage.js +543 -0
- package/dist/development/src/queryLanguage/QueryLanguage.js.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguageError.cjs.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguageError.js.map +1 -0
- package/dist/development/src/queryLanguage/tokenList.cjs +151 -0
- package/dist/development/src/queryLanguage/tokenList.cjs.map +1 -0
- package/dist/development/src/queryLanguage/tokenList.js +152 -0
- package/dist/development/src/queryLanguage/tokenList.js.map +1 -0
- package/dist/development/src/structures/BijectiveIndexedMap.cjs +117 -0
- package/dist/development/src/structures/BijectiveIndexedMap.cjs.map +1 -0
- package/dist/development/src/structures/BijectiveIndexedMap.js +117 -0
- package/dist/development/src/structures/BijectiveIndexedMap.js.map +1 -0
- package/dist/development/src/structures/LRUCache.cjs +32 -0
- package/dist/development/src/structures/LRUCache.cjs.map +1 -0
- package/dist/development/src/structures/LRUCache.js +32 -0
- package/dist/development/src/structures/LRUCache.js.map +1 -0
- package/dist/development/src/structures/WeakIdCache.cjs +30 -0
- package/dist/development/src/structures/WeakIdCache.cjs.map +1 -0
- package/dist/development/src/structures/WeakIdCache.js +30 -0
- package/dist/development/src/structures/WeakIdCache.js.map +1 -0
- package/dist/development/src/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
- package/dist/development/src/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -0
- package/dist/development/src/treeParameters/EntityCreationParameters.cjs.map +1 -0
- package/dist/development/src/treeParameters/EntityCreationParameters.js.map +1 -0
- package/dist/development/src/treeParameters/EntityListPreferences.cjs.map +1 -0
- package/dist/development/src/treeParameters/EntityListPreferences.js.map +1 -0
- package/dist/development/src/treeParameters/EventListenersStore.cjs.map +1 -0
- package/dist/development/src/treeParameters/EventListenersStore.js.map +1 -0
- package/dist/development/src/treeParameters/LeafField.cjs.map +1 -0
- package/dist/development/src/treeParameters/LeafField.js.map +1 -0
- package/dist/development/src/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
- package/dist/development/src/treeParameters/QualifiedEntityParameters.js.map +1 -0
- package/dist/development/src/treeParameters/Relation.cjs.map +1 -0
- package/dist/development/src/treeParameters/Relation.js.map +1 -0
- package/dist/development/src/utils/Hashing.cjs.map +1 -0
- package/dist/development/src/utils/Hashing.js.map +1 -0
- package/dist/development/src/utils/TreeNodeUtils.cjs.map +1 -0
- package/dist/development/src/utils/TreeNodeUtils.js.map +1 -0
- package/dist/development/src/utils/assert.cjs +10 -0
- package/dist/development/src/utils/assert.cjs.map +1 -0
- package/dist/development/src/utils/assert.js +10 -0
- package/dist/development/src/utils/assert.js.map +1 -0
- package/dist/development/src/utils/assertNever.cjs.map +1 -0
- package/dist/development/src/utils/assertNever.js.map +1 -0
- package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
- package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
- package/dist/development/src/utils/isEmptyObject.cjs.map +1 -0
- package/dist/development/src/utils/isEmptyObject.js.map +1 -0
- package/dist/development/src/utils/ucfirst.cjs.map +1 -0
- package/dist/development/src/utils/ucfirst.js.map +1 -0
- package/dist/production/index.cjs +49 -49
- package/dist/production/index.js +49 -49
- package/dist/production/src/BindingError.cjs.map +1 -0
- package/dist/production/src/BindingError.js.map +1 -0
- package/dist/production/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
- package/dist/production/src/accessorTree/NormalizedPersistedData.js.map +1 -0
- package/dist/production/src/accessorTree/RuntimeId.cjs +61 -0
- package/dist/production/src/accessorTree/RuntimeId.cjs.map +1 -0
- package/dist/production/src/accessorTree/RuntimeId.js +61 -0
- package/dist/production/src/accessorTree/RuntimeId.js.map +1 -0
- package/dist/production/src/accessors/EntityAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/EntityAccessor.js.map +1 -0
- package/dist/production/src/accessors/EntityListAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/EntityListAccessor.js.map +1 -0
- package/dist/production/src/accessors/ErrorAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/ErrorAccessor.js.map +1 -0
- package/dist/production/src/accessors/FieldAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/FieldAccessor.js.map +1 -0
- package/dist/production/src/accessors/TreeRootAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/TreeRootAccessor.js.map +1 -0
- package/dist/production/src/bindingTypes.cjs.map +1 -0
- package/dist/production/src/bindingTypes.js.map +1 -0
- package/dist/production/src/core/AccessorErrorManager.cjs +204 -0
- package/dist/production/src/core/AccessorErrorManager.cjs.map +1 -0
- package/dist/production/src/core/AccessorErrorManager.js +204 -0
- package/dist/production/src/core/AccessorErrorManager.js.map +1 -0
- package/dist/production/src/core/Config.cjs +29 -0
- package/dist/production/src/core/Config.cjs.map +1 -0
- package/dist/production/src/core/Config.js +29 -0
- package/dist/production/src/core/Config.js.map +1 -0
- package/dist/production/src/core/DataBinding.cjs +348 -0
- package/dist/production/src/core/DataBinding.cjs.map +1 -0
- package/dist/production/src/core/DataBinding.js +348 -0
- package/dist/production/src/core/DataBinding.js.map +1 -0
- package/dist/production/src/core/DirtinessTracker.cjs +26 -0
- package/dist/production/src/core/DirtinessTracker.cjs.map +1 -0
- package/dist/production/src/core/DirtinessTracker.js +26 -0
- package/dist/production/src/core/DirtinessTracker.js.map +1 -0
- package/dist/production/src/core/ErrorsPreprocessor.cjs +180 -0
- package/dist/production/src/core/ErrorsPreprocessor.cjs.map +1 -0
- package/dist/production/src/core/ErrorsPreprocessor.js +180 -0
- package/dist/production/src/core/ErrorsPreprocessor.js.map +1 -0
- package/dist/production/src/core/EventManager.cjs +408 -0
- package/dist/production/src/core/EventManager.cjs.map +1 -0
- package/dist/production/src/core/EventManager.js +408 -0
- package/dist/production/src/core/EventManager.js.map +1 -0
- package/dist/production/src/core/MarkerComparator.cjs.map +1 -0
- package/dist/production/src/core/MarkerComparator.js.map +1 -0
- package/dist/production/src/core/MarkerMerger.cjs +256 -0
- package/dist/production/src/core/MarkerMerger.cjs.map +1 -0
- package/dist/production/src/core/MarkerMerger.js +256 -0
- package/dist/production/src/core/MarkerMerger.js.map +1 -0
- package/dist/production/src/core/MutationGenerator.cjs +662 -0
- package/dist/production/src/core/MutationGenerator.cjs.map +1 -0
- package/dist/production/src/core/MutationGenerator.js +662 -0
- package/dist/production/src/core/MutationGenerator.js.map +1 -0
- package/dist/production/src/core/QueryGenerator.cjs.map +1 -0
- package/dist/production/src/core/QueryGenerator.js.map +1 -0
- package/dist/production/src/core/RealmKeyGenerator.cjs +42 -0
- package/dist/production/src/core/RealmKeyGenerator.cjs.map +1 -0
- package/dist/production/src/core/RealmKeyGenerator.js +42 -0
- package/dist/production/src/core/RealmKeyGenerator.js.map +1 -0
- package/dist/production/src/core/RequestResponseNormalizer.cjs.map +1 -0
- package/dist/production/src/core/RequestResponseNormalizer.js.map +1 -0
- package/dist/production/src/core/StateInitializer.cjs +387 -0
- package/dist/production/src/core/StateInitializer.cjs.map +1 -0
- package/dist/production/src/core/StateInitializer.js +387 -0
- package/dist/production/src/core/StateInitializer.js.map +1 -0
- package/dist/production/src/core/TreeAugmenter.cjs.map +1 -0
- package/dist/production/src/core/TreeAugmenter.js.map +1 -0
- package/dist/production/src/core/TreeFilterGenerator.cjs +82 -0
- package/dist/production/src/core/TreeFilterGenerator.cjs.map +1 -0
- package/dist/production/src/core/TreeFilterGenerator.js +82 -0
- package/dist/production/src/core/TreeFilterGenerator.js.map +1 -0
- package/dist/production/src/core/TreeParameterMerger.cjs.map +1 -0
- package/dist/production/src/core/TreeParameterMerger.js.map +1 -0
- package/dist/production/src/core/TreeStore.cjs +176 -0
- package/dist/production/src/core/TreeStore.cjs.map +1 -0
- package/dist/production/src/core/TreeStore.js +176 -0
- package/dist/production/src/core/TreeStore.js.map +1 -0
- package/dist/production/src/core/VariableInputTransformer.cjs.map +1 -0
- package/dist/production/src/core/VariableInputTransformer.js.map +1 -0
- package/dist/production/src/core/exceptions/ErrorLocator.cjs +59 -0
- package/dist/production/src/core/exceptions/ErrorLocator.cjs.map +1 -0
- package/dist/production/src/core/exceptions/ErrorLocator.js +59 -0
- package/dist/production/src/core/exceptions/ErrorLocator.js.map +1 -0
- package/dist/production/src/core/exceptions/LocalizedBindingError.cjs.map +1 -0
- package/dist/production/src/core/exceptions/LocalizedBindingError.js.map +1 -0
- package/dist/production/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
- package/dist/production/src/core/exceptions/MarkerSugarer.js.map +1 -0
- package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
- package/dist/production/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
- package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
- package/dist/production/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
- package/dist/production/src/core/operations/EntityOperations.cjs +232 -0
- package/dist/production/src/core/operations/EntityOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/EntityOperations.js +232 -0
- package/dist/production/src/core/operations/EntityOperations.js.map +1 -0
- package/dist/production/src/core/operations/FieldOperations.cjs +77 -0
- package/dist/production/src/core/operations/FieldOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/FieldOperations.js +77 -0
- package/dist/production/src/core/operations/FieldOperations.js.map +1 -0
- package/dist/production/src/core/operations/ListOperations.cjs +159 -0
- package/dist/production/src/core/operations/ListOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/ListOperations.js +159 -0
- package/dist/production/src/core/operations/ListOperations.js.map +1 -0
- package/dist/production/src/core/operations/OperationsHelpers.cjs.map +1 -0
- package/dist/production/src/core/operations/OperationsHelpers.js.map +1 -0
- package/dist/production/src/core/requestAliases/MutationAlias.cjs.map +1 -0
- package/dist/production/src/core/requestAliases/MutationAlias.js.map +1 -0
- package/dist/production/src/core/schema/Schema.cjs.map +1 -0
- package/dist/production/src/core/schema/Schema.js.map +1 -0
- package/dist/production/src/core/schema/SchemaLoader.cjs +25 -0
- package/dist/production/src/core/schema/SchemaLoader.cjs.map +1 -0
- package/dist/production/src/core/schema/SchemaLoader.js +25 -0
- package/dist/production/src/core/schema/SchemaLoader.js.map +1 -0
- package/dist/production/src/core/schema/SchemaPreprocessor.cjs.map +1 -0
- package/dist/production/src/core/schema/SchemaPreprocessor.js.map +1 -0
- package/dist/production/src/core/state/StateIterator.cjs.map +1 -0
- package/dist/production/src/core/state/StateIterator.js.map +1 -0
- package/dist/production/src/core/state/getEntityMarker.cjs.map +1 -0
- package/dist/production/src/core/state/getEntityMarker.js.map +1 -0
- package/dist/production/src/core/utils/createQueryBuilder.cjs.map +1 -0
- package/dist/production/src/core/utils/createQueryBuilder.js.map +1 -0
- package/dist/production/src/core/utils/getCombinedSignal.cjs.map +1 -0
- package/dist/production/src/core/utils/getCombinedSignal.js.map +1 -0
- package/dist/production/src/dao/Environment.cjs.map +1 -0
- package/dist/production/src/dao/Environment.js.map +1 -0
- package/dist/production/src/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
- package/dist/production/src/dao/TreeNodeEnvironmentFactory.js.map +1 -0
- package/dist/production/src/dao/VariableFieldValue.cjs.map +1 -0
- package/dist/production/src/dao/VariableFieldValue.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs +14 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.js +14 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
- package/dist/production/src/markers/EntityFieldMarkersContainer.cjs.map +1 -0
- package/dist/production/src/markers/EntityFieldMarkersContainer.js.map +1 -0
- package/dist/production/src/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntityFieldsWithHoistablesMarker.js.map +1 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.cjs +20 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.js +20 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.js.map +1 -0
- package/dist/production/src/markers/EntitySubTreeMarker.cjs +20 -0
- package/dist/production/src/markers/EntitySubTreeMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntitySubTreeMarker.js +20 -0
- package/dist/production/src/markers/EntitySubTreeMarker.js.map +1 -0
- package/dist/production/src/markers/FieldMarker.cjs +17 -0
- package/dist/production/src/markers/FieldMarker.cjs.map +1 -0
- package/dist/production/src/markers/FieldMarker.js +17 -0
- package/dist/production/src/markers/FieldMarker.js.map +1 -0
- package/dist/production/src/markers/HasManyRelationMarker.cjs +20 -0
- package/dist/production/src/markers/HasManyRelationMarker.cjs.map +1 -0
- package/dist/production/src/markers/HasManyRelationMarker.js +20 -0
- package/dist/production/src/markers/HasManyRelationMarker.js.map +1 -0
- package/dist/production/src/markers/HasOneRelationMarker.cjs +20 -0
- package/dist/production/src/markers/HasOneRelationMarker.cjs.map +1 -0
- package/dist/production/src/markers/HasOneRelationMarker.js +20 -0
- package/dist/production/src/markers/HasOneRelationMarker.js.map +1 -0
- package/dist/production/src/markers/MarkerTreeRoot.cjs.map +1 -0
- package/dist/production/src/markers/MarkerTreeRoot.js.map +1 -0
- package/dist/production/src/markers/ParentEntityMarker.cjs.map +1 -0
- package/dist/production/src/markers/ParentEntityMarker.js.map +1 -0
- package/dist/production/src/markers/PlaceholderGenerator.cjs.map +1 -0
- package/dist/production/src/markers/PlaceholderGenerator.js.map +1 -0
- package/dist/production/src/markers/PlaceholderParametersGenerator.cjs.map +1 -0
- package/dist/production/src/markers/PlaceholderParametersGenerator.js.map +1 -0
- package/dist/production/src/queryLanguage/CacheStore.cjs +44 -0
- package/dist/production/src/queryLanguage/CacheStore.cjs.map +1 -0
- package/dist/production/src/queryLanguage/CacheStore.js +44 -0
- package/dist/production/src/queryLanguage/CacheStore.js.map +1 -0
- package/dist/production/src/queryLanguage/MarkerFactory.cjs.map +1 -0
- package/dist/production/src/queryLanguage/MarkerFactory.js.map +1 -0
- package/dist/production/src/queryLanguage/Parser.cjs +721 -0
- package/dist/production/src/queryLanguage/Parser.cjs.map +1 -0
- package/dist/production/src/queryLanguage/Parser.js +721 -0
- package/dist/production/src/queryLanguage/Parser.js.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguage.cjs +540 -0
- package/dist/production/src/queryLanguage/QueryLanguage.cjs.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguage.js +540 -0
- package/dist/production/src/queryLanguage/QueryLanguage.js.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguageError.cjs.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguageError.js.map +1 -0
- package/dist/production/src/queryLanguage/tokenList.cjs +151 -0
- package/dist/production/src/queryLanguage/tokenList.cjs.map +1 -0
- package/dist/production/src/queryLanguage/tokenList.js +152 -0
- package/dist/production/src/queryLanguage/tokenList.js.map +1 -0
- package/dist/production/src/structures/BijectiveIndexedMap.cjs +117 -0
- package/dist/production/src/structures/BijectiveIndexedMap.cjs.map +1 -0
- package/dist/production/src/structures/BijectiveIndexedMap.js +117 -0
- package/dist/production/src/structures/BijectiveIndexedMap.js.map +1 -0
- package/dist/production/src/structures/LRUCache.cjs +32 -0
- package/dist/production/src/structures/LRUCache.cjs.map +1 -0
- package/dist/production/src/structures/LRUCache.js +32 -0
- package/dist/production/src/structures/LRUCache.js.map +1 -0
- package/dist/production/src/structures/WeakIdCache.cjs +30 -0
- package/dist/production/src/structures/WeakIdCache.cjs.map +1 -0
- package/dist/production/src/structures/WeakIdCache.js +30 -0
- package/dist/production/src/structures/WeakIdCache.js.map +1 -0
- package/dist/production/src/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
- package/dist/production/src/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -0
- package/dist/production/src/treeParameters/EntityCreationParameters.cjs.map +1 -0
- package/dist/production/src/treeParameters/EntityCreationParameters.js.map +1 -0
- package/dist/production/src/treeParameters/EntityListPreferences.cjs.map +1 -0
- package/dist/production/src/treeParameters/EntityListPreferences.js.map +1 -0
- package/dist/production/src/treeParameters/EventListenersStore.cjs.map +1 -0
- package/dist/production/src/treeParameters/EventListenersStore.js.map +1 -0
- package/dist/production/src/treeParameters/LeafField.cjs.map +1 -0
- package/dist/production/src/treeParameters/LeafField.js.map +1 -0
- package/dist/production/src/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
- package/dist/production/src/treeParameters/QualifiedEntityParameters.js.map +1 -0
- package/dist/production/src/treeParameters/Relation.cjs.map +1 -0
- package/dist/production/src/treeParameters/Relation.js.map +1 -0
- package/dist/production/src/utils/Hashing.cjs.map +1 -0
- package/dist/production/src/utils/Hashing.js.map +1 -0
- package/dist/production/src/utils/TreeNodeUtils.cjs.map +1 -0
- package/dist/production/src/utils/TreeNodeUtils.js.map +1 -0
- package/dist/production/src/utils/assert.cjs +10 -0
- package/dist/production/src/utils/assert.cjs.map +1 -0
- package/dist/production/src/utils/assert.js +10 -0
- package/dist/production/src/utils/assert.js.map +1 -0
- package/dist/production/src/utils/assertNever.cjs.map +1 -0
- package/dist/production/src/utils/assertNever.js.map +1 -0
- package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
- package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
- package/dist/production/src/utils/isEmptyObject.cjs.map +1 -0
- package/dist/production/src/utils/isEmptyObject.js.map +1 -0
- package/dist/production/src/utils/ucfirst.cjs.map +1 -0
- package/dist/production/src/utils/ucfirst.js.map +1 -0
- package/dist/types/accessorTree/RuntimeId.d.ts.map +1 -1
- package/dist/types/accessors/EntityAccessor.d.ts.map +1 -1
- package/dist/types/accessors/EntityListAccessor.d.ts.map +1 -1
- package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
- package/dist/types/core/DataBinding.d.ts.map +1 -1
- package/dist/types/core/EventManager.d.ts.map +1 -1
- package/dist/types/core/MarkerMerger.d.ts.map +1 -1
- package/dist/types/core/MutationGenerator.d.ts.map +1 -1
- package/dist/types/core/TreeStore.d.ts.map +1 -1
- package/dist/types/core/state/EntityListState.d.ts.map +1 -1
- package/dist/types/core/utils/getCombinedSignal.d.ts.map +1 -1
- package/dist/types/dao/Environment.d.ts +1 -1
- package/dist/types/dao/Environment.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -1
- package/dist/types/markers/FieldMarker.d.ts.map +1 -1
- package/dist/types/queryLanguage/QueryLanguage.d.ts +5 -4
- package/dist/types/queryLanguage/QueryLanguage.d.ts.map +1 -1
- package/dist/types/queryLanguage/tokenList.d.ts +1 -0
- package/dist/types/queryLanguage/tokenList.d.ts.map +1 -1
- package/dist/types/treeParameters/EntityListEventListeners.d.ts.map +1 -1
- package/dist/types/treeParameters/EventListenersStore.d.ts.map +1 -1
- package/dist/types/treeParameters/HasManyRelation.d.ts.map +1 -1
- package/dist/types/treeParameters/HasOneRelation.d.ts.map +1 -1
- package/dist/types/treeParameters/QualifiedEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/QualifiedSingleEntity.d.ts.map +1 -1
- package/dist/types/treeParameters/RelativeEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/SingleEntityEventListeners.d.ts.map +1 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -13
- package/src/accessorTree/QueryRequestResponse.ts +1 -1
- package/src/accessors/EntityAccessor.ts +1 -1
- package/src/accessors/EntityListAccessor.ts +1 -1
- package/src/core/AccessorErrorManager.ts +1 -0
- package/src/core/DataBinding.ts +8 -4
- package/src/core/EventManager.ts +6 -6
- package/src/core/MarkerMerger.ts +8 -2
- package/src/core/MutationGenerator.ts +8 -8
- package/src/core/RequestResponseNormalizer.ts +1 -1
- package/src/core/TreeStore.ts +6 -6
- package/src/core/operations/EntityOperations.ts +1 -1
- package/src/core/operations/FieldOperations.ts +2 -2
- package/src/core/operations/ListOperations.ts +1 -1
- package/src/core/state/EntityListState.ts +6 -6
- package/src/queryLanguage/Parser.ts +2 -2
- package/src/queryLanguage/QueryLanguage.ts +54 -25
- package/src/queryLanguage/tokenList.ts +2 -0
- package/src/treeParameters/EntityListEventListeners.ts +2 -2
- package/src/treeParameters/HasManyRelation.ts +3 -3
- package/src/treeParameters/HasOneRelation.ts +2 -2
- package/src/treeParameters/QualifiedEntityList.ts +7 -7
- package/src/treeParameters/QualifiedSingleEntity.ts +9 -9
- package/src/treeParameters/RelativeEntityList.ts +2 -2
- package/src/treeParameters/SingleEntityEventListeners.ts +3 -3
- package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +6 -6
- package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +4 -4
- package/src/tsconfig.json +4 -1
- package/src/typings/react-fix.d.ts +1 -1
- package/tests/cases/unit/queryLanguage/filter.spec.tsx +100 -0
- package/tests/cases/unit/queryLanguage/general.spec.tsx +59 -0
- package/tests/cases/unit/queryLanguage/orderBy.spec.tsx +48 -0
- package/tests/cases/unit/queryLanguage/qualifiedEntityList.spec.tsx +30 -0
- package/tests/cases/unit/queryLanguage/qualifiedFieldList.spec.tsx +29 -0
- package/tests/cases/unit/queryLanguage/relativeEntityList.spec.tsx +49 -0
- package/tests/cases/unit/queryLanguage/singleRelativeField.spec.tsx +132 -0
- package/tests/cases/unit/queryLanguage/taggedMap.spec.tsx +41 -0
- package/tests/tsconfig.json +10 -0
- package/tsconfig.json +8 -0
- package/tsdoc.json +6 -0
- package/vitest.config.ts +3 -0
- package/dist/development/BindingError.cjs.map +0 -1
- package/dist/development/BindingError.js.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.js.map +0 -1
- package/dist/development/accessorTree/RuntimeId.cjs +0 -64
- package/dist/development/accessorTree/RuntimeId.cjs.map +0 -1
- package/dist/development/accessorTree/RuntimeId.js +0 -64
- package/dist/development/accessorTree/RuntimeId.js.map +0 -1
- package/dist/development/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityAccessor.js.map +0 -1
- package/dist/development/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityListAccessor.js.map +0 -1
- package/dist/development/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/development/accessors/ErrorAccessor.js.map +0 -1
- package/dist/development/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/development/accessors/FieldAccessor.js.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/development/bindingTypes.cjs.map +0 -1
- package/dist/development/bindingTypes.js.map +0 -1
- package/dist/development/core/AccessorErrorManager.cjs +0 -207
- package/dist/development/core/AccessorErrorManager.cjs.map +0 -1
- package/dist/development/core/AccessorErrorManager.js +0 -207
- package/dist/development/core/AccessorErrorManager.js.map +0 -1
- package/dist/development/core/Config.cjs +0 -32
- package/dist/development/core/Config.cjs.map +0 -1
- package/dist/development/core/Config.js +0 -32
- package/dist/development/core/Config.js.map +0 -1
- package/dist/development/core/DataBinding.cjs +0 -353
- package/dist/development/core/DataBinding.cjs.map +0 -1
- package/dist/development/core/DataBinding.js +0 -353
- package/dist/development/core/DataBinding.js.map +0 -1
- package/dist/development/core/DirtinessTracker.cjs +0 -29
- package/dist/development/core/DirtinessTracker.cjs.map +0 -1
- package/dist/development/core/DirtinessTracker.js +0 -29
- package/dist/development/core/DirtinessTracker.js.map +0 -1
- package/dist/development/core/ErrorsPreprocessor.cjs +0 -181
- package/dist/development/core/ErrorsPreprocessor.cjs.map +0 -1
- package/dist/development/core/ErrorsPreprocessor.js +0 -181
- package/dist/development/core/ErrorsPreprocessor.js.map +0 -1
- package/dist/development/core/EventManager.cjs +0 -440
- package/dist/development/core/EventManager.cjs.map +0 -1
- package/dist/development/core/EventManager.js +0 -440
- package/dist/development/core/EventManager.js.map +0 -1
- package/dist/development/core/MarkerComparator.cjs.map +0 -1
- package/dist/development/core/MarkerComparator.js.map +0 -1
- package/dist/development/core/MarkerMerger.cjs +0 -252
- package/dist/development/core/MarkerMerger.cjs.map +0 -1
- package/dist/development/core/MarkerMerger.js +0 -252
- package/dist/development/core/MarkerMerger.js.map +0 -1
- package/dist/development/core/MutationGenerator.cjs +0 -665
- package/dist/development/core/MutationGenerator.cjs.map +0 -1
- package/dist/development/core/MutationGenerator.js +0 -665
- package/dist/development/core/MutationGenerator.js.map +0 -1
- package/dist/development/core/QueryGenerator.cjs.map +0 -1
- package/dist/development/core/QueryGenerator.js.map +0 -1
- package/dist/development/core/RealmKeyGenerator.cjs +0 -47
- package/dist/development/core/RealmKeyGenerator.cjs.map +0 -1
- package/dist/development/core/RealmKeyGenerator.js +0 -47
- package/dist/development/core/RealmKeyGenerator.js.map +0 -1
- package/dist/development/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/development/core/RequestResponseNormalizer.js.map +0 -1
- package/dist/development/core/StateInitializer.cjs +0 -390
- package/dist/development/core/StateInitializer.cjs.map +0 -1
- package/dist/development/core/StateInitializer.js +0 -390
- package/dist/development/core/StateInitializer.js.map +0 -1
- package/dist/development/core/TreeAugmenter.cjs.map +0 -1
- package/dist/development/core/TreeAugmenter.js.map +0 -1
- package/dist/development/core/TreeFilterGenerator.cjs +0 -83
- package/dist/development/core/TreeFilterGenerator.cjs.map +0 -1
- package/dist/development/core/TreeFilterGenerator.js +0 -83
- package/dist/development/core/TreeFilterGenerator.js.map +0 -1
- package/dist/development/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/development/core/TreeParameterMerger.js.map +0 -1
- package/dist/development/core/TreeStore.cjs +0 -182
- package/dist/development/core/TreeStore.cjs.map +0 -1
- package/dist/development/core/TreeStore.js +0 -182
- package/dist/development/core/TreeStore.js.map +0 -1
- package/dist/development/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/development/core/VariableInputTransformer.js.map +0 -1
- package/dist/development/core/exceptions/ErrorLocator.cjs +0 -62
- package/dist/development/core/exceptions/ErrorLocator.cjs.map +0 -1
- package/dist/development/core/exceptions/ErrorLocator.js +0 -62
- package/dist/development/core/exceptions/ErrorLocator.js.map +0 -1
- package/dist/development/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/development/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/development/core/operations/EntityOperations.cjs +0 -233
- package/dist/development/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/development/core/operations/EntityOperations.js +0 -233
- package/dist/development/core/operations/EntityOperations.js.map +0 -1
- package/dist/development/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/development/core/operations/FieldOperations.js.map +0 -1
- package/dist/development/core/operations/ListOperations.cjs +0 -159
- package/dist/development/core/operations/ListOperations.cjs.map +0 -1
- package/dist/development/core/operations/ListOperations.js +0 -159
- package/dist/development/core/operations/ListOperations.js.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/development/core/schema/Schema.cjs.map +0 -1
- package/dist/development/core/schema/Schema.js.map +0 -1
- package/dist/development/core/schema/SchemaLoader.cjs +0 -28
- package/dist/development/core/schema/SchemaLoader.cjs.map +0 -1
- package/dist/development/core/schema/SchemaLoader.js +0 -28
- package/dist/development/core/schema/SchemaLoader.js.map +0 -1
- package/dist/development/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/development/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/development/core/state/StateIterator.cjs.map +0 -1
- package/dist/development/core/state/StateIterator.js.map +0 -1
- package/dist/development/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/development/core/state/getEntityMarker.js.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/development/dao/Environment.cjs.map +0 -1
- package/dist/development/dao/Environment.js.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/development/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/development/dao/VariableFieldValue.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/FieldHelper.cjs +0 -17
- package/dist/development/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/FieldHelper.js +0 -17
- package/dist/development/fieldHelpers/helpers/FieldHelper.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.js.map +0 -1
- package/dist/development/markers/EntityListSubTreeMarker.cjs +0 -23
- package/dist/development/markers/EntityListSubTreeMarker.cjs.map +0 -1
- package/dist/development/markers/EntityListSubTreeMarker.js +0 -23
- package/dist/development/markers/EntityListSubTreeMarker.js.map +0 -1
- package/dist/development/markers/EntitySubTreeMarker.cjs +0 -23
- package/dist/development/markers/EntitySubTreeMarker.cjs.map +0 -1
- package/dist/development/markers/EntitySubTreeMarker.js +0 -23
- package/dist/development/markers/EntitySubTreeMarker.js.map +0 -1
- package/dist/development/markers/FieldMarker.cjs +0 -20
- package/dist/development/markers/FieldMarker.cjs.map +0 -1
- package/dist/development/markers/FieldMarker.js +0 -20
- package/dist/development/markers/FieldMarker.js.map +0 -1
- package/dist/development/markers/HasManyRelationMarker.cjs +0 -29
- package/dist/development/markers/HasManyRelationMarker.cjs.map +0 -1
- package/dist/development/markers/HasManyRelationMarker.js +0 -29
- package/dist/development/markers/HasManyRelationMarker.js.map +0 -1
- package/dist/development/markers/HasOneRelationMarker.cjs +0 -23
- package/dist/development/markers/HasOneRelationMarker.cjs.map +0 -1
- package/dist/development/markers/HasOneRelationMarker.js +0 -23
- package/dist/development/markers/HasOneRelationMarker.js.map +0 -1
- package/dist/development/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/development/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/development/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/development/markers/ParentEntityMarker.js.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.js.map +0 -1
- package/dist/development/queryLanguage/CacheStore.cjs +0 -47
- package/dist/development/queryLanguage/CacheStore.cjs.map +0 -1
- package/dist/development/queryLanguage/CacheStore.js +0 -47
- package/dist/development/queryLanguage/CacheStore.js.map +0 -1
- package/dist/development/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/development/queryLanguage/MarkerFactory.js.map +0 -1
- package/dist/development/queryLanguage/Parser.cjs +0 -728
- package/dist/development/queryLanguage/Parser.cjs.map +0 -1
- package/dist/development/queryLanguage/Parser.js +0 -728
- package/dist/development/queryLanguage/Parser.js.map +0 -1
- package/dist/development/queryLanguage/QueryLanguage.cjs +0 -520
- package/dist/development/queryLanguage/QueryLanguage.cjs.map +0 -1
- package/dist/development/queryLanguage/QueryLanguage.js +0 -520
- package/dist/development/queryLanguage/QueryLanguage.js.map +0 -1
- package/dist/development/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/development/queryLanguage/QueryLanguageError.js.map +0 -1
- package/dist/development/queryLanguage/tokenList.cjs +0 -150
- package/dist/development/queryLanguage/tokenList.cjs.map +0 -1
- package/dist/development/queryLanguage/tokenList.js +0 -151
- package/dist/development/queryLanguage/tokenList.js.map +0 -1
- package/dist/development/structures/BijectiveIndexedMap.cjs +0 -120
- package/dist/development/structures/BijectiveIndexedMap.cjs.map +0 -1
- package/dist/development/structures/BijectiveIndexedMap.js +0 -120
- package/dist/development/structures/BijectiveIndexedMap.js.map +0 -1
- package/dist/development/structures/LRUCache.cjs +0 -35
- package/dist/development/structures/LRUCache.cjs.map +0 -1
- package/dist/development/structures/LRUCache.js +0 -35
- package/dist/development/structures/LRUCache.js.map +0 -1
- package/dist/development/structures/WeakIdCache.cjs +0 -33
- package/dist/development/structures/WeakIdCache.cjs.map +0 -1
- package/dist/development/structures/WeakIdCache.js +0 -33
- package/dist/development/structures/WeakIdCache.js.map +0 -1
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/development/treeParameters/LeafField.cjs.map +0 -1
- package/dist/development/treeParameters/LeafField.js.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/development/treeParameters/Relation.cjs.map +0 -1
- package/dist/development/treeParameters/Relation.js.map +0 -1
- package/dist/development/utils/Hashing.cjs.map +0 -1
- package/dist/development/utils/Hashing.js.map +0 -1
- package/dist/development/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/development/utils/TreeNodeUtils.js.map +0 -1
- package/dist/development/utils/assert.cjs +0 -11
- package/dist/development/utils/assert.cjs.map +0 -1
- package/dist/development/utils/assert.js +0 -11
- package/dist/development/utils/assert.js.map +0 -1
- package/dist/development/utils/assertNever.cjs.map +0 -1
- package/dist/development/utils/assertNever.js.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/development/utils/isEmptyObject.cjs.map +0 -1
- package/dist/development/utils/isEmptyObject.js.map +0 -1
- package/dist/development/utils/ucfirst.cjs.map +0 -1
- package/dist/development/utils/ucfirst.js.map +0 -1
- package/dist/production/BindingError.cjs.map +0 -1
- package/dist/production/BindingError.js.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.js.map +0 -1
- package/dist/production/accessorTree/RuntimeId.cjs +0 -64
- package/dist/production/accessorTree/RuntimeId.cjs.map +0 -1
- package/dist/production/accessorTree/RuntimeId.js +0 -64
- package/dist/production/accessorTree/RuntimeId.js.map +0 -1
- package/dist/production/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityAccessor.js.map +0 -1
- package/dist/production/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityListAccessor.js.map +0 -1
- package/dist/production/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/production/accessors/ErrorAccessor.js.map +0 -1
- package/dist/production/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/production/accessors/FieldAccessor.js.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/production/bindingTypes.cjs.map +0 -1
- package/dist/production/bindingTypes.js.map +0 -1
- package/dist/production/core/AccessorErrorManager.cjs +0 -207
- package/dist/production/core/AccessorErrorManager.cjs.map +0 -1
- package/dist/production/core/AccessorErrorManager.js +0 -207
- package/dist/production/core/AccessorErrorManager.js.map +0 -1
- package/dist/production/core/Config.cjs +0 -32
- package/dist/production/core/Config.cjs.map +0 -1
- package/dist/production/core/Config.js +0 -32
- package/dist/production/core/Config.js.map +0 -1
- package/dist/production/core/DataBinding.cjs +0 -353
- package/dist/production/core/DataBinding.cjs.map +0 -1
- package/dist/production/core/DataBinding.js +0 -353
- package/dist/production/core/DataBinding.js.map +0 -1
- package/dist/production/core/DirtinessTracker.cjs +0 -29
- package/dist/production/core/DirtinessTracker.cjs.map +0 -1
- package/dist/production/core/DirtinessTracker.js +0 -29
- package/dist/production/core/DirtinessTracker.js.map +0 -1
- package/dist/production/core/ErrorsPreprocessor.cjs +0 -181
- package/dist/production/core/ErrorsPreprocessor.cjs.map +0 -1
- package/dist/production/core/ErrorsPreprocessor.js +0 -181
- package/dist/production/core/ErrorsPreprocessor.js.map +0 -1
- package/dist/production/core/EventManager.cjs +0 -414
- package/dist/production/core/EventManager.cjs.map +0 -1
- package/dist/production/core/EventManager.js +0 -414
- package/dist/production/core/EventManager.js.map +0 -1
- package/dist/production/core/MarkerComparator.cjs.map +0 -1
- package/dist/production/core/MarkerComparator.js.map +0 -1
- package/dist/production/core/MarkerMerger.cjs +0 -252
- package/dist/production/core/MarkerMerger.cjs.map +0 -1
- package/dist/production/core/MarkerMerger.js +0 -252
- package/dist/production/core/MarkerMerger.js.map +0 -1
- package/dist/production/core/MutationGenerator.cjs +0 -665
- package/dist/production/core/MutationGenerator.cjs.map +0 -1
- package/dist/production/core/MutationGenerator.js +0 -665
- package/dist/production/core/MutationGenerator.js.map +0 -1
- package/dist/production/core/QueryGenerator.cjs.map +0 -1
- package/dist/production/core/QueryGenerator.js.map +0 -1
- package/dist/production/core/RealmKeyGenerator.cjs +0 -47
- package/dist/production/core/RealmKeyGenerator.cjs.map +0 -1
- package/dist/production/core/RealmKeyGenerator.js +0 -47
- package/dist/production/core/RealmKeyGenerator.js.map +0 -1
- package/dist/production/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/production/core/RequestResponseNormalizer.js.map +0 -1
- package/dist/production/core/StateInitializer.cjs +0 -390
- package/dist/production/core/StateInitializer.cjs.map +0 -1
- package/dist/production/core/StateInitializer.js +0 -390
- package/dist/production/core/StateInitializer.js.map +0 -1
- package/dist/production/core/TreeAugmenter.cjs.map +0 -1
- package/dist/production/core/TreeAugmenter.js.map +0 -1
- package/dist/production/core/TreeFilterGenerator.cjs +0 -83
- package/dist/production/core/TreeFilterGenerator.cjs.map +0 -1
- package/dist/production/core/TreeFilterGenerator.js +0 -83
- package/dist/production/core/TreeFilterGenerator.js.map +0 -1
- package/dist/production/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/production/core/TreeParameterMerger.js.map +0 -1
- package/dist/production/core/TreeStore.cjs +0 -182
- package/dist/production/core/TreeStore.cjs.map +0 -1
- package/dist/production/core/TreeStore.js +0 -182
- package/dist/production/core/TreeStore.js.map +0 -1
- package/dist/production/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/production/core/VariableInputTransformer.js.map +0 -1
- package/dist/production/core/exceptions/ErrorLocator.cjs +0 -62
- package/dist/production/core/exceptions/ErrorLocator.cjs.map +0 -1
- package/dist/production/core/exceptions/ErrorLocator.js +0 -62
- package/dist/production/core/exceptions/ErrorLocator.js.map +0 -1
- package/dist/production/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/production/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/production/core/operations/EntityOperations.cjs +0 -233
- package/dist/production/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/production/core/operations/EntityOperations.js +0 -233
- package/dist/production/core/operations/EntityOperations.js.map +0 -1
- package/dist/production/core/operations/FieldOperations.cjs +0 -76
- package/dist/production/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/production/core/operations/FieldOperations.js +0 -76
- package/dist/production/core/operations/FieldOperations.js.map +0 -1
- package/dist/production/core/operations/ListOperations.cjs +0 -159
- package/dist/production/core/operations/ListOperations.cjs.map +0 -1
- package/dist/production/core/operations/ListOperations.js +0 -159
- package/dist/production/core/operations/ListOperations.js.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/production/core/schema/Schema.cjs.map +0 -1
- package/dist/production/core/schema/Schema.js.map +0 -1
- package/dist/production/core/schema/SchemaLoader.cjs +0 -28
- package/dist/production/core/schema/SchemaLoader.cjs.map +0 -1
- package/dist/production/core/schema/SchemaLoader.js +0 -28
- package/dist/production/core/schema/SchemaLoader.js.map +0 -1
- package/dist/production/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/production/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/production/core/state/StateIterator.cjs.map +0 -1
- package/dist/production/core/state/StateIterator.js.map +0 -1
- package/dist/production/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/production/core/state/getEntityMarker.js.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/production/dao/Environment.cjs.map +0 -1
- package/dist/production/dao/Environment.js.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/production/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/production/dao/VariableFieldValue.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/FieldHelper.cjs +0 -17
- package/dist/production/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/FieldHelper.js +0 -17
- package/dist/production/fieldHelpers/helpers/FieldHelper.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.js.map +0 -1
- package/dist/production/markers/EntityListSubTreeMarker.cjs +0 -23
- package/dist/production/markers/EntityListSubTreeMarker.cjs.map +0 -1
- package/dist/production/markers/EntityListSubTreeMarker.js +0 -23
- package/dist/production/markers/EntityListSubTreeMarker.js.map +0 -1
- package/dist/production/markers/EntitySubTreeMarker.cjs +0 -23
- package/dist/production/markers/EntitySubTreeMarker.cjs.map +0 -1
- package/dist/production/markers/EntitySubTreeMarker.js +0 -23
- package/dist/production/markers/EntitySubTreeMarker.js.map +0 -1
- package/dist/production/markers/FieldMarker.cjs +0 -20
- package/dist/production/markers/FieldMarker.cjs.map +0 -1
- package/dist/production/markers/FieldMarker.js +0 -20
- package/dist/production/markers/FieldMarker.js.map +0 -1
- package/dist/production/markers/HasManyRelationMarker.cjs +0 -23
- package/dist/production/markers/HasManyRelationMarker.cjs.map +0 -1
- package/dist/production/markers/HasManyRelationMarker.js +0 -23
- package/dist/production/markers/HasManyRelationMarker.js.map +0 -1
- package/dist/production/markers/HasOneRelationMarker.cjs +0 -23
- package/dist/production/markers/HasOneRelationMarker.cjs.map +0 -1
- package/dist/production/markers/HasOneRelationMarker.js +0 -23
- package/dist/production/markers/HasOneRelationMarker.js.map +0 -1
- package/dist/production/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/production/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/production/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/production/markers/ParentEntityMarker.js.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.js.map +0 -1
- package/dist/production/queryLanguage/CacheStore.cjs +0 -47
- package/dist/production/queryLanguage/CacheStore.cjs.map +0 -1
- package/dist/production/queryLanguage/CacheStore.js +0 -47
- package/dist/production/queryLanguage/CacheStore.js.map +0 -1
- package/dist/production/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/production/queryLanguage/MarkerFactory.js.map +0 -1
- package/dist/production/queryLanguage/Parser.cjs +0 -725
- package/dist/production/queryLanguage/Parser.cjs.map +0 -1
- package/dist/production/queryLanguage/Parser.js +0 -725
- package/dist/production/queryLanguage/Parser.js.map +0 -1
- package/dist/production/queryLanguage/QueryLanguage.cjs +0 -517
- package/dist/production/queryLanguage/QueryLanguage.cjs.map +0 -1
- package/dist/production/queryLanguage/QueryLanguage.js +0 -517
- package/dist/production/queryLanguage/QueryLanguage.js.map +0 -1
- package/dist/production/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/production/queryLanguage/QueryLanguageError.js.map +0 -1
- package/dist/production/queryLanguage/tokenList.cjs +0 -150
- package/dist/production/queryLanguage/tokenList.cjs.map +0 -1
- package/dist/production/queryLanguage/tokenList.js +0 -151
- package/dist/production/queryLanguage/tokenList.js.map +0 -1
- package/dist/production/structures/BijectiveIndexedMap.cjs +0 -120
- package/dist/production/structures/BijectiveIndexedMap.cjs.map +0 -1
- package/dist/production/structures/BijectiveIndexedMap.js +0 -120
- package/dist/production/structures/BijectiveIndexedMap.js.map +0 -1
- package/dist/production/structures/LRUCache.cjs +0 -35
- package/dist/production/structures/LRUCache.cjs.map +0 -1
- package/dist/production/structures/LRUCache.js +0 -35
- package/dist/production/structures/LRUCache.js.map +0 -1
- package/dist/production/structures/WeakIdCache.cjs +0 -33
- package/dist/production/structures/WeakIdCache.cjs.map +0 -1
- package/dist/production/structures/WeakIdCache.js +0 -33
- package/dist/production/structures/WeakIdCache.js.map +0 -1
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/production/treeParameters/LeafField.cjs.map +0 -1
- package/dist/production/treeParameters/LeafField.js.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/production/treeParameters/Relation.cjs.map +0 -1
- package/dist/production/treeParameters/Relation.js.map +0 -1
- package/dist/production/utils/Hashing.cjs.map +0 -1
- package/dist/production/utils/Hashing.js.map +0 -1
- package/dist/production/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/production/utils/TreeNodeUtils.js.map +0 -1
- package/dist/production/utils/assert.cjs +0 -11
- package/dist/production/utils/assert.cjs.map +0 -1
- package/dist/production/utils/assert.js +0 -11
- package/dist/production/utils/assert.js.map +0 -1
- package/dist/production/utils/assertNever.cjs.map +0 -1
- package/dist/production/utils/assertNever.js.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/production/utils/isEmptyObject.cjs.map +0 -1
- package/dist/production/utils/isEmptyObject.js.map +0 -1
- package/dist/production/utils/ucfirst.cjs.map +0 -1
- package/dist/production/utils/ucfirst.js.map +0 -1
- /package/dist/development/{BindingError.cjs → src/BindingError.cjs} +0 -0
- /package/dist/development/{BindingError.js → src/BindingError.js} +0 -0
- /package/dist/development/{accessorTree → src/accessorTree}/NormalizedPersistedData.cjs +0 -0
- /package/dist/development/{accessorTree → src/accessorTree}/NormalizedPersistedData.js +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityListAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityListAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/ErrorAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/ErrorAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/FieldAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/FieldAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/TreeRootAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/TreeRootAccessor.js +0 -0
- /package/dist/development/{bindingTypes.cjs → src/bindingTypes.cjs} +0 -0
- /package/dist/development/{bindingTypes.js → src/bindingTypes.js} +0 -0
- /package/dist/development/{core → src/core}/MarkerComparator.cjs +0 -0
- /package/dist/development/{core → src/core}/MarkerComparator.js +0 -0
- /package/dist/development/{core → src/core}/QueryGenerator.cjs +0 -0
- /package/dist/development/{core → src/core}/QueryGenerator.js +0 -0
- /package/dist/development/{core → src/core}/RequestResponseNormalizer.cjs +0 -0
- /package/dist/development/{core → src/core}/RequestResponseNormalizer.js +0 -0
- /package/dist/development/{core → src/core}/TreeAugmenter.cjs +0 -0
- /package/dist/development/{core → src/core}/TreeAugmenter.js +0 -0
- /package/dist/development/{core → src/core}/TreeParameterMerger.cjs +0 -0
- /package/dist/development/{core → src/core}/TreeParameterMerger.js +0 -0
- /package/dist/development/{core → src/core}/VariableInputTransformer.cjs +0 -0
- /package/dist/development/{core → src/core}/VariableInputTransformer.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/LocalizedBindingError.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/LocalizedBindingError.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/MarkerSugarer.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/MarkerSugarer.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/TreeParameterSugarer.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/TreeParameterSugarer.js +0 -0
- /package/dist/development/{core → src/core}/factories/createBatchUpdatesOptions.cjs +0 -0
- /package/dist/development/{core → src/core}/factories/createBatchUpdatesOptions.js +0 -0
- /package/dist/development/{core → src/core}/operations/FieldOperations.cjs +0 -0
- /package/dist/development/{core → src/core}/operations/FieldOperations.js +0 -0
- /package/dist/development/{core → src/core}/operations/OperationsHelpers.cjs +0 -0
- /package/dist/development/{core → src/core}/operations/OperationsHelpers.js +0 -0
- /package/dist/development/{core → src/core}/requestAliases/MutationAlias.cjs +0 -0
- /package/dist/development/{core → src/core}/requestAliases/MutationAlias.js +0 -0
- /package/dist/development/{core → src/core}/schema/Schema.cjs +0 -0
- /package/dist/development/{core → src/core}/schema/Schema.js +0 -0
- /package/dist/development/{core → src/core}/schema/SchemaPreprocessor.cjs +0 -0
- /package/dist/development/{core → src/core}/schema/SchemaPreprocessor.js +0 -0
- /package/dist/development/{core → src/core}/state/StateIterator.cjs +0 -0
- /package/dist/development/{core → src/core}/state/StateIterator.js +0 -0
- /package/dist/development/{core → src/core}/state/getEntityMarker.cjs +0 -0
- /package/dist/development/{core → src/core}/state/getEntityMarker.js +0 -0
- /package/dist/development/{core → src/core}/utils/createQueryBuilder.cjs +0 -0
- /package/dist/development/{core → src/core}/utils/createQueryBuilder.js +0 -0
- /package/dist/development/{core → src/core}/utils/getCombinedSignal.cjs +0 -0
- /package/dist/development/{core → src/core}/utils/getCombinedSignal.js +0 -0
- /package/dist/development/{dao → src/dao}/Environment.cjs +0 -0
- /package/dist/development/{dao → src/dao}/Environment.js +0 -0
- /package/dist/development/{dao → src/dao}/TreeNodeEnvironmentFactory.cjs +0 -0
- /package/dist/development/{dao → src/dao}/TreeNodeEnvironmentFactory.js +0 -0
- /package/dist/development/{dao → src/dao}/VariableFieldValue.cjs +0 -0
- /package/dist/development/{dao → src/dao}/VariableFieldValue.js +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.cjs +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.js +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.cjs +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.js +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldMarkersContainer.cjs +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldMarkersContainer.js +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldsWithHoistablesMarker.cjs +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldsWithHoistablesMarker.js +0 -0
- /package/dist/development/{markers → src/markers}/MarkerTreeRoot.cjs +0 -0
- /package/dist/development/{markers → src/markers}/MarkerTreeRoot.js +0 -0
- /package/dist/development/{markers → src/markers}/ParentEntityMarker.cjs +0 -0
- /package/dist/development/{markers → src/markers}/ParentEntityMarker.js +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderGenerator.cjs +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderGenerator.js +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderParametersGenerator.cjs +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderParametersGenerator.js +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/MarkerFactory.cjs +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/MarkerFactory.js +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/QueryLanguageError.cjs +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/QueryLanguageError.js +0 -0
- /package/dist/development/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.cjs +0 -0
- /package/dist/development/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityCreationParameters.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityCreationParameters.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityListPreferences.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityListPreferences.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EventListenersStore.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EventListenersStore.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/LeafField.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/LeafField.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/QualifiedEntityParameters.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/QualifiedEntityParameters.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/Relation.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/Relation.js +0 -0
- /package/dist/development/{utils → src/utils}/Hashing.cjs +0 -0
- /package/dist/development/{utils → src/utils}/Hashing.js +0 -0
- /package/dist/development/{utils → src/utils}/TreeNodeUtils.cjs +0 -0
- /package/dist/development/{utils → src/utils}/TreeNodeUtils.js +0 -0
- /package/dist/development/{utils → src/utils}/assertNever.cjs +0 -0
- /package/dist/development/{utils → src/utils}/assertNever.js +0 -0
- /package/dist/development/{utils → src/utils}/generateEnumerabilityPreventingEntropy.cjs +0 -0
- /package/dist/development/{utils → src/utils}/generateEnumerabilityPreventingEntropy.js +0 -0
- /package/dist/development/{utils → src/utils}/isEmptyObject.cjs +0 -0
- /package/dist/development/{utils → src/utils}/isEmptyObject.js +0 -0
- /package/dist/development/{utils → src/utils}/ucfirst.cjs +0 -0
- /package/dist/development/{utils → src/utils}/ucfirst.js +0 -0
- /package/dist/production/{BindingError.cjs → src/BindingError.cjs} +0 -0
- /package/dist/production/{BindingError.js → src/BindingError.js} +0 -0
- /package/dist/production/{accessorTree → src/accessorTree}/NormalizedPersistedData.cjs +0 -0
- /package/dist/production/{accessorTree → src/accessorTree}/NormalizedPersistedData.js +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityListAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityListAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/ErrorAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/ErrorAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/FieldAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/FieldAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/TreeRootAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/TreeRootAccessor.js +0 -0
- /package/dist/production/{bindingTypes.cjs → src/bindingTypes.cjs} +0 -0
- /package/dist/production/{bindingTypes.js → src/bindingTypes.js} +0 -0
- /package/dist/production/{core → src/core}/MarkerComparator.cjs +0 -0
- /package/dist/production/{core → src/core}/MarkerComparator.js +0 -0
- /package/dist/production/{core → src/core}/QueryGenerator.cjs +0 -0
- /package/dist/production/{core → src/core}/QueryGenerator.js +0 -0
- /package/dist/production/{core → src/core}/RequestResponseNormalizer.cjs +0 -0
- /package/dist/production/{core → src/core}/RequestResponseNormalizer.js +0 -0
- /package/dist/production/{core → src/core}/TreeAugmenter.cjs +0 -0
- /package/dist/production/{core → src/core}/TreeAugmenter.js +0 -0
- /package/dist/production/{core → src/core}/TreeParameterMerger.cjs +0 -0
- /package/dist/production/{core → src/core}/TreeParameterMerger.js +0 -0
- /package/dist/production/{core → src/core}/VariableInputTransformer.cjs +0 -0
- /package/dist/production/{core → src/core}/VariableInputTransformer.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/LocalizedBindingError.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/LocalizedBindingError.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/MarkerSugarer.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/MarkerSugarer.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/TreeParameterSugarer.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/TreeParameterSugarer.js +0 -0
- /package/dist/production/{core → src/core}/factories/createBatchUpdatesOptions.cjs +0 -0
- /package/dist/production/{core → src/core}/factories/createBatchUpdatesOptions.js +0 -0
- /package/dist/production/{core → src/core}/operations/OperationsHelpers.cjs +0 -0
- /package/dist/production/{core → src/core}/operations/OperationsHelpers.js +0 -0
- /package/dist/production/{core → src/core}/requestAliases/MutationAlias.cjs +0 -0
- /package/dist/production/{core → src/core}/requestAliases/MutationAlias.js +0 -0
- /package/dist/production/{core → src/core}/schema/Schema.cjs +0 -0
- /package/dist/production/{core → src/core}/schema/Schema.js +0 -0
- /package/dist/production/{core → src/core}/schema/SchemaPreprocessor.cjs +0 -0
- /package/dist/production/{core → src/core}/schema/SchemaPreprocessor.js +0 -0
- /package/dist/production/{core → src/core}/state/StateIterator.cjs +0 -0
- /package/dist/production/{core → src/core}/state/StateIterator.js +0 -0
- /package/dist/production/{core → src/core}/state/getEntityMarker.cjs +0 -0
- /package/dist/production/{core → src/core}/state/getEntityMarker.js +0 -0
- /package/dist/production/{core → src/core}/utils/createQueryBuilder.cjs +0 -0
- /package/dist/production/{core → src/core}/utils/createQueryBuilder.js +0 -0
- /package/dist/production/{core → src/core}/utils/getCombinedSignal.cjs +0 -0
- /package/dist/production/{core → src/core}/utils/getCombinedSignal.js +0 -0
- /package/dist/production/{dao → src/dao}/Environment.cjs +0 -0
- /package/dist/production/{dao → src/dao}/Environment.js +0 -0
- /package/dist/production/{dao → src/dao}/TreeNodeEnvironmentFactory.cjs +0 -0
- /package/dist/production/{dao → src/dao}/TreeNodeEnvironmentFactory.js +0 -0
- /package/dist/production/{dao → src/dao}/VariableFieldValue.cjs +0 -0
- /package/dist/production/{dao → src/dao}/VariableFieldValue.js +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.cjs +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.js +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.cjs +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.js +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldMarkersContainer.cjs +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldMarkersContainer.js +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldsWithHoistablesMarker.cjs +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldsWithHoistablesMarker.js +0 -0
- /package/dist/production/{markers → src/markers}/MarkerTreeRoot.cjs +0 -0
- /package/dist/production/{markers → src/markers}/MarkerTreeRoot.js +0 -0
- /package/dist/production/{markers → src/markers}/ParentEntityMarker.cjs +0 -0
- /package/dist/production/{markers → src/markers}/ParentEntityMarker.js +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderGenerator.cjs +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderGenerator.js +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderParametersGenerator.cjs +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderParametersGenerator.js +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/MarkerFactory.cjs +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/MarkerFactory.js +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/QueryLanguageError.cjs +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/QueryLanguageError.js +0 -0
- /package/dist/production/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.cjs +0 -0
- /package/dist/production/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityCreationParameters.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityCreationParameters.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityListPreferences.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityListPreferences.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EventListenersStore.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EventListenersStore.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/LeafField.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/LeafField.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/QualifiedEntityParameters.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/QualifiedEntityParameters.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/Relation.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/Relation.js +0 -0
- /package/dist/production/{utils → src/utils}/Hashing.cjs +0 -0
- /package/dist/production/{utils → src/utils}/Hashing.js +0 -0
- /package/dist/production/{utils → src/utils}/TreeNodeUtils.cjs +0 -0
- /package/dist/production/{utils → src/utils}/TreeNodeUtils.js +0 -0
- /package/dist/production/{utils → src/utils}/assertNever.cjs +0 -0
- /package/dist/production/{utils → src/utils}/assertNever.js +0 -0
- /package/dist/production/{utils → src/utils}/generateEnumerabilityPreventingEntropy.cjs +0 -0
- /package/dist/production/{utils → src/utils}/generateEnumerabilityPreventingEntropy.js +0 -0
- /package/dist/production/{utils → src/utils}/isEmptyObject.cjs +0 -0
- /package/dist/production/{utils → src/utils}/isEmptyObject.js +0 -0
- /package/dist/production/{utils → src/utils}/ucfirst.cjs +0 -0
- /package/dist/production/{utils → src/utils}/ucfirst.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityAccessor.js","sources":["../../../src/accessors/EntityAccessor.ts"],"sourcesContent":["import { RuntimeId, SingleEntityPersistedData } from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { EntityOperations } from '../core/operations'\nimport type { Environment } from '../dao'\nimport { EntityFieldMarkers, HasManyRelationMarker, HasOneRelationMarker, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tFieldValue,\n\tHasManyRelation,\n\tHasOneRelation,\n\tRelativeEntityList,\n\tRelativeSingleEntity,\n\tRelativeSingleField,\n\tSugaredRelativeEntityList,\n\tSugaredRelativeSingleEntity,\n\tSugaredRelativeSingleField,\n} from '../treeParameters'\nimport type { AsyncBatchUpdatesOptions } from './AsyncBatchUpdatesOptions'\nimport type { BatchUpdatesOptions } from './BatchUpdatesOptions'\nimport { EntityListAccessor } from './EntityListAccessor'\nimport type { Errorable } from './Errorable'\nimport { ErrorAccessor } from './ErrorAccessor'\nimport type { FieldAccessor } from './FieldAccessor'\nimport type { PersistErrorOptions } from './PersistErrorOptions'\nimport type { PersistSuccessOptions } from './PersistSuccessOptions'\nimport type { EntityRealmState } from '../core/state'\nimport { getEntityMarker } from '../core/state'\nimport { TreeNodeUtils } from '../utils/TreeNodeUtils'\nimport { PlaceholderParametersGenerator } from '../markers/PlaceholderParametersGenerator'\n\nclass EntityAccessor implements Errorable {\n\tpublic constructor(\n\t\tprivate readonly state: EntityRealmState,\n\t\tprivate readonly operations: EntityOperations,\n\t\tprivate readonly runtimeId: RuntimeId,\n\t\tpublic readonly key: EntityRealmKey, // ⚠️ This is *NOT* the id! ⚠️\n\t\tpublic readonly name: EntityName,\n\t\tprivate readonly fieldData: EntityAccessor.FieldData,\n\t\tprivate readonly dataFromServer: SingleEntityPersistedData | undefined,\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tpublic readonly errors: ErrorAccessor | undefined,\n\t\tpublic readonly environment: Environment,\n\t\tpublic readonly getAccessor: EntityAccessor.GetEntityAccessor,\n\t) {\n\t}\n\n\tpublic get idOnServer(): EntityId | undefined {\n\t\treturn this.runtimeId.existsOnServer ? this.runtimeId.value : undefined\n\t}\n\n\t/**\n\t * Note that for entities that don't yet exist on server this will return a dummy id.\n\t */\n\tpublic get id(): EntityId {\n\t\treturn this.runtimeId.value\n\t}\n\n\tpublic get existsOnServer(): boolean {\n\t\treturn this.runtimeId.existsOnServer\n\t}\n\n\t//\n\n\tpublic addError(error: ErrorAccessor.Error | string): () => void {\n\t\treturn this.operations.addError(this.state, ErrorAccessor.normalizeError(error))\n\t}\n\n\tpublic addEventListener<Type extends keyof EntityAccessor.RuntimeEntityEventListenerMap>(\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: EntityAccessor.EntityEventListenerMap[Type],\n\t): () => void {\n\t\treturn this.operations.addEventListener(this.state, event, listener)\n\t}\n\n\tpublic batchUpdates(performUpdates: EntityAccessor.BatchUpdatesHandler): void {\n\t\tthis.operations.batchUpdates(this.state, performUpdates)\n\t}\n\n\tpublic connectEntityAtField(field: SugaredRelativeSingleEntity | string, entityToConnect: EntityAccessor): void {\n\t\tconst desugared = QueryLanguage.desugarRelativeSingleEntity(field, this.environment)\n\t\tconst relativeTo = this.getRelativeSingleEntity({\n\t\t\thasOneRelationPath: desugared.hasOneRelationPath.slice(0, -1),\n\t\t})\n\t\tconst fieldName = desugared.hasOneRelationPath[desugared.hasOneRelationPath.length - 1].field\n\t\tthis.operations.connectEntityAtField(relativeTo.state, fieldName, entityToConnect)\n\t}\n\n\tpublic disconnectEntityAtField(field: SugaredRelativeSingleEntity | string, initializeReplacement?: EntityAccessor.BatchUpdatesHandler): void {\n\t\tconst desugared = QueryLanguage.desugarRelativeSingleEntity(field, this.environment)\n\t\tconst relativeTo = this.getRelativeSingleEntity({\n\t\t\thasOneRelationPath: desugared.hasOneRelationPath.slice(0, -1),\n\t\t})\n\t\tconst fieldName = desugared.hasOneRelationPath[desugared.hasOneRelationPath.length - 1].field\n\t\tthis.operations.disconnectEntityAtField(relativeTo.state, fieldName, initializeReplacement)\n\t}\n\n\tpublic deleteEntity(): void {\n\t\tthis.operations.deleteEntity(this.state)\n\t}\n\n\t//\n\n\tpublic updateValues(fieldValuePairs: EntityAccessor.FieldValuePairs): void {\n\t\tthis.batchUpdates(getAccessor => {\n\t\t\tconst entries = Array.isArray(fieldValuePairs) ? fieldValuePairs : Object.entries(fieldValuePairs)\n\n\t\t\tfor (const [field, value] of entries) {\n\t\t\t\tgetAccessor().getField(field).updateValue(value)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Please keep in mind that this method signature is literally impossible to implement safely. The generic parameter\n\t * is really just a way to succinctly write a type cast. Nothing more, really.\n\t */\n\tpublic getField<Value extends FieldValue = FieldValue>(field: SugaredRelativeSingleField | string): FieldAccessor<Value> {\n\t\treturn this.getRelativeSingleField<Value>(QueryLanguage.desugarRelativeSingleField(field, this.environment))\n\t}\n\n\tpublic getEntity(entity: SugaredRelativeSingleEntity | string): EntityAccessor {\n\t\treturn this.getRelativeSingleEntity(QueryLanguage.desugarRelativeSingleEntity(entity, this.environment))\n\t}\n\n\tpublic getEntityList(entityList: SugaredRelativeEntityList | string): EntityListAccessor {\n\t\treturn this.getRelativeEntityList(QueryLanguage.desugarRelativeEntityList(entityList, this.environment))\n\t}\n\n\t//\n\n\t/**\n\t * @see EntityAccessor.getField\n\t */\n\tpublic getRelativeSingleField<Value extends FieldValue = FieldValue>(field: RelativeSingleField): FieldAccessor<Value> {\n\t\tconst entity = this.getRelativeSingleEntity(field)\n\t\tconst fieldPlaceholder = PlaceholderGenerator.getFieldPlaceholder(field.field)\n\t\tconst accessor = entity.fieldData.get(fieldPlaceholder)\n\t\tif (accessor) {\n\t\t\treturn accessor.getAccessor() as FieldAccessor<Value>\n\t\t}\n\n\t\tTreeNodeUtils.resolveColumn(entity.environment, field.field)\n\n\t\tthrow new BindingError(''\n\t\t\t+ 'EntityAccessor: cannot access field '\n\t\t\t+ `'${field.field}' on ${TreeNodeUtils.describeLocation(entity.environment)}.\\n`\n\t\t\t+ 'The cause of the error is that this relation has not been registered during the static rendering process. As a result, it lacks a required marker and accessor.',\n\t\t)\n\t}\n\n\tpublic getRelativeSingleEntity(relativeSingleEntity: RelativeSingleEntity): EntityAccessor {\n\t\tlet relativeTo: EntityAccessor = this\n\n\t\tfor (const hasOneRelation of relativeSingleEntity.hasOneRelationPath) {\n\t\t\tconst fieldPlaceholder = PlaceholderGenerator.getHasOneRelationPlaceholder(hasOneRelation)\n\t\t\tconst accessor = relativeTo.fieldData.get(fieldPlaceholder)\n\t\t\tif (!accessor) {\n\t\t\t\treturn this.raiseInvalidHasOneRelationError(relativeTo, hasOneRelation)\n\t\t\t}\n\n\t\t\trelativeTo = accessor.getAccessor() as EntityAccessor\n\t\t}\n\t\treturn relativeTo\n\t}\n\n\tpublic getRelativeEntityList(entityList: RelativeEntityList): EntityListAccessor {\n\t\tconst entity = this.getRelativeSingleEntity(entityList)\n\t\tconst fieldPlaceholder = PlaceholderGenerator.getHasManyRelationPlaceholder(entityList.hasManyRelation)\n\t\tconst accessor = entity.fieldData.get(fieldPlaceholder)\n\t\tif (!accessor) {\n\t\t\treturn this.raiseInvalidHasManyRelationError(entity, entityList.hasManyRelation)\n\t\t}\n\n\t\treturn accessor.getAccessor() as EntityListAccessor\n\t}\n\n\tprivate raiseInvalidHasOneRelationError(relativeTo: EntityAccessor, hasOneRelation: HasOneRelation): never {\n\t\tTreeNodeUtils.resolveHasOneRelation(relativeTo.environment, hasOneRelation.field, !!hasOneRelation.reducedBy)\n\n\t\tconst entityMarker = relativeTo.getMarker()\n\t\tconst possibleMarkers = this.getMarkersOfType(entityMarker.fields.markers, HasOneRelationMarker, hasOneRelation.field)\n\t\tconst markerParams = possibleMarkers.map(it => PlaceholderParametersGenerator.createHasOneRelationParameters(it.parameters))\n\n\t\tconst relationParams = PlaceholderParametersGenerator.createHasOneRelationParameters(hasOneRelation)\n\n\t\tthis.raiseUndefinedRelationError(hasOneRelation.field, relativeTo.environment, relationParams, markerParams)\n\t}\n\n\tprivate raiseInvalidHasManyRelationError(entity: EntityAccessor, hasManyRelation: HasManyRelation): never {\n\t\tTreeNodeUtils.resolveHasManyRelation(entity.environment, hasManyRelation.field)\n\n\t\tconst entityMarker = entity.getMarker()\n\t\tconst possibleMarkers = this.getMarkersOfType(entityMarker.fields.markers, HasManyRelationMarker, hasManyRelation.field)\n\t\tconst markerParams = possibleMarkers.map(it => PlaceholderParametersGenerator.createHasManyRelationParameters(it.parameters))\n\n\t\tconst relationParams = PlaceholderParametersGenerator.createHasManyRelationParameters(hasManyRelation)\n\n\t\tthis.raiseUndefinedRelationError(hasManyRelation.field, entity.environment, relationParams, markerParams)\n\t}\n\n\tprivate raiseUndefinedRelationError(field: string, environment: Environment, relationParams: any, otherMarkersParams: any[]): never {\n\t\tconst hint = this.createHintMessage(otherMarkersParams)\n\t\tthrow new BindingError(''\n\t\t\t+ `EntityAccessor: cannot access relation `\n\t\t\t+ `'${field}' on ${TreeNodeUtils.describeLocation(environment)}.\\n`\n\t\t\t+ 'The cause of the error is that this relation has not been registered during the static rendering process. As a result, it lacks a required marker and accessor.\\n\\n'\n\t\t\t+ 'Provided parameters:\\n'\n\t\t\t+ JSON.stringify(relationParams)\n\t\t\t+ hint,\n\t\t)\n\t}\n\n\tprivate createHintMessage(params: any[]): string {\n\t\tif (params.length === 0) {\n\t\t\treturn ''\n\t\t}\n\n\t\tconst serializedParams = params.map(it => JSON.stringify(it)).join('\\n')\n\t\tconst message = params.length === 1\n\t\t\t? 'However, there is existing marker for the same field, but it have different parameters:'\n\t\t\t: 'However, there are existing markers for the same field, but they have different parameters:'\n\n\t\treturn `\\n\\n${message}\\n${serializedParams}`\n\t}\n\n\tprivate getMarkersOfType<T extends { new(...args: any[]): HasManyRelationMarker | HasOneRelationMarker }>(\n\t\tmarkers: EntityFieldMarkers,\n\t\tmarkerConstructor: T,\n\t\tfieldName: string,\n\t): InstanceType<T>[] {\n\t\treturn Array.from(markers.values())\n\t\t\t.filter((it): it is InstanceType<T> => (it instanceof markerConstructor) && it.parameters.field === fieldName)\n\t}\n\n\tpublic getParent(): EntityAccessor | EntityListAccessor | undefined {\n\t\tconst blueprint = this.state.blueprint\n\t\tif (blueprint.type === 'subTree') {\n\t\t\treturn undefined\n\t\t}\n\t\treturn blueprint.parent.getAccessor()\n\t}\n\n\tpublic getMarker() {\n\t\treturn getEntityMarker(this.state)\n\t}\n}\n\nnamespace EntityAccessor {\n\texport interface FieldDatum {\n\t\tgetAccessor(): NestedAccessor\n\t}\n\texport type NestedAccessor = EntityAccessor | EntityListAccessor | FieldAccessor<any>\n\n\texport type FieldValuePairs =\n\t\t| {\n\t\t\t\t[field: string]: FieldValue\n\t\t }\n\t\t| Iterable<[SugaredRelativeSingleField | string, FieldValue]>\n\n\texport type FieldData = Map<FieldName, FieldDatum>\n\n\texport type GetEntityAccessor = () => EntityAccessor\n\texport type BatchUpdatesHandler = (getAccessor: GetEntityAccessor, options: BatchUpdatesOptions) => void\n\texport type UpdateListener = (accessor: EntityAccessor) => void\n\n\texport type BeforePersistHandler = (\n\t\tgetAccessor: GetEntityAccessor,\n\t\toptions: AsyncBatchUpdatesOptions,\n\t) => void | BeforePersistHandler | Promise<void | BeforePersistHandler>\n\n\texport type PersistErrorHandler = (\n\t\tgetAccessor: GetEntityAccessor,\n\t\toptions: PersistErrorOptions,\n\t) => void | Promise<void>\n\n\texport type PersistSuccessHandler = (\n\t\tgetAccessor: GetEntityAccessor,\n\t\toptions: PersistSuccessOptions,\n\t) => void | PersistSuccessHandler | Promise<void | PersistSuccessHandler>\n\n\texport interface RuntimeEntityEventListenerMap {\n\t\tbeforePersist: BeforePersistHandler\n\t\tbeforeUpdate: BatchUpdatesHandler\n\t\tconnectionUpdate: UpdateListener\n\t\tpersistError: PersistErrorHandler\n\t\tpersistSuccess: PersistSuccessHandler\n\t\tupdate: UpdateListener\n\t}\n\texport interface EntityEventListenerMap extends RuntimeEntityEventListenerMap {\n\t\tinitialize: BatchUpdatesHandler\n\t}\n\texport type EntityEventType = keyof EntityEventListenerMap\n}\n\nexport { EntityAccessor }\n"],"names":[],"mappings":";;;;;;;;;AAkCA,MAAM,eAAoC;AAAA,EAClC,YACW,OACA,YACA,WACD,KACA,MACC,WACA,gBACD,uBACA,QACA,aACA,aACf;AAXgB,SAAA,QAAA;AACA,SAAA,aAAA;AACA,SAAA,YAAA;AACD,SAAA,MAAA;AACA,SAAA,OAAA;AACC,SAAA,YAAA;AACA,SAAA,iBAAA;AACD,SAAA,wBAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AACA,SAAA,cAAA;AAAA,EAEjB;AAAA,EAEA,IAAW,aAAmC;AAC7C,WAAO,KAAK,UAAU,iBAAiB,KAAK,UAAU,QAAQ;AAAA,EAC/D;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,KAAe;AACzB,WAAO,KAAK,UAAU;AAAA,EACvB;AAAA,EAEA,IAAW,iBAA0B;AACpC,WAAO,KAAK,UAAU;AAAA,EACvB;AAAA;AAAA,EAIO,SAAS,OAAiD;AACzD,WAAA,KAAK,WAAW,SAAS,KAAK,OAAO,cAAc,eAAe,KAAK,CAAC;A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AAO,WAAW,IAC/B,4FACA;AAEI,WAAA;AAAA;AAAA,EAAO,OAAO;AAAA,EAAK,gBAAgB;AAAA,EAC3C;AAAA,EAEQ,iBACP,SACA,mBACA,WACoB;AACpB,WAAO,MAAM,KAAK,QAAQ,OAAQ,CAAA,EAChC,OAAO,CAAC,OAA+B,cAAc,qBAAsB,GAAG,WAAW,UAAU,SAAS;AAAA,EAC/G;AAAA,EAEO,YAA6D;AAC7D,UAAA,YAAY,KAAK,MAAM;AACzB,QAAA,UAAU,SAAS,WAAW;AAC1B,aAAA;AAAA,IACR;AACO,WAAA,UAAU,OAAO;EACzB;AAAA,EAEO,YAAY;AACX,WAAA,gBAAgB,KAAK,KAAK;AAAA,EAClC;AACD;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityListAccessor.cjs","sources":["../../../src/accessors/EntityListAccessor.ts"],"sourcesContent":["import type { ListOperations } from '../core/operations'\nimport type { Environment } from '../dao'\nimport type { EntityId, EntityName, EntityRealmKey } from '../treeParameters'\nimport type { AsyncBatchUpdatesOptions } from './AsyncBatchUpdatesOptions'\nimport type { BatchUpdatesOptions } from './BatchUpdatesOptions'\nimport type { EntityAccessor } from './EntityAccessor'\nimport type { Errorable } from './Errorable'\nimport { ErrorAccessor } from './ErrorAccessor'\nimport type { PersistErrorOptions } from './PersistErrorOptions'\nimport type { PersistSuccessOptions } from './PersistSuccessOptions'\nimport type { EntityListState } from '../core/state'\nimport { RuntimeId } from '../accessorTree'\nimport { EntityListSubTreeMarker, HasManyRelationMarker } from '../markers'\n\nclass EntityListAccessor implements Errorable {\n\tpublic constructor(\n\t\tprivate readonly state: EntityListState,\n\t\tprivate readonly operations: ListOperations,\n\t\tpublic readonly name: EntityName,\n\t\tprivate readonly _children: ReadonlyMap<EntityId, { getAccessor: EntityAccessor.GetEntityAccessor }>,\n\t\tprivate readonly _idsPersistedOnServer: ReadonlySet<EntityId>,\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tpublic readonly errors: ErrorAccessor | undefined,\n\t\tpublic readonly environment: Environment,\n\t\tpublic readonly getAccessor: EntityListAccessor.GetEntityListAccessor,\n\t) {}\n\n\t/**\n\t * Returns all entity keys that are on the list.\n\t * **KEYS ARE NOT IDS!**\n\t * @see EntityAccessor.key\n\t */\n\tpublic *keys(): IterableIterator<EntityRealmKey> {\n\t\tfor (const accessor of this) {\n\t\t\tyield accessor.key\n\t\t}\n\t}\n\n\tpublic *ids(): IterableIterator<EntityId> {\n\t\treturn this._children.keys()\n\t}\n\n\t/**\n\t * This will only contain the ids that the server knows about. Not necessarily the ids that have been added on\n\t * the list since the last server query.\n\t */\n\tpublic get idsPersistedOnServer(): Set<EntityId> {\n\t\treturn new Set(this._idsPersistedOnServer)\n\t}\n\n\tpublic *[Symbol.iterator](): IterableIterator<EntityAccessor> {\n\t\tfor (const { getAccessor } of this._children.values()) {\n\t\t\tyield getAccessor()\n\t\t}\n\t}\n\n\tpublic hasEntityId(id: EntityId): boolean {\n\t\treturn this._children.has(id)\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.length === 0\n\t}\n\n\tpublic get length(): number {\n\t\treturn this._children.size\n\t}\n\n\tpublic hasEntityOnServer(entityOrItsId: EntityAccessor | EntityId): boolean {\n\t\tif (typeof entityOrItsId === 'string' || typeof entityOrItsId === 'number') {\n\t\t\treturn this.idsPersistedOnServer.has(entityOrItsId)\n\t\t}\n\t\tconst idOnServer = entityOrItsId.idOnServer\n\t\tif (idOnServer === undefined) {\n\t\t\treturn false\n\t\t}\n\t\treturn this.idsPersistedOnServer.has(idOnServer)\n\t}\n\n\tpublic deleteAll(): void {\n\t\tthis.batchUpdates(getAccessor => {\n\t\t\tconst list = getAccessor()\n\t\t\tfor (const entity of list) {\n\t\t\t\tentity.deleteEntity()\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic disconnectAll(): void {\n\t\tthis.batchUpdates(getAccessor => {\n\t\t\tconst list = getAccessor()\n\t\t\tfor (const entity of list) {\n\t\t\t\tlist.disconnectEntity(entity)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic addError(error: ErrorAccessor.Error | string): () => void {\n\t\treturn this.operations.addError(this.state, ErrorAccessor.normalizeError(error))\n\t}\n\n\tpublic addEventListener<Type extends keyof EntityListAccessor.RuntimeEntityListEventListenerMap>(\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: EntityListAccessor.RuntimeEntityListEventListenerMap[Type],\n\t) {\n\t\treturn this.operations.addEventListener(this.state, 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\treturn this.operations.addChildEventListener(this.state, event, listener)\n\t}\n\n\tpublic batchUpdates(performUpdates: EntityListAccessor.BatchUpdatesHandler): void {\n\t\tthis.operations.batchUpdates(this.state, performUpdates)\n\t}\n\n\tpublic connectEntity(entityToConnect: EntityAccessor): void {\n\t\tthis.operations.connectEntity(this.state, entityToConnect)\n\t}\n\n\tpublic createNewEntity(initialize?: EntityAccessor.BatchUpdatesHandler): RuntimeId {\n\t\treturn this.operations.createNewEntity(this.state, initialize)\n\t}\n\tpublic disconnectEntity(childEntity: EntityAccessor, options: { noPersist?: boolean } = {}): void {\n\t\tthis.operations.disconnectEntity(this.state, childEntity, options)\n\t}\n\tpublic getChildEntityById(id: EntityId): EntityAccessor {\n\t\treturn this.operations.getChildEntityById(this.state, id)\n\t}\n\n\tpublic getParent(): EntityAccessor | undefined {\n\t\treturn this.state.blueprint.parent?.getAccessor()\n\t}\n\n\tpublic getMarker(): EntityListSubTreeMarker | HasManyRelationMarker {\n\t\treturn this.state.blueprint.marker\n\t}\n}\n\nnamespace EntityListAccessor {\n\texport type GetEntityListAccessor = () => EntityListAccessor\n\texport type BatchUpdatesHandler = (getAccessor: GetEntityListAccessor, options: BatchUpdatesOptions) => void\n\n\texport type UpdateListener = (accessor: EntityListAccessor) => void\n\n\texport type BeforePersistHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: AsyncBatchUpdatesOptions,\n\t) => void | Promise<void | BeforePersistHandler>\n\n\texport type PersistErrorHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: PersistErrorOptions,\n\t) => void | Promise<void>\n\n\texport type PersistSuccessHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: PersistSuccessOptions,\n\t) => void | Promise<void | PersistSuccessHandler>\n\n\texport type ChildEventListenerMap = {\n\t\t[EventType in keyof Pick<EntityAccessor.EntityEventListenerMap, 'beforeUpdate' | 'initialize' | 'update'> &\n\t\t\tstring as `child${Capitalize<EventType>}`]: EntityAccessor.EntityEventListenerMap[EventType]\n\t}\n\n\texport interface RuntimeEntityListEventListenerMap {\n\t\tbeforePersist: BeforePersistHandler\n\t\tbeforeUpdate: BatchUpdatesHandler\n\t\tpersistError: PersistErrorHandler\n\t\tpersistSuccess: PersistSuccessHandler\n\t\tupdate: UpdateListener\n\t}\n\texport interface EntityListEventListenerMap extends RuntimeEntityListEventListenerMap {\n\t\tinitialize: BatchUpdatesHandler\n\t}\n\texport type EntityListEventType = keyof EntityListEventListenerMap\n}\n\nexport { EntityListAccessor }\n"],"names":["ErrorAccessor"],"mappings":";;;AAcA,MAAM,mBAAwC;AAAA,EACtC,YACW,OACA,YACD,MACC,WACA,uBACD,uBACA,QACA,aACA,aACf;AATgB,SAAA,QAAA;AACA,SAAA,aAAA;AACD,SAAA,OAAA;AACC,SAAA,YAAA;AACA,SAAA,wBAAA;AACD,SAAA,wBAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AACA,SAAA,cAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOH,CAAQ,OAAyC;AAChD,eAAW,YAAY,MAAM;AAC5B,YAAM,SAAS;AAAA,IAChB;AAAA,EACD;AAAA,EAEA,CAAQ,MAAkC;AAClC,WA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OACA,OACA,UACC;AACD,WAAO,KAAK,WAAW,sBAAsB,KAAK,OAAO,OAAO,QAAQ;AAAA,EACzE;AAAA,EAEO,aAAa,gBAA8D;AACjF,SAAK,WAAW,aAAa,KAAK,OAAO,cAAc;AAAA,EACxD;AAAA,EAEO,cAAc,iBAAuC;AAC3D,SAAK,WAAW,cAAc,KAAK,OAAO,eAAe;AAAA,EAC1D;AAAA,EAEO,gBAAgB,YAA4D;AAClF,WAAO,KAAK,WAAW,gBAAgB,KAAK,OAAO,UAAU;AAAA,EAC9D;AAAA,EACO,iBAAiB,aAA6B,UAAmC,IAAU;AACjG,SAAK,WAAW,iBAAiB,KAAK,OAAO,aAAa,OAAO;AAAA,EAClE;AAAA,EACO,mBAAmB,IAA8B;AACvD,WAAO,KAAK,WAAW,mBAAmB,KAAK,OAAO,EAAE;AAAA,EACzD;AAAA,EAEO,YAAwC;AAC9C,WAAO,KAAK,MAAM,UAAU,QAAQ,YAAY;AAAA,EACjD;AAAA,EAEO,YAA6D;AAC5D,WAAA,KAAK,MAAM,UAAU;AAAA,EAC7B;AACD;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityListAccessor.js","sources":["../../../src/accessors/EntityListAccessor.ts"],"sourcesContent":["import type { ListOperations } from '../core/operations'\nimport type { Environment } from '../dao'\nimport type { EntityId, EntityName, EntityRealmKey } from '../treeParameters'\nimport type { AsyncBatchUpdatesOptions } from './AsyncBatchUpdatesOptions'\nimport type { BatchUpdatesOptions } from './BatchUpdatesOptions'\nimport type { EntityAccessor } from './EntityAccessor'\nimport type { Errorable } from './Errorable'\nimport { ErrorAccessor } from './ErrorAccessor'\nimport type { PersistErrorOptions } from './PersistErrorOptions'\nimport type { PersistSuccessOptions } from './PersistSuccessOptions'\nimport type { EntityListState } from '../core/state'\nimport { RuntimeId } from '../accessorTree'\nimport { EntityListSubTreeMarker, HasManyRelationMarker } from '../markers'\n\nclass EntityListAccessor implements Errorable {\n\tpublic constructor(\n\t\tprivate readonly state: EntityListState,\n\t\tprivate readonly operations: ListOperations,\n\t\tpublic readonly name: EntityName,\n\t\tprivate readonly _children: ReadonlyMap<EntityId, { getAccessor: EntityAccessor.GetEntityAccessor }>,\n\t\tprivate readonly _idsPersistedOnServer: ReadonlySet<EntityId>,\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tpublic readonly errors: ErrorAccessor | undefined,\n\t\tpublic readonly environment: Environment,\n\t\tpublic readonly getAccessor: EntityListAccessor.GetEntityListAccessor,\n\t) {}\n\n\t/**\n\t * Returns all entity keys that are on the list.\n\t * **KEYS ARE NOT IDS!**\n\t * @see EntityAccessor.key\n\t */\n\tpublic *keys(): IterableIterator<EntityRealmKey> {\n\t\tfor (const accessor of this) {\n\t\t\tyield accessor.key\n\t\t}\n\t}\n\n\tpublic *ids(): IterableIterator<EntityId> {\n\t\treturn this._children.keys()\n\t}\n\n\t/**\n\t * This will only contain the ids that the server knows about. Not necessarily the ids that have been added on\n\t * the list since the last server query.\n\t */\n\tpublic get idsPersistedOnServer(): Set<EntityId> {\n\t\treturn new Set(this._idsPersistedOnServer)\n\t}\n\n\tpublic *[Symbol.iterator](): IterableIterator<EntityAccessor> {\n\t\tfor (const { getAccessor } of this._children.values()) {\n\t\t\tyield getAccessor()\n\t\t}\n\t}\n\n\tpublic hasEntityId(id: EntityId): boolean {\n\t\treturn this._children.has(id)\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.length === 0\n\t}\n\n\tpublic get length(): number {\n\t\treturn this._children.size\n\t}\n\n\tpublic hasEntityOnServer(entityOrItsId: EntityAccessor | EntityId): boolean {\n\t\tif (typeof entityOrItsId === 'string' || typeof entityOrItsId === 'number') {\n\t\t\treturn this.idsPersistedOnServer.has(entityOrItsId)\n\t\t}\n\t\tconst idOnServer = entityOrItsId.idOnServer\n\t\tif (idOnServer === undefined) {\n\t\t\treturn false\n\t\t}\n\t\treturn this.idsPersistedOnServer.has(idOnServer)\n\t}\n\n\tpublic deleteAll(): void {\n\t\tthis.batchUpdates(getAccessor => {\n\t\t\tconst list = getAccessor()\n\t\t\tfor (const entity of list) {\n\t\t\t\tentity.deleteEntity()\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic disconnectAll(): void {\n\t\tthis.batchUpdates(getAccessor => {\n\t\t\tconst list = getAccessor()\n\t\t\tfor (const entity of list) {\n\t\t\t\tlist.disconnectEntity(entity)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic addError(error: ErrorAccessor.Error | string): () => void {\n\t\treturn this.operations.addError(this.state, ErrorAccessor.normalizeError(error))\n\t}\n\n\tpublic addEventListener<Type extends keyof EntityListAccessor.RuntimeEntityListEventListenerMap>(\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: EntityListAccessor.RuntimeEntityListEventListenerMap[Type],\n\t) {\n\t\treturn this.operations.addEventListener(this.state, 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\treturn this.operations.addChildEventListener(this.state, event, listener)\n\t}\n\n\tpublic batchUpdates(performUpdates: EntityListAccessor.BatchUpdatesHandler): void {\n\t\tthis.operations.batchUpdates(this.state, performUpdates)\n\t}\n\n\tpublic connectEntity(entityToConnect: EntityAccessor): void {\n\t\tthis.operations.connectEntity(this.state, entityToConnect)\n\t}\n\n\tpublic createNewEntity(initialize?: EntityAccessor.BatchUpdatesHandler): RuntimeId {\n\t\treturn this.operations.createNewEntity(this.state, initialize)\n\t}\n\tpublic disconnectEntity(childEntity: EntityAccessor, options: { noPersist?: boolean } = {}): void {\n\t\tthis.operations.disconnectEntity(this.state, childEntity, options)\n\t}\n\tpublic getChildEntityById(id: EntityId): EntityAccessor {\n\t\treturn this.operations.getChildEntityById(this.state, id)\n\t}\n\n\tpublic getParent(): EntityAccessor | undefined {\n\t\treturn this.state.blueprint.parent?.getAccessor()\n\t}\n\n\tpublic getMarker(): EntityListSubTreeMarker | HasManyRelationMarker {\n\t\treturn this.state.blueprint.marker\n\t}\n}\n\nnamespace EntityListAccessor {\n\texport type GetEntityListAccessor = () => EntityListAccessor\n\texport type BatchUpdatesHandler = (getAccessor: GetEntityListAccessor, options: BatchUpdatesOptions) => void\n\n\texport type UpdateListener = (accessor: EntityListAccessor) => void\n\n\texport type BeforePersistHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: AsyncBatchUpdatesOptions,\n\t) => void | Promise<void | BeforePersistHandler>\n\n\texport type PersistErrorHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: PersistErrorOptions,\n\t) => void | Promise<void>\n\n\texport type PersistSuccessHandler = (\n\t\tgetAccessor: GetEntityListAccessor,\n\t\toptions: PersistSuccessOptions,\n\t) => void | Promise<void | PersistSuccessHandler>\n\n\texport type ChildEventListenerMap = {\n\t\t[EventType in keyof Pick<EntityAccessor.EntityEventListenerMap, 'beforeUpdate' | 'initialize' | 'update'> &\n\t\t\tstring as `child${Capitalize<EventType>}`]: EntityAccessor.EntityEventListenerMap[EventType]\n\t}\n\n\texport interface RuntimeEntityListEventListenerMap {\n\t\tbeforePersist: BeforePersistHandler\n\t\tbeforeUpdate: BatchUpdatesHandler\n\t\tpersistError: PersistErrorHandler\n\t\tpersistSuccess: PersistSuccessHandler\n\t\tupdate: UpdateListener\n\t}\n\texport interface EntityListEventListenerMap extends RuntimeEntityListEventListenerMap {\n\t\tinitialize: BatchUpdatesHandler\n\t}\n\texport type EntityListEventType = keyof EntityListEventListenerMap\n}\n\nexport { EntityListAccessor }\n"],"names":[],"mappings":";AAcA,MAAM,mBAAwC;AAAA,EACtC,YACW,OACA,YACD,MACC,WACA,uBACD,uBACA,QACA,aACA,aACf;AATgB,SAAA,QAAA;AACA,SAAA,aAAA;AACD,SAAA,OAAA;AACC,SAAA,YAAA;AACA,SAAA,wBAAA;AACD,SAAA,wBAAA;AACA,SAAA,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SAAS,OAAiD;AACzD,WAAA,KAAK,WAAW,SAAS,KAAK,OAAO,cAAc,eAAe,KAAK,CAAC;AAAA,EAChF;AAAA,EAEO,iBACN,OACA,UACC;AACD,WAAO,KAAK,WAAW,iBAAiB,KAAK,OAAO,OAAO,QAAQ;AAAA,EACpE;AAAA,EAEO,sBACN,OACA,OACA,UACC;AACD,WAAO,KAAK,WAAW,sBAAsB,KAAK,OAAO,OAAO,QAAQ;AAAA,EACzE;AAAA,EAEO,aAAa,gBAA8D;AACjF,SAAK,WAAW,aAAa,KAAK,OAAO,cAAc;AAAA,EACxD;AAAA,EAEO,cAAc,iBAAuC;AAC3D,SAAK,WAAW,cAAc,KAAK,OAAO,eAAe;AAAA,EAC1D;AAAA,EAEO,gBAAgB,YAA4D;AAClF,WAAO,KAAK,WAAW,gBAAgB,KAAK,OAAO,UAAU;AAAA,EAC9D;AAAA,EACO,iBAAiB,aAA6B,UAAmC,IAAU;AACjG,SAAK,WAAW,iBAAiB,KAAK,OAAO,aAAa,OAAO;AAAA,EAClE;AAAA,EACO,mBAAmB,IAA8B;AACvD,WAAO,KAAK,WAAW,mBAAmB,KAAK,OAAO,EAAE;AAAA,EACzD;AAAA,EAEO,YAAwC;AAC9C,WAAO,KAAK,MAAM,UAAU,QAAQ,YAAY;AAAA,EACjD;AAAA,EAEO,YAA6D;AAC5D,WAAA,KAAK,MAAM,UAAU;AAAA,EAC7B;AACD;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorAccessor.cjs","sources":["../../../src/accessors/ErrorAccessor.ts"],"sourcesContent":["import type { Result } from '@contember/client'\n\nclass ErrorAccessor {\n\tpublic constructor(\n\t\tpublic readonly errors: ErrorAccessor.Error[],\n\t) {\n\t}\n}\n\nnamespace ErrorAccessor {\n\texport type ErrorId = number\n\texport type Error = ExecutionError | ValidationError\n\texport type ErrorsById = Map<ErrorId, Error>\n\n\texport type ExecutionErrors = ExecutionError[]\n\n\texport interface ExecutionError {\n\t\ttype: 'execution'\n\t\tcode: Result.ExecutionErrorType\n\t\tdeveloperMessage: string | null\n\t}\n\n\texport type ValidationErrors = ValidationError[]\n\n\texport interface ValidationError {\n\t\ttype: 'validation'\n\t\tcode: WellKnownErrorCode | string | undefined\n\t\tmessage: string\n\t}\n\n\texport type WellKnownErrorCode = 'fieldRequired'\n\n\texport const normalizeError = (error: Error | string): Error => typeof error === 'string' ? {\n\t\ttype: 'validation',\n\t\tmessage: error,\n\t\tcode: undefined,\n\t} : error\n}\nexport { ErrorAccessor }\n\nexport interface ErrorAccessorHolder {\n\treadonly errors: ErrorAccessor | undefined\n}\n"],"names":["ErrorAccessor"],"mappings":";;AAEA,MAAM,cAAc;AAAA,EACZ,YACU,QACf;AADe,SAAA,SAAA;AAAA,EAEjB;AACD;AAAA,CAEA,CAAUA,mBAAV;AAuBcA,iBAAA,iBAAiB,CAAC,UAAiC,OAAO,UAAU,WAAW;AAAA,IAC3F,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EACH,IAAA;AAAA,GA3BK,kBAAA,gBAAA,CAAA,EAAA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorAccessor.js","sources":["../../../src/accessors/ErrorAccessor.ts"],"sourcesContent":["import type { Result } from '@contember/client'\n\nclass ErrorAccessor {\n\tpublic constructor(\n\t\tpublic readonly errors: ErrorAccessor.Error[],\n\t) {\n\t}\n}\n\nnamespace ErrorAccessor {\n\texport type ErrorId = number\n\texport type Error = ExecutionError | ValidationError\n\texport type ErrorsById = Map<ErrorId, Error>\n\n\texport type ExecutionErrors = ExecutionError[]\n\n\texport interface ExecutionError {\n\t\ttype: 'execution'\n\t\tcode: Result.ExecutionErrorType\n\t\tdeveloperMessage: string | null\n\t}\n\n\texport type ValidationErrors = ValidationError[]\n\n\texport interface ValidationError {\n\t\ttype: 'validation'\n\t\tcode: WellKnownErrorCode | string | undefined\n\t\tmessage: string\n\t}\n\n\texport type WellKnownErrorCode = 'fieldRequired'\n\n\texport const normalizeError = (error: Error | string): Error => typeof error === 'string' ? {\n\t\ttype: 'validation',\n\t\tmessage: error,\n\t\tcode: undefined,\n\t} : error\n}\nexport { ErrorAccessor }\n\nexport interface ErrorAccessorHolder {\n\treadonly errors: ErrorAccessor | undefined\n}\n"],"names":["ErrorAccessor"],"mappings":"AAEA,MAAM,cAAc;AAAA,EACZ,YACU,QACf;AADe,SAAA,SAAA;AAAA,EAEjB;AACD;AAAA,CAEA,CAAUA,mBAAV;AAuBcA,iBAAA,iBAAiB,CAAC,UAAiC,OAAO,UAAU,WAAW;AAAA,IAC3F,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EACH,IAAA;AAAA,GA3BK,kBAAA,gBAAA,CAAA,EAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldAccessor.cjs","sources":["../../../src/accessors/FieldAccessor.ts"],"sourcesContent":["import type { FieldOperations } from '../core/operations'\nimport type { FieldState } from '../core/state'\nimport { TemporalFieldHelper, UuidFieldHelper } from '../fieldHelpers'\nimport type { FieldName, FieldValue } from '../treeParameters'\nimport type { BatchUpdatesOptions } from './BatchUpdatesOptions'\nimport type { Errorable } from './Errorable'\nimport { ErrorAccessor } from './ErrorAccessor'\nimport type { SchemaColumn } from '../core/schema/SchemaColumn'\nimport { EntityAccessor } from './EntityAccessor'\n\nclass FieldAccessor<Value extends FieldValue = FieldValue> implements Errorable {\n\tconstructor(\n\t\tprivate readonly state: FieldState<Value>,\n\t\tprivate readonly operations: FieldOperations,\n\t\tpublic readonly fieldName: FieldName,\n\t\tpublic readonly value: Value | null,\n\t\tpublic readonly valueOnServer: Value | null,\n\t\tpublic readonly defaultValue: Value | undefined,\n\t\tpublic readonly errors: ErrorAccessor | undefined,\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tprivate readonly touchLog: ReadonlySet<string> | undefined,\n\t\tpublic readonly getAccessor: FieldAccessor.GetFieldAccessor<Value>,\n\t\tpublic readonly schema: SchemaColumn,\n\t) {}\n\n\tpublic addError(error: ErrorAccessor.Error | string): () => void {\n\t\treturn this.operations.addError(this.state, ErrorAccessor.normalizeError(error))\n\t}\n\n\tpublic clearErrors(): void {\n\t\tthis.operations.clearErrors(this.state)\n\t}\n\n\tpublic addEventListener<Type extends keyof FieldAccessor.FieldEventListenerMap<Value>>(\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: FieldAccessor.FieldEventListenerMap<Value>[Type],\n\t): () => void {\n\t\treturn this.operations.addEventListener(this.state, event, listener)\n\t}\n\n\tpublic updateValue(newValue: Value | null, options?: FieldAccessor.UpdateOptions): void {\n\t\tthis.operations.updateValue(this.state, newValue, options)\n\t}\n\n\tpublic hasValue(candidate: this['value']): boolean {\n\t\treturn this.value === candidate\n\t}\n\n\tpublic isTouchedBy(agent: string) {\n\t\treturn this.touchLog?.has(agent) ?? false\n\t}\n\n\tpublic get isTouched() {\n\t\treturn this.isTouchedBy(FieldAccessor.userAgent)\n\t}\n\n\tpublic get resolvedValue() {\n\t\tif (this.defaultValue === undefined) {\n\t\t\treturn this.value\n\t\t}\n\t\treturn this.value === null ? this.defaultValue : this.value\n\t}\n\n\t// helpers\n\n\tpublic get asTemporal(): TemporalFieldHelper {\n\t\treturn new TemporalFieldHelper(this.getAccessor as FieldAccessor.GetFieldAccessor<any>)\n\t}\n\n\tpublic get asUuid(): UuidFieldHelper {\n\t\treturn new UuidFieldHelper(this.getAccessor as FieldAccessor.GetFieldAccessor<any>)\n\t}\n\n\tpublic getParent(): EntityAccessor {\n\t\treturn this.state.parent.getAccessor()\n\t}\n}\nnamespace FieldAccessor {\n\texport const userAgent = 'user'\n\n\texport interface UpdateOptions {\n\t\tagent?: string\n\t}\n\n\texport type GetFieldAccessor<Value extends FieldValue = FieldValue> = () => FieldAccessor<Value>\n\n\texport type BeforeUpdateListener<Value extends FieldValue = FieldValue> = (\n\t\tupdatedAccessor: FieldAccessor<Value>,\n\t) => void\n\texport type InitializeListener<Value extends FieldValue = FieldValue> = (\n\t\tgetAccessor: GetFieldAccessor<Value>,\n\t\toptions: BatchUpdatesOptions,\n\t) => void\n\texport type UpdateListener<Value extends FieldValue = FieldValue> = (accessor: FieldAccessor<Value>) => void\n\n\texport interface RuntimeFieldEventListenerMap<Value extends FieldValue = FieldValue> {\n\t\tbeforeUpdate: BeforeUpdateListener<Value>\n\t\tupdate: UpdateListener<Value>\n\t}\n\texport interface FieldEventListenerMap<Value extends FieldValue = FieldValue>\n\t\textends RuntimeFieldEventListenerMap<Value> {\n\t\tinitialize: InitializeListener<Value>\n\t}\n\texport type FieldEventType = keyof FieldEventListenerMap\n}\n\nexport { FieldAccessor }\n"],"names":["ErrorAccessor","TemporalFieldHelper","UuidFieldHelper","FieldAccessor"],"mappings":";;;;;AAUA,MAAM,cAA0E;AAAA,EAC/E,YACkB,OACA,YACD,WACA,OACA,eACA,cACA,QACA,uBACC,UACD,aACA,QACf;AAXgB,SAAA,QAAA;AACA,SAAA,aAAA;AACD,SAAA,YAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AACA,SAAA,eAAA;AACA,SAAA,SAAA;AACA,SAAA,wBAAA;AACC,SAAA,WAAA;AACD,SAAA,cAAA;AACA,SAAA,SAAA;AAAA,EACd;AAAA,EAEI,SAAS,OAAiD;AACzD,WAAA,KAAK,WAAW,SAAS,KAAK,OAAOA,4BAAc,eAAe,KAAK,CAAC;AAAA,EAChF;AAAA,EAEO,cAAoB;AACrB,SAAA,WAAW,YAAY,KAAK,KAAK;AAAA,EACvC;AAAA,EAEO,iBACN,OACA,UACa;AACb,WAAO,KAAK,WAAW,iBAAiB,KAAK,OAAO,OAAO,QAAQ;AAAA,EACpE;AAAA,EAEO,YAAY,UAAwB,SAA6C;AACvF,SAAK,WAAW,YAAY,KAAK,OAAO,UAAU,OAAO;AAAA,EAC1D;AAAA,EAEO,SAAS,WAAmC;AAClD,WAAO,KAAK,UAAU;AAAA,EACvB;AAAA,EAEO,YAAY,OAAe;AACjC,WAAO,KAAK,UAAU,IAAI,KAAK,KAAK;AAAA,EACrC;AAAA,EAEA,IAAW,YAAY;AACf,WAAA,KAAK,YAAY,cAAc,SAAS;AAAA,EAChD;AAAA,EAEA,IAAW,gBAAgB;AACtB,QAAA,KAAK,iBAAiB,QAAW;AACpC,aAAO,KAAK;AAAA,IACb;AACA,WAAO,KAAK,UAAU,OAAO,KAAK,eAAe,KAAK;AAAA,EACvD;AAAA;AAAA,EAIA,IAAW,aAAkC;AACrC,WAAA,IAAIC,oBAAoB,oBAAA,KAAK,WAAkD;AAAA,EACvF;AAAA,EAEA,IAAW,SAA0B;AAC7B,WAAA,IAAIC,gBAAgB,gBAAA,KAAK,WAAkD;AAAA,EACnF;AAAA,EAEO,YAA4B;AAC3B,WAAA,KAAK,MAAM,OAAO,YAAY;AAAA,EACtC;AACD;AAAA,CACA,CAAUC,mBAAV;AACcA,iBAAA,YAAY;AAAA,GADhB,kBAAA,gBAAA,CAAA,EAAA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldAccessor.js","sources":["../../../src/accessors/FieldAccessor.ts"],"sourcesContent":["import type { FieldOperations } from '../core/operations'\nimport type { FieldState } from '../core/state'\nimport { TemporalFieldHelper, UuidFieldHelper } from '../fieldHelpers'\nimport type { FieldName, FieldValue } from '../treeParameters'\nimport type { BatchUpdatesOptions } from './BatchUpdatesOptions'\nimport type { Errorable } from './Errorable'\nimport { ErrorAccessor } from './ErrorAccessor'\nimport type { SchemaColumn } from '../core/schema/SchemaColumn'\nimport { EntityAccessor } from './EntityAccessor'\n\nclass FieldAccessor<Value extends FieldValue = FieldValue> implements Errorable {\n\tconstructor(\n\t\tprivate readonly state: FieldState<Value>,\n\t\tprivate readonly operations: FieldOperations,\n\t\tpublic readonly fieldName: FieldName,\n\t\tpublic readonly value: Value | null,\n\t\tpublic readonly valueOnServer: Value | null,\n\t\tpublic readonly defaultValue: Value | undefined,\n\t\tpublic readonly errors: ErrorAccessor | undefined,\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tprivate readonly touchLog: ReadonlySet<string> | undefined,\n\t\tpublic readonly getAccessor: FieldAccessor.GetFieldAccessor<Value>,\n\t\tpublic readonly schema: SchemaColumn,\n\t) {}\n\n\tpublic addError(error: ErrorAccessor.Error | string): () => void {\n\t\treturn this.operations.addError(this.state, ErrorAccessor.normalizeError(error))\n\t}\n\n\tpublic clearErrors(): void {\n\t\tthis.operations.clearErrors(this.state)\n\t}\n\n\tpublic addEventListener<Type extends keyof FieldAccessor.FieldEventListenerMap<Value>>(\n\t\tevent: { type: Type; key?: string },\n\t\tlistener: FieldAccessor.FieldEventListenerMap<Value>[Type],\n\t): () => void {\n\t\treturn this.operations.addEventListener(this.state, event, listener)\n\t}\n\n\tpublic updateValue(newValue: Value | null, options?: FieldAccessor.UpdateOptions): void {\n\t\tthis.operations.updateValue(this.state, newValue, options)\n\t}\n\n\tpublic hasValue(candidate: this['value']): boolean {\n\t\treturn this.value === candidate\n\t}\n\n\tpublic isTouchedBy(agent: string) {\n\t\treturn this.touchLog?.has(agent) ?? false\n\t}\n\n\tpublic get isTouched() {\n\t\treturn this.isTouchedBy(FieldAccessor.userAgent)\n\t}\n\n\tpublic get resolvedValue() {\n\t\tif (this.defaultValue === undefined) {\n\t\t\treturn this.value\n\t\t}\n\t\treturn this.value === null ? this.defaultValue : this.value\n\t}\n\n\t// helpers\n\n\tpublic get asTemporal(): TemporalFieldHelper {\n\t\treturn new TemporalFieldHelper(this.getAccessor as FieldAccessor.GetFieldAccessor<any>)\n\t}\n\n\tpublic get asUuid(): UuidFieldHelper {\n\t\treturn new UuidFieldHelper(this.getAccessor as FieldAccessor.GetFieldAccessor<any>)\n\t}\n\n\tpublic getParent(): EntityAccessor {\n\t\treturn this.state.parent.getAccessor()\n\t}\n}\nnamespace FieldAccessor {\n\texport const userAgent = 'user'\n\n\texport interface UpdateOptions {\n\t\tagent?: string\n\t}\n\n\texport type GetFieldAccessor<Value extends FieldValue = FieldValue> = () => FieldAccessor<Value>\n\n\texport type BeforeUpdateListener<Value extends FieldValue = FieldValue> = (\n\t\tupdatedAccessor: FieldAccessor<Value>,\n\t) => void\n\texport type InitializeListener<Value extends FieldValue = FieldValue> = (\n\t\tgetAccessor: GetFieldAccessor<Value>,\n\t\toptions: BatchUpdatesOptions,\n\t) => void\n\texport type UpdateListener<Value extends FieldValue = FieldValue> = (accessor: FieldAccessor<Value>) => void\n\n\texport interface RuntimeFieldEventListenerMap<Value extends FieldValue = FieldValue> {\n\t\tbeforeUpdate: BeforeUpdateListener<Value>\n\t\tupdate: UpdateListener<Value>\n\t}\n\texport interface FieldEventListenerMap<Value extends FieldValue = FieldValue>\n\t\textends RuntimeFieldEventListenerMap<Value> {\n\t\tinitialize: InitializeListener<Value>\n\t}\n\texport type FieldEventType = keyof FieldEventListenerMap\n}\n\nexport { FieldAccessor }\n"],"names":["FieldAccessor"],"mappings":";;;AAUA,MAAM,cAA0E;AAAA,EAC/E,YACkB,OACA,YACD,WACA,OACA,eACA,cACA,QACA,uBACC,UACD,aACA,QACf;AAXgB,SAAA,QAAA;AACA,SAAA,aAAA;AACD,SAAA,YAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AACA,SAAA,eAAA;AACA,SAAA,SAAA;AACA,SAAA,wBAAA;AACC,SAAA,WAAA;AACD,SAAA,cAAA;AACA,SAAA,SAAA;AAAA,EACd;AAAA,EAEI,SAAS,OAAiD;AACzD,WAAA,KAAK,WAAW,SAAS,KAAK,OAAO,cAAc,eAAe,KAAK,CAAC;AAAA,EAChF;AAAA,EAEO,cAAoB;AACrB,SAAA,WAAW,YAAY,KAAK,KAAK;AAAA,EACvC;AAAA,EAEO,iBACN,OACA,UACa;AACb,WAAO,KAAK,WAAW,iBAAiB,KAAK,OAAO,OAAO,QAAQ;AAAA,EACpE;AAAA,EAEO,YAAY,UAAwB,SAA6C;AACvF,SAAK,WAAW,YAAY,KAAK,OAAO,UAAU,OAAO;AAAA,EAC1D;AAAA,EAEO,SAAS,WAAmC;AAClD,WAAO,KAAK,UAAU;AAAA,EACvB;AAAA,EAEO,YAAY,OAAe;AACjC,WAAO,KAAK,UAAU,IAAI,KAAK,KAAK;AAAA,EACrC;AAAA,EAEA,IAAW,YAAY;AACf,WAAA,KAAK,YAAY,cAAc,SAAS;AAAA,EAChD;AAAA,EAEA,IAAW,gBAAgB;AACtB,QAAA,KAAK,iBAAiB,QAAW;AACpC,aAAO,KAAK;AAAA,IACb;AACA,WAAO,KAAK,UAAU,OAAO,KAAK,eAAe,KAAK;AAAA,EACvD;AAAA;AAAA,EAIA,IAAW,aAAkC;AACrC,WAAA,IAAI,oBAAoB,KAAK,WAAkD;AAAA,EACvF;AAAA,EAEA,IAAW,SAA0B;AAC7B,WAAA,IAAI,gBAAgB,KAAK,WAAkD;AAAA,EACnF;AAAA,EAEO,YAA4B;AAC3B,WAAA,KAAK,MAAM,OAAO,YAAY;AAAA,EACtC;AACD;AAAA,CACA,CAAUA,mBAAV;AACcA,iBAAA,YAAY;AAAA,GADhB,kBAAA,gBAAA,CAAA,EAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootAccessor.cjs","sources":["../../../src/accessors/TreeRootAccessor.ts"],"sourcesContent":["import type { BindingOperations } from './BindingOperations'\n\n// This allows us to have several parallel sub-trees without one having to be the main tree\n// and all the other ones subordinate.\nexport class TreeRootAccessor<Node> {\n\t/**\n\t * Whenever an update occurs, a new instance of this class is created.\n\t */\n\tpublic constructor(\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tpublic readonly isMutating: boolean,\n\t\tpublic readonly bindingOperations: BindingOperations<Node>,\n\t) {}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,iBAAuB;AAAA;AAAA;AAAA;AAAA,EAI5B,YACU,uBACA,YACA,mBACf;AAHe,SAAA,wBAAA;AACA,SAAA,aAAA;AACA,SAAA,oBAAA;AAAA,EACd;AACJ;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootAccessor.js","sources":["../../../src/accessors/TreeRootAccessor.ts"],"sourcesContent":["import type { BindingOperations } from './BindingOperations'\n\n// This allows us to have several parallel sub-trees without one having to be the main tree\n// and all the other ones subordinate.\nexport class TreeRootAccessor<Node> {\n\t/**\n\t * Whenever an update occurs, a new instance of this class is created.\n\t */\n\tpublic constructor(\n\t\tpublic readonly hasUnpersistedChanges: boolean,\n\t\tpublic readonly isMutating: boolean,\n\t\tpublic readonly bindingOperations: BindingOperations<Node>,\n\t) {}\n}\n"],"names":[],"mappings":"AAIO,MAAM,iBAAuB;AAAA;AAAA;AAAA;AAAA,EAI5B,YACU,uBACA,YACA,mBACf;AAHe,SAAA,wBAAA;AACA,SAAA,aAAA;AACA,SAAA,oBAAA;AAAA,EACd;AACJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindingTypes.cjs","sources":["../../src/bindingTypes.ts"],"sourcesContent":["export const PRIMARY_KEY_NAME = 'id'\nexport const TYPENAME_KEY_NAME = '__typename'\nexport const NIL_UUID = '00000000-0000-0000-0000-000000000000'\n"],"names":[],"mappings":";;AAAO,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,WAAW;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindingTypes.js","sources":["../../src/bindingTypes.ts"],"sourcesContent":["export const PRIMARY_KEY_NAME = 'id'\nexport const TYPENAME_KEY_NAME = '__typename'\nexport const NIL_UUID = '00000000-0000-0000-0000-000000000000'\n"],"names":[],"mappings":"AAAO,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,WAAW;"}
|
|
@@ -1,207 +0,0 @@
|
|
|
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 ErrorsPreprocessor = require("./ErrorsPreprocessor.cjs");
|
|
10
|
-
const EventManager = require("./EventManager.cjs");
|
|
11
|
-
const ErrorAccessor = require("../accessors/ErrorAccessor.cjs");
|
|
12
|
-
const getEntityMarker = require("./state/getEntityMarker.cjs");
|
|
13
|
-
class AccessorErrorManager {
|
|
14
|
-
constructor(eventManager, treeStore) {
|
|
15
|
-
__publicField(this, "errorsByState", /* @__PURE__ */ new Map());
|
|
16
|
-
__publicField(this, "getNewErrorId", /* @__PURE__ */ (() => {
|
|
17
|
-
let errorId = 1;
|
|
18
|
-
return () => errorId++;
|
|
19
|
-
})());
|
|
20
|
-
this.eventManager = eventManager;
|
|
21
|
-
this.treeStore = treeStore;
|
|
22
|
-
}
|
|
23
|
-
hasErrors() {
|
|
24
|
-
return !!this.errorsByState.size;
|
|
25
|
-
}
|
|
26
|
-
getErrors() {
|
|
27
|
-
return Array.from(this.errorsByState.values(), (it) => Array.from(it.values())).flat();
|
|
28
|
-
}
|
|
29
|
-
clearErrors() {
|
|
30
|
-
this.eventManager.syncOperation(() => {
|
|
31
|
-
for (const [stateNode] of this.errorsByState) {
|
|
32
|
-
stateNode.errors = void 0;
|
|
33
|
-
this.eventManager.registerJustUpdated(stateNode, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
|
|
34
|
-
}
|
|
35
|
-
this.errorsByState.clear();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
clearErrorsByState(state) {
|
|
39
|
-
return this.eventManager.syncOperation(() => {
|
|
40
|
-
if (!this.errorsByState.has(state)) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
this.errorsByState.delete(state);
|
|
44
|
-
state.errors = void 0;
|
|
45
|
-
this.eventManager.registerJustUpdated(state, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
replaceErrors(data, operations) {
|
|
49
|
-
this.eventManager.syncOperation(() => {
|
|
50
|
-
this.clearErrors();
|
|
51
|
-
const preprocessor = new ErrorsPreprocessor.ErrorsPreprocessor(data, operations);
|
|
52
|
-
const errorTreeRoot = preprocessor.preprocess();
|
|
53
|
-
this.setRootStateErrors(errorTreeRoot);
|
|
54
|
-
this.dumpErrorData(data);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
addError(state, error) {
|
|
58
|
-
return this.eventManager.syncOperation(() => {
|
|
59
|
-
const errorId = this.getNewErrorId();
|
|
60
|
-
let errorsById = this.errorsByState.get(state);
|
|
61
|
-
if (errorsById === void 0) {
|
|
62
|
-
this.errorsByState.set(state, errorsById = /* @__PURE__ */ new Map());
|
|
63
|
-
}
|
|
64
|
-
errorsById.set(errorId, error);
|
|
65
|
-
state.errors = new ErrorAccessor.ErrorAccessor(Array.from(errorsById.values()));
|
|
66
|
-
this.eventManager.registerJustUpdated(state, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
|
|
67
|
-
return () => this.eventManager.syncOperation(() => {
|
|
68
|
-
const errorsById2 = this.errorsByState.get(state);
|
|
69
|
-
if (errorsById2 === void 0) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
errorsById2.delete(errorId);
|
|
73
|
-
if (errorsById2.size) {
|
|
74
|
-
state.errors = new ErrorAccessor.ErrorAccessor(Array.from(errorsById2.values()));
|
|
75
|
-
} else {
|
|
76
|
-
state.errors = void 0;
|
|
77
|
-
this.errorsByState.delete(state);
|
|
78
|
-
}
|
|
79
|
-
this.eventManager.registerJustUpdated(state, EventManager.EventManager.NO_CHANGES_DIFFERENCE);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
addSeveralErrors(state, errors) {
|
|
84
|
-
if (errors.validation) {
|
|
85
|
-
for (const error of errors.validation) {
|
|
86
|
-
this.addError(state, error);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (errors.execution) {
|
|
90
|
-
for (const error of errors.execution) {
|
|
91
|
-
this.addError(state, error);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
setRootStateErrors(errorTreeRoot) {
|
|
96
|
-
for (const rootStates of this.treeStore.subTreeStatesByRoot.values()) {
|
|
97
|
-
for (const [subTreePlaceholder, rootError] of errorTreeRoot) {
|
|
98
|
-
const rootState = rootStates.get(subTreePlaceholder);
|
|
99
|
-
if (!rootState) {
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
switch (rootState.type) {
|
|
103
|
-
case "entityRealm": {
|
|
104
|
-
this.setEntityStateErrors(rootState, rootError);
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
case "entityList": {
|
|
108
|
-
this.setEntityListStateErrors(rootState, rootError);
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
setEntityStateErrors(state, errors) {
|
|
116
|
-
this.addSeveralErrors(state, errors);
|
|
117
|
-
if (errors.nodeType !== "iNode") {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
for (const [childKey, child] of errors.children) {
|
|
121
|
-
if (typeof childKey !== "string") {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (child.nodeType === "leaf") {
|
|
125
|
-
const fieldState = state.children.get(childKey);
|
|
126
|
-
if (fieldState?.type === "field") {
|
|
127
|
-
this.addSeveralErrors(fieldState, child);
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const fields = getEntityMarker.getEntityMarker(state).fields;
|
|
132
|
-
const placeholders = fields.placeholders.get(childKey);
|
|
133
|
-
if (placeholders === void 0) {
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const normalizedPlaceholders = typeof placeholders === "string" ? /* @__PURE__ */ new Set([placeholders]) : placeholders;
|
|
137
|
-
for (const normalizedPlaceholder of normalizedPlaceholders) {
|
|
138
|
-
const fieldState = state.children.get(normalizedPlaceholder);
|
|
139
|
-
if (fieldState === void 0) {
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
switch (fieldState.type) {
|
|
143
|
-
case "entityRealm":
|
|
144
|
-
if (child.nodeType === "iNode" && child.children.has(fieldState.entity.id.value)) {
|
|
145
|
-
this.setEntityStateErrors(fieldState, child.children.get(fieldState.entity.id.value));
|
|
146
|
-
} else {
|
|
147
|
-
this.setEntityStateErrors(fieldState, child);
|
|
148
|
-
}
|
|
149
|
-
break;
|
|
150
|
-
case "entityList":
|
|
151
|
-
this.setEntityListStateErrors(fieldState, child);
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
setEntityListStateErrors(state, errors) {
|
|
158
|
-
this.addSeveralErrors(state, errors);
|
|
159
|
-
if (errors.nodeType !== "iNode") {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
for (const [childKey, childError] of errors.children) {
|
|
163
|
-
let childState = state.children.get(childKey);
|
|
164
|
-
if (childState === void 0) {
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
if (childState.type === "entityRealmStub") {
|
|
168
|
-
childState.getAccessor();
|
|
169
|
-
childState = state.children.get(childKey);
|
|
170
|
-
}
|
|
171
|
-
if (childError.nodeType === "iNode") {
|
|
172
|
-
this.setEntityStateErrors(childState, childError);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
dumpErrorData(data) {
|
|
177
|
-
for (const subTreePlaceholder in data.data) {
|
|
178
|
-
const treeDatum = data.data[subTreePlaceholder];
|
|
179
|
-
const executionErrors = treeDatum.errors;
|
|
180
|
-
const allErrors = treeDatum?.validation?.errors ? executionErrors.concat(treeDatum.validation.errors) : executionErrors;
|
|
181
|
-
const normalizedErrors = allErrors.map((error) => {
|
|
182
|
-
const path = "paths" in error ? error.paths[0] ?? [] : error.path;
|
|
183
|
-
return {
|
|
184
|
-
path: path.map((pathPart) => {
|
|
185
|
-
if ("field" in pathPart) {
|
|
186
|
-
return pathPart.field;
|
|
187
|
-
}
|
|
188
|
-
if (pathPart.alias) {
|
|
189
|
-
return `#${pathPart.index}(${pathPart.alias})`;
|
|
190
|
-
}
|
|
191
|
-
return pathPart.index;
|
|
192
|
-
}).join("."),
|
|
193
|
-
type: "type" in error ? error.type : void 0,
|
|
194
|
-
message: typeof error.message === "string" ? error.message : error.message?.text
|
|
195
|
-
};
|
|
196
|
-
});
|
|
197
|
-
if (Object.keys(normalizedErrors).length) {
|
|
198
|
-
console.table(normalizedErrors);
|
|
199
|
-
}
|
|
200
|
-
if (treeDatum.errorMessage) {
|
|
201
|
-
console.error(treeDatum.errorMessage);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
exports.AccessorErrorManager = AccessorErrorManager;
|
|
207
|
-
//# sourceMappingURL=AccessorErrorManager.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorErrorManager.cjs","sources":["../../../src/core/AccessorErrorManager.ts"],"sourcesContent":["import { ErrorAccessor } from '../accessors'\nimport { ErrorsPreprocessor } from './ErrorsPreprocessor'\nimport { EventManager } from './EventManager'\nimport { EntityListState, EntityRealmState, getEntityMarker, StateNode } from './state'\nimport type { TreeStore } from './TreeStore'\nimport { SubMutationOperation } from './MutationGenerator'\nimport { DataBindingTransactionResult } from './DataBinding'\nimport { MutationError, ValidationError } from '@contember/client'\n\nexport class AccessorErrorManager {\n\tprivate errorsByState: Map<StateNode, ErrorAccessor.ErrorsById> = new Map()\n\n\tprivate getNewErrorId = (() => {\n\t\tlet errorId = 1\n\n\t\treturn () => errorId++\n\t})()\n\n\tpublic constructor(private readonly eventManager: EventManager, private readonly treeStore: TreeStore) {}\n\n\tpublic hasErrors() {\n\t\treturn !!this.errorsByState.size\n\t}\n\n\tpublic getErrors(): ErrorAccessor.Error[] {\n\t\treturn Array.from(this.errorsByState.values(), it => Array.from(it.values())).flat()\n\t}\n\n\tpublic clearErrors() {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tfor (const [stateNode] of this.errorsByState) {\n\t\t\t\tstateNode.errors = undefined\n\t\t\t\tthis.eventManager.registerJustUpdated(stateNode, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t}\n\t\t\tthis.errorsByState.clear()\n\t\t})\n\t}\n\n\tpublic clearErrorsByState(state: StateNode): void {\n\t\treturn this.eventManager.syncOperation(() => {\n\t\t\tif (!this.errorsByState.has(state)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.errorsByState.delete(state)\n\t\t\tstate.errors = undefined\n\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t})\n\t}\n\n\tpublic replaceErrors(data: DataBindingTransactionResult, operations: SubMutationOperation[]) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tthis.clearErrors()\n\n\t\t\tconst preprocessor = new ErrorsPreprocessor(data, operations)\n\t\t\tconst errorTreeRoot = preprocessor.preprocess()\n\n\t\t\tthis.setRootStateErrors(errorTreeRoot)\n\n\t\t\tthis.dumpErrorData(data)\n\t\t})\n\t}\n\n\tpublic addError(state: StateNode, error: ErrorAccessor.Error): () => void {\n\t\treturn this.eventManager.syncOperation(() => {\n\t\t\tconst errorId = this.getNewErrorId()\n\n\t\t\tlet errorsById: ErrorAccessor.ErrorsById | undefined = this.errorsByState.get(state)\n\t\t\tif (errorsById === undefined) {\n\t\t\t\tthis.errorsByState.set(state, (errorsById = new Map()))\n\t\t\t}\n\t\t\terrorsById.set(errorId, error)\n\t\t\tstate.errors = new ErrorAccessor(Array.from(errorsById.values()))\n\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\n\t\t\treturn () =>\n\t\t\t\tthis.eventManager.syncOperation(() => {\n\t\t\t\t\tconst errorsById = this.errorsByState.get(state)\n\t\t\t\t\tif (errorsById === undefined) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\terrorsById.delete(errorId)\n\t\t\t\t\tif (errorsById.size) {\n\t\t\t\t\t\tstate.errors = new ErrorAccessor(Array.from(errorsById.values()))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.errors = undefined\n\t\t\t\t\t\tthis.errorsByState.delete(state)\n\t\t\t\t\t}\n\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t})\n\t\t})\n\t}\n\n\tprivate addSeveralErrors(state: StateNode, errors: ErrorsPreprocessor.BaseErrorNode) {\n\t\tif (errors.validation) {\n\t\t\tfor (const error of errors.validation) {\n\t\t\t\tthis.addError(state, error)\n\t\t\t}\n\t\t}\n\t\tif (errors.execution) {\n\t\t\tfor (const error of errors.execution) {\n\t\t\t\tthis.addError(state, error)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setRootStateErrors(errorTreeRoot: ErrorsPreprocessor.ErrorTreeRoot) {\n\t\tfor (const rootStates of this.treeStore.subTreeStatesByRoot.values()) {\n\t\t\tfor (const [subTreePlaceholder, rootError] of errorTreeRoot) {\n\t\t\t\tconst rootState = rootStates.get(subTreePlaceholder)\n\n\t\t\t\tif (!rootState) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch (rootState.type) {\n\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\tthis.setEntityStateErrors(rootState, rootError)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tthis.setEntityListStateErrors(rootState, rootError)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setEntityStateErrors(\n\t\tstate: EntityRealmState,\n\t\terrors: ErrorsPreprocessor.ErrorINode | ErrorsPreprocessor.LeafErrorNode,\n\t) {\n\t\tthis.addSeveralErrors(state, errors)\n\n\t\tif (errors.nodeType !== 'iNode') {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const [childKey, child] of errors.children) {\n\t\t\tif (typeof childKey !== 'string') {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (child.nodeType === 'leaf') {\n\t\t\t\tconst fieldState = state.children.get(childKey)\n\n\t\t\t\tif (fieldState?.type === 'field') {\n\t\t\t\t\tthis.addSeveralErrors(fieldState, child)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Deliberately letting flow get here as well. Leaf errors *CAN* refer to relations as well.\n\n\t\t\tconst fields = getEntityMarker(state).fields\n\t\t\tconst placeholders = fields.placeholders.get(childKey)\n\t\t\tif (placeholders === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst normalizedPlaceholders = typeof placeholders === 'string' ? new Set([placeholders]) : placeholders\n\n\t\t\tfor (const normalizedPlaceholder of normalizedPlaceholders) {\n\t\t\t\tconst fieldState = state.children.get(normalizedPlaceholder)\n\t\t\t\tif (fieldState === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch (fieldState.type) {\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\t\t// unwrap for reduced has many\n\t\t\t\t\t\tif (child.nodeType === 'iNode' && child.children.has(fieldState.entity.id.value)) {\n\t\t\t\t\t\t\tthis.setEntityStateErrors(fieldState, child.children.get(fieldState.entity.id.value)!)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.setEntityStateErrors(fieldState, child)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\tthis.setEntityListStateErrors(fieldState, child)\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setEntityListStateErrors(\n\t\tstate: EntityListState,\n\t\terrors: ErrorsPreprocessor.ErrorINode | ErrorsPreprocessor.LeafErrorNode,\n\t) {\n\t\tthis.addSeveralErrors(state, errors)\n\n\t\tif (errors.nodeType !== 'iNode') {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const [childKey, childError] of errors.children) {\n\t\t\tlet childState = state.children.get(childKey)\n\n\t\t\tif (childState === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (childState.type === 'entityRealmStub') {\n\t\t\t\tchildState.getAccessor() // Force init\n\t\t\t\tchildState = state.children.get(childKey)!\n\t\t\t}\n\n\t\t\tif (childError.nodeType === 'iNode') {\n\t\t\t\tthis.setEntityStateErrors(childState as EntityRealmState, childError)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate dumpErrorData(data: DataBindingTransactionResult) {\n\t\t// TODO this is just temporary\n\t\tfor (const subTreePlaceholder in data.data) {\n\t\t\tconst treeDatum = data.data[subTreePlaceholder]\n\t\t\tconst executionErrors: Array<MutationError | ValidationError> = treeDatum.errors\n\t\t\tconst allErrors = treeDatum?.validation?.errors\n\t\t\t\t? executionErrors.concat(treeDatum.validation.errors)\n\t\t\t\t: executionErrors\n\t\t\tconst normalizedErrors = allErrors.map((error: MutationError | ValidationError) => {\n\t\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\t\t\treturn {\n\t\t\t\t\tpath: path\n\t\t\t\t\t\t.map(pathPart => {\n\t\t\t\t\t\t\tif ('field' in pathPart) {\n\t\t\t\t\t\t\t\treturn pathPart.field\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (pathPart.alias) {\n\t\t\t\t\t\t\t\treturn `#${pathPart.index}(${pathPart.alias})`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn pathPart.index\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('.'),\n\t\t\t\t\ttype: 'type' in error ? error.type : undefined,\n\t\t\t\t\tmessage: typeof error.message === 'string' ? error.message : error.message?.text,\n\t\t\t\t}\n\t\t\t})\n\t\t\tif (Object.keys(normalizedErrors).length) {\n\t\t\t\tconsole.table(normalizedErrors)\n\t\t\t}\n\t\t\tif (treeDatum.errorMessage) {\n\t\t\t\tconsole.error(treeDatum.errorMessage)\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["EventManager","ErrorsPreprocessor","ErrorAccessor","errorsById","getEntityMarker"],"mappings":";;;;;;;;;;;;AASO,MAAM,qBAAqB;AAAA,EAS1B,YAA6B,cAA6C,WAAsB;AAR/F,6DAA8D;AAE9D,yCAAuB,uBAAA;AAC9B,UAAI,UAAU;AAEd,aAAO,MAAM;AAAA,IAAA;AAGsB,SAAA,eAAA;AAA6C,SAAA,YAAA;AAAA,EAAuB;AAAA,EAEjG,YAAY;AACX,WAAA,CAAC,CAAC,KAAK,cAAc;AAAA,EAC7B;AAAA,EAEO,YAAmC;AACzC,WAAO,MAAM,KAAK,KAAK,cAAc,OAAU,GAAA,CAAA,OAAM,MAAM,KAAK,GAAG,OAAQ,CAAA,CAAC,EAAE,KAAK;AAAA,EACpF;AAAA,EAEO,cAAc;AACf,SAAA,aAAa,cAAc,MAAM;AACrC,iBAAW,CAAC,SAAS,KAAK,KAAK,eAAe;AAC7C,kBAAU,SAAS;AACnB,aAAK,aAAa,oBAAoB,WAAWA,aAAA,aAAa,qBAAqB;AAAA,MACpF;AACA,WAAK,cAAc;IAAM,CACzB;AAAA,EACF;AAAA,EAEO,mBAAmB,OAAwB;AAC1C,WAAA,KAAK,aAAa,cAAc,MAAM;AAC5C,UAAI,CAAC,KAAK,cAAc,IAAI,KAAK,GAAG;AACnC;AAAA,MACD;AACK,WAAA,cAAc,OAAO,KAAK;AAC/B,YAAM,SAAS;AACf,WAAK,aAAa,oBAAoB,OAAOA,aAAA,aAAa,qBAAqB;AAAA,IAAA,CAC/E;AAAA,EACF;AAAA,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,IAAI,SAAS,KAAK,IAAI,SAAS,KAAK;AAAA,YAC5C;AACA,mBAAO,SAAS;AAAA,UAAA,CAChB,EACA,KAAK,GAAG;AAAA,UACV,MAAM,UAAU,QAAQ,MAAM,OAAO;AAAA,UACrC,SAAS,OAAO,MAAM,YAAY,WAAW,MAAM,UAAU,MAAM,SAAS;AAAA,QAAA;AAAA,MAC7E,CACA;AACD,UAAI,OAAO,KAAK,gBAAgB,EAAE,QAAQ;AACzC,gBAAQ,MAAM,gBAAgB;AAAA,MAC/B;AACA,UAAI,UAAU,cAAc;AACnB,gBAAA,MAAM,UAAU,YAAY;AAAA,MACrC;AAAA,IACD;AAAA,EACD;AACD;;"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { ErrorsPreprocessor } from "./ErrorsPreprocessor.js";
|
|
8
|
-
import { EventManager } from "./EventManager.js";
|
|
9
|
-
import { ErrorAccessor } from "../accessors/ErrorAccessor.js";
|
|
10
|
-
import { getEntityMarker } from "./state/getEntityMarker.js";
|
|
11
|
-
class AccessorErrorManager {
|
|
12
|
-
constructor(eventManager, treeStore) {
|
|
13
|
-
__publicField(this, "errorsByState", /* @__PURE__ */ new Map());
|
|
14
|
-
__publicField(this, "getNewErrorId", /* @__PURE__ */ (() => {
|
|
15
|
-
let errorId = 1;
|
|
16
|
-
return () => errorId++;
|
|
17
|
-
})());
|
|
18
|
-
this.eventManager = eventManager;
|
|
19
|
-
this.treeStore = treeStore;
|
|
20
|
-
}
|
|
21
|
-
hasErrors() {
|
|
22
|
-
return !!this.errorsByState.size;
|
|
23
|
-
}
|
|
24
|
-
getErrors() {
|
|
25
|
-
return Array.from(this.errorsByState.values(), (it) => Array.from(it.values())).flat();
|
|
26
|
-
}
|
|
27
|
-
clearErrors() {
|
|
28
|
-
this.eventManager.syncOperation(() => {
|
|
29
|
-
for (const [stateNode] of this.errorsByState) {
|
|
30
|
-
stateNode.errors = void 0;
|
|
31
|
-
this.eventManager.registerJustUpdated(stateNode, EventManager.NO_CHANGES_DIFFERENCE);
|
|
32
|
-
}
|
|
33
|
-
this.errorsByState.clear();
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
clearErrorsByState(state) {
|
|
37
|
-
return this.eventManager.syncOperation(() => {
|
|
38
|
-
if (!this.errorsByState.has(state)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this.errorsByState.delete(state);
|
|
42
|
-
state.errors = void 0;
|
|
43
|
-
this.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
replaceErrors(data, operations) {
|
|
47
|
-
this.eventManager.syncOperation(() => {
|
|
48
|
-
this.clearErrors();
|
|
49
|
-
const preprocessor = new ErrorsPreprocessor(data, operations);
|
|
50
|
-
const errorTreeRoot = preprocessor.preprocess();
|
|
51
|
-
this.setRootStateErrors(errorTreeRoot);
|
|
52
|
-
this.dumpErrorData(data);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
addError(state, error) {
|
|
56
|
-
return this.eventManager.syncOperation(() => {
|
|
57
|
-
const errorId = this.getNewErrorId();
|
|
58
|
-
let errorsById = this.errorsByState.get(state);
|
|
59
|
-
if (errorsById === void 0) {
|
|
60
|
-
this.errorsByState.set(state, errorsById = /* @__PURE__ */ new Map());
|
|
61
|
-
}
|
|
62
|
-
errorsById.set(errorId, error);
|
|
63
|
-
state.errors = new ErrorAccessor(Array.from(errorsById.values()));
|
|
64
|
-
this.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE);
|
|
65
|
-
return () => this.eventManager.syncOperation(() => {
|
|
66
|
-
const errorsById2 = this.errorsByState.get(state);
|
|
67
|
-
if (errorsById2 === void 0) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
errorsById2.delete(errorId);
|
|
71
|
-
if (errorsById2.size) {
|
|
72
|
-
state.errors = new ErrorAccessor(Array.from(errorsById2.values()));
|
|
73
|
-
} else {
|
|
74
|
-
state.errors = void 0;
|
|
75
|
-
this.errorsByState.delete(state);
|
|
76
|
-
}
|
|
77
|
-
this.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE);
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
addSeveralErrors(state, errors) {
|
|
82
|
-
if (errors.validation) {
|
|
83
|
-
for (const error of errors.validation) {
|
|
84
|
-
this.addError(state, error);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (errors.execution) {
|
|
88
|
-
for (const error of errors.execution) {
|
|
89
|
-
this.addError(state, error);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
setRootStateErrors(errorTreeRoot) {
|
|
94
|
-
for (const rootStates of this.treeStore.subTreeStatesByRoot.values()) {
|
|
95
|
-
for (const [subTreePlaceholder, rootError] of errorTreeRoot) {
|
|
96
|
-
const rootState = rootStates.get(subTreePlaceholder);
|
|
97
|
-
if (!rootState) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
switch (rootState.type) {
|
|
101
|
-
case "entityRealm": {
|
|
102
|
-
this.setEntityStateErrors(rootState, rootError);
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
case "entityList": {
|
|
106
|
-
this.setEntityListStateErrors(rootState, rootError);
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
setEntityStateErrors(state, errors) {
|
|
114
|
-
this.addSeveralErrors(state, errors);
|
|
115
|
-
if (errors.nodeType !== "iNode") {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
for (const [childKey, child] of errors.children) {
|
|
119
|
-
if (typeof childKey !== "string") {
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
if (child.nodeType === "leaf") {
|
|
123
|
-
const fieldState = state.children.get(childKey);
|
|
124
|
-
if (fieldState?.type === "field") {
|
|
125
|
-
this.addSeveralErrors(fieldState, child);
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const fields = getEntityMarker(state).fields;
|
|
130
|
-
const placeholders = fields.placeholders.get(childKey);
|
|
131
|
-
if (placeholders === void 0) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
const normalizedPlaceholders = typeof placeholders === "string" ? /* @__PURE__ */ new Set([placeholders]) : placeholders;
|
|
135
|
-
for (const normalizedPlaceholder of normalizedPlaceholders) {
|
|
136
|
-
const fieldState = state.children.get(normalizedPlaceholder);
|
|
137
|
-
if (fieldState === void 0) {
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
switch (fieldState.type) {
|
|
141
|
-
case "entityRealm":
|
|
142
|
-
if (child.nodeType === "iNode" && child.children.has(fieldState.entity.id.value)) {
|
|
143
|
-
this.setEntityStateErrors(fieldState, child.children.get(fieldState.entity.id.value));
|
|
144
|
-
} else {
|
|
145
|
-
this.setEntityStateErrors(fieldState, child);
|
|
146
|
-
}
|
|
147
|
-
break;
|
|
148
|
-
case "entityList":
|
|
149
|
-
this.setEntityListStateErrors(fieldState, child);
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
setEntityListStateErrors(state, errors) {
|
|
156
|
-
this.addSeveralErrors(state, errors);
|
|
157
|
-
if (errors.nodeType !== "iNode") {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
for (const [childKey, childError] of errors.children) {
|
|
161
|
-
let childState = state.children.get(childKey);
|
|
162
|
-
if (childState === void 0) {
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
if (childState.type === "entityRealmStub") {
|
|
166
|
-
childState.getAccessor();
|
|
167
|
-
childState = state.children.get(childKey);
|
|
168
|
-
}
|
|
169
|
-
if (childError.nodeType === "iNode") {
|
|
170
|
-
this.setEntityStateErrors(childState, childError);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
dumpErrorData(data) {
|
|
175
|
-
for (const subTreePlaceholder in data.data) {
|
|
176
|
-
const treeDatum = data.data[subTreePlaceholder];
|
|
177
|
-
const executionErrors = treeDatum.errors;
|
|
178
|
-
const allErrors = treeDatum?.validation?.errors ? executionErrors.concat(treeDatum.validation.errors) : executionErrors;
|
|
179
|
-
const normalizedErrors = allErrors.map((error) => {
|
|
180
|
-
const path = "paths" in error ? error.paths[0] ?? [] : error.path;
|
|
181
|
-
return {
|
|
182
|
-
path: path.map((pathPart) => {
|
|
183
|
-
if ("field" in pathPart) {
|
|
184
|
-
return pathPart.field;
|
|
185
|
-
}
|
|
186
|
-
if (pathPart.alias) {
|
|
187
|
-
return `#${pathPart.index}(${pathPart.alias})`;
|
|
188
|
-
}
|
|
189
|
-
return pathPart.index;
|
|
190
|
-
}).join("."),
|
|
191
|
-
type: "type" in error ? error.type : void 0,
|
|
192
|
-
message: typeof error.message === "string" ? error.message : error.message?.text
|
|
193
|
-
};
|
|
194
|
-
});
|
|
195
|
-
if (Object.keys(normalizedErrors).length) {
|
|
196
|
-
console.table(normalizedErrors);
|
|
197
|
-
}
|
|
198
|
-
if (treeDatum.errorMessage) {
|
|
199
|
-
console.error(treeDatum.errorMessage);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
export {
|
|
205
|
-
AccessorErrorManager
|
|
206
|
-
};
|
|
207
|
-
//# sourceMappingURL=AccessorErrorManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorErrorManager.js","sources":["../../../src/core/AccessorErrorManager.ts"],"sourcesContent":["import { ErrorAccessor } from '../accessors'\nimport { ErrorsPreprocessor } from './ErrorsPreprocessor'\nimport { EventManager } from './EventManager'\nimport { EntityListState, EntityRealmState, getEntityMarker, StateNode } from './state'\nimport type { TreeStore } from './TreeStore'\nimport { SubMutationOperation } from './MutationGenerator'\nimport { DataBindingTransactionResult } from './DataBinding'\nimport { MutationError, ValidationError } from '@contember/client'\n\nexport class AccessorErrorManager {\n\tprivate errorsByState: Map<StateNode, ErrorAccessor.ErrorsById> = new Map()\n\n\tprivate getNewErrorId = (() => {\n\t\tlet errorId = 1\n\n\t\treturn () => errorId++\n\t})()\n\n\tpublic constructor(private readonly eventManager: EventManager, private readonly treeStore: TreeStore) {}\n\n\tpublic hasErrors() {\n\t\treturn !!this.errorsByState.size\n\t}\n\n\tpublic getErrors(): ErrorAccessor.Error[] {\n\t\treturn Array.from(this.errorsByState.values(), it => Array.from(it.values())).flat()\n\t}\n\n\tpublic clearErrors() {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tfor (const [stateNode] of this.errorsByState) {\n\t\t\t\tstateNode.errors = undefined\n\t\t\t\tthis.eventManager.registerJustUpdated(stateNode, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t}\n\t\t\tthis.errorsByState.clear()\n\t\t})\n\t}\n\n\tpublic clearErrorsByState(state: StateNode): void {\n\t\treturn this.eventManager.syncOperation(() => {\n\t\t\tif (!this.errorsByState.has(state)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.errorsByState.delete(state)\n\t\t\tstate.errors = undefined\n\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t})\n\t}\n\n\tpublic replaceErrors(data: DataBindingTransactionResult, operations: SubMutationOperation[]) {\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tthis.clearErrors()\n\n\t\t\tconst preprocessor = new ErrorsPreprocessor(data, operations)\n\t\t\tconst errorTreeRoot = preprocessor.preprocess()\n\n\t\t\tthis.setRootStateErrors(errorTreeRoot)\n\n\t\t\tthis.dumpErrorData(data)\n\t\t})\n\t}\n\n\tpublic addError(state: StateNode, error: ErrorAccessor.Error): () => void {\n\t\treturn this.eventManager.syncOperation(() => {\n\t\t\tconst errorId = this.getNewErrorId()\n\n\t\t\tlet errorsById: ErrorAccessor.ErrorsById | undefined = this.errorsByState.get(state)\n\t\t\tif (errorsById === undefined) {\n\t\t\t\tthis.errorsByState.set(state, (errorsById = new Map()))\n\t\t\t}\n\t\t\terrorsById.set(errorId, error)\n\t\t\tstate.errors = new ErrorAccessor(Array.from(errorsById.values()))\n\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\n\t\t\treturn () =>\n\t\t\t\tthis.eventManager.syncOperation(() => {\n\t\t\t\t\tconst errorsById = this.errorsByState.get(state)\n\t\t\t\t\tif (errorsById === undefined) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\terrorsById.delete(errorId)\n\t\t\t\t\tif (errorsById.size) {\n\t\t\t\t\t\tstate.errors = new ErrorAccessor(Array.from(errorsById.values()))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.errors = undefined\n\t\t\t\t\t\tthis.errorsByState.delete(state)\n\t\t\t\t\t}\n\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t})\n\t\t})\n\t}\n\n\tprivate addSeveralErrors(state: StateNode, errors: ErrorsPreprocessor.BaseErrorNode) {\n\t\tif (errors.validation) {\n\t\t\tfor (const error of errors.validation) {\n\t\t\t\tthis.addError(state, error)\n\t\t\t}\n\t\t}\n\t\tif (errors.execution) {\n\t\t\tfor (const error of errors.execution) {\n\t\t\t\tthis.addError(state, error)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setRootStateErrors(errorTreeRoot: ErrorsPreprocessor.ErrorTreeRoot) {\n\t\tfor (const rootStates of this.treeStore.subTreeStatesByRoot.values()) {\n\t\t\tfor (const [subTreePlaceholder, rootError] of errorTreeRoot) {\n\t\t\t\tconst rootState = rootStates.get(subTreePlaceholder)\n\n\t\t\t\tif (!rootState) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch (rootState.type) {\n\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\tthis.setEntityStateErrors(rootState, rootError)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tthis.setEntityListStateErrors(rootState, rootError)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setEntityStateErrors(\n\t\tstate: EntityRealmState,\n\t\terrors: ErrorsPreprocessor.ErrorINode | ErrorsPreprocessor.LeafErrorNode,\n\t) {\n\t\tthis.addSeveralErrors(state, errors)\n\n\t\tif (errors.nodeType !== 'iNode') {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const [childKey, child] of errors.children) {\n\t\t\tif (typeof childKey !== 'string') {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (child.nodeType === 'leaf') {\n\t\t\t\tconst fieldState = state.children.get(childKey)\n\n\t\t\t\tif (fieldState?.type === 'field') {\n\t\t\t\t\tthis.addSeveralErrors(fieldState, child)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Deliberately letting flow get here as well. Leaf errors *CAN* refer to relations as well.\n\n\t\t\tconst fields = getEntityMarker(state).fields\n\t\t\tconst placeholders = fields.placeholders.get(childKey)\n\t\t\tif (placeholders === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst normalizedPlaceholders = typeof placeholders === 'string' ? new Set([placeholders]) : placeholders\n\n\t\t\tfor (const normalizedPlaceholder of normalizedPlaceholders) {\n\t\t\t\tconst fieldState = state.children.get(normalizedPlaceholder)\n\t\t\t\tif (fieldState === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch (fieldState.type) {\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\t\t// unwrap for reduced has many\n\t\t\t\t\t\tif (child.nodeType === 'iNode' && child.children.has(fieldState.entity.id.value)) {\n\t\t\t\t\t\t\tthis.setEntityStateErrors(fieldState, child.children.get(fieldState.entity.id.value)!)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.setEntityStateErrors(fieldState, child)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\tthis.setEntityListStateErrors(fieldState, child)\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setEntityListStateErrors(\n\t\tstate: EntityListState,\n\t\terrors: ErrorsPreprocessor.ErrorINode | ErrorsPreprocessor.LeafErrorNode,\n\t) {\n\t\tthis.addSeveralErrors(state, errors)\n\n\t\tif (errors.nodeType !== 'iNode') {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const [childKey, childError] of errors.children) {\n\t\t\tlet childState = state.children.get(childKey)\n\n\t\t\tif (childState === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (childState.type === 'entityRealmStub') {\n\t\t\t\tchildState.getAccessor() // Force init\n\t\t\t\tchildState = state.children.get(childKey)!\n\t\t\t}\n\n\t\t\tif (childError.nodeType === 'iNode') {\n\t\t\t\tthis.setEntityStateErrors(childState as EntityRealmState, childError)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate dumpErrorData(data: DataBindingTransactionResult) {\n\t\t// TODO this is just temporary\n\t\tfor (const subTreePlaceholder in data.data) {\n\t\t\tconst treeDatum = data.data[subTreePlaceholder]\n\t\t\tconst executionErrors: Array<MutationError | ValidationError> = treeDatum.errors\n\t\t\tconst allErrors = treeDatum?.validation?.errors\n\t\t\t\t? executionErrors.concat(treeDatum.validation.errors)\n\t\t\t\t: executionErrors\n\t\t\tconst normalizedErrors = allErrors.map((error: MutationError | ValidationError) => {\n\t\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\t\t\treturn {\n\t\t\t\t\tpath: path\n\t\t\t\t\t\t.map(pathPart => {\n\t\t\t\t\t\t\tif ('field' in pathPart) {\n\t\t\t\t\t\t\t\treturn pathPart.field\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (pathPart.alias) {\n\t\t\t\t\t\t\t\treturn `#${pathPart.index}(${pathPart.alias})`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn pathPart.index\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('.'),\n\t\t\t\t\ttype: 'type' in error ? error.type : undefined,\n\t\t\t\t\tmessage: typeof error.message === 'string' ? error.message : error.message?.text,\n\t\t\t\t}\n\t\t\t})\n\t\t\tif (Object.keys(normalizedErrors).length) {\n\t\t\t\tconsole.table(normalizedErrors)\n\t\t\t}\n\t\t\tif (treeDatum.errorMessage) {\n\t\t\t\tconsole.error(treeDatum.errorMessage)\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["errorsById"],"mappings":";;;;;;;;;;AASO,MAAM,qBAAqB;AAAA,EAS1B,YAA6B,cAA6C,WAAsB;AAR/F,6DAA8D;AAE9D,yCAAuB,uBAAA;AAC9B,UAAI,UAAU;AAEd,aAAO,MAAM;AAAA,IAAA;AAGsB,SAAA,eAAA;AAA6C,SAAA,YAAA;AAAA,EAAuB;AAAA,EAEjG,YAAY;AACX,WAAA,CAAC,CAAC,KAAK,cAAc;AAAA,EAC7B;AAAA,EAEO,YAAmC;AACzC,WAAO,MAAM,KAAK,KAAK,cAAc,OAAU,GAAA,CAAA,OAAM,MAAM,KAAK,GAAG,OAAQ,CAAA,CAAC,EAAE,KAAK;AAAA,EACpF;AAAA,EAEO,cAAc;AACf,SAAA,aAAa,cAAc,MAAM;AACrC,iBAAW,CAAC,SAAS,K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