@contember/react-binding 2.1.0-alpha.9 → 2.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +57 -0
- package/dist/development/index.cjs +99 -99
- package/dist/development/index.js +48 -48
- package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.cjs +0 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.js +1 -2
- package/dist/development/src/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
- package/dist/development/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useBindingOperations.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntity.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntity.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityKey.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityKey.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityList.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityList.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
- package/dist/development/src/accessorPropagation/useExtendTree.cjs +1 -4
- package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useExtendTree.js +1 -4
- package/dist/development/src/accessorPropagation/useExtendTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useField.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useField.js.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useHasEntity.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useHasEntity.js.map +1 -1
- package/dist/development/src/accessorPropagation/usePersist.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/usePersist.js.map +1 -1
- package/dist/development/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useTreeRootId.js.map +1 -1
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs +10 -10
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js +10 -10
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.js.map +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
- package/dist/development/src/accessorSorting/sortEntities.cjs.map +1 -1
- package/dist/development/src/accessorSorting/sortEntities.js.map +1 -1
- package/dist/development/src/accessorTree/AccessorTree.cjs.map +1 -1
- package/dist/development/src/accessorTree/AccessorTree.js.map +1 -1
- package/dist/development/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
- package/dist/development/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
- package/dist/development/src/accessorTree/DirtinessContext.cjs.map +1 -1
- package/dist/development/src/accessorTree/DirtinessContext.js.map +1 -1
- package/dist/development/src/accessorTree/MutationStateContext.cjs.map +1 -1
- package/dist/development/src/accessorTree/MutationStateContext.js.map +1 -1
- package/dist/development/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
- package/dist/development/src/accessorTree/useAccessorTreeState.js.map +1 -1
- package/dist/development/src/accessorTree/useDataBinding.cjs +17 -13
- package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
- package/dist/development/src/accessorTree/useDataBinding.js +19 -15
- package/dist/development/src/accessorTree/useDataBinding.js.map +1 -1
- package/dist/development/src/accessorTree/useDirtinessState.cjs.map +1 -1
- package/dist/development/src/accessorTree/useDirtinessState.js.map +1 -1
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
- package/dist/development/src/accessorTree/useMutationState.cjs.map +1 -1
- package/dist/development/src/accessorTree/useMutationState.js.map +1 -1
- package/dist/development/src/coreComponents/Component.cjs.map +1 -1
- package/dist/development/src/coreComponents/Component.js.map +1 -1
- package/dist/development/src/coreComponents/DataBindingProvider.cjs +1 -1
- package/dist/development/src/coreComponents/DataBindingProvider.cjs.map +1 -1
- package/dist/development/src/coreComponents/DataBindingProvider.js +1 -1
- package/dist/development/src/coreComponents/DataBindingProvider.js.map +1 -1
- package/dist/development/src/coreComponents/Entity.cjs.map +1 -1
- package/dist/development/src/coreComponents/Entity.js.map +1 -1
- package/dist/development/src/coreComponents/EntityList.cjs +3 -3
- package/dist/development/src/coreComponents/EntityList.cjs.map +1 -1
- package/dist/development/src/coreComponents/EntityList.js +3 -3
- package/dist/development/src/coreComponents/EntityList.js.map +1 -1
- package/dist/development/src/coreComponents/EntityListSubTree.cjs +3 -3
- package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
- package/dist/development/src/coreComponents/EntityListSubTree.js +4 -4
- package/dist/development/src/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/development/src/coreComponents/EntitySubTree.cjs.map +1 -1
- package/dist/development/src/coreComponents/EntitySubTree.js +1 -1
- package/dist/development/src/coreComponents/EntitySubTree.js.map +1 -1
- package/dist/development/src/coreComponents/Field.cjs +2 -2
- package/dist/development/src/coreComponents/Field.cjs.map +1 -1
- package/dist/development/src/coreComponents/Field.js +3 -3
- package/dist/development/src/coreComponents/Field.js.map +1 -1
- package/dist/development/src/coreComponents/HasMany.cjs +3 -3
- package/dist/development/src/coreComponents/HasMany.cjs.map +1 -1
- package/dist/development/src/coreComponents/HasMany.js +4 -4
- package/dist/development/src/coreComponents/HasMany.js.map +1 -1
- package/dist/development/src/coreComponents/HasOne.cjs.map +1 -1
- package/dist/development/src/coreComponents/HasOne.js +1 -1
- package/dist/development/src/coreComponents/HasOne.js.map +1 -1
- package/dist/development/src/coreComponents/ParentEntity.cjs.map +1 -1
- package/dist/development/src/coreComponents/ParentEntity.js.map +1 -1
- package/dist/development/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
- package/dist/development/src/entityEvents/useDataBindingEvent.js.map +1 -1
- package/dist/development/src/entityEvents/useDerivedField.cjs.map +1 -1
- package/dist/development/src/entityEvents/useDerivedField.js.map +1 -1
- package/dist/development/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityBeforePersist.js.map +1 -1
- package/dist/development/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
- package/dist/development/src/entityEvents/useEntityEvent.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityEvent.js.map +1 -1
- package/dist/development/src/entityEvents/useEntityPersistError.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityPersistError.js.map +1 -1
- package/dist/development/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
- package/dist/development/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
- package/dist/development/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
- package/dist/development/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
- package/dist/development/src/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.js +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
- package/dist/development/src/helperComponents/DimensionRenderer.cjs +4 -4
- package/dist/development/src/helperComponents/DimensionRenderer.cjs.map +1 -1
- package/dist/development/src/helperComponents/DimensionRenderer.js +4 -4
- package/dist/development/src/helperComponents/DimensionRenderer.js.map +1 -1
- package/dist/development/src/helperComponents/EntityView.cjs +1 -1
- package/dist/development/src/helperComponents/EntityView.cjs.map +1 -1
- package/dist/development/src/helperComponents/EntityView.js +1 -1
- package/dist/development/src/helperComponents/EntityView.js.map +1 -1
- package/dist/development/src/helperComponents/FieldView.cjs +4 -4
- package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
- package/dist/development/src/helperComponents/FieldView.js +4 -4
- package/dist/development/src/helperComponents/FieldView.js.map +1 -1
- package/dist/development/src/helperComponents/If.cjs +20 -23
- package/dist/development/src/helperComponents/If.cjs.map +1 -1
- package/dist/development/src/helperComponents/If.js +20 -23
- package/dist/development/src/helperComponents/If.js.map +1 -1
- package/dist/development/src/helperComponents/LabelMiddleware.cjs.map +1 -1
- package/dist/development/src/helperComponents/LabelMiddleware.js.map +1 -1
- package/dist/development/src/helperComponents/RecursionTerminator.cjs.map +1 -1
- package/dist/development/src/helperComponents/RecursionTerminator.js.map +1 -1
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
- package/dist/development/src/helperComponents/StaticRender.cjs.map +1 -1
- package/dist/development/src/helperComponents/StaticRender.js.map +1 -1
- package/dist/development/src/helperComponents/SugaredField.cjs.map +1 -1
- package/dist/development/src/helperComponents/SugaredField.js.map +1 -1
- package/dist/development/src/helperComponents/Variable.cjs.map +1 -1
- package/dist/development/src/helperComponents/Variable.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnKey.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistTrigger.cjs +1 -1
- package/dist/development/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistTrigger.js +1 -1
- package/dist/development/src/helperComponents/persist/PersistTrigger.js.map +1 -1
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
- package/dist/development/src/markers/IncrementalMarkerBuilder.cjs +47 -44
- package/dist/development/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
- package/dist/development/src/markers/IncrementalMarkerBuilder.js +47 -44
- package/dist/development/src/markers/IncrementalMarkerBuilder.js.map +1 -1
- package/dist/development/src/markers/MarkerStaticAnalyzer.cjs +19 -19
- package/dist/development/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
- package/dist/development/src/markers/MarkerStaticAnalyzer.js +19 -19
- package/dist/development/src/markers/MarkerStaticAnalyzer.js.map +1 -1
- package/dist/development/src/markers/MarkerTreeGenerator.cjs.map +1 -1
- package/dist/development/src/markers/MarkerTreeGenerator.js.map +1 -1
- package/dist/production/index.cjs +99 -99
- package/dist/production/index.js +48 -48
- package/dist/production/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.cjs +0 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.js +1 -2
- package/dist/production/src/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.js.map +1 -1
- package/dist/production/src/accessorPropagation/useBindingOperations.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useBindingOperations.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js +1 -2
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntity.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntity.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityKey.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityKey.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityList.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityList.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
- package/dist/production/src/accessorPropagation/useExtendTree.cjs +1 -4
- package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useExtendTree.js +1 -4
- package/dist/production/src/accessorPropagation/useExtendTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useField.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useField.js.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntityByKey.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntityByKey.js.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntityListSubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntityListSubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntitySubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useGetEntitySubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useHasEntity.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useHasEntity.js.map +1 -1
- package/dist/production/src/accessorPropagation/usePersist.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/usePersist.js.map +1 -1
- package/dist/production/src/accessorPropagation/useTreeRootId.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useTreeRootId.js.map +1 -1
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs +1 -1
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js +1 -1
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.js.map +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
- package/dist/production/src/accessorSorting/sortEntities.cjs.map +1 -1
- package/dist/production/src/accessorSorting/sortEntities.js.map +1 -1
- package/dist/production/src/accessorTree/AccessorTree.cjs.map +1 -1
- package/dist/production/src/accessorTree/AccessorTree.js.map +1 -1
- package/dist/production/src/accessorTree/AccessorTreeStateContext.cjs.map +1 -1
- package/dist/production/src/accessorTree/AccessorTreeStateContext.js.map +1 -1
- package/dist/production/src/accessorTree/DirtinessContext.cjs.map +1 -1
- package/dist/production/src/accessorTree/DirtinessContext.js.map +1 -1
- package/dist/production/src/accessorTree/MutationStateContext.cjs.map +1 -1
- package/dist/production/src/accessorTree/MutationStateContext.js.map +1 -1
- package/dist/production/src/accessorTree/useAccessorTreeState.cjs.map +1 -1
- package/dist/production/src/accessorTree/useAccessorTreeState.js.map +1 -1
- package/dist/production/src/accessorTree/useDataBinding.cjs +17 -13
- package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
- package/dist/production/src/accessorTree/useDataBinding.js +19 -15
- package/dist/production/src/accessorTree/useDataBinding.js.map +1 -1
- package/dist/production/src/accessorTree/useDirtinessState.cjs.map +1 -1
- package/dist/production/src/accessorTree/useDirtinessState.js.map +1 -1
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -1
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.js.map +1 -1
- package/dist/production/src/accessorTree/useMutationState.cjs.map +1 -1
- package/dist/production/src/accessorTree/useMutationState.js.map +1 -1
- package/dist/production/src/coreComponents/Component.cjs.map +1 -1
- package/dist/production/src/coreComponents/Component.js.map +1 -1
- package/dist/production/src/coreComponents/DataBindingProvider.cjs.map +1 -1
- package/dist/production/src/coreComponents/DataBindingProvider.js.map +1 -1
- package/dist/production/src/coreComponents/Entity.cjs.map +1 -1
- package/dist/production/src/coreComponents/Entity.js.map +1 -1
- package/dist/production/src/coreComponents/EntityList.cjs.map +1 -1
- package/dist/production/src/coreComponents/EntityList.js.map +1 -1
- package/dist/production/src/coreComponents/EntityListSubTree.cjs.map +1 -1
- package/dist/production/src/coreComponents/EntityListSubTree.js +1 -1
- package/dist/production/src/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.cjs.map +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.js +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.js.map +1 -1
- package/dist/production/src/coreComponents/Field.cjs.map +1 -1
- package/dist/production/src/coreComponents/Field.js +1 -1
- package/dist/production/src/coreComponents/Field.js.map +1 -1
- package/dist/production/src/coreComponents/HasMany.cjs.map +1 -1
- package/dist/production/src/coreComponents/HasMany.js +1 -1
- package/dist/production/src/coreComponents/HasMany.js.map +1 -1
- package/dist/production/src/coreComponents/HasOne.cjs.map +1 -1
- package/dist/production/src/coreComponents/HasOne.js +1 -1
- package/dist/production/src/coreComponents/HasOne.js.map +1 -1
- package/dist/production/src/coreComponents/ParentEntity.cjs.map +1 -1
- package/dist/production/src/coreComponents/ParentEntity.js.map +1 -1
- package/dist/production/src/entityEvents/useDataBindingEvent.cjs.map +1 -1
- package/dist/production/src/entityEvents/useDataBindingEvent.js.map +1 -1
- package/dist/production/src/entityEvents/useDerivedField.cjs.map +1 -1
- package/dist/production/src/entityEvents/useDerivedField.js.map +1 -1
- package/dist/production/src/entityEvents/useEntityBeforePersist.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityBeforePersist.js.map +1 -1
- package/dist/production/src/entityEvents/useEntityBeforeUpdate.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityBeforeUpdate.js.map +1 -1
- package/dist/production/src/entityEvents/useEntityEvent.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityEvent.js.map +1 -1
- package/dist/production/src/entityEvents/useEntityPersistError.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityPersistError.js.map +1 -1
- package/dist/production/src/entityEvents/useEntityPersistSuccess.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityPersistSuccess.js.map +1 -1
- package/dist/production/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
- package/dist/production/src/entityEvents/useOnConnectionUpdate.js.map +1 -1
- package/dist/production/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
- package/dist/production/src/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -1
- package/dist/production/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
- package/dist/production/src/helperComponents/DimensionRenderer.cjs.map +1 -1
- package/dist/production/src/helperComponents/DimensionRenderer.js.map +1 -1
- package/dist/production/src/helperComponents/EntityView.cjs.map +1 -1
- package/dist/production/src/helperComponents/EntityView.js.map +1 -1
- package/dist/production/src/helperComponents/FieldView.cjs.map +1 -1
- package/dist/production/src/helperComponents/FieldView.js.map +1 -1
- package/dist/production/src/helperComponents/If.cjs +7 -10
- package/dist/production/src/helperComponents/If.cjs.map +1 -1
- package/dist/production/src/helperComponents/If.js +8 -11
- package/dist/production/src/helperComponents/If.js.map +1 -1
- package/dist/production/src/helperComponents/LabelMiddleware.cjs.map +1 -1
- package/dist/production/src/helperComponents/LabelMiddleware.js.map +1 -1
- package/dist/production/src/helperComponents/RecursionTerminator.cjs.map +1 -1
- package/dist/production/src/helperComponents/RecursionTerminator.js.map +1 -1
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -1
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.js.map +1 -1
- package/dist/production/src/helperComponents/StaticRender.cjs.map +1 -1
- package/dist/production/src/helperComponents/StaticRender.js.map +1 -1
- package/dist/production/src/helperComponents/SugaredField.cjs.map +1 -1
- package/dist/production/src/helperComponents/SugaredField.js.map +1 -1
- package/dist/production/src/helperComponents/Variable.cjs.map +1 -1
- package/dist/production/src/helperComponents/Variable.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs +4 -2
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js +4 -2
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnKey.cjs.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnKey.js.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistTrigger.cjs.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistTrigger.js.map +1 -1
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -1
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.js.map +1 -1
- package/dist/production/src/markers/IncrementalMarkerBuilder.cjs +47 -44
- package/dist/production/src/markers/IncrementalMarkerBuilder.cjs.map +1 -1
- package/dist/production/src/markers/IncrementalMarkerBuilder.js +47 -44
- package/dist/production/src/markers/IncrementalMarkerBuilder.js.map +1 -1
- package/dist/production/src/markers/MarkerStaticAnalyzer.cjs +19 -19
- package/dist/production/src/markers/MarkerStaticAnalyzer.cjs.map +1 -1
- package/dist/production/src/markers/MarkerStaticAnalyzer.js +19 -19
- package/dist/production/src/markers/MarkerStaticAnalyzer.js.map +1 -1
- package/dist/production/src/markers/MarkerTreeGenerator.cjs.map +1 -1
- package/dist/production/src/markers/MarkerTreeGenerator.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 +1 -1
- 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/useAccessorUpdateSubscription.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useDesugaredRelativeEntityList.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useDesugaredRelativeSingleEntity.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useDesugaredRelativeSingleField.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntity.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntityList.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntityListSubTreeLoader.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntitySubTreeLoader.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useExtendTree.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useField.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts +1 -1
- package/dist/types/accessorPropagation/useGetEntityListSubTree.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts +1 -1
- package/dist/types/accessorPropagation/useGetEntitySubTree.d.ts.map +1 -1
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeStateAction.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeStateContext.d.ts +1 -1
- package/dist/types/accessorTree/AccessorTreeStateContext.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/MutationStateContext.d.ts +1 -1
- package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
- package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
- package/dist/types/accessorTree/useEnvironmentWithSchema.d.ts.map +1 -1
- package/dist/types/coreComponents/Component.d.ts.map +1 -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/EntityList.d.ts.map +1 -1
- package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
- package/dist/types/coreComponents/Field.d.ts.map +1 -1
- package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
- package/dist/types/coreComponents/HasOne.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/helperComponents/DeferredSubTrees.d.ts +1 -1
- package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
- package/dist/types/helperComponents/DeleteEntityTrigger.d.ts.map +1 -1
- package/dist/types/helperComponents/DimensionRenderer.d.ts.map +1 -1
- package/dist/types/helperComponents/EntityView.d.ts.map +1 -1
- package/dist/types/helperComponents/FieldView.d.ts +13 -2
- package/dist/types/helperComponents/FieldView.d.ts.map +1 -1
- package/dist/types/helperComponents/If.d.ts +1 -1
- package/dist/types/helperComponents/If.d.ts.map +1 -1
- package/dist/types/helperComponents/LabelMiddleware.d.ts +1 -1
- package/dist/types/helperComponents/LabelMiddleware.d.ts.map +1 -1
- package/dist/types/helperComponents/RecursionTerminator.d.ts +1 -1
- package/dist/types/helperComponents/RecursionTerminator.d.ts.map +1 -1
- package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts +1 -1
- package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts.map +1 -1
- package/dist/types/helperComponents/StaticRender.d.ts +1 -1
- package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
- package/dist/types/helperComponents/Variable.d.ts +1 -1
- package/dist/types/helperComponents/Variable.d.ts.map +1 -1
- package/dist/types/helperComponents/helpers/FilterEvaluator.d.ts.map +1 -1
- package/dist/types/helperComponents/helpers/FilterFieldsCollector.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts +1 -1
- package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts +1 -1
- package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -1
- package/dist/types/markers/IncrementalMarkerBuilder.d.ts.map +1 -1
- package/dist/types/markers/MarkerProvider.d.ts.map +1 -1
- package/dist/types/markers/MarkerStaticAnalyzer.d.ts.map +1 -1
- package/dist/types/markers/MarkerTreeGenerator.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -13
- package/src/accessorPropagation/BindingOperationsContext.ts +3 -3
- package/src/accessorPropagation/EnvironmentContext.tsx +1 -1
- package/src/accessorPropagation/useAccessorUpdateSubscription.ts +5 -3
- package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +2 -3
- package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +2 -3
- package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +2 -3
- package/src/accessorPropagation/useEntity.ts +0 -7
- package/src/accessorPropagation/useEntityKey.ts +2 -2
- package/src/accessorPropagation/useEntityList.ts +0 -3
- package/src/accessorPropagation/useEntityListSubTreeLoader.ts +12 -8
- package/src/accessorPropagation/useEntityListSubTreeParameters.ts +0 -6
- package/src/accessorPropagation/useEntitySubTreeLoader.ts +12 -9
- package/src/accessorPropagation/useEntitySubTreeParameters.ts +0 -6
- package/src/accessorPropagation/useExtendTree.ts +1 -3
- package/src/accessorPropagation/useField.ts +0 -3
- package/src/accessorPropagation/useGetEntityListSubTree.ts +3 -8
- package/src/accessorPropagation/useGetEntitySubTree.ts +3 -8
- package/src/accessorSorting/SetOrderFieldOnCreate.tsx +2 -4
- package/src/accessorTree/AccessorTreeStateAction.ts +2 -2
- package/src/accessorTree/useDataBinding.ts +18 -21
- package/src/accessorTree/useEnvironmentWithSchema.ts +1 -2
- package/src/coreComponents/Component.tsx +4 -3
- package/src/coreComponents/DataBindingProvider.tsx +0 -1
- package/src/coreComponents/Entity.tsx +1 -1
- package/src/coreComponents/EntityList.tsx +9 -8
- package/src/coreComponents/EntityListSubTree.tsx +14 -12
- package/src/coreComponents/Field.tsx +3 -5
- package/src/coreComponents/HasMany.tsx +14 -12
- package/src/coreComponents/HasOne.tsx +1 -2
- package/src/coreComponents/ParentEntity.tsx +1 -2
- package/src/entityEvents/useDataBindingEvent.ts +1 -1
- package/src/entityEvents/useEntityEvent.ts +1 -1
- package/src/helperComponents/DeferredSubTrees.tsx +2 -2
- package/src/helperComponents/DeleteEntityTrigger.tsx +1 -3
- package/src/helperComponents/DimensionRenderer.tsx +12 -10
- package/src/helperComponents/EntityView.tsx +0 -1
- package/src/helperComponents/FieldView.tsx +33 -20
- package/src/helperComponents/If.tsx +16 -14
- package/src/helperComponents/RecursionTerminator.tsx +1 -7
- package/src/helperComponents/helpers/FilterEvaluator.ts +0 -3
- package/src/helperComponents/helpers/FilterFieldsCollector.ts +5 -6
- package/src/helperComponents/helpers/evaluateCondition.ts +1 -1
- package/src/helperComponents/persist/PersistOnFieldChange.tsx +0 -1
- package/src/helperComponents/persist/PersistOnHasOneChange.tsx +1 -2
- package/src/helperComponents/persist/PersistOnKey.tsx +2 -2
- package/src/helperComponents/persist/PersistTrigger.tsx +3 -1
- package/src/markers/IncrementalMarkerBuilder.ts +50 -45
- package/src/markers/MarkerProvider.ts +6 -6
- package/src/markers/MarkerStaticAnalyzer.ts +16 -14
- package/src/markers/MarkerTreeGenerator.ts +0 -2
- package/src/typings/react-fix.d.ts +2 -4
- package/tests/cases/unit/core/entityOperations.test.tsx +18 -17
- package/tests/cases/unit/core/eventManager.test.tsx +15 -7
- package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +0 -2
- package/tests/cases/unit/helperComponents/schema.ts +1 -2
- package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +103 -81
- package/tests/lib/bindingFactory.ts +11 -1
- package/tests/lib/convertModelToAdminSchema.ts +109 -107
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityListSubTreeParameters.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\n\nexport function useEntityListSubTreeParameters(alias: Alias): Alias\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityListOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList {\n\tuseConstantValueInvariant(typeof qualifiedEntityList)\n\n\tif (typeof qualifiedEntityList === 'string') {\n\t\treturn qualifiedEntityList\n\t}\n\n\
|
|
1
|
+
{"version":3,"file":"useEntityListSubTreeParameters.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityListSubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList } from '@contember/binding'\n\nexport function useEntityListSubTreeParameters(alias: Alias): Alias\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityListOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList\nexport function useEntityListSubTreeParameters(\n\tqualifiedEntityList: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n): Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList {\n\tuseConstantValueInvariant(typeof qualifiedEntityList)\n\n\tif (typeof qualifiedEntityList === 'string') {\n\t\treturn qualifiedEntityList\n\t}\n\n\tuseConstantValueInvariant(\n\t\tqualifiedEntityList.isCreating,\n\t\t`EntityListSubTree: cannot alternate the 'isCreating' value.`,\n\t)\n\n\tuseConstantValueInvariant(\n\t\ttypeof qualifiedEntityList.entities,\n\t\t`EntityListSubTree: cannot alternate the 'entities' value.`,\n\t)\n\n\tif (qualifiedEntityList.isCreating) {\n\t\tconst entities = qualifiedEntityList.entities\n\n\t\tif (typeof entities === 'string') {\n\t\t\treturn useMemo(\n\t\t\t\t() => ({\n\t\t\t\t\tisCreating: true,\n\t\t\t\t\tentities,\n\t\t\t\t}),\n\t\t\t\t[entities],\n\t\t\t)\n\t\t}\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tisCreating: true,\n\t\t\t\tentities: { entityName: entities.entityName },\n\t\t\t}),\n\t\t\t[entities.entityName],\n\t\t)\n\t}\n\tconst entities = qualifiedEntityList.entities\n\n\tif (typeof entities === 'string') {\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tentities: entities,\n\t\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\t\toffset: qualifiedEntityList.offset,\n\t\t\t\tlimit: qualifiedEntityList.limit,\n\t\t\t}),\n\t\t\t[entities, qualifiedEntityList.limit, qualifiedEntityList.offset, qualifiedEntityList.orderBy],\n\t\t)\n\t}\n\treturn useMemo(\n\t\t() => ({\n\t\t\tentities: {\n\t\t\t\tentityName: entities.entityName,\n\t\t\t\tfilter: entities.filter,\n\t\t\t},\n\t\t\torderBy: qualifiedEntityList.orderBy,\n\t\t\toffset: qualifiedEntityList.offset,\n\t\t\tlimit: qualifiedEntityList.limit,\n\t\t}),\n\t\t[\n\t\t\tentities.entityName,\n\t\t\tentities.filter,\n\t\t\tqualifiedEntityList.limit,\n\t\t\tqualifiedEntityList.offset,\n\t\t\tqualifiedEntityList.orderBy,\n\t\t],\n\t)\n}\n"],"names":["entities"],"mappings":";;AAWO,SAAS,+BACf,qBAC+E;AAC/E,4BAA0B,OAAO,mBAAmB;AAEpD,MAAI,OAAO,wBAAwB,UAAU;AAC5C,WAAO;AAAA,EACR;AAEA;AAAA,IACC,oBAAoB;AAAA,IACpB;AAAA,EAAA;AAGD;AAAA,IACC,OAAO,oBAAoB;AAAA,IAC3B;AAAA,EAAA;AAGD,MAAI,oBAAoB,YAAY;AACnC,UAAMA,YAAW,oBAAoB;AAErC,QAAI,OAAOA,cAAa,UAAU;AACjC,aAAO;AAAA,QACN,OAAO;AAAA,UACN,YAAY;AAAA,UACZ,UAAAA;AAAAA,QAAA;AAAA,QAED,CAACA,SAAQ;AAAA,MAAA;AAAA,IAEX;AACA,WAAO;AAAA,MACN,OAAO;AAAA,QACN,YAAY;AAAA,QACZ,UAAU,EAAE,YAAYA,UAAS,WAAA;AAAA,MAAW;AAAA,MAE7C,CAACA,UAAS,UAAU;AAAA,IAAA;AAAA,EAEtB;AACA,QAAM,WAAW,oBAAoB;AAErC,MAAI,OAAO,aAAa,UAAU;AACjC,WAAO;AAAA,MACN,OAAO;AAAA,QACN;AAAA,QACA,SAAS,oBAAoB;AAAA,QAC7B,QAAQ,oBAAoB;AAAA,QAC5B,OAAO,oBAAoB;AAAA,MAAA;AAAA,MAE5B,CAAC,UAAU,oBAAoB,OAAO,oBAAoB,QAAQ,oBAAoB,OAAO;AAAA,IAAA;AAAA,EAE/F;AACA,SAAO;AAAA,IACN,OAAO;AAAA,MACN,UAAU;AAAA,QACT,YAAY,SAAS;AAAA,QACrB,QAAQ,SAAS;AAAA,MAAA;AAAA,MAElB,SAAS,oBAAoB;AAAA,MAC7B,QAAQ,oBAAoB;AAAA,MAC5B,OAAO,oBAAoB;AAAA,IAAA;AAAA,IAE5B;AAAA,MACC,SAAS;AAAA,MACT,SAAS;AAAA,MACT,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,IAAA;AAAA,EACrB;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntitySubTree","useEntitySubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"useEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":["useGetEntitySubTree","useEntitySubTreeParameters","useCallback","useAccessorUpdateSubscription"],"mappings":";;;;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAaA,oBAAAA,oBAAA;AACnB,QAAM,aAAaC,2BAAAA,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAcC,MAAAA;AAAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAOC,8BAAAA,8BAA8B,WAAW,EAAE,CAAC;AACpD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { Alias, EntityAccessor, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\nimport { TreeRootId } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useEntitySubTreeParameters } from './useEntitySubTreeParameters'\nimport { useGetEntitySubTree } from './useGetEntitySubTree'\n\nexport const useEntitySubTree = (\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n): EntityAccessor => {\n\tconst getSubTree = useGetEntitySubTree()\n\tconst parameters = useEntitySubTreeParameters(qualifiedSingleEntity)\n\tconst hasTreeId = treeId.length > 0\n\tconst treeIdVal = treeId[0]\n\tconst getAccessor = useCallback(\n\t\t() => getSubTree(parameters, ...(hasTreeId ? [treeIdVal] : [])),\n\t\t[getSubTree, hasTreeId, parameters, treeIdVal],\n\t)\n\n\t// if (typeof parameters !== 'string' && parameters.hasOneRelationPath.length) {\n\t// \tthrow new BindingError(`useEntitySubTree: cannot use hasOneRelationPath!`)\n\t// }\n\treturn useAccessorUpdateSubscription(getAccessor)[0]\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,mBAAmB,CAC/B,0BACG,WACiB;AACpB,QAAM,aAAa,oBAAA;AACnB,QAAM,aAAa,2BAA2B,qBAAqB;AACnE,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,YAAY,OAAO,CAAC;AAC1B,QAAM,cAAc;AAAA,IACnB,MAAM,WAAW,YAAY,GAAI,YAAY,CAAC,SAAS,IAAI,EAAG;AAAA,IAC9D,CAAC,YAAY,WAAW,YAAY,SAAS;AAAA,EAAA;AAM9C,SAAO,8BAA8B,WAAW,EAAE,CAAC;AACpD;"}
|
|
@@ -13,7 +13,7 @@ const useEntitySubTreeLoader = (entity, children, state) => {
|
|
|
13
13
|
treeRootId: void 0,
|
|
14
14
|
customState: void 0
|
|
15
15
|
});
|
|
16
|
-
const currentlyLoading = React.useRef();
|
|
16
|
+
const currentlyLoading = React.useRef(void 0);
|
|
17
17
|
const extendTree = useExtendTree.useExtendTree();
|
|
18
18
|
const [reloadTrigger, setReloadTrigger] = React.useState(null);
|
|
19
19
|
const memoizedEntity = reactUtils.useObjectMemo(entity ?? emptyObject);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\
|
|
1
|
+
{"version":3,"file":"useEntitySubTreeLoader.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":["useState","useRef","useExtendTree","useObjectMemo","useEffect","createElement","EntitySubTree","useCallback"],"mappings":";;;;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,eAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmBC,MAAAA,OAKvB,MAAS;AAEX,QAAM,aAAaC,cAAAA,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAIF,MAAAA,SAAwB,IAAI;AACtE,QAAM,iBAAiBG,WAAAA,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjDC,QAAAA,UAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3BC,MAAAA,cAAcC,cAAAA,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQC,MAAAA,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;;"}
|
|
@@ -11,7 +11,7 @@ const useEntitySubTreeLoader = (entity, children, state) => {
|
|
|
11
11
|
treeRootId: void 0,
|
|
12
12
|
customState: void 0
|
|
13
13
|
});
|
|
14
|
-
const currentlyLoading = useRef();
|
|
14
|
+
const currentlyLoading = useRef(void 0);
|
|
15
15
|
const extendTree = useExtendTree();
|
|
16
16
|
const [reloadTrigger, setReloadTrigger] = useState(null);
|
|
17
17
|
const memoizedEntity = useObjectMemo(entity ?? emptyObject);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\
|
|
1
|
+
{"version":3,"file":"useEntitySubTreeLoader.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeLoader.ts"],"sourcesContent":["import { createElement, ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { SugaredQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useExtendTree } from './useExtendTree'\nimport { EntitySubTree } from '../coreComponents'\nimport { useObjectMemo } from '@contember/react-utils'\n\nexport type UseEntitySubTreeLoaderStateInitial = {\n\tstate: 'initial'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateLoading = {\n\tstate: 'loading'\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateRefreshing<State> = {\n\tstate: 'refreshing'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: true\n}\n\nexport type UseEntitySubTreeLoaderStateLoaded<State> = {\n\tstate: 'loaded'\n\tentity: SugaredQualifiedSingleEntity\n\ttreeRootId: TreeRootId | undefined\n\tcustomState: State\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderStateFailed = {\n\tstate: 'failed'\n\terror: unknown\n\tentity: undefined\n\ttreeRootId: undefined\n\tcustomState: undefined\n\tisLoading: false\n}\n\nexport type UseEntitySubTreeLoaderState<State> =\n\t| UseEntitySubTreeLoaderStateInitial\n\t| UseEntitySubTreeLoaderStateLoading\n\t| UseEntitySubTreeLoaderStateRefreshing<State>\n\t| UseEntitySubTreeLoaderStateLoaded<State>\n\t| UseEntitySubTreeLoaderStateFailed\n\nexport type EntityListSubTreeLoaderState = UseEntitySubTreeLoaderState<any>['state']\n\nexport type UseEntitySubTreeLoaderStateMethods = {\n\treload: () => void\n}\n\nconst emptyObject = {} as SugaredQualifiedSingleEntity\n\nexport const useEntitySubTreeLoader = <State>(\n\tentity: SugaredQualifiedSingleEntity | undefined,\n\tchildren: ReactNode,\n\tstate?: State,\n): [UseEntitySubTreeLoaderState<State>, UseEntitySubTreeLoaderStateMethods] => {\n\tconst [displayedState, setDisplayedState] = useState<UseEntitySubTreeLoaderState<State>>({\n\t\tstate: 'initial',\n\t\tisLoading: false,\n\t\tentity: undefined,\n\t\ttreeRootId: undefined,\n\t\tcustomState: undefined,\n\t})\n\tconst currentlyLoading = useRef<\n\t\t{\n\t\t\tentity: SugaredQualifiedSingleEntity\n\t\t\tstate?: State\n\t\t} | undefined\n\t>(undefined)\n\n\tconst extendTree = useExtendTree()\n\tconst [reloadTrigger, setReloadTrigger] = useState<object | null>(null)\n\tconst memoizedEntity = useObjectMemo(entity ?? emptyObject)\n\tconst resolvedEntity = entity ? memoizedEntity : undefined\n\n\tuseEffect(() => {\n\t\t;(async () => {\n\t\t\tif (!resolvedEntity) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tcurrentlyLoading.current = {\n\t\t\t\tentity: resolvedEntity,\n\t\t\t\tstate,\n\t\t\t}\n\n\t\t\tsetDisplayedState(it => {\n\t\t\t\tif (it.state === 'initial' || it.state === 'loading' || it.state === 'failed') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'loading',\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...it,\n\t\t\t\t\t\tisLoading: true,\n\t\t\t\t\t\tstate: 'refreshing',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst newTreeRootId = await extendTree(\n\t\t\t\tcreateElement(EntitySubTree, {\n\t\t\t\t\t...resolvedEntity,\n\t\t\t\t\tchildren,\n\t\t\t\t}),\n\t\t\t\t{\n\t\t\t\t\tforce: reloadTrigger !== null,\n\t\t\t\t\tonError: e => {\n\t\t\t\t\t\tconsole.error(e)\n\n\t\t\t\t\t\tcurrentlyLoading.current = undefined\n\n\t\t\t\t\t\tsetDisplayedState({\n\t\t\t\t\t\t\tstate: 'failed',\n\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\tentity: undefined,\n\t\t\t\t\t\t\ttreeRootId: undefined,\n\t\t\t\t\t\t\tcustomState: undefined,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tif (newTreeRootId) {\n\t\t\t\tcurrentlyLoading.current = undefined\n\t\t\t\tsetDisplayedState({\n\t\t\t\t\tstate: 'loaded',\n\t\t\t\t\tentity: resolvedEntity,\n\t\t\t\t\ttreeRootId: newTreeRootId,\n\t\t\t\t\tcustomState: state as State,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t})\n\t\t\t}\n\t\t})()\n\t}, [extendTree, resolvedEntity, children, state, reloadTrigger])\n\n\treturn [\n\t\tdisplayedState,\n\t\t{\n\t\t\treload: useCallback(() => setReloadTrigger({}), []),\n\t\t},\n\t]\n}\n"],"names":[],"mappings":";;;;AA4DA,MAAM,cAAc,CAAA;AAEb,MAAM,yBAAyB,CACrC,QACA,UACA,UAC8E;AAC9E,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA6C;AAAA,IACxF,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,EAAA,CACb;AACD,QAAM,mBAAmB,OAKvB,MAAS;AAEX,QAAM,aAAa,cAAA;AACnB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAwB,IAAI;AACtE,QAAM,iBAAiB,cAAc,UAAU,WAAW;AAC1D,QAAM,iBAAiB,SAAS,iBAAiB;AAEjD,YAAU,MAAM;AACd,KAAC,YAAY;AACb,UAAI,CAAC,gBAAgB;AACpB;AAAA,MACD;AAEA,uBAAiB,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,MAAA;AAGD,wBAAkB,CAAA,OAAM;AACvB,YAAI,GAAG,UAAU,aAAa,GAAG,UAAU,aAAa,GAAG,UAAU,UAAU;AAC9E,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET,OAAO;AACN,iBAAO;AAAA,YACN,GAAG;AAAA,YACH,WAAW;AAAA,YACX,OAAO;AAAA,UAAA;AAAA,QAET;AAAA,MACD,CAAC;AAED,YAAM,gBAAgB,MAAM;AAAA,QAC3B,cAAc,eAAe;AAAA,UAC5B,GAAG;AAAA,UACH;AAAA,QAAA,CACA;AAAA,QACD;AAAA,UACC,OAAO,kBAAkB;AAAA,UACzB,SAAS,CAAA,MAAK;AACb,oBAAQ,MAAM,CAAC;AAEf,6BAAiB,UAAU;AAE3B,8BAAkB;AAAA,cACjB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,WAAW;AAAA,YAAA,CACX;AAAA,UACF;AAAA,QAAA;AAAA,MACD;AAGD,UAAI,eAAe;AAClB,yBAAiB,UAAU;AAC3B,0BAAkB;AAAA,UACjB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QAAA,CACX;AAAA,MACF;AAAA,IACD,GAAA;AAAA,EACD,GAAG,CAAC,YAAY,gBAAgB,UAAU,OAAO,aAAa,CAAC;AAE/D,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,QAAQ,YAAY,MAAM,iBAAiB,CAAA,CAAE,GAAG,CAAA,CAAE;AAAA,IAAA;AAAA,EACnD;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTreeParameters.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\n\nexport function useEntitySubTreeParameters(alias: Alias): Alias\nexport function useEntitySubTreeParameters(\n\tqualifiedEntity: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntityOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity {\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity)\n\n\tif (typeof qualifiedSingleEntity === 'string') {\n\t\treturn qualifiedSingleEntity\n\t}\n\
|
|
1
|
+
{"version":3,"file":"useEntitySubTreeParameters.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\n\nexport function useEntitySubTreeParameters(alias: Alias): Alias\nexport function useEntitySubTreeParameters(\n\tqualifiedEntity: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntityOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity {\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity)\n\n\tif (typeof qualifiedSingleEntity === 'string') {\n\t\treturn qualifiedSingleEntity\n\t}\n\tuseConstantValueInvariant(qualifiedSingleEntity.isCreating, `EntitySubTree: cannot alternate the 'isCreating' value.`)\n\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity.entity, `EntitySubTree: cannot alternate the 'entity' value.`)\n\n\tif (qualifiedSingleEntity.isCreating) {\n\t\tconst entity = qualifiedSingleEntity.entity\n\n\t\tif (typeof entity === 'string') {\n\t\t\treturn useMemo(\n\t\t\t\t() => ({\n\t\t\t\t\tisCreating: true,\n\t\t\t\t\tentity: entity,\n\t\t\t\t}),\n\t\t\t\t[entity],\n\t\t\t)\n\t\t}\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tisCreating: true,\n\t\t\t\tentity: { entityName: entity.entityName },\n\t\t\t}),\n\t\t\t[entity.entityName],\n\t\t)\n\t}\n\n\tconst entity = qualifiedSingleEntity.entity\n\n\tif (typeof entity === 'string') {\n\t\treturn useMemo(() => ({ entity: entity }), [entity])\n\t}\n\treturn useMemo(\n\t\t() => ({\n\t\t\tentity: {\n\t\t\t\tentityName: entity.entityName,\n\t\t\t\tfilter: entity.filter,\n\t\t\t\twhere: entity.where,\n\t\t\t},\n\t\t}),\n\t\t[entity.entityName, entity.filter, entity.where],\n\t)\n}\n"],"names":["useConstantValueInvariant","entity","useMemo"],"mappings":";;;;AAWO,SAAS,2BACf,uBACmF;AACnFA,aAAAA,0BAA0B,OAAO,qBAAqB;AAEtD,MAAI,OAAO,0BAA0B,UAAU;AAC9C,WAAO;AAAA,EACR;AACAA,aAAAA,0BAA0B,sBAAsB,YAAY,yDAAyD;AAErHA,aAAAA,0BAA0B,OAAO,sBAAsB,QAAQ,qDAAqD;AAEpH,MAAI,sBAAsB,YAAY;AACrC,UAAMC,UAAS,sBAAsB;AAErC,QAAI,OAAOA,YAAW,UAAU;AAC/B,aAAOC,MAAAA;AAAAA,QACN,OAAO;AAAA,UACN,YAAY;AAAA,UACZ,QAAQD;AAAAA,QAAA;AAAA,QAET,CAACA,OAAM;AAAA,MAAA;AAAA,IAET;AACA,WAAOC,MAAAA;AAAAA,MACN,OAAO;AAAA,QACN,YAAY;AAAA,QACZ,QAAQ,EAAE,YAAYD,QAAO,WAAA;AAAA,MAAW;AAAA,MAEzC,CAACA,QAAO,UAAU;AAAA,IAAA;AAAA,EAEpB;AAEA,QAAM,SAAS,sBAAsB;AAErC,MAAI,OAAO,WAAW,UAAU;AAC/B,WAAOC,MAAAA,QAAQ,OAAO,EAAE,WAAmB,CAAC,MAAM,CAAC;AAAA,EACpD;AACA,SAAOA,MAAAA;AAAAA,IACN,OAAO;AAAA,MACN,QAAQ;AAAA,QACP,YAAY,OAAO;AAAA,QACnB,QAAQ,OAAO;AAAA,QACf,OAAO,OAAO;AAAA,MAAA;AAAA,IACf;AAAA,IAED,CAAC,OAAO,YAAY,OAAO,QAAQ,OAAO,KAAK;AAAA,EAAA;AAEjD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntitySubTreeParameters.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\n\nexport function useEntitySubTreeParameters(alias: Alias): Alias\nexport function useEntitySubTreeParameters(\n\tqualifiedEntity: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntityOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity {\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity)\n\n\tif (typeof qualifiedSingleEntity === 'string') {\n\t\treturn qualifiedSingleEntity\n\t}\n\
|
|
1
|
+
{"version":3,"file":"useEntitySubTreeParameters.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntitySubTreeParameters.ts"],"sourcesContent":["import { useConstantValueInvariant } from '@contember/react-utils'\nimport { useMemo } from 'react'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity } from '@contember/binding'\n\nexport function useEntitySubTreeParameters(alias: Alias): Alias\nexport function useEntitySubTreeParameters(\n\tqualifiedEntity: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntityOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity\nexport function useEntitySubTreeParameters(\n\tqualifiedSingleEntity: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n): Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity {\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity)\n\n\tif (typeof qualifiedSingleEntity === 'string') {\n\t\treturn qualifiedSingleEntity\n\t}\n\tuseConstantValueInvariant(qualifiedSingleEntity.isCreating, `EntitySubTree: cannot alternate the 'isCreating' value.`)\n\n\tuseConstantValueInvariant(typeof qualifiedSingleEntity.entity, `EntitySubTree: cannot alternate the 'entity' value.`)\n\n\tif (qualifiedSingleEntity.isCreating) {\n\t\tconst entity = qualifiedSingleEntity.entity\n\n\t\tif (typeof entity === 'string') {\n\t\t\treturn useMemo(\n\t\t\t\t() => ({\n\t\t\t\t\tisCreating: true,\n\t\t\t\t\tentity: entity,\n\t\t\t\t}),\n\t\t\t\t[entity],\n\t\t\t)\n\t\t}\n\t\treturn useMemo(\n\t\t\t() => ({\n\t\t\t\tisCreating: true,\n\t\t\t\tentity: { entityName: entity.entityName },\n\t\t\t}),\n\t\t\t[entity.entityName],\n\t\t)\n\t}\n\n\tconst entity = qualifiedSingleEntity.entity\n\n\tif (typeof entity === 'string') {\n\t\treturn useMemo(() => ({ entity: entity }), [entity])\n\t}\n\treturn useMemo(\n\t\t() => ({\n\t\t\tentity: {\n\t\t\t\tentityName: entity.entityName,\n\t\t\t\tfilter: entity.filter,\n\t\t\t\twhere: entity.where,\n\t\t\t},\n\t\t}),\n\t\t[entity.entityName, entity.filter, entity.where],\n\t)\n}\n"],"names":["entity"],"mappings":";;AAWO,SAAS,2BACf,uBACmF;AACnF,4BAA0B,OAAO,qBAAqB;AAEtD,MAAI,OAAO,0BAA0B,UAAU;AAC9C,WAAO;AAAA,EACR;AACA,4BAA0B,sBAAsB,YAAY,yDAAyD;AAErH,4BAA0B,OAAO,sBAAsB,QAAQ,qDAAqD;AAEpH,MAAI,sBAAsB,YAAY;AACrC,UAAMA,UAAS,sBAAsB;AAErC,QAAI,OAAOA,YAAW,UAAU;AAC/B,aAAO;AAAA,QACN,OAAO;AAAA,UACN,YAAY;AAAA,UACZ,QAAQA;AAAAA,QAAA;AAAA,QAET,CAACA,OAAM;AAAA,MAAA;AAAA,IAET;AACA,WAAO;AAAA,MACN,OAAO;AAAA,QACN,YAAY;AAAA,QACZ,QAAQ,EAAE,YAAYA,QAAO,WAAA;AAAA,MAAW;AAAA,MAEzC,CAACA,QAAO,UAAU;AAAA,IAAA;AAAA,EAEpB;AAEA,QAAM,SAAS,sBAAsB;AAErC,MAAI,OAAO,WAAW,UAAU;AAC/B,WAAO,QAAQ,OAAO,EAAE,WAAmB,CAAC,MAAM,CAAC;AAAA,EACpD;AACA,SAAO;AAAA,IACN,OAAO;AAAA,MACN,QAAQ;AAAA,QACP,YAAY,OAAO;AAAA,QACnB,QAAQ,OAAO;AAAA,QACf,OAAO,OAAO;AAAA,MAAA;AAAA,IACf;AAAA,IAED,CAAC,OAAO,YAAY,OAAO,QAAQ,OAAO,KAAK;AAAA,EAAA;AAEjD;"}
|
|
@@ -12,10 +12,7 @@ const useExtendTree = () => {
|
|
|
12
12
|
const environment = useEnvironment.useEnvironment();
|
|
13
13
|
return React.useCallback(async (newFragment, options) => {
|
|
14
14
|
try {
|
|
15
|
-
const newTreeRootId = await extendTree(
|
|
16
|
-
newFragment,
|
|
17
|
-
{ environment, ...options, signal: abort() }
|
|
18
|
-
);
|
|
15
|
+
const newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() });
|
|
19
16
|
if (!isMountedRef.current) {
|
|
20
17
|
return;
|
|
21
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExtendTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment
|
|
1
|
+
{"version":3,"file":"useExtendTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":["useAbortController","useBindingOperations","useIsMounted","useEnvironment","useCallback","DataBindingExtendAborted"],"mappings":";;;;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQA,WAAAA,mBAAA;AACd,QAAM,EAAE,WAAA,IAAeC,0CAAA;AACvB,QAAM,eAAeC,WAAAA,aAAA;AACrB,QAAM,cAAcC,eAAAA,eAAA;AACpB,SAAOC,MAAAA,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAMC,QAAAA,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;;"}
|
|
@@ -10,10 +10,7 @@ const useExtendTree = () => {
|
|
|
10
10
|
const environment = useEnvironment();
|
|
11
11
|
return useCallback(async (newFragment, options) => {
|
|
12
12
|
try {
|
|
13
|
-
const newTreeRootId = await extendTree(
|
|
14
|
-
newFragment,
|
|
15
|
-
{ environment, ...options, signal: abort() }
|
|
16
|
-
);
|
|
13
|
+
const newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() });
|
|
17
14
|
if (!isMountedRef.current) {
|
|
18
15
|
return;
|
|
19
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExtendTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment
|
|
1
|
+
{"version":3,"file":"useExtendTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useExtendTree.ts"],"sourcesContent":["import { ReactNode, useCallback } from 'react'\nimport { useAbortController, useIsMounted } from '@contember/react-utils'\nimport { useBindingOperations } from './useBindingOperations'\nimport { TreeRootId } from '@contember/binding'\nimport { ExtendTreeOptions } from '@contember/binding'\nimport { DataBindingExtendAborted } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\nexport const useExtendTree = () => {\n\tconst abort = useAbortController()\n\tconst { extendTree } = useBindingOperations()\n\tconst isMountedRef = useIsMounted()\n\tconst environment = useEnvironment()\n\treturn useCallback(async (newFragment: ReactNode, options?: Omit<ExtendTreeOptions, 'signal'>): Promise<TreeRootId | undefined> => {\n\t\ttry {\n\t\t\tconst newTreeRootId = await extendTree(newFragment, { environment, ...options, signal: abort() })\n\t\t\tif (!isMountedRef.current) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn newTreeRootId\n\t\t} catch (e) {\n\t\t\tif (e === DataBindingExtendAborted) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}, [abort, environment, extendTree, isMountedRef])\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,gBAAgB,MAAM;AAClC,QAAM,QAAQ,mBAAA;AACd,QAAM,EAAE,WAAA,IAAe,qBAAA;AACvB,QAAM,eAAe,aAAA;AACrB,QAAM,cAAc,eAAA;AACpB,SAAO,YAAY,OAAO,aAAwB,YAAiF;AAClI,QAAI;AACH,YAAM,gBAAgB,MAAM,WAAW,aAAa,EAAE,aAAa,GAAG,SAAS,QAAQ,MAAA,GAAS;AAChG,UAAI,CAAC,aAAa,SAAS;AAC1B;AAAA,MACD;AACA,aAAO;AAAA,IACR,SAAS,GAAG;AACX,UAAI,MAAM,0BAA0B;AACnC;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,OAAO,aAAa,YAAY,YAAY,CAAC;AAClD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\
|
|
1
|
+
{"version":3,"file":"useField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [field, { update }] = useAccessorUpdateSubscription(getField)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":["useDesugaredRelativeSingleField","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAeA,SAAS,SACR,4BACmC;AACnC,QAAM,sBAAsBA,gCAAAA,gCAAgC,0BAA0B;AACtFC,aAAAA;AAAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAYC,aAAAA,aAAA;AAClB,QAAM,iBAAiBC,kBAAAA,kBAAA;AACvB,QAAM,WAAWC,MAAAA,YAAY,MAAM;AAClC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,SAAgB,mBAAoB;AAAA,EACnD,GAAG,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AACxBC,eAAAA;AAAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAED,UAAM,CAAC,OAAO,EAAE,QAAQ,IAAIC,8BAAAA,8BAA8B,QAAQ;AAElE,QAAI,oBAAoB,mBAAmB,QAAQ;AAClDC,4BAAAA,sBAAsB,oBAAoB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC9E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\
|
|
1
|
+
{"version":3,"file":"useField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useField.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { FieldAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { FieldValue, SugaredRelativeSingleField } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleField } from './useDesugaredRelativeSingleField'\n\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): FieldAccessor<Value>\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined\nfunction useField<Value extends FieldValue = FieldValue>(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): FieldAccessor<Value> | undefined {\n\tconst relativeSingleField = useDesugaredRelativeSingleField(sugaredRelativeSingleField)\n\tuseConstantValueInvariant(\n\t\t!!relativeSingleField,\n\t\t'useField: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getField = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getField<Value>(relativeSingleField!)\n\t}, [entityKey, getEntityByKey, relativeSingleField])\n\n\tif (relativeSingleField) {\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleField.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\tconst [field, { update }] = useAccessorUpdateSubscription(getField)\n\n\t\tif (relativeSingleField.hasOneRelationPath.length) {\n\t\t\tuseOnConnectionUpdate(relativeSingleField.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn field\n\t}\n\treturn undefined\n}\n\nexport { useField }\n"],"names":[],"mappings":";;;;;;;AAeA,SAAS,SACR,4BACmC;AACnC,QAAM,sBAAsB,gCAAgC,0BAA0B;AACtF;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EAAA;AAGD,QAAM,YAAY,aAAA;AAClB,QAAM,iBAAiB,kBAAA;AACvB,QAAM,WAAW,YAAY,MAAM;AAClC,UAAM,SAAS,eAAe,SAAS;AACvC,WAAO,OAAO,SAAgB,mBAAoB;AAAA,EACnD,GAAG,CAAC,WAAW,gBAAgB,mBAAmB,CAAC;AAEnD,MAAI,qBAAqB;AACxB;AAAA,MACC,oBAAoB;AAAA,MACpB;AAAA,IAAA;AAED,UAAM,CAAC,OAAO,EAAE,QAAQ,IAAI,8BAA8B,QAAQ;AAElE,QAAI,oBAAoB,mBAAmB,QAAQ;AAClD,4BAAsB,oBAAoB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAC9E;AAEA,WAAO;AAAA,EACR;AACA,SAAO;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntityByKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityByKey.ts"],"sourcesContent":["import type { GetEntityByKey } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const useGetEntityByKey = (): GetEntityByKey => useBindingOperations().getEntityByKey\n"],"names":["useBindingOperations"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"useGetEntityByKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityByKey.ts"],"sourcesContent":["import type { GetEntityByKey } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const useGetEntityByKey = (): GetEntityByKey => useBindingOperations().getEntityByKey\n"],"names":["useBindingOperations"],"mappings":";;;AAGO,MAAM,oBAAoB,MAAsBA,qBAAAA,uBAAuB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntityByKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityByKey.ts"],"sourcesContent":["import type { GetEntityByKey } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const useGetEntityByKey = (): GetEntityByKey => useBindingOperations().getEntityByKey\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"useGetEntityByKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityByKey.ts"],"sourcesContent":["import type { GetEntityByKey } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const useGetEntityByKey = (): GetEntityByKey => useBindingOperations().getEntityByKey\n"],"names":[],"mappings":";AAGO,MAAM,oBAAoB,MAAsB,uBAAuB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type {
|
|
1
|
+
{"version":3,"file":"useGetEntityListSubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntityListSubTree = (): (\n\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityListAccessor => {\n\tconst environment = useEnvironment()\n\tconst getEntityListSubTree = useBindingOperations().getEntityListSubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntityListSubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntityListSubTree, treeRootId],\n\t)\n}\n"],"names":["useEnvironment","useBindingOperations","useTreeRootId","useCallback"],"mappings":";;;;;;AAOO,MAAM,0BAA0B,MAGZ;AAC1B,QAAM,cAAcA,eAAAA,eAAA;AACpB,QAAM,uBAAuBC,qBAAAA,uBAAuB;AACpD,QAAM,aAAaC,cAAAA,cAAA;AAEnB,SAAOC,MAAAA;AAAAA,IACN,CACC,sBACG,WACC,qBAAqB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IACtG,CAAC,aAAa,sBAAsB,UAAU;AAAA,EAAA;AAEhD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type {
|
|
1
|
+
{"version":3,"file":"useGetEntityListSubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntityListSubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityListAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntityListSubTree = (): (\n\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityListAccessor => {\n\tconst environment = useEnvironment()\n\tconst getEntityListSubTree = useBindingOperations().getEntityListSubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntityListSubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntityListSubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,0BAA0B,MAGZ;AAC1B,QAAM,cAAc,eAAA;AACpB,QAAM,uBAAuB,uBAAuB;AACpD,QAAM,aAAa,cAAA;AAEnB,SAAO;AAAA,IACN,CACC,sBACG,WACC,qBAAqB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IACtG,CAAC,aAAa,sBAAsB,UAAU;AAAA,EAAA;AAEhD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport type {
|
|
1
|
+
{"version":3,"file":"useGetEntitySubTree.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntitySubTree = (): (\n\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityAccessor => {\n\tconst environment = useEnvironment()\n\tconst getEntitySubTree = useBindingOperations().getEntitySubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntitySubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntitySubTree, treeRootId],\n\t)\n}\n"],"names":["useEnvironment","useBindingOperations","useTreeRootId","useCallback"],"mappings":";;;;;;AAOO,MAAM,sBAAsB,MAGZ;AACtB,QAAM,cAAcA,eAAAA,eAAA;AACpB,QAAM,mBAAmBC,qBAAAA,uBAAuB;AAChD,QAAM,aAAaC,cAAAA,cAAA;AAEnB,SAAOC,MAAAA;AAAAA,IACN,CACC,sBACG,WACC,iBAAiB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IAClG,CAAC,aAAa,kBAAkB,UAAU;AAAA,EAAA;AAE5C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport type {
|
|
1
|
+
{"version":3,"file":"useGetEntitySubTree.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useGetEntitySubTree.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { EntityAccessor } from '@contember/binding'\nimport type { Alias, SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\nimport { useEnvironment } from './useEnvironment'\nimport { useTreeRootId } from './useTreeRootId'\n\nexport const useGetEntitySubTree = (): (\n\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t...treeId: [TreeRootId | undefined] | []\n) => EntityAccessor => {\n\tconst environment = useEnvironment()\n\tconst getEntitySubTree = useBindingOperations().getEntitySubTree\n\tconst treeRootId = useTreeRootId()\n\n\treturn useCallback(\n\t\t(\n\t\t\tparametersOrAlias: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t...treeId: [TreeRootId | undefined] | []\n\t\t) => getEntitySubTree(parametersOrAlias, treeId.length === 0 ? treeRootId : treeId[0], environment),\n\t\t[environment, getEntitySubTree, treeRootId],\n\t)\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,sBAAsB,MAGZ;AACtB,QAAM,cAAc,eAAA;AACpB,QAAM,mBAAmB,uBAAuB;AAChD,QAAM,aAAa,cAAA;AAEnB,SAAO;AAAA,IACN,CACC,sBACG,WACC,iBAAiB,mBAAmB,OAAO,WAAW,IAAI,aAAa,OAAO,CAAC,GAAG,WAAW;AAAA,IAClG,CAAC,aAAa,kBAAkB,UAAU;AAAA,EAAA;AAE5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHasEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useHasEntity.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useHasEntity = (): boolean => {\n\treturn useContext(EntityKeyContext) !== undefined\n}\n"],"names":["useContext","EntityKeyContext"],"mappings":";;;;AAGO,MAAM,eAAe,MAAe;
|
|
1
|
+
{"version":3,"file":"useHasEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useHasEntity.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useHasEntity = (): boolean => {\n\treturn useContext(EntityKeyContext) !== undefined\n}\n"],"names":["useContext","EntityKeyContext"],"mappings":";;;;AAGO,MAAM,eAAe,MAAe;AAC1C,SAAOA,MAAAA,WAAWC,iBAAAA,gBAAgB,MAAM;AACzC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHasEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useHasEntity.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useHasEntity = (): boolean => {\n\treturn useContext(EntityKeyContext) !== undefined\n}\n"],"names":[],"mappings":";;AAGO,MAAM,eAAe,MAAe;
|
|
1
|
+
{"version":3,"file":"useHasEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useHasEntity.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useHasEntity = (): boolean => {\n\treturn useContext(EntityKeyContext) !== undefined\n}\n"],"names":[],"mappings":";;AAGO,MAAM,eAAe,MAAe;AAC1C,SAAO,WAAW,gBAAgB,MAAM;AACzC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersist.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/usePersist.ts"],"sourcesContent":["import type { Persist } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const usePersist = (): Persist => useBindingOperations().persist\n"],"names":["useBindingOperations"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"usePersist.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/usePersist.ts"],"sourcesContent":["import type { Persist } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const usePersist = (): Persist => useBindingOperations().persist\n"],"names":["useBindingOperations"],"mappings":";;;AAGO,MAAM,aAAa,MAAeA,qBAAAA,uBAAuB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersist.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/usePersist.ts"],"sourcesContent":["import type { Persist } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const usePersist = (): Persist => useBindingOperations().persist\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"usePersist.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/usePersist.ts"],"sourcesContent":["import type { Persist } from '@contember/binding'\nimport { useBindingOperations } from './useBindingOperations'\n\nexport const usePersist = (): Persist => useBindingOperations().persist\n"],"names":[],"mappings":";AAGO,MAAM,aAAa,MAAe,uBAAuB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeRootId.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useTreeRootId.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport const useTreeRootId = (): TreeRootId | undefined => useContext(TreeRootIdContext)\n"],"names":["useContext","TreeRootIdContext"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useTreeRootId.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useTreeRootId.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport const useTreeRootId = (): TreeRootId | undefined => useContext(TreeRootIdContext)\n"],"names":["useContext","TreeRootIdContext"],"mappings":";;;;AAIO,MAAM,gBAAgB,MAA8BA,MAAAA,WAAWC,kBAAAA,iBAAiB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeRootId.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useTreeRootId.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport const useTreeRootId = (): TreeRootId | undefined => useContext(TreeRootIdContext)\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useTreeRootId.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useTreeRootId.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport const useTreeRootId = (): TreeRootId | undefined => useContext(TreeRootIdContext)\n"],"names":[],"mappings":";;AAIO,MAAM,gBAAgB,MAA8B,WAAW,iBAAiB;"}
|
|
@@ -43,7 +43,7 @@ const SetOrderFieldOnCreate = Component.Component(
|
|
|
43
43
|
},
|
|
44
44
|
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(SugaredField.SugaredField, { field: orderField }, void 0, false, {
|
|
45
45
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
46
|
-
lineNumber:
|
|
46
|
+
lineNumber: 58,
|
|
47
47
|
columnNumber: 7
|
|
48
48
|
}, void 0)
|
|
49
49
|
},
|
|
@@ -51,30 +51,30 @@ const SetOrderFieldOnCreate = Component.Component(
|
|
|
51
51
|
false,
|
|
52
52
|
{
|
|
53
53
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
54
|
-
lineNumber:
|
|
54
|
+
lineNumber: 46,
|
|
55
55
|
columnNumber: 6
|
|
56
56
|
},
|
|
57
57
|
void 0
|
|
58
58
|
),
|
|
59
59
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV(EntityListSubTree.EntityListSubTree, { ...qel, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(SugaredField.SugaredField, { field: orderField }, void 0, false, {
|
|
60
60
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
61
|
-
lineNumber:
|
|
61
|
+
lineNumber: 61,
|
|
62
62
|
columnNumber: 7
|
|
63
63
|
}, void 0) }, void 0, false, {
|
|
64
64
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
65
|
-
lineNumber:
|
|
65
|
+
lineNumber: 60,
|
|
66
66
|
columnNumber: 6
|
|
67
67
|
}, void 0)
|
|
68
68
|
] }, void 0, true, {
|
|
69
69
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
70
|
-
lineNumber:
|
|
70
|
+
lineNumber: 45,
|
|
71
71
|
columnNumber: 5
|
|
72
72
|
}, void 0);
|
|
73
73
|
}
|
|
74
74
|
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: [
|
|
75
75
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV(Field.Field, { field: desugaredOrderField, defaultValue: newOrderFieldValue, isNonbearing: true }, void 0, false, {
|
|
76
76
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
77
|
-
lineNumber:
|
|
77
|
+
lineNumber: 68,
|
|
78
78
|
columnNumber: 5
|
|
79
79
|
}, void 0),
|
|
80
80
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
@@ -84,7 +84,7 @@ const SetOrderFieldOnCreate = Component.Component(
|
|
|
84
84
|
expectedMutation: "anyMutation",
|
|
85
85
|
orderBy: getOrderBy("asc"),
|
|
86
86
|
onBeforePersist: (getAccessor, bindingOperations) => {
|
|
87
|
-
let newEntityKey
|
|
87
|
+
let newEntityKey;
|
|
88
88
|
addEntityAtIndex.addEntityAtIndex(getAccessor(), desugaredOrderField, newOrderFieldValue, (getNewEntity) => {
|
|
89
89
|
newEntityKey = getNewEntity().key;
|
|
90
90
|
});
|
|
@@ -92,7 +92,7 @@ const SetOrderFieldOnCreate = Component.Component(
|
|
|
92
92
|
},
|
|
93
93
|
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(SugaredField.SugaredField, { field: orderField }, void 0, false, {
|
|
94
94
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
95
|
-
lineNumber:
|
|
95
|
+
lineNumber: 83,
|
|
96
96
|
columnNumber: 6
|
|
97
97
|
}, void 0)
|
|
98
98
|
},
|
|
@@ -100,14 +100,14 @@ const SetOrderFieldOnCreate = Component.Component(
|
|
|
100
100
|
false,
|
|
101
101
|
{
|
|
102
102
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
103
|
-
lineNumber:
|
|
103
|
+
lineNumber: 69,
|
|
104
104
|
columnNumber: 5
|
|
105
105
|
},
|
|
106
106
|
void 0
|
|
107
107
|
)
|
|
108
108
|
] }, void 0, true, {
|
|
109
109
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
110
|
-
lineNumber:
|
|
110
|
+
lineNumber: 67,
|
|
111
111
|
columnNumber: 4
|
|
112
112
|
}, void 0);
|
|
113
113
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetOrderFieldOnCreate.cjs","sources":["../../../../../packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx"],"sourcesContent":["import type { Input } from '@contember/client'\nimport type {\n\tSugaredOrderBy,\n\tSugaredQualifiedEntityList,\n\tSugaredRelativeSingleField,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n} from '@contember/binding'\nimport { QueryLanguage } from '@contember/binding'\nimport { Component, EntityListSubTree, EntitySubTree, Field } from '../coreComponents'\nimport { SugaredField } from '../helperComponents'\nimport { addEntityAtIndex } from './addEntityAtIndex'\n\nexport interface SetOrderFieldOnCreateOwnProps {\n\torderField: SugaredRelativeSingleField | string\n\tnewOrderFieldValue?: number\n}\n\nexport interface SetOrderFieldOnCreateProps
|
|
1
|
+
{"version":3,"file":"SetOrderFieldOnCreate.cjs","sources":["../../../../../packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx"],"sourcesContent":["import type { Input } from '@contember/client'\nimport type {\n\tSugaredOrderBy,\n\tSugaredQualifiedEntityList,\n\tSugaredRelativeSingleField,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n} from '@contember/binding'\nimport { QueryLanguage } from '@contember/binding'\nimport { Component, EntityListSubTree, EntitySubTree, Field } from '../coreComponents'\nimport { SugaredField } from '../helperComponents'\nimport { addEntityAtIndex } from './addEntityAtIndex'\n\nexport interface SetOrderFieldOnCreateOwnProps {\n\torderField: SugaredRelativeSingleField | string\n\tnewOrderFieldValue?: number\n}\n\nexport interface SetOrderFieldOnCreateProps extends SetOrderFieldOnCreateOwnProps, Pick<SugaredUnconstrainedQualifiedSingleEntity, 'entity'> {}\n\nexport const SetOrderFieldOnCreate = Component<SetOrderFieldOnCreateProps>(\n\t() => null,\n\t({ orderField, newOrderFieldValue, entity }, environment) => {\n\t\tconst desugaredOrderField = QueryLanguage.desugarRelativeSingleField(orderField, environment)\n\t\tconst getOrderBy = (order: 'asc' | 'desc'): SugaredOrderBy => [\n\t\t\tdesugaredOrderField.hasOneRelationPath\n\t\t\t\t.map(relation => relation.field)\n\t\t\t\t.reduceRight(\n\t\t\t\t\t(accumulator, currentValue) => ({\n\t\t\t\t\t\t[currentValue]: accumulator,\n\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\t[desugaredOrderField.field]: order,\n\t\t\t\t\t} as Input.OrderBy<`${Input.OrderDirection}`>,\n\t\t\t\t),\n\t\t]\n\n\t\tif (newOrderFieldValue === undefined) {\n\t\t\tconst qel: SugaredQualifiedEntityList = {\n\t\t\t\tentities: entity,\n\t\t\t\texpectedMutation: 'none',\n\t\t\t\tlimit: 1,\n\t\t\t\torderBy: getOrderBy('desc'),\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<EntitySubTree\n\t\t\t\t\t\tentity={entity}\n\t\t\t\t\t\tisCreating\n\t\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t\tconst listSubTree = bindingOperations.getEntityListSubTree(qel)\n\t\t\t\t\t\t\tconst entities = Array.from(listSubTree)\n\t\t\t\t\t\t\tconst newOrderFieldValue = !entities.length\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: (entities[0].getField<number>(desugaredOrderField).value ?? 0) + 1\n\t\t\t\t\t\t\tgetAccessor().getField<number>(desugaredOrderField).updateValue(newOrderFieldValue)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntitySubTree>\n\t\t\t\t\t<EntityListSubTree {...qel}>\n\t\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t\t</EntityListSubTree>\n\t\t\t\t</>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Field field={desugaredOrderField} defaultValue={newOrderFieldValue} isNonbearing />\n\t\t\t\t<EntityListSubTree\n\t\t\t\t\tentities={entity}\n\t\t\t\t\texpectedMutation=\"anyMutation\"\n\t\t\t\t\torderBy={getOrderBy('asc')}\n\t\t\t\t\tonBeforePersist={(getAccessor, bindingOperations) => {\n\t\t\t\t\t\t// We're creating a new entity which adjusts the numbering of the other ones if applicable\n\t\t\t\t\t\t// and then deleting it again which leaves a hole for newOrderFieldValue that is set above.\n\t\t\t\t\t\tlet newEntityKey: string | undefined\n\t\t\t\t\t\taddEntityAtIndex(getAccessor(), desugaredOrderField, newOrderFieldValue, getNewEntity => {\n\t\t\t\t\t\t\tnewEntityKey = getNewEntity().key\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnewEntityKey && bindingOperations.getEntityByKey(newEntityKey).deleteEntity()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<SugaredField field={orderField} />\n\t\t\t\t</EntityListSubTree>\n\t\t\t</>\n\t\t)\n\t},\n\t'SetOrderFieldOnCreate',\n)\n"],"names":["Component","QueryLanguage","jsxDEV","Fragment","EntitySubTree","newOrderFieldValue","SugaredField","this","EntityListSubTree","Field","addEntityAtIndex"],"mappings":";;;;;;;;;;AAmBO,MAAM,wBAAwBA,UAAAA;AAAAA,EACpC,MAAM;AAAA,EACN,CAAC,EAAE,YAAY,oBAAoB,OAAA,GAAU,gBAAgB;AAC5D,UAAM,sBAAsBC,QAAAA,cAAc,2BAA2B,YAAY,WAAW;AAC5F,UAAM,aAAa,CAAC,UAA0C;AAAA,MAC7D,oBAAoB,mBAClB,IAAI,CAAA,aAAY,SAAS,KAAK,EAC9B;AAAA,QACA,CAAC,aAAa,kBAAkB;AAAA,UAC/B,CAAC,YAAY,GAAG;AAAA,QAAA;AAAA,QAEjB;AAAA,UACC,CAAC,oBAAoB,KAAK,GAAG;AAAA,QAAA;AAAA,MAC9B;AAAA,IACD;AAGF,QAAI,uBAAuB,QAAW;AACrC,YAAM,MAAkC;AAAA,QACvC,UAAU;AAAA,QACV,kBAAkB;AAAA,QAClB,OAAO;AAAA,QACP,SAAS,WAAW,MAAM;AAAA,MAAA;AAE3B,aACCC,8BAAAA,OAAAC,wBAAA,EACC,UAAA;AAAA,QAAAD,8BAAAA;AAAAA,UAACE,cAAAA;AAAAA,UAAA;AAAA,YACA;AAAA,YACA,YAAU;AAAA,YACV,iBAAiB,CAAC,aAAa,sBAAsB;AACpD,oBAAM,cAAc,kBAAkB,qBAAqB,GAAG;AAC9D,oBAAM,WAAW,MAAM,KAAK,WAAW;AACvC,oBAAMC,sBAAqB,CAAC,SAAS,SAClC,KACC,SAAS,CAAC,EAAE,SAAiB,mBAAmB,EAAE,SAAS,KAAK;AACpE,0BAAA,EAAc,SAAiB,mBAAmB,EAAE,YAAYA,mBAAkB;AAAA,YACnF;AAAA,YAEA,UAAAH,8BAAAA,OAACI,2BAAA,EAAa,OAAO,WAAA,GAArB,QAAA,OAAA;AAAA,cAAA,UAAA;AAAA,cAAA,YAAA;AAAA,cAAA,cAAA;AAAA,YAAA,GAAAC,MAAiC;AAAA,UAAA;AAAA,UAZlC;AAAA,UAAA;AAAA,UAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA;AAAA,UAAAA;AAAAA,QAAA;AAAA,6CAcCC,kBAAAA,mBAAA,EAAmB,GAAG,KACtB,UAAAN,8BAAAA,OAACI,aAAAA,cAAA,EAAa,OAAO,cAArB,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAC,MAAiC,EAAA,GADlC,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,MAEA;AAAA,MAAA,EAAA,GAjBD,QAAA,MAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAA,MAkBA;AAAA,IAEF;AACA,WACCL,8BAAAA,OAAAC,wBAAA,EACC,UAAA;AAAA,MAAAD,8BAAAA,OAACO,MAAAA,SAAM,OAAO,qBAAqB,cAAc,oBAAoB,cAAY,QAAjF,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA,GAAAF,MAAkF;AAAA,MAClFL,8BAAAA;AAAAA,QAACM,kBAAAA;AAAAA,QAAA;AAAA,UACA,UAAU;AAAA,UACV,kBAAiB;AAAA,UACjB,SAAS,WAAW,KAAK;AAAA,UACzB,iBAAiB,CAAC,aAAa,sBAAsB;AAGpD,gBAAI;AACJE,6BAAAA,iBAAiB,YAAA,GAAe,qBAAqB,oBAAoB,CAAA,iBAAgB;AACxF,6BAAe,eAAe;AAAA,YAC/B,CAAC;AACD,4BAAgB,kBAAkB,eAAe,YAAY,EAAE,aAAA;AAAA,UAChE;AAAA,UAEA,UAAAR,8BAAAA,OAACI,2BAAA,EAAa,OAAO,WAAA,GAArB,QAAA,OAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAAC,MAAiC;AAAA,QAAA;AAAA,QAdlC;AAAA,QAAA;AAAA,QAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA;AAAA,QAAAA;AAAAA,MAAA;AAAA,IAeA,EAAA,GAjBD,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAA,MAkBA;AAAA,EAEF;AAAA,EACA;AACD;;"}
|
|
@@ -41,7 +41,7 @@ const SetOrderFieldOnCreate = Component(
|
|
|
41
41
|
},
|
|
42
42
|
children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
|
|
43
43
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
44
|
-
lineNumber:
|
|
44
|
+
lineNumber: 58,
|
|
45
45
|
columnNumber: 7
|
|
46
46
|
}, void 0)
|
|
47
47
|
},
|
|
@@ -49,30 +49,30 @@ const SetOrderFieldOnCreate = Component(
|
|
|
49
49
|
false,
|
|
50
50
|
{
|
|
51
51
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
52
|
-
lineNumber:
|
|
52
|
+
lineNumber: 46,
|
|
53
53
|
columnNumber: 6
|
|
54
54
|
},
|
|
55
55
|
void 0
|
|
56
56
|
),
|
|
57
57
|
/* @__PURE__ */ jsxDEV(EntityListSubTree, { ...qel, children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
|
|
58
58
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
59
|
-
lineNumber:
|
|
59
|
+
lineNumber: 61,
|
|
60
60
|
columnNumber: 7
|
|
61
61
|
}, void 0) }, void 0, false, {
|
|
62
62
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
63
|
-
lineNumber:
|
|
63
|
+
lineNumber: 60,
|
|
64
64
|
columnNumber: 6
|
|
65
65
|
}, void 0)
|
|
66
66
|
] }, void 0, true, {
|
|
67
67
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
68
|
-
lineNumber:
|
|
68
|
+
lineNumber: 45,
|
|
69
69
|
columnNumber: 5
|
|
70
70
|
}, void 0);
|
|
71
71
|
}
|
|
72
72
|
return /* @__PURE__ */ jsxDEV(Fragment, { children: [
|
|
73
73
|
/* @__PURE__ */ jsxDEV(Field, { field: desugaredOrderField, defaultValue: newOrderFieldValue, isNonbearing: true }, void 0, false, {
|
|
74
74
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
75
|
-
lineNumber:
|
|
75
|
+
lineNumber: 68,
|
|
76
76
|
columnNumber: 5
|
|
77
77
|
}, void 0),
|
|
78
78
|
/* @__PURE__ */ jsxDEV(
|
|
@@ -82,7 +82,7 @@ const SetOrderFieldOnCreate = Component(
|
|
|
82
82
|
expectedMutation: "anyMutation",
|
|
83
83
|
orderBy: getOrderBy("asc"),
|
|
84
84
|
onBeforePersist: (getAccessor, bindingOperations) => {
|
|
85
|
-
let newEntityKey
|
|
85
|
+
let newEntityKey;
|
|
86
86
|
addEntityAtIndex(getAccessor(), desugaredOrderField, newOrderFieldValue, (getNewEntity) => {
|
|
87
87
|
newEntityKey = getNewEntity().key;
|
|
88
88
|
});
|
|
@@ -90,7 +90,7 @@ const SetOrderFieldOnCreate = Component(
|
|
|
90
90
|
},
|
|
91
91
|
children: /* @__PURE__ */ jsxDEV(SugaredField, { field: orderField }, void 0, false, {
|
|
92
92
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
93
|
-
lineNumber:
|
|
93
|
+
lineNumber: 83,
|
|
94
94
|
columnNumber: 6
|
|
95
95
|
}, void 0)
|
|
96
96
|
},
|
|
@@ -98,14 +98,14 @@ const SetOrderFieldOnCreate = Component(
|
|
|
98
98
|
false,
|
|
99
99
|
{
|
|
100
100
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
101
|
-
lineNumber:
|
|
101
|
+
lineNumber: 69,
|
|
102
102
|
columnNumber: 5
|
|
103
103
|
},
|
|
104
104
|
void 0
|
|
105
105
|
)
|
|
106
106
|
] }, void 0, true, {
|
|
107
107
|
fileName: "/home/runner/work/contember/contember/packages/react-binding/src/accessorSorting/SetOrderFieldOnCreate.tsx",
|
|
108
|
-
lineNumber:
|
|
108
|
+
lineNumber: 67,
|
|
109
109
|
columnNumber: 4
|
|
110
110
|
}, void 0);
|
|
111
111
|
},
|