@contember/binding 1.1.0-alpha.0 → 1.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/accessorPropagation/EnvironmentContext.js +28 -2
- package/dist/development/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/development/accessorPropagation/useEntityListSubTree.js +4 -2
- package/dist/development/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/development/accessorPropagation/useEntitySubTree.js +4 -2
- package/dist/development/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/development/accessorPropagation/useExtendTree.js +27 -0
- package/dist/development/accessorPropagation/useExtendTree.js.map +1 -0
- package/dist/development/accessorTree/AccessorTree.js +16 -14
- package/dist/development/accessorTree/AccessorTree.js.map +1 -1
- package/dist/development/accessorTree/AccessorTreeStateContext.js +4 -0
- package/dist/development/accessorTree/AccessorTreeStateContext.js.map +1 -0
- package/dist/development/accessorTree/NormalizedPersistedData.js.map +1 -1
- package/dist/development/accessorTree/RuntimeId.js +17 -4
- package/dist/development/accessorTree/RuntimeId.js.map +1 -1
- package/dist/development/accessorTree/accessorTreeStateReducer.js +11 -2
- package/dist/development/accessorTree/accessorTreeStateReducer.js.map +1 -1
- package/dist/development/accessorTree/useAccessorTreeState.js +12 -0
- package/dist/development/accessorTree/useAccessorTreeState.js.map +1 -0
- package/dist/development/accessorTree/useDataBinding.js +41 -51
- package/dist/development/accessorTree/useDataBinding.js.map +1 -1
- package/dist/development/accessors/EntityAccessor.js +19 -40
- package/dist/development/accessors/EntityAccessor.js.map +1 -1
- package/dist/development/accessors/EntityListAccessor.js +11 -11
- package/dist/development/accessors/EntityListAccessor.js.map +1 -1
- package/dist/development/accessors/FieldAccessor.js +6 -6
- package/dist/development/accessors/FieldAccessor.js.map +1 -1
- package/dist/development/core/AccessorErrorManager.js +5 -2
- package/dist/development/core/AccessorErrorManager.js.map +1 -1
- package/dist/development/core/Config.js +1 -2
- package/dist/development/core/Config.js.map +1 -1
- package/dist/development/core/DataBinding.js +27 -40
- package/dist/development/core/DataBinding.js.map +1 -1
- package/dist/development/core/DirtinessTracker.js +4 -13
- package/dist/development/core/DirtinessTracker.js.map +1 -1
- package/dist/development/core/ErrorsPreprocessor.js +9 -13
- package/dist/development/core/ErrorsPreprocessor.js.map +1 -1
- package/dist/development/core/EventManager.js +13 -8
- package/dist/development/core/EventManager.js.map +1 -1
- package/dist/development/core/IncrementalMarkerBuilder.js +1 -1
- package/dist/development/core/MarkerMerger.js +2 -2
- package/dist/development/core/MutationGenerator.js +180 -141
- package/dist/development/core/MutationGenerator.js.map +1 -1
- package/dist/development/core/RequestResponseNormalizer.js +93 -134
- package/dist/development/core/RequestResponseNormalizer.js.map +1 -1
- package/dist/development/core/StateInitializer.js +30 -38
- package/dist/development/core/StateInitializer.js.map +1 -1
- package/dist/development/core/TreeAugmenter.js +14 -14
- package/dist/development/core/TreeAugmenter.js.map +1 -1
- package/dist/development/core/TreeFilterGenerator.js +2 -2
- package/dist/development/core/TreeFilterGenerator.js.map +1 -1
- package/dist/development/core/TreeStore.js +12 -23
- package/dist/development/core/TreeStore.js.map +1 -1
- package/dist/development/core/VariableInputTransformer.js.map +1 -1
- package/dist/development/core/operations/EntityOperations.js +14 -13
- package/dist/development/core/operations/EntityOperations.js.map +1 -1
- package/dist/development/core/operations/FieldOperations.js +2 -2
- package/dist/development/core/operations/FieldOperations.js.map +1 -1
- package/dist/development/core/operations/ListOperations.js +3 -3
- package/dist/development/core/operations/ListOperations.js.map +1 -1
- package/dist/development/core/operations/OperationsHelpers.js +2 -2
- package/dist/development/core/operations/OperationsHelpers.js.map +1 -1
- package/dist/development/core/requestAliases/MutationAlias.js +4 -40
- package/dist/development/core/requestAliases/MutationAlias.js.map +1 -1
- package/dist/development/core/schema/Schema.js +27 -3
- package/dist/development/core/schema/Schema.js.map +1 -1
- package/dist/development/core/schema/SchemaLoader.js +12 -12
- package/dist/development/core/schema/SchemaLoader.js.map +1 -1
- package/dist/development/core/schema/SchemaPreprocessor.js +1 -1
- package/dist/development/core/schema/SchemaPreprocessor.js.map +1 -1
- package/dist/development/coreComponents/Component.js +5 -2
- package/dist/development/coreComponents/Component.js.map +1 -1
- package/dist/development/coreComponents/DataBindingProvider.js +0 -1
- package/dist/development/coreComponents/DataBindingProvider.js.map +1 -1
- package/dist/development/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/development/coreComponents/HasOne.js +1 -1
- package/dist/development/dao/Environment.js +35 -3
- package/dist/development/dao/Environment.js.map +1 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.js +6 -13
- package/dist/development/dao/TreeNodeEnvironmentFactory.js.map +1 -1
- package/dist/development/helperComponents/DeferredSubTrees.js +16 -8
- package/dist/development/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/development/helperComponents/If.js +39 -0
- package/dist/development/helperComponents/If.js.map +1 -0
- package/dist/development/helperComponents/SugaredField.js +1 -1
- package/dist/development/helperComponents/helpers/FilterEvaluator.js +35 -0
- package/dist/development/helperComponents/helpers/FilterEvaluator.js.map +1 -0
- package/dist/development/helperComponents/helpers/FilterFieldsCollector.js +38 -0
- package/dist/development/helperComponents/helpers/FilterFieldsCollector.js.map +1 -0
- package/dist/development/helperComponents/helpers/evaluateCondition.js +46 -0
- package/dist/development/helperComponents/helpers/evaluateCondition.js.map +1 -0
- package/dist/development/index.js +7 -2
- package/dist/development/index.js.map +1 -1
- package/dist/development/markers/EntityListSubTreeMarker.js +1 -1
- package/dist/development/markers/EntityListSubTreeMarker.js.map +1 -1
- package/dist/development/markers/EntitySubTreeMarker.js +1 -1
- package/dist/development/markers/EntitySubTreeMarker.js.map +1 -1
- package/dist/development/markers/PlaceholderGenerator.js +4 -4
- package/dist/development/markers/PlaceholderGenerator.js.map +1 -1
- package/dist/development/queryLanguage/MarkerFactory.js +2 -2
- package/dist/development/queryLanguage/QueryLanguage.js +1 -1
- package/dist/development/utils/Hashing.js +21 -6
- package/dist/development/utils/Hashing.js.map +1 -1
- package/dist/production/accessorPropagation/EnvironmentContext.js +28 -2
- package/dist/production/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/production/accessorPropagation/useEntityListSubTree.js +4 -2
- package/dist/production/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/production/accessorPropagation/useEntitySubTree.js +4 -2
- package/dist/production/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/production/accessorPropagation/useExtendTree.js +27 -0
- package/dist/production/accessorPropagation/useExtendTree.js.map +1 -0
- package/dist/production/accessorTree/AccessorTree.js +16 -14
- package/dist/production/accessorTree/AccessorTree.js.map +1 -1
- package/dist/production/accessorTree/AccessorTreeStateContext.js +4 -0
- package/dist/production/accessorTree/AccessorTreeStateContext.js.map +1 -0
- package/dist/production/accessorTree/NormalizedPersistedData.js.map +1 -1
- package/dist/production/accessorTree/RuntimeId.js +17 -4
- package/dist/production/accessorTree/RuntimeId.js.map +1 -1
- package/dist/production/accessorTree/accessorTreeStateReducer.js +11 -2
- package/dist/production/accessorTree/accessorTreeStateReducer.js.map +1 -1
- package/dist/production/accessorTree/useAccessorTreeState.js +12 -0
- package/dist/production/accessorTree/useAccessorTreeState.js.map +1 -0
- package/dist/production/accessorTree/useDataBinding.js +41 -51
- package/dist/production/accessorTree/useDataBinding.js.map +1 -1
- package/dist/production/accessors/EntityAccessor.js +19 -40
- package/dist/production/accessors/EntityAccessor.js.map +1 -1
- package/dist/production/accessors/EntityListAccessor.js +11 -11
- package/dist/production/accessors/EntityListAccessor.js.map +1 -1
- package/dist/production/accessors/FieldAccessor.js +6 -6
- package/dist/production/accessors/FieldAccessor.js.map +1 -1
- package/dist/production/core/AccessorErrorManager.js +5 -2
- package/dist/production/core/AccessorErrorManager.js.map +1 -1
- package/dist/production/core/Config.js +1 -2
- package/dist/production/core/Config.js.map +1 -1
- package/dist/production/core/DataBinding.js +27 -40
- package/dist/production/core/DataBinding.js.map +1 -1
- package/dist/production/core/DirtinessTracker.js +4 -13
- package/dist/production/core/DirtinessTracker.js.map +1 -1
- package/dist/production/core/ErrorsPreprocessor.js +9 -13
- package/dist/production/core/ErrorsPreprocessor.js.map +1 -1
- package/dist/production/core/EventManager.js +12 -7
- package/dist/production/core/EventManager.js.map +1 -1
- package/dist/production/core/IncrementalMarkerBuilder.js +1 -1
- package/dist/production/core/MarkerMerger.js +2 -2
- package/dist/production/core/MutationGenerator.js +180 -141
- package/dist/production/core/MutationGenerator.js.map +1 -1
- package/dist/production/core/RequestResponseNormalizer.js +93 -134
- package/dist/production/core/RequestResponseNormalizer.js.map +1 -1
- package/dist/production/core/StateInitializer.js +30 -38
- package/dist/production/core/StateInitializer.js.map +1 -1
- package/dist/production/core/TreeAugmenter.js +14 -14
- package/dist/production/core/TreeAugmenter.js.map +1 -1
- package/dist/production/core/TreeFilterGenerator.js +2 -2
- package/dist/production/core/TreeFilterGenerator.js.map +1 -1
- package/dist/production/core/TreeStore.js +12 -23
- package/dist/production/core/TreeStore.js.map +1 -1
- package/dist/production/core/VariableInputTransformer.js.map +1 -1
- package/dist/production/core/operations/EntityOperations.js +14 -13
- package/dist/production/core/operations/EntityOperations.js.map +1 -1
- package/dist/production/core/operations/FieldOperations.js.map +1 -1
- package/dist/production/core/operations/ListOperations.js +3 -3
- package/dist/production/core/operations/ListOperations.js.map +1 -1
- package/dist/production/core/operations/OperationsHelpers.js +2 -2
- package/dist/production/core/operations/OperationsHelpers.js.map +1 -1
- package/dist/production/core/requestAliases/MutationAlias.js +4 -33
- package/dist/production/core/requestAliases/MutationAlias.js.map +1 -1
- package/dist/production/core/schema/Schema.js +27 -3
- package/dist/production/core/schema/Schema.js.map +1 -1
- package/dist/production/core/schema/SchemaLoader.js +12 -12
- package/dist/production/core/schema/SchemaLoader.js.map +1 -1
- package/dist/production/core/schema/SchemaPreprocessor.js +1 -1
- package/dist/production/core/schema/SchemaPreprocessor.js.map +1 -1
- package/dist/production/coreComponents/Component.js +5 -2
- package/dist/production/coreComponents/Component.js.map +1 -1
- package/dist/production/coreComponents/DataBindingProvider.js +0 -1
- package/dist/production/coreComponents/DataBindingProvider.js.map +1 -1
- package/dist/production/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/production/coreComponents/HasOne.js +1 -1
- package/dist/production/dao/Environment.js +35 -3
- package/dist/production/dao/Environment.js.map +1 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.js +6 -13
- package/dist/production/dao/TreeNodeEnvironmentFactory.js.map +1 -1
- package/dist/production/helperComponents/DeferredSubTrees.js +16 -8
- package/dist/production/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/production/helperComponents/If.js +39 -0
- package/dist/production/helperComponents/If.js.map +1 -0
- package/dist/production/helperComponents/SugaredField.js +1 -1
- package/dist/production/helperComponents/helpers/FilterEvaluator.js +35 -0
- package/dist/production/helperComponents/helpers/FilterEvaluator.js.map +1 -0
- package/dist/production/helperComponents/helpers/FilterFieldsCollector.js +38 -0
- package/dist/production/helperComponents/helpers/FilterFieldsCollector.js.map +1 -0
- package/dist/production/helperComponents/helpers/evaluateCondition.js +46 -0
- package/dist/production/helperComponents/helpers/evaluateCondition.js.map +1 -0
- package/dist/production/index.js +7 -2
- package/dist/production/index.js.map +1 -1
- package/dist/production/markers/EntityListSubTreeMarker.js +1 -1
- package/dist/production/markers/EntityListSubTreeMarker.js.map +1 -1
- package/dist/production/markers/EntitySubTreeMarker.js +1 -1
- package/dist/production/markers/EntitySubTreeMarker.js.map +1 -1
- package/dist/production/markers/PlaceholderGenerator.js +4 -4
- package/dist/production/markers/PlaceholderGenerator.js.map +1 -1
- package/dist/production/queryLanguage/MarkerFactory.js +2 -2
- package/dist/production/queryLanguage/QueryLanguage.js +1 -1
- package/dist/production/utils/Hashing.js +21 -6
- package/dist/production/utils/Hashing.js.map +1 -1
- package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +1 -1
- package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/EntityKeyContext.d.ts +1 -1
- package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/EnvironmentContext.d.ts +13 -2
- package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +1 -1
- package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/index.d.ts +1 -0
- package/dist/types/accessorPropagation/index.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntityListSubTree.d.ts +2 -1
- package/dist/types/accessorPropagation/useEntityListSubTree.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntitySubTree.d.ts +2 -1
- package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useExtendTree.d.ts +5 -0
- package/dist/types/accessorPropagation/useExtendTree.d.ts.map +1 -0
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeState.d.ts +8 -0
- package/dist/types/accessorTree/AccessorTreeState.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeStateAction.d.ts +6 -0
- package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +4 -0
- package/dist/types/accessorTree/AccessorTreeStateContext.d.ts.map +1 -0
- package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts +0 -1
- package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +1 -1
- package/dist/types/accessorTree/DirtinessContext.d.ts +1 -1
- package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
- package/dist/types/accessorTree/MutationRequestResponse.d.ts +5 -1
- package/dist/types/accessorTree/MutationRequestResponse.d.ts.map +1 -1
- package/dist/types/accessorTree/MutationStateContext.d.ts +1 -1
- package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
- package/dist/types/accessorTree/NormalizedPersistedData.d.ts +5 -5
- package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +1 -1
- package/dist/types/accessorTree/PersistResult.d.ts +2 -1
- package/dist/types/accessorTree/PersistResult.d.ts.map +1 -1
- package/dist/types/accessorTree/QueryRequestResponse.d.ts +11 -10
- package/dist/types/accessorTree/QueryRequestResponse.d.ts.map +1 -1
- package/dist/types/accessorTree/RuntimeId.d.ts +16 -6
- package/dist/types/accessorTree/RuntimeId.d.ts.map +1 -1
- package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +1 -1
- package/dist/types/accessorTree/index.d.ts +1 -0
- package/dist/types/accessorTree/index.d.ts.map +1 -1
- package/dist/types/accessorTree/useAccessorTreeState.d.ts +2 -0
- package/dist/types/accessorTree/useAccessorTreeState.d.ts.map +1 -0
- package/dist/types/accessorTree/useDataBinding.d.ts +1 -1
- package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
- package/dist/types/accessors/BindingConfig.d.ts +0 -1
- package/dist/types/accessors/BindingConfig.d.ts.map +1 -1
- package/dist/types/accessors/EntityAccessor.d.ts +5 -5
- package/dist/types/accessors/EntityAccessor.d.ts.map +1 -1
- package/dist/types/accessors/EntityListAccessor.d.ts +4 -4
- package/dist/types/accessors/EntityListAccessor.d.ts.map +1 -1
- package/dist/types/accessors/FieldAccessor.d.ts +2 -2
- package/dist/types/accessors/FieldAccessor.d.ts.map +1 -1
- package/dist/types/core/AccessorErrorManager.d.ts +2 -1
- package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
- package/dist/types/core/Config.d.ts.map +1 -1
- package/dist/types/core/DataBinding.d.ts +3 -4
- package/dist/types/core/DataBinding.d.ts.map +1 -1
- package/dist/types/core/DirtinessTracker.d.ts +2 -5
- package/dist/types/core/DirtinessTracker.d.ts.map +1 -1
- package/dist/types/core/ErrorsPreprocessor.d.ts +5 -3
- package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -1
- package/dist/types/core/EventManager.d.ts +1 -1
- package/dist/types/core/EventManager.d.ts.map +1 -1
- package/dist/types/core/MutationGenerator.d.ts +25 -1
- package/dist/types/core/MutationGenerator.d.ts.map +1 -1
- package/dist/types/core/RequestResponseNormalizer.d.ts +6 -7
- package/dist/types/core/RequestResponseNormalizer.d.ts.map +1 -1
- package/dist/types/core/StateInitializer.d.ts +1 -5
- package/dist/types/core/StateInitializer.d.ts.map +1 -1
- package/dist/types/core/TreeAugmenter.d.ts +3 -2
- package/dist/types/core/TreeAugmenter.d.ts.map +1 -1
- package/dist/types/core/TreeStore.d.ts +8 -8
- package/dist/types/core/TreeStore.d.ts.map +1 -1
- package/dist/types/core/VariableInputTransformer.d.ts +2 -2
- package/dist/types/core/VariableInputTransformer.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/operations/EntityOperations.d.ts.map +1 -1
- package/dist/types/core/operations/ListOperations.d.ts +2 -1
- package/dist/types/core/operations/ListOperations.d.ts.map +1 -1
- package/dist/types/core/requestAliases/MutationAlias.d.ts +0 -3
- package/dist/types/core/requestAliases/MutationAlias.d.ts.map +1 -1
- package/dist/types/core/requestAliases/index.d.ts +0 -3
- package/dist/types/core/requestAliases/index.d.ts.map +1 -1
- package/dist/types/core/schema/RawSchemaEntity.d.ts +3 -2
- package/dist/types/core/schema/RawSchemaEntity.d.ts.map +1 -1
- package/dist/types/core/schema/Schema.d.ts +13 -3
- package/dist/types/core/schema/Schema.d.ts.map +1 -1
- package/dist/types/core/schema/SchemaColumn.d.ts +1 -1
- package/dist/types/core/schema/SchemaColumn.d.ts.map +1 -1
- package/dist/types/core/schema/SchemaEntity.d.ts +1 -1
- package/dist/types/core/schema/SchemaEntity.d.ts.map +1 -1
- package/dist/types/core/schema/SchemaLoader.d.ts +2 -1
- package/dist/types/core/schema/SchemaLoader.d.ts.map +1 -1
- package/dist/types/core/schema/SchemaRelation.d.ts +1 -1
- package/dist/types/core/schema/SchemaRelation.d.ts.map +1 -1
- package/dist/types/core/state/FieldState.d.ts +2 -2
- package/dist/types/core/state/FieldState.d.ts.map +1 -1
- package/dist/types/coreComponents/Component.d.ts +9 -4
- package/dist/types/coreComponents/Component.d.ts.map +1 -1
- package/dist/types/coreComponents/DataBindingProvider.d.ts +0 -1
- package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
- package/dist/types/coreComponents/Entity.d.ts +1 -1
- package/dist/types/coreComponents/Entity.d.ts.map +1 -1
- package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
- package/dist/types/coreComponents/Field.d.ts +1 -1
- package/dist/types/coreComponents/Field.d.ts.map +1 -1
- package/dist/types/coreComponents/ParentEntity.d.ts +1 -1
- package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
- package/dist/types/dao/Environment.d.ts +14 -5
- package/dist/types/dao/Environment.d.ts.map +1 -1
- package/dist/types/dao/TreeNodeEnvironmentFactory.d.ts.map +1 -1
- package/dist/types/entityEvents/useDerivedField.d.ts +2 -2
- package/dist/types/entityEvents/useDerivedField.d.ts.map +1 -1
- package/dist/types/helperComponents/DeferredSubTrees.d.ts +1 -1
- package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
- package/dist/types/helperComponents/FieldView.d.ts +7 -7
- package/dist/types/helperComponents/FieldView.d.ts.map +1 -1
- package/dist/types/helperComponents/If.d.ts +14 -0
- package/dist/types/helperComponents/If.d.ts.map +1 -0
- package/dist/types/helperComponents/StaticRender.d.ts +1 -1
- package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
- package/dist/types/helperComponents/SugaredField.d.ts +1 -1
- package/dist/types/helperComponents/SugaredField.d.ts.map +1 -1
- package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts +9 -0
- package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +1 -0
- package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts +10 -0
- package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +1 -0
- package/dist/types/helperComponents/helpers/evaluateCondition.d.ts +4 -0
- package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +1 -0
- package/dist/types/helperComponents/index.d.ts +1 -0
- package/dist/types/helperComponents/index.d.ts.map +1 -1
- package/dist/types/markers/FieldMarker.d.ts +3 -3
- package/dist/types/markers/FieldMarker.d.ts.map +1 -1
- package/dist/types/markers/PlaceholderGenerator.d.ts +3 -2
- package/dist/types/markers/PlaceholderGenerator.d.ts.map +1 -1
- package/dist/types/treeParameters/primitives/EntityId.d.ts +1 -1
- package/dist/types/treeParameters/primitives/EntityId.d.ts.map +1 -1
- package/dist/types/treeParameters/primitives/FieldValue.d.ts +2 -2
- package/dist/types/treeParameters/primitives/FieldValue.d.ts.map +1 -1
- package/dist/types/treeParameters/primitives/Json.d.ts +7 -0
- package/dist/types/treeParameters/primitives/Json.d.ts.map +1 -0
- package/dist/types/treeParameters/primitives/index.d.ts +1 -0
- package/dist/types/treeParameters/primitives/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/Hashing.d.ts +3 -2
- package/dist/types/utils/Hashing.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/accessorPropagation/EnvironmentContext.tsx +44 -0
- package/src/accessorPropagation/index.ts +1 -0
- package/src/accessorPropagation/useEntityListSubTree.ts +8 -1
- package/src/accessorPropagation/useEntitySubTree.ts +8 -1
- package/src/accessorPropagation/useExtendTree.ts +30 -0
- package/src/accessorTree/AccessorTree.tsx +18 -18
- package/src/accessorTree/AccessorTreeState.ts +12 -1
- package/src/accessorTree/AccessorTreeStateAction.ts +7 -1
- package/src/accessorTree/AccessorTreeStateContext.ts +4 -0
- package/src/accessorTree/AccessorTreeStateOptions.ts +0 -1
- package/src/accessorTree/MutationRequestResponse.ts +9 -1
- package/src/accessorTree/NormalizedPersistedData.ts +5 -5
- package/src/accessorTree/PersistResult.ts +2 -1
- package/src/accessorTree/QueryRequestResponse.ts +17 -14
- package/src/accessorTree/RuntimeId.ts +27 -6
- package/src/accessorTree/accessorTreeStateReducer.ts +10 -1
- package/src/accessorTree/index.ts +1 -0
- package/src/accessorTree/useAccessorTreeState.ts +11 -0
- package/src/accessorTree/useDataBinding.ts +41 -59
- package/src/accessors/BindingConfig.ts +0 -1
- package/src/accessors/EntityAccessor.ts +22 -58
- package/src/accessors/EntityListAccessor.ts +12 -12
- package/src/accessors/FieldAccessor.ts +5 -5
- package/src/core/AccessorErrorManager.ts +6 -2
- package/src/core/Config.ts +0 -1
- package/src/core/DataBinding.ts +28 -44
- package/src/core/DirtinessTracker.ts +4 -16
- package/src/core/ErrorsPreprocessor.ts +16 -18
- package/src/core/EventManager.ts +14 -8
- package/src/core/MutationGenerator.ts +249 -188
- package/src/core/RequestResponseNormalizer.ts +111 -163
- package/src/core/StateInitializer.ts +46 -58
- package/src/core/TreeAugmenter.ts +16 -15
- package/src/core/TreeFilterGenerator.ts +5 -5
- package/src/core/TreeStore.ts +23 -27
- package/src/core/VariableInputTransformer.ts +2 -2
- package/src/core/index.ts +1 -0
- package/src/core/operations/EntityOperations.ts +13 -14
- package/src/core/operations/FieldOperations.ts +2 -2
- package/src/core/operations/ListOperations.ts +6 -5
- package/src/core/operations/OperationsHelpers.ts +2 -2
- package/src/core/requestAliases/MutationAlias.ts +4 -57
- package/src/core/requestAliases/index.ts +0 -3
- package/src/core/schema/RawSchemaEntity.ts +1 -2
- package/src/core/schema/Schema.ts +38 -4
- package/src/core/schema/SchemaColumn.ts +1 -1
- package/src/core/schema/SchemaEntity.ts +1 -1
- package/src/core/schema/SchemaLoader.ts +13 -11
- package/src/core/schema/SchemaPreprocessor.ts +1 -1
- package/src/core/schema/SchemaRelation.ts +1 -1
- package/src/core/state/FieldState.ts +2 -2
- package/src/coreComponents/Component.tsx +20 -7
- package/src/coreComponents/DataBindingProvider.tsx +0 -2
- package/src/coreComponents/EntityListSubTree.tsx +2 -3
- package/src/dao/Environment.ts +48 -7
- package/src/dao/TreeNodeEnvironmentFactory.ts +8 -13
- package/src/helperComponents/DeferredSubTrees.tsx +20 -13
- package/src/helperComponents/If.tsx +71 -0
- package/src/helperComponents/helpers/FilterEvaluator.ts +46 -0
- package/src/helperComponents/helpers/FilterFieldsCollector.ts +46 -0
- package/src/helperComponents/helpers/evaluateCondition.ts +52 -0
- package/src/helperComponents/index.ts +1 -0
- package/src/markers/EntityListSubTreeMarker.ts +1 -1
- package/src/markers/EntitySubTreeMarker.ts +1 -1
- package/src/markers/PlaceholderGenerator.ts +5 -2
- package/src/treeParameters/primitives/EntityId.ts +1 -1
- package/src/treeParameters/primitives/FieldValue.ts +2 -2
- package/src/treeParameters/primitives/Json.ts +7 -0
- package/src/treeParameters/primitives/index.ts +1 -0
- package/src/typings/react-fix.d.ts +12 -0
- package/src/utils/Hashing.ts +23 -8
- package/dist/development/core/requestAliases/mutationOperationSubTreeType.js +0 -6
- package/dist/development/core/requestAliases/mutationOperationSubTreeType.js.map +0 -1
- package/dist/development/core/requestAliases/mutationOperationType.js +0 -7
- package/dist/development/core/requestAliases/mutationOperationType.js.map +0 -1
- package/dist/production/core/requestAliases/mutationOperationSubTreeType.js +0 -6
- package/dist/production/core/requestAliases/mutationOperationSubTreeType.js.map +0 -1
- package/dist/production/core/requestAliases/mutationOperationType.js +0 -7
- package/dist/production/core/requestAliases/mutationOperationType.js.map +0 -1
- package/dist/types/core/requestAliases/TopLevelMutationOperation.d.ts +0 -11
- package/dist/types/core/requestAliases/TopLevelMutationOperation.d.ts.map +0 -1
- package/dist/types/core/requestAliases/mutationOperationSubTreeType.d.ts +0 -5
- package/dist/types/core/requestAliases/mutationOperationSubTreeType.d.ts.map +0 -1
- package/dist/types/core/requestAliases/mutationOperationType.d.ts +0 -6
- package/dist/types/core/requestAliases/mutationOperationType.d.ts.map +0 -1
- package/src/accessorPropagation/EnvironmentContext.ts +0 -5
- package/src/core/requestAliases/TopLevelMutationOperation.ts +0 -11
- package/src/core/requestAliases/mutationOperationSubTreeType.ts +0 -4
- package/src/core/requestAliases/mutationOperationType.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"If.js","sources":["../../../src/helperComponents/If.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useMemo } from 'react'\nimport { Component, Field } from '../coreComponents'\nimport { EntityAccessor } from '../accessors'\nimport { QueryLanguage } from '../queryLanguage'\nimport { useEntity, useEnvironment } from '../accessorPropagation'\nimport { Filter } from '../treeParameters'\nimport { FilterFieldsCollector } from './helpers/FilterFieldsCollector'\nimport { FilterEvaluator } from './helpers/FilterEvaluator'\n\nexport type IfProps =\n\t| IfFilterProps\n\t| IfCallbackProps\n\nexport interface IfFilterProps {\n\tcondition: string | Filter\n\tchildren?: ReactNode\n}\n\nexport interface IfCallbackProps {\n\tcondition: (accessor: EntityAccessor) => boolean\n\tchildren?: ReactNode\n}\n\nexport const If = Component<IfProps>(props => {\n\t\treturn typeof props.condition !== 'function'\n\t\t\t? <IfFilter condition={props.condition}>{props.children}</IfFilter>\n\t\t\t: <IfCallback condition={props.condition}>{props.children}</IfCallback>\n\t},\n\t'If',\n)\n\nconst IfCallback = Component<IfCallbackProps>(\n\t({ children, condition }) => {\n\t\tconst entity = useEntity()\n\t\tconst evaluated = useMemo(() => condition(entity), [condition, entity])\n\n\t\treturn evaluated ? <>{children}</> : null\n\t},\n\t({ children }) => {\n\t\treturn <>{children}</>\n\t},\n\t'IfCallback',\n)\n\nconst IfFilter = Component<IfFilterProps>(\n\t({ children, condition }) => {\n\t\tconst env = useEnvironment()\n\t\tconst entity = useEntity()\n\n\t\tconst schema = env.getSchema()\n\t\tconst evaluated = useMemo(\n\t\t\t() => new FilterEvaluator(schema).evaluateFilter(entity, QueryLanguage.desugarFilter(condition, env)),\n\t\t\t[condition, entity, env, schema],\n\t\t)\n\n\t\treturn evaluated ? <>{children}</> : null\n\t},\n\t({ children, condition }, env) => {\n\t\tconst desugaredFilter = QueryLanguage.desugarFilter(condition, env)\n\t\tconst collectedFields = new FilterFieldsCollector(env.getSchema(), desugaredFilter).collectFields(env.getSubTreeNode().entity)\n\t\tconst additionalFields = <>{Array.from(collectedFields).map(it => <Field field={it} key={it} />)}</>\n\n\t\treturn <>\n\t\t\t{additionalFields}\n\t\t\t{children}\n\t\t</>\n\t},\n\t'IfFilter',\n)\n\n"],"names":["_jsx","_jsxFragment"],"mappings":";;;;;;;;AAwBa,MAAA,KAAK,UAAmB,CAAS,UAAA;AAC5C,SAAO,OAAO,MAAM,cAAc,aAC9BA,8BAAA,UAAA;AAAA,IAAS,WAAW,MAAM;AAAA,EAAY,GAAA,MAAM,QAAS,IACrDA,8BAAA,YAAA;AAAA,IAAW,WAAW,MAAM;AAAA,EAAA,GAAY,MAAM,QAAS;AAC5D,GACA,IACD;AAEA,MAAM,aAAa,UAClB,CAAC,EAAE,UAAU,gBAAgB;AAC5B,QAAM,SAAS;AACT,QAAA,YAAY,QAAQ,MAAM,UAAU,MAAM,GAAG,CAAC,WAAW,MAAM,CAAC;AAE/D,SAAA,YAAeA,8BAAAC,UAAA,MAAA,QAAS,IAAM;AACtC,GACA,CAAC,EAAE,eAAe;AACjB,uDAAU,QAAS;AACpB,GACA,YACD;AAEA,MAAM,WAAW,UAChB,CAAC,EAAE,UAAU,gBAAgB;AAC5B,QAAM,MAAM;AACZ,QAAM,SAAS;AAET,QAAA,SAAS,IAAI;AACb,QAAA,YAAY,QACjB,MAAM,IAAI,gBAAgB,MAAM,EAAE,eAAe,QAAQ,cAAc,cAAc,WAAW,GAAG,CAAC,GACpG,CAAC,WAAW,QAAQ,KAAK,MAAM,CAChC;AAEO,SAAA,YAAeD,8BAAAC,UAAA,MAAA,QAAS,IAAM;AACtC,GACA,CAAC,EAAE,UAAU,aAAa,QAAQ;AACjC,QAAM,kBAAkB,cAAc,cAAc,WAAW,GAAG;AAClE,QAAM,kBAAkB,IAAI,sBAAsB,IAAI,UAAU,GAAG,eAAe,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM;AACvH,QAAA,iEAAsB,MAAM,KAAK,eAAe,EAAE,IAAI,QAAOD,8BAAA,OAAA;AAAA,IAAM,OAAO;AAAA,IAAI,KAAK;AAAA,EAAI,CAAA,CAAE,CAAE;AAE1F,SAAAA,8BAAAC,UAAA,MACL,kBACA,QACF;AACD,GACA,UACD;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
|
-
import { Field } from "../coreComponents/Field.js";
|
|
3
2
|
import { Component } from "../coreComponents/Component.js";
|
|
3
|
+
import { Field } from "../coreComponents/Field.js";
|
|
4
4
|
const SugaredField = Component((props) => {
|
|
5
5
|
if (typeof props.field === "string") {
|
|
6
6
|
return /* @__PURE__ */ createElement(Field, {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BindingError } from "../../BindingError.js";
|
|
2
|
+
import { evaluateCondition } from "./evaluateCondition.js";
|
|
3
|
+
class FilterEvaluator {
|
|
4
|
+
constructor(schema) {
|
|
5
|
+
this.schema = schema;
|
|
6
|
+
}
|
|
7
|
+
evaluateFilter(entity, filter) {
|
|
8
|
+
const entitySchema = this.schema.getEntity(entity.name);
|
|
9
|
+
let acc = true;
|
|
10
|
+
for (const [key, value] of Object.entries(filter)) {
|
|
11
|
+
if (key === "and" || key === "or") {
|
|
12
|
+
if (!Array.isArray(value)) {
|
|
13
|
+
throw new BindingError();
|
|
14
|
+
}
|
|
15
|
+
const operation = key === "and" ? "every" : "some";
|
|
16
|
+
acc && (acc = value[operation]((it) => this.evaluateFilter(entity, it)));
|
|
17
|
+
} else if (key === "not") {
|
|
18
|
+
acc && (acc = !this.evaluateFilter(entity, value));
|
|
19
|
+
} else {
|
|
20
|
+
const field = entitySchema.fields.get(key);
|
|
21
|
+
if (!field) {
|
|
22
|
+
throw new BindingError();
|
|
23
|
+
}
|
|
24
|
+
if (field.__typename === "_Column") {
|
|
25
|
+
acc && (acc = evaluateCondition(entity.getField(key).value, value));
|
|
26
|
+
} else {
|
|
27
|
+
acc && (acc = this.evaluateFilter(entity.getEntity(key), value));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return acc;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export { FilterEvaluator };
|
|
35
|
+
//# sourceMappingURL=FilterEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterEvaluator.js","sources":["../../../../src/helperComponents/helpers/FilterEvaluator.ts"],"sourcesContent":["import { Schema } from '../../core/schema'\nimport { Input } from '@contember/client'\nimport { EntityAccessor } from '../../accessors'\nimport { Filter } from '../../treeParameters'\nimport { BindingError } from '../../BindingError'\nimport { evaluateCondition } from './evaluateCondition'\n\n\nexport class FilterEvaluator {\n\tconstructor(\n\t\tprivate readonly schema: Schema,\n\t) {\n\t}\n\n\tevaluateFilter(entity: EntityAccessor, filter: Filter): boolean {\n\t\tconst entitySchema = this.schema.getEntity(entity.name)\n\n\t\tlet acc = true\n\t\tfor (const [key, value] of Object.entries(filter)) {\n\t\t\tif (key === 'and' || key === 'or') {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\n\t\t\t\t\tconst operation = key === 'and' ? 'every' : 'some' as const\n\t\t\t\t\tacc &&= value[operation](it => this.evaluateFilter(entity, it))\n\n\t\t\t} else if (key === 'not') {\n\t\t\t\t\tacc &&= !this.evaluateFilter(entity, value as Filter)\n\n\t\t\t} else {\n\t\t\t\tconst field = entitySchema.fields.get(key)\n\t\t\t\tif (!field) {\n\t\t\t\t\tthrow new BindingError()\n\t\t\t\t}\n\n\t\t\t\tif (field.__typename === '_Column') {\n\t\t\t\t\tacc &&= evaluateCondition(entity.getField(key).value, value as Input.Condition)\n\t\t\t\t} else {\n\t\t\t\t\tacc &&= this.evaluateFilter(entity.getEntity(key), value as Filter)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn acc\n\t}\n}\n"],"names":[],"mappings":";;AAQO,MAAM,gBAAgB;AAAA,EAC5B,YACkB,QAChB;AADgB,SAAA,SAAA;AAAA,EAElB;AAAA,EAEA,eAAe,QAAwB,QAAyB;AAC/D,UAAM,eAAe,KAAK,OAAO,UAAU,OAAO,IAAI;AAEtD,QAAI,MAAM;AACV,eAAW,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;AAC9C,UAAA,QAAQ,SAAS,QAAQ,MAAM;AACjC,YAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;AAC1B,gBAAM,IAAI,aAAa;AAAA,QACxB;AAEM,cAAA,YAAY,QAAQ,QAAQ,UAAU;AAC5C,sBAAQ,MAAM,WAAW,CAAA,OAAM,KAAK,eAAe,QAAQ,EAAE,CAAC;AAAA,MAAA,WAErD,QAAQ,OAAO;AACxB,sBAAQ,CAAC,KAAK,eAAe,QAAQ,KAAe;AAAA,MAAA,OAE/C;AACN,cAAM,QAAQ,aAAa,OAAO,IAAI,GAAG;AACzC,YAAI,CAAC,OAAO;AACX,gBAAM,IAAI,aAAa;AAAA,QACxB;AAEI,YAAA,MAAM,eAAe,WAAW;AACnC,wBAAQ,kBAAkB,OAAO,SAAS,GAAG,EAAE,OAAO,KAAwB;AAAA,QAAA,OACxE;AACN,wBAAQ,KAAK,eAAe,OAAO,UAAU,GAAG,GAAG,KAAe;AAAA,QACnE;AAAA,MACD;AAAA,IACD;AACO,WAAA;AAAA,EACR;AACD;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BindingError } from "../../BindingError.js";
|
|
2
|
+
class FilterFieldsCollector {
|
|
3
|
+
constructor(schema, rootFilter) {
|
|
4
|
+
this.schema = schema;
|
|
5
|
+
this.rootFilter = rootFilter;
|
|
6
|
+
}
|
|
7
|
+
collectFields(entity) {
|
|
8
|
+
const result = /* @__PURE__ */ new Set();
|
|
9
|
+
this.collectFieldsInternal(this.rootFilter, entity, [], result);
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
collectFieldsInternal(filter, entity, path, result) {
|
|
13
|
+
for (const [key, value] of Object.entries(filter)) {
|
|
14
|
+
if (key === "and" || key === "or") {
|
|
15
|
+
if (!Array.isArray(value)) {
|
|
16
|
+
throw new BindingError();
|
|
17
|
+
}
|
|
18
|
+
value?.forEach((it) => this.collectFieldsInternal(it, entity, path, result));
|
|
19
|
+
} else if (key === "not") {
|
|
20
|
+
this.collectFieldsInternal(value, entity, path, result);
|
|
21
|
+
} else {
|
|
22
|
+
const field = entity.fields.get(key);
|
|
23
|
+
if (!field) {
|
|
24
|
+
throw new BindingError(`Invalid field: the name "${key}" does not exist on entity "${entity.name}" in a ${path.length === 0 ? "root" : `path "${path.join(".")}"`} of a following filter:
|
|
25
|
+
` + JSON.stringify(this.rootFilter, null, " "));
|
|
26
|
+
}
|
|
27
|
+
if (field.__typename === "_Column") {
|
|
28
|
+
result.add([...path, key].join("."));
|
|
29
|
+
} else {
|
|
30
|
+
const entity2 = this.schema.getEntity(field.targetEntity);
|
|
31
|
+
this.collectFieldsInternal(value, entity2, [...path, key], result);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export { FilterFieldsCollector };
|
|
38
|
+
//# sourceMappingURL=FilterFieldsCollector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterFieldsCollector.js","sources":["../../../../src/helperComponents/helpers/FilterFieldsCollector.ts"],"sourcesContent":["import { Schema, SchemaEntity } from '../../core/schema'\nimport { Filter } from '../../treeParameters'\nimport { BindingError } from '../../BindingError'\n\nexport class FilterFieldsCollector {\n\tconstructor(\n\t\tprivate readonly schema: Schema,\n\t\tprivate readonly rootFilter: Filter,\n\t) {\n\t}\n\n\n\tcollectFields(entity: SchemaEntity): Set<string> {\n\t\tconst result = new Set<string>()\n\t\tthis.collectFieldsInternal(this.rootFilter, entity, [], result)\n\t\treturn result\n\t}\n\n\tprivate collectFieldsInternal(filter: Filter, entity: SchemaEntity, path: string[], result: Set<string>): void {\n\t\tfor (const [key, value] of Object.entries(filter)) {\n\t\t\tif (key === 'and' || key === 'or') {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tvalue?.forEach(it => this.collectFieldsInternal(it, entity, path, result))\n\n\t\t\t} else if (key === 'not') {\n\t\t\t\t\tthis.collectFieldsInternal(value as Filter, entity, path, result)\n\n\t\t\t} else {\n\t\t\t\tconst field = entity.fields.get(key)\n\t\t\t\tif (!field) {\n\t\t\t\t\tthrow new BindingError(`Invalid field: the name \"${key}\" does not exist on entity \"${entity.name}\" `\n\t\t\t\t\t\t+ `in a ${path.length === 0 ? 'root' : `path \"${path.join('.')}\"`} of a following filter:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.rootFilter, null, ' '))\n\t\t\t\t}\n\t\t\t\tif (field.__typename === '_Column') {\n\t\t\t\t\tresult.add([...path, key].join('.'))\n\t\t\t\t} else {\n\t\t\t\t\tconst entity = this.schema.getEntity(field.targetEntity)\n\t\t\t\t\tthis.collectFieldsInternal(value as Filter, entity, [...path, key], result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";AAIO,MAAM,sBAAsB;AAAA,EAClC,YACkB,QACA,YAChB;AAFgB,SAAA,SAAA;AACA,SAAA,aAAA;AAAA,EAElB;AAAA,EAGA,cAAc,QAAmC;AAC1C,UAAA,6BAAa;AACnB,SAAK,sBAAsB,KAAK,YAAY,QAAQ,CAAA,GAAI,MAAM;AACvD,WAAA;AAAA,EACR;AAAA,EAEQ,sBAAsB,QAAgB,QAAsB,MAAgB,QAA2B;AAC9G,eAAW,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;AAC9C,UAAA,QAAQ,SAAS,QAAQ,MAAM;AACjC,YAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;AAC1B,gBAAM,IAAI,aAAa;AAAA,QACxB;AACO,eAAA,QAAQ,QAAM,KAAK,sBAAsB,IAAI,QAAQ,MAAM,MAAM,CAAC;AAAA,MAAA,WAEhE,QAAQ,OAAO;AACxB,aAAK,sBAAsB,OAAiB,QAAQ,MAAM,MAAM;AAAA,MAAA,OAE3D;AACN,cAAM,QAAQ,OAAO,OAAO,IAAI,GAAG;AACnC,YAAI,CAAC,OAAO;AACX,gBAAM,IAAI,aAAa,4BAA4B,kCAAkC,OAAO,cACjF,KAAK,WAAW,IAAI,SAAS,SAAS,KAAK,KAAK,GAAG;AAAA,IAC3D,KAAK,UAAU,KAAK,YAAY,MAAM,IAAI,CAAC;AAAA,QAC/C;AACI,YAAA,MAAM,eAAe,WAAW;AAC5B,iBAAA,IAAI,CAAC,GAAG,MAAM,GAAG,EAAE,KAAK,GAAG,CAAC;AAAA,QAAA,OAC7B;AACN,gBAAM,UAAS,KAAK,OAAO,UAAU,MAAM,YAAY;AAClD,eAAA,sBAAsB,OAAiB,SAAQ,CAAC,GAAG,MAAM,GAAG,GAAG,MAAM;AAAA,QAC3E;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GraphQlLiteral } from "@contember/client";
|
|
2
|
+
import { BindingError } from "../../BindingError.js";
|
|
3
|
+
const unwrapGraphqlLiteral = (value) => {
|
|
4
|
+
if (value instanceof GraphQlLiteral) {
|
|
5
|
+
return value.value;
|
|
6
|
+
}
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
const evaluateCondition = (value, condition) => {
|
|
10
|
+
const handlers = {
|
|
11
|
+
and: (expr) => expr.every((it) => evaluateCondition(value, it)),
|
|
12
|
+
or: (expr) => expr.some((it) => evaluateCondition(value, it)),
|
|
13
|
+
not: (expr) => !evaluateCondition(value, expr),
|
|
14
|
+
eq: (expr) => value === unwrapGraphqlLiteral(expr),
|
|
15
|
+
notEq: (expr) => value !== unwrapGraphqlLiteral(expr),
|
|
16
|
+
isNull: (expr) => value === null === expr,
|
|
17
|
+
in: (expr) => expr.map(unwrapGraphqlLiteral).includes(value),
|
|
18
|
+
notIn: (expr) => !expr.map(unwrapGraphqlLiteral).includes(value),
|
|
19
|
+
lt: (expr) => value !== null && value < unwrapGraphqlLiteral(expr),
|
|
20
|
+
lte: (expr) => value !== null && value <= unwrapGraphqlLiteral(expr),
|
|
21
|
+
gt: (expr) => value !== null && value > unwrapGraphqlLiteral(expr),
|
|
22
|
+
gte: (expr) => value !== null && value >= unwrapGraphqlLiteral(expr),
|
|
23
|
+
contains: (expr) => typeof value === "string" && value.includes(unwrapGraphqlLiteral(expr)),
|
|
24
|
+
startsWith: (expr) => typeof value === "string" && value.startsWith(unwrapGraphqlLiteral(expr)),
|
|
25
|
+
endsWith: (expr) => typeof value === "string" && value.endsWith(unwrapGraphqlLiteral(expr)),
|
|
26
|
+
containsCI: (expr) => typeof value === "string" && value.toLowerCase().includes(unwrapGraphqlLiteral(expr).toLowerCase()),
|
|
27
|
+
startsWithCI: (expr) => typeof value === "string" && value.toLowerCase().startsWith(unwrapGraphqlLiteral(expr).toLowerCase()),
|
|
28
|
+
endsWithCI: (expr) => typeof value === "string" && value.toLowerCase().endsWith(unwrapGraphqlLiteral(expr).toLowerCase()),
|
|
29
|
+
never: () => false,
|
|
30
|
+
always: () => true,
|
|
31
|
+
null: (expr) => value === null === expr
|
|
32
|
+
};
|
|
33
|
+
return Object.entries(condition).every(([operator, argument]) => {
|
|
34
|
+
if (value === void 0) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
const handlerKey = operator;
|
|
38
|
+
const handler = handlers[handlerKey];
|
|
39
|
+
if (!handler) {
|
|
40
|
+
throw new BindingError();
|
|
41
|
+
}
|
|
42
|
+
return handler(argument);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export { evaluateCondition };
|
|
46
|
+
//# sourceMappingURL=evaluateCondition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateCondition.js","sources":["../../../../src/helperComponents/helpers/evaluateCondition.ts"],"sourcesContent":["import { GraphQlLiteral, Input } from '@contember/client'\nimport { FieldValue } from '../../treeParameters'\nimport { BindingError } from '../../BindingError'\n\nconst unwrapGraphqlLiteral = (value: Input.ColumnValue<GraphQlLiteral>): any => {\n\tif (value instanceof GraphQlLiteral) {\n\t\treturn value.value\n\t}\n\treturn value\n}\n\nexport const evaluateCondition = (value: FieldValue | null, condition: Input.Condition<Input.ColumnValue<GraphQlLiteral>>) => {\n\t\tconst handlers: {\n\t\t\t[K in keyof Required<Input.Condition<any>>]: (\n\t\t\t\tparam: Exclude<Input.Condition<any>[K], undefined>,\n\t\t\t) => boolean\n\t\t} = {\n\t\t\tand: expr => expr.every(it => evaluateCondition(value, it)),\n\t\t\tor: expr => expr.some(it => evaluateCondition(value, it)),\n\t\t\tnot: expr => !evaluateCondition(value, expr),\n\t\t\teq: expr => value === unwrapGraphqlLiteral(expr),\n\t\t\tnotEq: expr => value !== unwrapGraphqlLiteral(expr),\n\t\t\tisNull: expr => (value === null) === expr,\n\t\t\tin: expr => expr.map(unwrapGraphqlLiteral).includes(value),\n\t\t\tnotIn: expr => !expr.map(unwrapGraphqlLiteral).includes(value),\n\t\t\tlt: expr => value !== null && value < unwrapGraphqlLiteral(expr),\n\t\t\tlte: expr => value !== null && value <= unwrapGraphqlLiteral(expr),\n\t\t\tgt: expr => value !== null && value > unwrapGraphqlLiteral(expr),\n\t\t\tgte: expr => value !== null && value >= unwrapGraphqlLiteral(expr),\n\t\t\tcontains: expr => typeof value === 'string' && value.includes(unwrapGraphqlLiteral(expr)),\n\t\t\tstartsWith: expr => typeof value === 'string' && value.startsWith(unwrapGraphqlLiteral(expr)),\n\t\t\tendsWith: expr => typeof value === 'string' && value.endsWith(unwrapGraphqlLiteral(expr)),\n\t\t\tcontainsCI: expr => typeof value === 'string' && value.toLowerCase().includes(unwrapGraphqlLiteral(expr).toLowerCase()),\n\t\t\tstartsWithCI: expr => typeof value === 'string' && value.toLowerCase().startsWith(unwrapGraphqlLiteral(expr).toLowerCase()),\n\t\t\tendsWithCI: expr => typeof value === 'string' && value.toLowerCase().endsWith(unwrapGraphqlLiteral(expr).toLowerCase()),\n\t\t\tnever: () => false,\n\t\t\talways: () => true,\n\t\t\t// deprecated\n\t\t\tnull: expr => (value === null) === expr,\n\t\t}\n\t\treturn Object.entries(condition).every(([operator, argument]) => {\n\t\t\tif (value === undefined) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst handlerKey = operator as keyof typeof handlers\n\t\t\tconst handler = handlers[handlerKey]\n\t\t\tif (!handler) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\treturn handler(argument)\n\t\t})\n\t}\n"],"names":[],"mappings":";;AAIA,MAAM,uBAAuB,CAAC,UAAkD;AAC/E,MAAI,iBAAiB,gBAAgB;AACpC,WAAO,MAAM;AAAA,EACd;AACO,SAAA;AACR;AAEa,MAAA,oBAAoB,CAAC,OAA0B,cAAkE;AAC5H,QAAM,WAIF;AAAA,IACH,KAAK,UAAQ,KAAK,MAAM,QAAM,kBAAkB,OAAO,EAAE,CAAC;AAAA,IAC1D,IAAI,UAAQ,KAAK,KAAK,QAAM,kBAAkB,OAAO,EAAE,CAAC;AAAA,IACxD,KAAK,CAAA,SAAQ,CAAC,kBAAkB,OAAO,IAAI;AAAA,IAC3C,IAAI,CAAA,SAAQ,UAAU,qBAAqB,IAAI;AAAA,IAC/C,OAAO,CAAA,SAAQ,UAAU,qBAAqB,IAAI;AAAA,IAClD,QAAQ,CAAS,SAAA,UAAU,SAAU;AAAA,IACrC,IAAI,CAAQ,SAAA,KAAK,IAAI,oBAAoB,EAAE,SAAS,KAAK;AAAA,IACzD,OAAO,UAAQ,CAAC,KAAK,IAAI,oBAAoB,EAAE,SAAS,KAAK;AAAA,IAC7D,IAAI,CAAQ,SAAA,UAAU,QAAQ,QAAQ,qBAAqB,IAAI;AAAA,IAC/D,KAAK,CAAQ,SAAA,UAAU,QAAQ,SAAS,qBAAqB,IAAI;AAAA,IACjE,IAAI,CAAQ,SAAA,UAAU,QAAQ,QAAQ,qBAAqB,IAAI;AAAA,IAC/D,KAAK,CAAQ,SAAA,UAAU,QAAQ,SAAS,qBAAqB,IAAI;AAAA,IACjE,UAAU,UAAQ,OAAO,UAAU,YAAY,MAAM,SAAS,qBAAqB,IAAI,CAAC;AAAA,IACxF,YAAY,UAAQ,OAAO,UAAU,YAAY,MAAM,WAAW,qBAAqB,IAAI,CAAC;AAAA,IAC5F,UAAU,UAAQ,OAAO,UAAU,YAAY,MAAM,SAAS,qBAAqB,IAAI,CAAC;AAAA,IACxF,YAAY,CAAA,SAAQ,OAAO,UAAU,YAAY,MAAM,YAAY,EAAE,SAAS,qBAAqB,IAAI,EAAE,aAAa;AAAA,IACtH,cAAc,CAAA,SAAQ,OAAO,UAAU,YAAY,MAAM,YAAY,EAAE,WAAW,qBAAqB,IAAI,EAAE,aAAa;AAAA,IAC1H,YAAY,CAAA,SAAQ,OAAO,UAAU,YAAY,MAAM,YAAY,EAAE,SAAS,qBAAqB,IAAI,EAAE,aAAa;AAAA,IACtH,OAAO,MAAM;AAAA,IACb,QAAQ,MAAM;AAAA,IAEd,MAAM,CAAS,SAAA,UAAU,SAAU;AAAA,EAAA;AAE7B,SAAA,OAAO,QAAQ,SAAS,EAAE,MAAM,CAAC,CAAC,UAAU,cAAc;AAChE,QAAI,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACA,UAAM,aAAa;AACnB,UAAM,UAAU,SAAS;AACzB,QAAI,CAAC,SAAS;AACb,YAAM,IAAI,aAAa;AAAA,IACxB;AACA,WAAO,QAAQ,QAAQ;AAAA,EAAA,CACvB;AACF;;"}
|
package/dist/production/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { v4 as generateUuid } from "uuid";
|
|
|
4
4
|
export { AccessorProvider } from "./accessorPropagation/AccessorProvider.js";
|
|
5
5
|
export { BindingOperationsProvider } from "./accessorPropagation/BindingOperationsProvider.js";
|
|
6
6
|
export { EntityKeyProvider } from "./accessorPropagation/EntityKeyProvider.js";
|
|
7
|
-
export { EnvironmentContext } from "./accessorPropagation/EnvironmentContext.js";
|
|
7
|
+
export { EnvironmentContext, EnvironmentExtensionProvider, EnvironmentMiddleware } from "./accessorPropagation/EnvironmentContext.js";
|
|
8
8
|
export { TreeRootIdProvider } from "./accessorPropagation/TreeRootIdProvider.js";
|
|
9
9
|
export { useAccessorUpdateSubscription } from "./accessorPropagation/useAccessorUpdateSubscription.js";
|
|
10
10
|
export { useBindingOperations } from "./accessorPropagation/useBindingOperations.js";
|
|
@@ -20,6 +20,7 @@ export { useEntityListSubTreeParameters } from "./accessorPropagation/useEntityL
|
|
|
20
20
|
export { useEntitySubTree } from "./accessorPropagation/useEntitySubTree.js";
|
|
21
21
|
export { useEntitySubTreeParameters } from "./accessorPropagation/useEntitySubTreeParameters.js";
|
|
22
22
|
export { useEnvironment } from "./accessorPropagation/useEnvironment.js";
|
|
23
|
+
export { useExtendTree } from "./accessorPropagation/useExtendTree.js";
|
|
23
24
|
export { useField } from "./accessorPropagation/useField.js";
|
|
24
25
|
export { useGetEntityByKey } from "./accessorPropagation/useGetEntityByKey.js";
|
|
25
26
|
export { useGetEntityListSubTree } from "./accessorPropagation/useGetEntityListSubTree.js";
|
|
@@ -44,10 +45,13 @@ export { DirtinessContext } from "./accessorTree/DirtinessContext.js";
|
|
|
44
45
|
export { metadataToRequestError } from "./accessorTree/metadataToRequestError.js";
|
|
45
46
|
export { MutationStateContext } from "./accessorTree/MutationStateContext.js";
|
|
46
47
|
export { NormalizedPersistedData } from "./accessorTree/NormalizedPersistedData.js";
|
|
47
|
-
export { ClientGeneratedUuid,
|
|
48
|
+
export { ClientGeneratedUuid, ServerId, UnpersistedEntityDummyId } from "./accessorTree/RuntimeId.js";
|
|
49
|
+
export { useAccessorTreeState } from "./accessorTree/useAccessorTreeState.js";
|
|
48
50
|
export { useDataBinding } from "./accessorTree/useDataBinding.js";
|
|
49
51
|
export { useDirtinessState } from "./accessorTree/useDirtinessState.js";
|
|
50
52
|
export { useMutationState } from "./accessorTree/useMutationState.js";
|
|
53
|
+
export { Schema } from "./core/schema/Schema.js";
|
|
54
|
+
export { SchemaLoader } from "./core/schema/SchemaLoader.js";
|
|
51
55
|
export { DataBinding, DataBindingExtendAborted } from "./core/DataBinding.js";
|
|
52
56
|
export { MarkerMerger } from "./core/MarkerMerger.js";
|
|
53
57
|
export { MarkerTreeGenerator } from "./core/MarkerTreeGenerator.js";
|
|
@@ -74,6 +78,7 @@ export { useEntityPersistSuccess } from "./entityEvents/useEntityPersistSuccess.
|
|
|
74
78
|
export { useOnConnectionUpdate } from "./entityEvents/useOnConnectionUpdate.js";
|
|
75
79
|
export { DeferredSubTrees } from "./helperComponents/DeferredSubTrees.js";
|
|
76
80
|
export { EntityView } from "./helperComponents/EntityView.js";
|
|
81
|
+
export { If } from "./helperComponents/If.js";
|
|
77
82
|
export { FieldView } from "./helperComponents/FieldView.js";
|
|
78
83
|
export { StaticRender } from "./helperComponents/StaticRender.js";
|
|
79
84
|
export { SugaredField } from "./helperComponents/SugaredField.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,7 +11,7 @@ class EntityListSubTreeMarker {
|
|
|
11
11
|
this.parameters = parameters;
|
|
12
12
|
this.fields = fields;
|
|
13
13
|
this.environment = environment;
|
|
14
|
-
this.placeholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(this.parameters);
|
|
14
|
+
this.placeholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(this.parameters, this.environment);
|
|
15
15
|
}
|
|
16
16
|
get entityName() {
|
|
17
17
|
return this.parameters.entityName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityListSubTreeMarker.js","sources":["../../../src/markers/EntityListSubTreeMarker.ts"],"sourcesContent":["import type { Environment } from '../dao'\nimport type { QualifiedEntityList, UnconstrainedQualifiedEntityList } from '../treeParameters'\nimport type { EntityFieldMarkersContainer } from './EntityFieldMarkersContainer'\nimport { PlaceholderGenerator } from './PlaceholderGenerator'\n\nexport class EntityListSubTreeMarker {\n\tpublic readonly placeholderName: string\n\n\tpublic constructor(\n\t\tpublic readonly parameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tpublic readonly fields: EntityFieldMarkersContainer,\n\t\tpublic readonly environment: Environment,\n\t) {\n\t\tthis.placeholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(this.parameters)\n\t}\n\n\tpublic get entityName() {\n\t\treturn this.parameters.entityName\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,wBAAwB;AAAA,EAG7B,YACU,YACA,QACA,aACf;AANc;AAGC,SAAA,aAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AAEhB,SAAK,kBAAkB,qBAAqB,gCAAgC,KAAK,
|
|
1
|
+
{"version":3,"file":"EntityListSubTreeMarker.js","sources":["../../../src/markers/EntityListSubTreeMarker.ts"],"sourcesContent":["import type { Environment } from '../dao'\nimport type { QualifiedEntityList, UnconstrainedQualifiedEntityList } from '../treeParameters'\nimport type { EntityFieldMarkersContainer } from './EntityFieldMarkersContainer'\nimport { PlaceholderGenerator } from './PlaceholderGenerator'\n\nexport class EntityListSubTreeMarker {\n\tpublic readonly placeholderName: string\n\n\tpublic constructor(\n\t\tpublic readonly parameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tpublic readonly fields: EntityFieldMarkersContainer,\n\t\tpublic readonly environment: Environment,\n\t) {\n\t\tthis.placeholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(this.parameters, this.environment)\n\t}\n\n\tpublic get entityName() {\n\t\treturn this.parameters.entityName\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,wBAAwB;AAAA,EAG7B,YACU,YACA,QACA,aACf;AANc;AAGC,SAAA,aAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AAEhB,SAAK,kBAAkB,qBAAqB,gCAAgC,KAAK,YAAY,KAAK,WAAW;AAAA,EAC9G;AAAA,MAEW,aAAa;AACvB,WAAO,KAAK,WAAW;AAAA,EACxB;AACD;;"}
|
|
@@ -11,7 +11,7 @@ class EntitySubTreeMarker {
|
|
|
11
11
|
this.parameters = parameters;
|
|
12
12
|
this.fields = fields;
|
|
13
13
|
this.environment = environment;
|
|
14
|
-
this.placeholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(this.parameters);
|
|
14
|
+
this.placeholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(this.parameters, this.environment);
|
|
15
15
|
}
|
|
16
16
|
get entityName() {
|
|
17
17
|
return this.parameters.entityName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitySubTreeMarker.js","sources":["../../../src/markers/EntitySubTreeMarker.ts"],"sourcesContent":["import type { Environment } from '../dao'\nimport type { QualifiedSingleEntity, UnconstrainedQualifiedSingleEntity } from '../treeParameters'\nimport type { EntityFieldMarkersContainer } from './EntityFieldMarkersContainer'\nimport { PlaceholderGenerator } from './PlaceholderGenerator'\n\nexport class EntitySubTreeMarker {\n\tpublic readonly placeholderName: string\n\n\tpublic constructor(\n\t\tpublic readonly parameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tpublic readonly fields: EntityFieldMarkersContainer,\n\t\tpublic readonly environment: Environment,\n\t) {\n\t\tthis.placeholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(this.parameters)\n\t}\n\n\tpublic get entityName() {\n\t\treturn this.parameters.entityName\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,oBAAoB;AAAA,EAGzB,YACU,YACA,QACA,aACf;AANc;AAGC,SAAA,aAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AAEhB,SAAK,kBAAkB,qBAAqB,4BAA4B,KAAK,
|
|
1
|
+
{"version":3,"file":"EntitySubTreeMarker.js","sources":["../../../src/markers/EntitySubTreeMarker.ts"],"sourcesContent":["import type { Environment } from '../dao'\nimport type { QualifiedSingleEntity, UnconstrainedQualifiedSingleEntity } from '../treeParameters'\nimport type { EntityFieldMarkersContainer } from './EntityFieldMarkersContainer'\nimport { PlaceholderGenerator } from './PlaceholderGenerator'\n\nexport class EntitySubTreeMarker {\n\tpublic readonly placeholderName: string\n\n\tpublic constructor(\n\t\tpublic readonly parameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tpublic readonly fields: EntityFieldMarkersContainer,\n\t\tpublic readonly environment: Environment,\n\t) {\n\t\tthis.placeholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(this.parameters, this.environment)\n\t}\n\n\tpublic get entityName() {\n\t\treturn this.parameters.entityName\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,oBAAoB;AAAA,EAGzB,YACU,YACA,QACA,aACf;AANc;AAGC,SAAA,aAAA;AACA,SAAA,SAAA;AACA,SAAA,cAAA;AAEhB,SAAK,kBAAkB,qBAAqB,4BAA4B,KAAK,YAAY,KAAK,WAAW;AAAA,EAC1G;AAAA,MAEW,aAAa;AACvB,WAAO,KAAK,WAAW;AAAA,EACxB;AACD;;"}
|
|
@@ -9,11 +9,11 @@ class PlaceholderGenerator {
|
|
|
9
9
|
static getHasManyRelationPlaceholder(relation) {
|
|
10
10
|
return `${relation.field}_${Hashing.hashHasManyRelation(relation)}`;
|
|
11
11
|
}
|
|
12
|
-
static getEntitySubTreePlaceholder(subTreeParameters) {
|
|
13
|
-
return `est_${Hashing.hashEntitySubTreeParameters(subTreeParameters)}`;
|
|
12
|
+
static getEntitySubTreePlaceholder(subTreeParameters, environment) {
|
|
13
|
+
return `est_${Hashing.hashEntitySubTreeParameters(subTreeParameters, environment)}`;
|
|
14
14
|
}
|
|
15
|
-
static getEntityListSubTreePlaceholder(subTreeParameters) {
|
|
16
|
-
return `lst_${Hashing.hashEntityListSubTreeParameters(subTreeParameters)}`;
|
|
15
|
+
static getEntityListSubTreePlaceholder(subTreeParameters, environment) {
|
|
16
|
+
return `lst_${Hashing.hashEntityListSubTreeParameters(subTreeParameters, environment)}`;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
export { PlaceholderGenerator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceholderGenerator.js","sources":["../../../src/markers/PlaceholderGenerator.ts"],"sourcesContent":["import type {\n\tFieldName,\n\tHasManyRelation,\n\tHasOneRelation,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { Hashing } from '../utils'\n\nexport class PlaceholderGenerator {\n\tpublic static getFieldPlaceholder(fieldName: FieldName): string {\n\t\treturn fieldName\n\t}\n\n\tpublic static getHasOneRelationPlaceholder(relation: HasOneRelation): string {\n\t\treturn `${relation.field}_${Hashing.hashHasOneRelation(relation)}`\n\t}\n\n\tpublic static getHasManyRelationPlaceholder(relation: HasManyRelation): string {\n\t\treturn `${relation.field}_${Hashing.hashHasManyRelation(relation)}`\n\t}\n\n\tpublic static getEntitySubTreePlaceholder(\n\t\tsubTreeParameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t): string {\n\t\treturn `est_${Hashing.hashEntitySubTreeParameters(subTreeParameters)}`\n\t}\n\n\tpublic static getEntityListSubTreePlaceholder(\n\t\tsubTreeParameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t): string {\n\t\treturn `lst_${Hashing.hashEntityListSubTreeParameters(subTreeParameters)}`\n\t}\n}\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PlaceholderGenerator.js","sources":["../../../src/markers/PlaceholderGenerator.ts"],"sourcesContent":["import type {\n\tFieldName,\n\tHasManyRelation,\n\tHasOneRelation,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { Hashing } from '../utils'\nimport { Environment } from '../dao'\n\nexport class PlaceholderGenerator {\n\tpublic static getFieldPlaceholder(fieldName: FieldName): string {\n\t\treturn fieldName\n\t}\n\n\tpublic static getHasOneRelationPlaceholder(relation: HasOneRelation): string {\n\t\treturn `${relation.field}_${Hashing.hashHasOneRelation(relation)}`\n\t}\n\n\tpublic static getHasManyRelationPlaceholder(relation: HasManyRelation): string {\n\t\treturn `${relation.field}_${Hashing.hashHasManyRelation(relation)}`\n\t}\n\n\tpublic static getEntitySubTreePlaceholder(\n\t\tsubTreeParameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): string {\n\t\treturn `est_${Hashing.hashEntitySubTreeParameters(subTreeParameters, environment)}`\n\t}\n\n\tpublic static getEntityListSubTreePlaceholder(\n\t\tsubTreeParameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): string {\n\t\treturn `lst_${Hashing.hashEntityListSubTreeParameters(subTreeParameters, environment)}`\n\t}\n}\n"],"names":[],"mappings":";AAYO,MAAM,qBAAqB;AAAA,SACnB,oBAAoB,WAA8B;AACxD,WAAA;AAAA,EACR;AAAA,SAEc,6BAA6B,UAAkC;AAC5E,WAAO,GAAG,SAAS,SAAS,QAAQ,mBAAmB,QAAQ;AAAA,EAChE;AAAA,SAEc,8BAA8B,UAAmC;AAC9E,WAAO,GAAG,SAAS,SAAS,QAAQ,oBAAoB,QAAQ;AAAA,EACjE;AAAA,SAEc,4BACb,mBACA,aACS;AACT,WAAO,OAAO,QAAQ,4BAA4B,mBAAmB,WAAW;AAAA,EACjF;AAAA,SAEc,gCACb,mBACA,aACS;AACT,WAAO,OAAO,QAAQ,gCAAgC,mBAAmB,WAAW;AAAA,EACrF;AACD;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { QueryLanguage } from "./QueryLanguage.js";
|
|
2
|
-
import { MarkerMerger } from "../core/MarkerMerger.js";
|
|
3
2
|
import { EntityFieldsWithHoistablesMarker } from "../markers/EntityFieldsWithHoistablesMarker.js";
|
|
4
|
-
import {
|
|
3
|
+
import { MarkerMerger } from "../core/MarkerMerger.js";
|
|
5
4
|
import { EntitySubTreeMarker } from "../markers/EntitySubTreeMarker.js";
|
|
6
5
|
import { EntityListSubTreeMarker } from "../markers/EntityListSubTreeMarker.js";
|
|
7
6
|
import { EntityFieldMarkersContainer } from "../markers/EntityFieldMarkersContainer.js";
|
|
8
7
|
import { FieldMarker } from "../markers/FieldMarker.js";
|
|
9
8
|
import { HasOneRelationMarker } from "../markers/HasOneRelationMarker.js";
|
|
10
9
|
import { HasManyRelationMarker } from "../markers/HasManyRelationMarker.js";
|
|
10
|
+
import { TreeParameterMerger } from "../core/TreeParameterMerger.js";
|
|
11
11
|
import { assertNever } from "../utils/assertNever.js";
|
|
12
12
|
class MarkerFactory {
|
|
13
13
|
static createSubTreeMarker(qualifiedParams, key, Marker, fields, environment) {
|
|
@@ -9,12 +9,12 @@ import { Parser } from "./Parser.js";
|
|
|
9
9
|
import { GraphQlLiteral } from "@contember/client";
|
|
10
10
|
import { EntityListPreferencesDefaults } from "../treeParameters/EntityListPreferences.js";
|
|
11
11
|
import { TreeParameterMerger } from "../core/TreeParameterMerger.js";
|
|
12
|
+
import { EventListenersStore } from "../treeParameters/EventListenersStore.js";
|
|
12
13
|
import { RelationDefaults } from "../treeParameters/Relation.js";
|
|
13
14
|
import { EntityCreationParametersDefaults } from "../treeParameters/EntityCreationParameters.js";
|
|
14
15
|
import { QualifiedEntityParametersDefaults } from "../treeParameters/QualifiedEntityParameters.js";
|
|
15
16
|
import { VariableInputTransformer } from "../core/VariableInputTransformer.js";
|
|
16
17
|
import { LeafFieldDefaults } from "../treeParameters/LeafField.js";
|
|
17
|
-
import { EventListenersStore } from "../treeParameters/EventListenersStore.js";
|
|
18
18
|
const _QueryLanguage = class {
|
|
19
19
|
static preparePrimitiveEntryPoint(entryPoint) {
|
|
20
20
|
return (input, environment) => Parser.parseQueryLanguageExpression(input, entryPoint, environment);
|
|
@@ -19,9 +19,13 @@ class Hashing {
|
|
|
19
19
|
];
|
|
20
20
|
return Hashing.hashArray(where);
|
|
21
21
|
}
|
|
22
|
-
static hashEntityListSubTreeParameters(parameters) {
|
|
22
|
+
static hashEntityListSubTreeParameters(parameters, environment) {
|
|
23
23
|
if (parameters.isCreating) {
|
|
24
|
-
return Hashing.hashArray([
|
|
24
|
+
return Hashing.hashArray([
|
|
25
|
+
parameters.isCreating,
|
|
26
|
+
parameters.entityName,
|
|
27
|
+
environment.getAllVariables()
|
|
28
|
+
]);
|
|
25
29
|
}
|
|
26
30
|
return Hashing.hashArray([
|
|
27
31
|
parameters.isCreating,
|
|
@@ -29,14 +33,25 @@ class Hashing {
|
|
|
29
33
|
parameters.filter,
|
|
30
34
|
parameters.orderBy,
|
|
31
35
|
parameters.offset,
|
|
32
|
-
parameters.limit
|
|
36
|
+
parameters.limit,
|
|
37
|
+
environment.getAllVariables()
|
|
33
38
|
]);
|
|
34
39
|
}
|
|
35
|
-
static hashEntitySubTreeParameters(parameters) {
|
|
40
|
+
static hashEntitySubTreeParameters(parameters, environment) {
|
|
36
41
|
if (parameters.isCreating) {
|
|
37
|
-
return Hashing.hashArray([
|
|
42
|
+
return Hashing.hashArray([
|
|
43
|
+
parameters.isCreating,
|
|
44
|
+
parameters.entityName,
|
|
45
|
+
environment.getAllVariables()
|
|
46
|
+
]);
|
|
38
47
|
}
|
|
39
|
-
return Hashing.hashArray([
|
|
48
|
+
return Hashing.hashArray([
|
|
49
|
+
parameters.isCreating,
|
|
50
|
+
parameters.where,
|
|
51
|
+
parameters.entityName,
|
|
52
|
+
parameters.filter,
|
|
53
|
+
environment.getAllVariables()
|
|
54
|
+
]);
|
|
40
55
|
}
|
|
41
56
|
static hashArray(array) {
|
|
42
57
|
const json = array.map((item) => JSON.stringify(item)).join("_");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hashing.js","sources":["../../../src/utils/Hashing.ts"],"sourcesContent":["import type {\n\
|
|
1
|
+
{"version":3,"file":"Hashing.js","sources":["../../../src/utils/Hashing.ts"],"sourcesContent":["import type {\n\tHasManyRelation,\n\tHasOneRelation,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { Environment } from '../dao'\n\n// TODO update hashing so that for offset, 0 == undefined\nexport class Hashing {\n\tpublic static hashHasOneRelation(relation: HasOneRelation): number {\n\t\tconst where = [\n\t\t\t'upToOne',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\trelation.reducedBy,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashHasManyRelation(relation: HasManyRelation): number {\n\t\tconst where = [\n\t\t\t'possiblyMany',\n\t\t\trelation.field,\n\t\t\trelation.filter,\n\t\t\t'offset' in relation ? relation.offset : undefined,\n\t\t\t'limit' in relation ? relation.limit : undefined,\n\t\t\t'orderBy' in relation ? relation.orderBy : undefined,\n\t\t]\n\n\t\treturn Hashing.hashArray(where)\n\t}\n\n\tpublic static hashEntityListSubTreeParameters(\n\t\tparameters: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tparameters.orderBy,\n\t\t\tparameters.offset,\n\t\t\tparameters.limit,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tpublic static hashEntitySubTreeParameters(\n\t\tparameters: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): number {\n\t\tif (parameters.isCreating) {\n\t\t\treturn Hashing.hashArray([\n\t\t\t\tparameters.isCreating,\n\t\t\t\tparameters.entityName,\n\t\t\t\tenvironment.getAllVariables(),\n\t\t\t])\n\t\t}\n\t\treturn Hashing.hashArray([\n\t\t\tparameters.isCreating,\n\t\t\tparameters.where,\n\t\t\tparameters.entityName,\n\t\t\tparameters.filter,\n\t\t\tenvironment.getAllVariables(),\n\t\t])\n\t}\n\n\tprivate static hashArray(array: any[]): number {\n\t\tconst json = array.map(item => JSON.stringify(item)).join('_')\n\t\treturn Hashing.hash(json)\n\t}\n\n\t// Taken from Java\n\tpublic static hash(str: string): number {\n\t\tlet hash = 0\n\t\tif (str.length === 0) {\n\t\t\treturn hash\n\t\t}\n\t\tfor (let i = 0; i < str.length; i++) {\n\t\t\thash = (hash << 5) - hash + str.charCodeAt(i)\n\t\t\thash = hash & hash // Convert to 32bit integer\n\t\t}\n\t\treturn Math.abs(hash)\n\t}\n}\n"],"names":[],"mappings":"AAWO,MAAM,QAAQ;AAAA,SACN,mBAAmB,UAAkC;AAClE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAGH,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,SAEc,oBAAoB,UAAmC;AACpE,UAAM,QAAQ;AAAA,MACb;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY,WAAW,SAAS,SAAS;AAAA,MACzC,WAAW,WAAW,SAAS,QAAQ;AAAA,MACvC,aAAa,WAAW,SAAS,UAAU;AAAA,IAAA;AAGrC,WAAA,QAAQ,UAAU,KAAK;AAAA,EAC/B;AAAA,SAEc,gCACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,SAEc,4BACb,YACA,aACS;AACT,QAAI,WAAW,YAAY;AAC1B,aAAO,QAAQ,UAAU;AAAA,QACxB,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAY,gBAAgB;AAAA,MAAA,CAC5B;AAAA,IACF;AACA,WAAO,QAAQ,UAAU;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY,gBAAgB;AAAA,IAAA,CAC5B;AAAA,EACF;AAAA,SAEe,UAAU,OAAsB;AACxC,UAAA,OAAO,MAAM,IAAI,CAAQ,SAAA,KAAK,UAAU,IAAI,CAAC,EAAE,KAAK,GAAG;AACtD,WAAA,QAAQ,KAAK,IAAI;AAAA,EACzB;AAAA,SAGc,KAAK,KAAqB;AACvC,QAAI,OAAO;AACP,QAAA,IAAI,WAAW,GAAG;AACd,aAAA;AAAA,IACR;AACA,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACpC,aAAgB,SAAA,KAAK,OAAO,IAAI,WAAW,CAAC;AAC5C,aAAO,OAAO;AAAA,IACf;AACO,WAAA,KAAK,IAAI,IAAI;AAAA,EACrB;AACD;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { BindingOperations } from '../accessors';
|
|
3
3
|
export declare const defaultBindingOperations: Readonly<BindingOperations>;
|
|
4
|
-
export declare const BindingOperationsContext:
|
|
4
|
+
export declare const BindingOperationsContext: React.Context<BindingOperations>;
|
|
5
5
|
//# sourceMappingURL=BindingOperationsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BindingOperationsContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/BindingOperationsContext.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAWrD,eAAO,MAAM,wBAAwB,6BAiBnC,CAAA;AAEF,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"BindingOperationsContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/BindingOperationsContext.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAWrD,eAAO,MAAM,wBAAwB,6BAiBnC,CAAA;AAEF,eAAO,MAAM,wBAAwB,kCAA6D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityKeyContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EntityKeyContext.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"EntityKeyContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EntityKeyContext.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,gBAAgB,mCAA+C,CAAA"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Environment } from '../dao';
|
|
3
|
-
export declare const EnvironmentContext:
|
|
3
|
+
export declare const EnvironmentContext: React.Context<Environment>;
|
|
4
|
+
export interface EnvironmentMiddlewareProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
create: (env: Environment) => Environment;
|
|
7
|
+
}
|
|
8
|
+
export declare const EnvironmentMiddleware: React.NamedExoticComponent<EnvironmentMiddlewareProps>;
|
|
9
|
+
export interface EnvironmentWithExtensionProps<S, R> {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
extension: Environment.Extension<S, R>;
|
|
12
|
+
state: S;
|
|
13
|
+
}
|
|
14
|
+
export declare const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactElement | null;
|
|
4
15
|
//# sourceMappingURL=EnvironmentContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EnvironmentContext.
|
|
1
|
+
{"version":3,"file":"EnvironmentContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/EnvironmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,SAAS,EAAe,MAAM,OAAO,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAIpC,eAAO,MAAM,kBAAkB,4BAAmD,CAAA;AAGlF,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,WAAW,CAAA;CACzC;AAED,eAAO,MAAM,qBAAqB,wDAajC,CAAA;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC,EAAE,CAAC;IAClD,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACtC,KAAK,EAAE,CAAC,CAAA;CACR;AAED,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,YAAY,GAAG,IAS/G,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootIdContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/TreeRootIdContext.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TreeRootIdContext.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/TreeRootIdContext.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,iBAAiB,mCAAmD,CAAA"}
|
|
@@ -17,6 +17,7 @@ export * from './useEntityListSubTreeParameters';
|
|
|
17
17
|
export * from './useEntitySubTree';
|
|
18
18
|
export * from './useEntitySubTreeParameters';
|
|
19
19
|
export * from './useEnvironment';
|
|
20
|
+
export * from './useExtendTree';
|
|
20
21
|
export * from './useField';
|
|
21
22
|
export * from './useGetEntityByKey';
|
|
22
23
|
export * from './useGetEntityListSubTree';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EntityListAccessor } from '../accessors';
|
|
2
2
|
import type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '../treeParameters';
|
|
3
|
-
|
|
3
|
+
import { TreeRootId } from '../treeParameters';
|
|
4
|
+
export declare const useEntityListSubTree: (qualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList, ...treeId: [TreeRootId | undefined] | []) => EntityListAccessor;
|
|
4
5
|
//# sourceMappingURL=useEntityListSubTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityListSubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"useEntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntityListSubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAA;AAInH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,eAAO,MAAM,oBAAoB,wBACX,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,aACtF,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,KACtC,kBAeF,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EntityAccessor } from '../accessors';
|
|
2
2
|
import type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '../treeParameters';
|
|
3
|
-
|
|
3
|
+
import { TreeRootId } from '../treeParameters';
|
|
4
|
+
export declare const useEntitySubTree: (qualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity, ...treeId: [TreeRootId | undefined] | []) => EntityAccessor;
|
|
4
5
|
//# sourceMappingURL=useEntitySubTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntitySubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"useEntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useEntitySubTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,MAAM,mBAAmB,CAAA;AAIvH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,eAAO,MAAM,gBAAgB,0BACL,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,aAC5F,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,KACtC,cAcF,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TreeRootId } from '../treeParameters';
|
|
3
|
+
import { ExtendTreeOptions } from '../accessors';
|
|
4
|
+
export declare const useExtendTree: () => (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, "signal"> | undefined) => Promise<TreeRootId | undefined>;
|
|
5
|
+
//# sourceMappingURL=useExtendTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExtendTree.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/useExtendTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAA;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAIhD,eAAO,MAAM,aAAa,sBAKc,SAAS,8DAAgD,QAAQ,UAAU,GAAG,SAAS,CAgB9H,CAAA"}
|
|
@@ -6,5 +6,5 @@ export interface SetOrderFieldOnCreateOwnProps {
|
|
|
6
6
|
}
|
|
7
7
|
export interface SetOrderFieldOnCreateProps extends SetOrderFieldOnCreateOwnProps, Pick<SugaredUnconstrainedQualifiedSingleEntity, 'entity'> {
|
|
8
8
|
}
|
|
9
|
-
export declare const SetOrderFieldOnCreate:
|
|
9
|
+
export declare const SetOrderFieldOnCreate: React.NamedExoticComponent<SetOrderFieldOnCreateProps>;
|
|
10
10
|
//# sourceMappingURL=SetOrderFieldOnCreate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetOrderFieldOnCreate.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/SetOrderFieldOnCreate.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAGX,0BAA0B,EAC1B,yCAAyC,EACzC,MAAM,mBAAmB,CAAA;AAG1B,MAAM,WAAW,6BAA6B;IAC7C,UAAU,EAAE,0BAA0B,GAAG,MAAM,CAAA;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,0BAChB,SAAQ,6BAA6B,EACpC,IAAI,CAAC,yCAAyC,EAAE,QAAQ,CAAC;CAAG;AAE9D,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SetOrderFieldOnCreate.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/SetOrderFieldOnCreate.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAGX,0BAA0B,EAC1B,yCAAyC,EACzC,MAAM,mBAAmB,CAAA;AAG1B,MAAM,WAAW,6BAA6B;IAC7C,UAAU,EAAE,0BAA0B,GAAG,MAAM,CAAA;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,0BAChB,SAAQ,6BAA6B,EACpC,IAAI,CAAC,yCAAyC,EAAE,QAAQ,CAAC;CAAG;AAE9D,eAAO,MAAM,qBAAqB,wDAqEjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorTree.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"AccessorTree.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,iBAAiB,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,iBAAiB,eAmBlE;yBAnBe,YAAY"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { TreeRootAccessor } from '../accessors';
|
|
2
2
|
import type { RequestError } from './RequestError';
|
|
3
|
+
import { DataBinding } from '../core';
|
|
4
|
+
import { Environment } from '../dao';
|
|
3
5
|
export interface InitializingAccessorTreeState {
|
|
4
6
|
name: 'initializing';
|
|
7
|
+
environment: Environment;
|
|
8
|
+
binding?: DataBinding;
|
|
5
9
|
}
|
|
6
10
|
export interface InitializedAccessorTreeState {
|
|
7
11
|
name: 'initialized';
|
|
12
|
+
environment: Environment;
|
|
13
|
+
binding: DataBinding;
|
|
8
14
|
data: TreeRootAccessor;
|
|
9
15
|
}
|
|
10
16
|
export interface ErrorAccessorTreeState {
|
|
11
17
|
name: 'error';
|
|
18
|
+
environment: Environment;
|
|
19
|
+
binding: DataBinding;
|
|
12
20
|
error: RequestError;
|
|
13
21
|
}
|
|
14
22
|
export declare type AccessorTreeState = InitializingAccessorTreeState | InitializedAccessorTreeState | ErrorAccessorTreeState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorTreeState.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"AccessorTreeState.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,MAAM,WAAW,6BAA6B;IAC7C,IAAI,EAAE,cAAc,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC5C,IAAI,EAAE,aAAa,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE,gBAAgB,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,KAAK,EAAE,YAAY,CAAA;CACnB;AAED,oBAAY,iBAAiB,GAC1B,6BAA6B,GAC7B,4BAA4B,GAC5B,sBAAsB,CAAA"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { TreeRootAccessor } from '../accessors';
|
|
2
2
|
import type { RequestError } from './RequestError';
|
|
3
|
+
import { DataBinding } from '../core';
|
|
4
|
+
import { Environment } from '../dao';
|
|
3
5
|
export declare type AccessorTreeStateAction = {
|
|
4
6
|
type: 'setData';
|
|
5
7
|
data: TreeRootAccessor;
|
|
8
|
+
binding: DataBinding;
|
|
6
9
|
} | {
|
|
7
10
|
type: 'failWithError';
|
|
8
11
|
error: RequestError;
|
|
12
|
+
binding: DataBinding;
|
|
9
13
|
} | {
|
|
10
14
|
type: 'reset';
|
|
15
|
+
binding: DataBinding;
|
|
16
|
+
environment: Environment;
|
|
11
17
|
};
|
|
12
18
|
//# sourceMappingURL=AccessorTreeStateAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorTreeStateAction.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeStateAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"AccessorTreeStateAction.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeStateAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,oBAAY,uBAAuB,GAChC;IACA,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,gBAAgB,CAAA;IACtB,OAAO,EAAE,WAAW,CAAA;CACnB,GACD;IACA,IAAI,EAAE,eAAe,CAAA;IACrB,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,WAAW,CAAA;CACnB,GACD;IACA,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,WAAW,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessorTreeStateContext.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeStateContext.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,eAAO,MAAM,wBAAwB,8CAA0D,CAAA"}
|