@contember/react-binding 2.1.0-beta.2 → 2.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.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/EntityKeyProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.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/useBindingOperations.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useBindingOperations.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
- package/dist/development/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
- 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.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.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.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEnvironment.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEnvironment.js.map +1 -1
- package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- 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.map +1 -1
- 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/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/useAccessorTreeState.cjs.map +1 -1
- package/dist/development/src/accessorTree/useAccessorTreeState.js.map +1 -1
- package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
- 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/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.map +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.map +1 -1
- package/dist/development/src/coreComponents/EntityList.js.map +1 -1
- package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
- 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.map +1 -1
- package/dist/development/src/coreComponents/Field.cjs.map +1 -1
- package/dist/development/src/coreComponents/Field.js.map +1 -1
- package/dist/development/src/coreComponents/HasMany.cjs.map +1 -1
- 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.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.map +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -1
- package/dist/development/src/helperComponents/DimensionRenderer.cjs.map +1 -1
- package/dist/development/src/helperComponents/DimensionRenderer.js.map +1 -1
- package/dist/development/src/helperComponents/EntityView.cjs.map +1 -1
- package/dist/development/src/helperComponents/EntityView.js.map +1 -1
- package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
- package/dist/development/src/helperComponents/FieldView.js.map +1 -1
- package/dist/development/src/helperComponents/If.cjs.map +1 -1
- 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/evaluateCondition.cjs +33 -0
- package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/evaluateCondition.js +33 -0
- package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +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/MarkerStaticAnalyzer.cjs.map +1 -1
- 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/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.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/EntityKeyProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.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/useBindingOperations.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useBindingOperations.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeEntityList.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleEntity.js.map +1 -1
- package/dist/production/src/accessorPropagation/useDesugaredRelativeSingleField.cjs.map +1 -1
- 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.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.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.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEnvironment.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEnvironment.js.map +1 -1
- package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- 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.map +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/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/useAccessorTreeState.cjs.map +1 -1
- package/dist/production/src/accessorTree/useAccessorTreeState.js.map +1 -1
- package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
- 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/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.map +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.cjs.map +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.map +1 -1
- package/dist/production/src/coreComponents/HasMany.cjs.map +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.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.map +1 -1
- 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/evaluateCondition.cjs +33 -0
- package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/evaluateCondition.js +33 -0
- 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/MarkerStaticAnalyzer.cjs.map +1 -1
- 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/index.d.ts +28 -28
- package/dist/types/accessorPropagation/index.d.ts.map +1 -1
- package/dist/types/accessorSorting/index.d.ts +5 -5
- package/dist/types/accessorSorting/index.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTree.d.ts +1 -1
- package/dist/types/accessorTree/AccessorTree.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/index.d.ts +11 -11
- package/dist/types/accessorTree/index.d.ts.map +1 -1
- package/dist/types/accessorTree/useAccessorTreeState.d.ts +1 -1
- package/dist/types/accessorTree/useAccessorTreeState.d.ts.map +1 -1
- package/dist/types/accessorTree/useDataBinding.d.ts +1 -1
- package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
- package/dist/types/coreComponents/Component.d.ts +1 -1
- package/dist/types/coreComponents/Component.d.ts.map +1 -1
- package/dist/types/coreComponents/DataBindingProvider.d.ts +1 -1
- package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
- package/dist/types/coreComponents/EntityListSubTree.d.ts +1 -1
- package/dist/types/coreComponents/EntityListSubTree.d.ts.map +1 -1
- package/dist/types/coreComponents/EntitySubTree.d.ts +1 -1
- package/dist/types/coreComponents/EntitySubTree.d.ts.map +1 -1
- package/dist/types/coreComponents/HasMany.d.ts +1 -1
- package/dist/types/coreComponents/HasMany.d.ts.map +1 -1
- package/dist/types/coreComponents/index.d.ts +10 -10
- package/dist/types/coreComponents/index.d.ts.map +1 -1
- package/dist/types/entityEvents/index.d.ts +8 -8
- package/dist/types/entityEvents/index.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/SugaredField.d.ts +1 -1
- package/dist/types/helperComponents/SugaredField.d.ts.map +1 -1
- package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +1 -1
- package/dist/types/helperComponents/index.d.ts +13 -13
- package/dist/types/helperComponents/index.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/PersistTrigger.d.ts +3 -0
- package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/index.d.ts +4 -4
- package/dist/types/helperComponents/persist/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markers/index.d.ts +2 -2
- package/dist/types/markers/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -8
- package/src/accessorPropagation/AccessorProvider.tsx +2 -2
- package/src/accessorPropagation/BindingOperationsProvider.tsx +1 -1
- package/src/accessorPropagation/EntityKeyProvider.tsx +1 -1
- package/src/accessorPropagation/EnvironmentContext.tsx +2 -2
- package/src/accessorPropagation/TreeRootIdProvider.tsx +1 -1
- package/src/accessorPropagation/index.ts +31 -31
- package/src/accessorPropagation/useBindingOperations.ts +1 -1
- package/src/accessorPropagation/useDesugaredRelativeEntityList.ts +1 -1
- package/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts +1 -1
- package/src/accessorPropagation/useDesugaredRelativeSingleField.ts +1 -1
- package/src/accessorPropagation/useEntity.ts +4 -4
- package/src/accessorPropagation/useEntityKey.ts +1 -1
- package/src/accessorPropagation/useEntityList.ts +4 -4
- package/src/accessorPropagation/useEntityListSubTree.ts +3 -3
- package/src/accessorPropagation/useEntityListSubTreeLoader.ts +3 -3
- package/src/accessorPropagation/useEntitySubTree.ts +3 -3
- package/src/accessorPropagation/useEntitySubTreeLoader.ts +2 -2
- package/src/accessorPropagation/useEnvironment.ts +1 -1
- package/src/accessorPropagation/useExtendTree.ts +2 -2
- package/src/accessorPropagation/useField.ts +4 -4
- package/src/accessorPropagation/useGetEntityByKey.ts +1 -1
- package/src/accessorPropagation/useGetEntityListSubTree.ts +3 -3
- package/src/accessorPropagation/useGetEntitySubTree.ts +3 -3
- package/src/accessorPropagation/useHasEntity.ts +1 -1
- package/src/accessorPropagation/usePersist.ts +1 -1
- package/src/accessorPropagation/useTreeRootId.ts +1 -1
- package/src/accessorSorting/SetOrderFieldOnCreate.tsx +3 -3
- package/src/accessorSorting/addEntityAtIndex.ts +2 -2
- package/src/accessorSorting/index.ts +5 -5
- package/src/accessorTree/AccessorTree.tsx +6 -6
- package/src/accessorTree/AccessorTreeStateContext.ts +1 -1
- package/src/accessorTree/index.ts +11 -11
- package/src/accessorTree/useAccessorTreeState.ts +1 -1
- package/src/accessorTree/useDataBinding.ts +4 -4
- package/src/accessorTree/useDirtinessState.ts +1 -1
- package/src/accessorTree/useMutationState.ts +1 -1
- package/src/coreComponents/Component.tsx +2 -2
- package/src/coreComponents/DataBindingProvider.tsx +1 -1
- package/src/coreComponents/Entity.tsx +2 -2
- package/src/coreComponents/EntityList.tsx +2 -2
- package/src/coreComponents/EntityListSubTree.tsx +4 -4
- package/src/coreComponents/EntitySubTree.tsx +5 -5
- package/src/coreComponents/Field.tsx +2 -2
- package/src/coreComponents/HasMany.tsx +4 -4
- package/src/coreComponents/HasOne.tsx +4 -4
- package/src/coreComponents/ParentEntity.tsx +1 -1
- package/src/coreComponents/index.ts +10 -10
- package/src/entityEvents/index.ts +8 -8
- package/src/entityEvents/useDataBindingEvent.ts +1 -1
- package/src/entityEvents/useDerivedField.ts +1 -1
- package/src/entityEvents/useEntityBeforePersist.ts +1 -1
- package/src/entityEvents/useEntityBeforeUpdate.ts +1 -1
- package/src/entityEvents/useEntityEvent.ts +1 -1
- package/src/entityEvents/useEntityPersistError.ts +1 -1
- package/src/entityEvents/useEntityPersistSuccess.ts +1 -1
- package/src/entityEvents/useOnConnectionUpdate.ts +1 -1
- package/src/helperComponents/DeferredSubTrees.tsx +4 -4
- package/src/helperComponents/DeleteEntityTrigger.tsx +3 -3
- package/src/helperComponents/DimensionRenderer.tsx +2 -2
- package/src/helperComponents/EntityView.tsx +1 -1
- package/src/helperComponents/FieldView.tsx +3 -3
- package/src/helperComponents/If.tsx +4 -4
- package/src/helperComponents/LabelMiddleware.tsx +1 -1
- package/src/helperComponents/RecursionTerminator.tsx +1 -1
- package/src/helperComponents/RecursionTerminatorPortal.tsx +3 -3
- package/src/helperComponents/StaticRender.tsx +1 -1
- package/src/helperComponents/SugaredField.tsx +1 -1
- package/src/helperComponents/Variable.tsx +1 -1
- package/src/helperComponents/helpers/FilterEvaluator.ts +1 -1
- package/src/helperComponents/helpers/evaluateCondition.ts +33 -0
- package/src/helperComponents/index.ts +13 -13
- package/src/helperComponents/persist/PersistOnFieldChange.tsx +3 -3
- package/src/helperComponents/persist/PersistOnHasOneChange.tsx +3 -3
- package/src/helperComponents/persist/PersistOnKey.tsx +1 -1
- package/src/helperComponents/persist/PersistTrigger.tsx +5 -2
- package/src/helperComponents/persist/index.tsx +4 -4
- package/src/helperComponents/persist/useDecoratedPersist.ts +1 -1
- package/src/index.ts +7 -7
- package/src/markers/MarkerStaticAnalyzer.ts +2 -2
- package/src/markers/MarkerTreeGenerator.ts +1 -1
- package/src/markers/index.ts +2 -2
- package/tests/cases/unit/core/entityOperations.test.tsx +3 -3
- package/tests/cases/unit/core/eventManager.test.tsx +3 -3
- package/tests/cases/unit/helperComponents/FilterEvaluator.spec.ts +3 -3
- package/tests/cases/unit/helperComponents/FilterFieldsCollector.spec.ts +2 -2
- package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +1 -1
- package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +1 -1
- package/tests/lib/bindingFactory.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistOnHasOneChange.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnHasOneChange.tsx"],"sourcesContent":["import { ErrorPersistResult, QueryLanguage, SuccessfulPersistResult, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEffect, useMemo } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist'\nimport { useEntity, useEnvironment } from '../../accessorPropagation'\nimport { Component, HasOne } from '../../coreComponents'\n\nexport type PersistOnHasOneChangeProps = {\n\t/**\n\t * The relation field that should trigger persist when changed.\n\t */\n\tfield: SugaredRelativeSingleEntity['field']\n\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * Triggers persist when the specified relation field changes.\n * This only works for has-one relation fields, for scalar fields, see {@link PersistOnFieldChange}.\n *\n * ## Props {@link PersistOnHasOneChangeProps}\n * - field, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnHasOneChange field=\"author\" />\n * ```\n */\nexport const PersistOnHasOneChange = Component<PersistOnHasOneChangeProps>(({ field, onPersistError, onPersistSuccess }) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst env = useEnvironment()\n\tconst desugaredPath = useMemo(() => QueryLanguage.desugarRelativeSingleEntity({ field }, env), [field, env])\n\tconst getEntity = useEntity(useMemo(() => ({\n\t\tfield: desugaredPath.hasOneRelationPath.slice(0, -1),\n\t}), [desugaredPath])).getAccessor\n\n\tconst lastField = desugaredPath.hasOneRelationPath[desugaredPath.hasOneRelationPath.length - 1].field\n\n\tuseEffect(() => {\n\t\tconst unregister = getEntity().addEventListener({ type: 'connectionUpdate', key: lastField }, async accessor => {\n\t\t\tif (!accessor.hasUnpersistedChanges) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait doPersist()\n\t\t})\n\n\t\treturn unregister\n\t}, [getEntity, doPersist, lastField])\n\n\treturn null\n}, ({ field }) => <HasOne field={field} />)\n"],"names":["Component","useDecoratedPersist","useEnvironment","useMemo","QueryLanguage","useEntity","useEffect","jsx","HasOne"],"mappings":";;;;;;;;;;AAmCO,MAAM,wBAAwBA,UAAAA,UAAsC,CAAC,EAAE,OAAO,gBAAgB,uBAAuB;AAC3H,QAAM,YAAYC,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC1E,QAAM,MAAMC,eAAAA,eAAA;AACZ,QAAM,gBAAgBC,MAAAA,QAAQ,MAAMC,QAAAA,cAAc,4BAA4B,EAAE,MAAA,GAAS,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC;AAC3G,QAAM,YAAYC,oBAAUF,MAAAA,QAAQ,OAAO;AAAA,IAC1C,OAAO,cAAc,mBAAmB,MAAM,GAAG,EAAE;AAAA,EAAA,IAChD,CAAC,aAAa,CAAC,CAAC,EAAE;AAEtB,QAAM,YAAY,cAAc,mBAAmB,cAAc,mBAAmB,SAAS,CAAC,EAAE;AAEhGG,QAAAA,UAAU,MAAM;AACf,UAAM,aAAa,YAAY,iBAAiB,EAAE,MAAM,oBAAoB,KAAK,aAAa,OAAM,aAAY;AAC/G,UAAI,CAAC,SAAS,uBAAuB;AACpC;AAAA,MACD;AACA,YAAM,UAAA;AAAA,IACP,CAAC;AAED,WAAO;AAAA,EACR,GAAG,CAAC,WAAW,WAAW,SAAS,CAAC;AAEpC,SAAO;AACR,GAAG,CAAC,EAAE,MAAA,MAAYC,2BAAAA,IAACC,OAAAA,QAAA,EAAO,OAAc,CAAE;;"}
|
|
1
|
+
{"version":3,"file":"PersistOnHasOneChange.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnHasOneChange.tsx"],"sourcesContent":["import { ErrorPersistResult, QueryLanguage, SuccessfulPersistResult, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEffect, useMemo } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\nimport { useEntity, useEnvironment } from '../../accessorPropagation/index.js'\nimport { Component, HasOne } from '../../coreComponents/index.js'\n\nexport type PersistOnHasOneChangeProps = {\n\t/**\n\t * The relation field that should trigger persist when changed.\n\t */\n\tfield: SugaredRelativeSingleEntity['field']\n\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * Triggers persist when the specified relation field changes.\n * This only works for has-one relation fields, for scalar fields, see {@link PersistOnFieldChange}.\n *\n * ## Props {@link PersistOnHasOneChangeProps}\n * - field, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnHasOneChange field=\"author\" />\n * ```\n */\nexport const PersistOnHasOneChange = Component<PersistOnHasOneChangeProps>(({ field, onPersistError, onPersistSuccess }) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst env = useEnvironment()\n\tconst desugaredPath = useMemo(() => QueryLanguage.desugarRelativeSingleEntity({ field }, env), [field, env])\n\tconst getEntity = useEntity(useMemo(() => ({\n\t\tfield: desugaredPath.hasOneRelationPath.slice(0, -1),\n\t}), [desugaredPath])).getAccessor\n\n\tconst lastField = desugaredPath.hasOneRelationPath[desugaredPath.hasOneRelationPath.length - 1].field\n\n\tuseEffect(() => {\n\t\tconst unregister = getEntity().addEventListener({ type: 'connectionUpdate', key: lastField }, async accessor => {\n\t\t\tif (!accessor.hasUnpersistedChanges) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait doPersist()\n\t\t})\n\n\t\treturn unregister\n\t}, [getEntity, doPersist, lastField])\n\n\treturn null\n}, ({ field }) => <HasOne field={field} />)\n"],"names":["Component","useDecoratedPersist","useEnvironment","useMemo","QueryLanguage","useEntity","useEffect","jsx","HasOne"],"mappings":";;;;;;;;;;AAmCO,MAAM,wBAAwBA,UAAAA,UAAsC,CAAC,EAAE,OAAO,gBAAgB,uBAAuB;AAC3H,QAAM,YAAYC,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC1E,QAAM,MAAMC,eAAAA,eAAA;AACZ,QAAM,gBAAgBC,MAAAA,QAAQ,MAAMC,QAAAA,cAAc,4BAA4B,EAAE,MAAA,GAAS,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC;AAC3G,QAAM,YAAYC,oBAAUF,MAAAA,QAAQ,OAAO;AAAA,IAC1C,OAAO,cAAc,mBAAmB,MAAM,GAAG,EAAE;AAAA,EAAA,IAChD,CAAC,aAAa,CAAC,CAAC,EAAE;AAEtB,QAAM,YAAY,cAAc,mBAAmB,cAAc,mBAAmB,SAAS,CAAC,EAAE;AAEhGG,QAAAA,UAAU,MAAM;AACf,UAAM,aAAa,YAAY,iBAAiB,EAAE,MAAM,oBAAoB,KAAK,aAAa,OAAM,aAAY;AAC/G,UAAI,CAAC,SAAS,uBAAuB;AACpC;AAAA,MACD;AACA,YAAM,UAAA;AAAA,IACP,CAAC;AAED,WAAO;AAAA,EACR,GAAG,CAAC,WAAW,WAAW,SAAS,CAAC;AAEpC,SAAO;AACR,GAAG,CAAC,EAAE,MAAA,MAAYC,2BAAAA,IAACC,OAAAA,QAAA,EAAO,OAAc,CAAE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistOnHasOneChange.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnHasOneChange.tsx"],"sourcesContent":["import { ErrorPersistResult, QueryLanguage, SuccessfulPersistResult, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEffect, useMemo } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist'\nimport { useEntity, useEnvironment } from '../../accessorPropagation'\nimport { Component, HasOne } from '../../coreComponents'\n\nexport type PersistOnHasOneChangeProps = {\n\t/**\n\t * The relation field that should trigger persist when changed.\n\t */\n\tfield: SugaredRelativeSingleEntity['field']\n\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * Triggers persist when the specified relation field changes.\n * This only works for has-one relation fields, for scalar fields, see {@link PersistOnFieldChange}.\n *\n * ## Props {@link PersistOnHasOneChangeProps}\n * - field, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnHasOneChange field=\"author\" />\n * ```\n */\nexport const PersistOnHasOneChange = Component<PersistOnHasOneChangeProps>(({ field, onPersistError, onPersistSuccess }) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst env = useEnvironment()\n\tconst desugaredPath = useMemo(() => QueryLanguage.desugarRelativeSingleEntity({ field }, env), [field, env])\n\tconst getEntity = useEntity(useMemo(() => ({\n\t\tfield: desugaredPath.hasOneRelationPath.slice(0, -1),\n\t}), [desugaredPath])).getAccessor\n\n\tconst lastField = desugaredPath.hasOneRelationPath[desugaredPath.hasOneRelationPath.length - 1].field\n\n\tuseEffect(() => {\n\t\tconst unregister = getEntity().addEventListener({ type: 'connectionUpdate', key: lastField }, async accessor => {\n\t\t\tif (!accessor.hasUnpersistedChanges) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait doPersist()\n\t\t})\n\n\t\treturn unregister\n\t}, [getEntity, doPersist, lastField])\n\n\treturn null\n}, ({ field }) => <HasOne field={field} />)\n"],"names":[],"mappings":";;;;;;;;AAmCO,MAAM,wBAAwB,UAAsC,CAAC,EAAE,OAAO,gBAAgB,uBAAuB;AAC3H,QAAM,YAAY,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC1E,QAAM,MAAM,eAAA;AACZ,QAAM,gBAAgB,QAAQ,MAAM,cAAc,4BAA4B,EAAE,MAAA,GAAS,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC;AAC3G,QAAM,YAAY,UAAU,QAAQ,OAAO;AAAA,IAC1C,OAAO,cAAc,mBAAmB,MAAM,GAAG,EAAE;AAAA,EAAA,IAChD,CAAC,aAAa,CAAC,CAAC,EAAE;AAEtB,QAAM,YAAY,cAAc,mBAAmB,cAAc,mBAAmB,SAAS,CAAC,EAAE;AAEhG,YAAU,MAAM;AACf,UAAM,aAAa,YAAY,iBAAiB,EAAE,MAAM,oBAAoB,KAAK,aAAa,OAAM,aAAY;AAC/G,UAAI,CAAC,SAAS,uBAAuB;AACpC;AAAA,MACD;AACA,YAAM,UAAA;AAAA,IACP,CAAC;AAED,WAAO;AAAA,EACR,GAAG,CAAC,WAAW,WAAW,SAAS,CAAC;AAEpC,SAAO;AACR,GAAG,CAAC,EAAE,MAAA,MAAY,oBAAC,QAAA,EAAO,OAAc,CAAE;"}
|
|
1
|
+
{"version":3,"file":"PersistOnHasOneChange.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnHasOneChange.tsx"],"sourcesContent":["import { ErrorPersistResult, QueryLanguage, SuccessfulPersistResult, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEffect, useMemo } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\nimport { useEntity, useEnvironment } from '../../accessorPropagation/index.js'\nimport { Component, HasOne } from '../../coreComponents/index.js'\n\nexport type PersistOnHasOneChangeProps = {\n\t/**\n\t * The relation field that should trigger persist when changed.\n\t */\n\tfield: SugaredRelativeSingleEntity['field']\n\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * Triggers persist when the specified relation field changes.\n * This only works for has-one relation fields, for scalar fields, see {@link PersistOnFieldChange}.\n *\n * ## Props {@link PersistOnHasOneChangeProps}\n * - field, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnHasOneChange field=\"author\" />\n * ```\n */\nexport const PersistOnHasOneChange = Component<PersistOnHasOneChangeProps>(({ field, onPersistError, onPersistSuccess }) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\tconst env = useEnvironment()\n\tconst desugaredPath = useMemo(() => QueryLanguage.desugarRelativeSingleEntity({ field }, env), [field, env])\n\tconst getEntity = useEntity(useMemo(() => ({\n\t\tfield: desugaredPath.hasOneRelationPath.slice(0, -1),\n\t}), [desugaredPath])).getAccessor\n\n\tconst lastField = desugaredPath.hasOneRelationPath[desugaredPath.hasOneRelationPath.length - 1].field\n\n\tuseEffect(() => {\n\t\tconst unregister = getEntity().addEventListener({ type: 'connectionUpdate', key: lastField }, async accessor => {\n\t\t\tif (!accessor.hasUnpersistedChanges) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait doPersist()\n\t\t})\n\n\t\treturn unregister\n\t}, [getEntity, doPersist, lastField])\n\n\treturn null\n}, ({ field }) => <HasOne field={field} />)\n"],"names":[],"mappings":";;;;;;;;AAmCO,MAAM,wBAAwB,UAAsC,CAAC,EAAE,OAAO,gBAAgB,uBAAuB;AAC3H,QAAM,YAAY,oBAAoB,EAAE,gBAAgB,kBAAkB;AAC1E,QAAM,MAAM,eAAA;AACZ,QAAM,gBAAgB,QAAQ,MAAM,cAAc,4BAA4B,EAAE,MAAA,GAAS,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC;AAC3G,QAAM,YAAY,UAAU,QAAQ,OAAO;AAAA,IAC1C,OAAO,cAAc,mBAAmB,MAAM,GAAG,EAAE;AAAA,EAAA,IAChD,CAAC,aAAa,CAAC,CAAC,EAAE;AAEtB,QAAM,YAAY,cAAc,mBAAmB,cAAc,mBAAmB,SAAS,CAAC,EAAE;AAEhG,YAAU,MAAM;AACf,UAAM,aAAa,YAAY,iBAAiB,EAAE,MAAM,oBAAoB,KAAK,aAAa,OAAM,aAAY;AAC/G,UAAI,CAAC,SAAS,uBAAuB;AACpC;AAAA,MACD;AACA,YAAM,UAAA;AAAA,IACP,CAAC;AAED,WAAO;AAAA,EACR,GAAG,CAAC,WAAW,WAAW,SAAS,CAAC;AAEpC,SAAO;AACR,GAAG,CAAC,EAAE,MAAA,MAAY,oBAAC,QAAA,EAAO,OAAc,CAAE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistOnKey.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnKey.tsx"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEffect } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist'\n\nexport type PersistOnKeyProps = {\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n\t/**\n\t * Optional function that decides whether a given KeyboardEvent\n\t * should trigger the persist action.\n\t */\n\tisHotkey?: (event: KeyboardEvent) => boolean\n}\n\n/**\n * Triggers persist when the specified hotkey is pressed.\n *\n * ## Props {@link PersistOnKeyProps}\n * - ?isHotkey, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnKey />\n * ```\n */\nexport const PersistOnKey = ({\n\tonPersistSuccess,\n\tonPersistError,\n\tisHotkey,\n}: PersistOnKeyProps) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tuseEffect(() => {\n\t\tconst shouldHandleHotkey = isHotkey ?? defaultHotkeyCheck\n\n\t\tconst listener = (event: KeyboardEvent) => {\n\t\t\tif (shouldHandleHotkey(event)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tdoPersist()\n\t\t\t}\n\t\t}\n\n\t\tdocument.body.addEventListener('keydown', listener)\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('keydown', listener)\n\t\t}\n\t}, [doPersist, isHotkey]) // Re-run effect if these change\n\n\treturn null\n}\n\n// Default hotkey check: ctrl+s or command+s\nconst defaultHotkeyCheck = (event: KeyboardEvent) => {\n\treturn (\n\t\t(event.ctrlKey || event.metaKey)\n\t\t&& event.key.toLowerCase() === 's'\n\t)\n}\n"],"names":["useDecoratedPersist","useEffect"],"mappings":";;;;AA+BO,MAAM,eAAe,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACD,MAAyB;AACxB,QAAM,YAAYA,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE1EC,QAAAA,UAAU,MAAM;AACf,UAAM,qBAAqB,YAAY;AAEvC,UAAM,WAAW,CAAC,UAAyB;AAC1C,UAAI,mBAAmB,KAAK,GAAG;AAC9B,cAAM,eAAA;AACN,kBAAA;AAAA,MACD;AAAA,IACD;AAEA,aAAS,KAAK,iBAAiB,WAAW,QAAQ;AAClD,WAAO,MAAM;AACZ,eAAS,KAAK,oBAAoB,WAAW,QAAQ;AAAA,IACtD;AAAA,EACD,GAAG,CAAC,WAAW,QAAQ,CAAC;AAExB,SAAO;AACR;AAGA,MAAM,qBAAqB,CAAC,UAAyB;AACpD,UACE,MAAM,WAAW,MAAM,YACrB,MAAM,IAAI,kBAAkB;AAEjC;;"}
|
|
1
|
+
{"version":3,"file":"PersistOnKey.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnKey.tsx"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEffect } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\n\nexport type PersistOnKeyProps = {\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n\t/**\n\t * Optional function that decides whether a given KeyboardEvent\n\t * should trigger the persist action.\n\t */\n\tisHotkey?: (event: KeyboardEvent) => boolean\n}\n\n/**\n * Triggers persist when the specified hotkey is pressed.\n *\n * ## Props {@link PersistOnKeyProps}\n * - ?isHotkey, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnKey />\n * ```\n */\nexport const PersistOnKey = ({\n\tonPersistSuccess,\n\tonPersistError,\n\tisHotkey,\n}: PersistOnKeyProps) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tuseEffect(() => {\n\t\tconst shouldHandleHotkey = isHotkey ?? defaultHotkeyCheck\n\n\t\tconst listener = (event: KeyboardEvent) => {\n\t\t\tif (shouldHandleHotkey(event)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tdoPersist()\n\t\t\t}\n\t\t}\n\n\t\tdocument.body.addEventListener('keydown', listener)\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('keydown', listener)\n\t\t}\n\t}, [doPersist, isHotkey]) // Re-run effect if these change\n\n\treturn null\n}\n\n// Default hotkey check: ctrl+s or command+s\nconst defaultHotkeyCheck = (event: KeyboardEvent) => {\n\treturn (\n\t\t(event.ctrlKey || event.metaKey)\n\t\t&& event.key.toLowerCase() === 's'\n\t)\n}\n"],"names":["useDecoratedPersist","useEffect"],"mappings":";;;;AA+BO,MAAM,eAAe,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACD,MAAyB;AACxB,QAAM,YAAYA,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE1EC,QAAAA,UAAU,MAAM;AACf,UAAM,qBAAqB,YAAY;AAEvC,UAAM,WAAW,CAAC,UAAyB;AAC1C,UAAI,mBAAmB,KAAK,GAAG;AAC9B,cAAM,eAAA;AACN,kBAAA;AAAA,MACD;AAAA,IACD;AAEA,aAAS,KAAK,iBAAiB,WAAW,QAAQ;AAClD,WAAO,MAAM;AACZ,eAAS,KAAK,oBAAoB,WAAW,QAAQ;AAAA,IACtD;AAAA,EACD,GAAG,CAAC,WAAW,QAAQ,CAAC;AAExB,SAAO;AACR;AAGA,MAAM,qBAAqB,CAAC,UAAyB;AACpD,UACE,MAAM,WAAW,MAAM,YACrB,MAAM,IAAI,kBAAkB;AAEjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistOnKey.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnKey.tsx"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEffect } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist'\n\nexport type PersistOnKeyProps = {\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n\t/**\n\t * Optional function that decides whether a given KeyboardEvent\n\t * should trigger the persist action.\n\t */\n\tisHotkey?: (event: KeyboardEvent) => boolean\n}\n\n/**\n * Triggers persist when the specified hotkey is pressed.\n *\n * ## Props {@link PersistOnKeyProps}\n * - ?isHotkey, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnKey />\n * ```\n */\nexport const PersistOnKey = ({\n\tonPersistSuccess,\n\tonPersistError,\n\tisHotkey,\n}: PersistOnKeyProps) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tuseEffect(() => {\n\t\tconst shouldHandleHotkey = isHotkey ?? defaultHotkeyCheck\n\n\t\tconst listener = (event: KeyboardEvent) => {\n\t\t\tif (shouldHandleHotkey(event)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tdoPersist()\n\t\t\t}\n\t\t}\n\n\t\tdocument.body.addEventListener('keydown', listener)\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('keydown', listener)\n\t\t}\n\t}, [doPersist, isHotkey]) // Re-run effect if these change\n\n\treturn null\n}\n\n// Default hotkey check: ctrl+s or command+s\nconst defaultHotkeyCheck = (event: KeyboardEvent) => {\n\treturn (\n\t\t(event.ctrlKey || event.metaKey)\n\t\t&& event.key.toLowerCase() === 's'\n\t)\n}\n"],"names":[],"mappings":";;AA+BO,MAAM,eAAe,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACD,MAAyB;AACxB,QAAM,YAAY,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE1E,YAAU,MAAM;AACf,UAAM,qBAAqB,YAAY;AAEvC,UAAM,WAAW,CAAC,UAAyB;AAC1C,UAAI,mBAAmB,KAAK,GAAG;AAC9B,cAAM,eAAA;AACN,kBAAA;AAAA,MACD;AAAA,IACD;AAEA,aAAS,KAAK,iBAAiB,WAAW,QAAQ;AAClD,WAAO,MAAM;AACZ,eAAS,KAAK,oBAAoB,WAAW,QAAQ;AAAA,IACtD;AAAA,EACD,GAAG,CAAC,WAAW,QAAQ,CAAC;AAExB,SAAO;AACR;AAGA,MAAM,qBAAqB,CAAC,UAAyB;AACpD,UACE,MAAM,WAAW,MAAM,YACrB,MAAM,IAAI,kBAAkB;AAEjC;"}
|
|
1
|
+
{"version":3,"file":"PersistOnKey.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistOnKey.tsx"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useEffect } from 'react'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\n\nexport type PersistOnKeyProps = {\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n\t/**\n\t * Optional function that decides whether a given KeyboardEvent\n\t * should trigger the persist action.\n\t */\n\tisHotkey?: (event: KeyboardEvent) => boolean\n}\n\n/**\n * Triggers persist when the specified hotkey is pressed.\n *\n * ## Props {@link PersistOnKeyProps}\n * - ?isHotkey, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistOnKey />\n * ```\n */\nexport const PersistOnKey = ({\n\tonPersistSuccess,\n\tonPersistError,\n\tisHotkey,\n}: PersistOnKeyProps) => {\n\tconst doPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tuseEffect(() => {\n\t\tconst shouldHandleHotkey = isHotkey ?? defaultHotkeyCheck\n\n\t\tconst listener = (event: KeyboardEvent) => {\n\t\t\tif (shouldHandleHotkey(event)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tdoPersist()\n\t\t\t}\n\t\t}\n\n\t\tdocument.body.addEventListener('keydown', listener)\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('keydown', listener)\n\t\t}\n\t}, [doPersist, isHotkey]) // Re-run effect if these change\n\n\treturn null\n}\n\n// Default hotkey check: ctrl+s or command+s\nconst defaultHotkeyCheck = (event: KeyboardEvent) => {\n\treturn (\n\t\t(event.ctrlKey || event.metaKey)\n\t\t&& event.key.toLowerCase() === 's'\n\t)\n}\n"],"names":[],"mappings":";;AA+BO,MAAM,eAAe,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACD,MAAyB;AACxB,QAAM,YAAY,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE1E,YAAU,MAAM;AACf,UAAM,qBAAqB,YAAY;AAEvC,UAAM,WAAW,CAAC,UAAyB;AAC1C,UAAI,mBAAmB,KAAK,GAAG;AAC9B,cAAM,eAAA;AACN,kBAAA;AAAA,MACD;AAAA,IACD;AAEA,aAAS,KAAK,iBAAiB,WAAW,QAAQ;AAClD,WAAO,MAAM;AACZ,eAAS,KAAK,oBAAoB,WAAW,QAAQ;AAAA,IACtD;AAAA,EACD,GAAG,CAAC,WAAW,QAAQ,CAAC;AAExB,SAAO;AACR;AAGA,MAAM,qBAAqB,CAAC,UAAyB;AACpD,UACE,MAAM,WAAW,MAAM,YACrB,MAAM,IAAI,kBAAkB;AAEjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistTrigger.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistTrigger.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\nimport { useDecoratedPersist } from './useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useDirtinessState, useMutationState } from '../../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nexport interface PersistTriggerAttributes {\n\t['data-dirty']?: ''\n\t['data-loading']?: ''\n}\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement> & PersistTriggerAttributes\n>\n\nexport interface PersistTriggerProps {\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that triggers persist when clicked.\n *\n * ## Props {@link PersistTriggerProps}\n * - children, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistTrigger>\n * <button>Save</button>\n * </PersistTrigger>\n * ```\n */\nexport const PersistTrigger = ({ onPersistError, onPersistSuccess, ...props }: PersistTriggerProps) => {\n\tconst isMutating = useMutationState()\n\tconst isDirty = useDirtinessState()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tconst isDisabled = isMutating || !isDirty\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isDisabled}\n\t\t\tdata-dirty={dataAttribute(isDirty)}\n\t\t\tdata-loading={dataAttribute(isMutating)}\n\t\t\tonClick={composeEventHandlers(triggerPersist, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["Slot","useMutationState","useDirtinessState","useDecoratedPersist","jsx","dataAttribute","composeEventHandlers"],"mappings":";;;;;;;;;AAaA,MAAM,WAAWA,UAAAA;
|
|
1
|
+
{"version":3,"file":"PersistTrigger.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistTrigger.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useDirtinessState, useMutationState } from '../../accessorTree/index.js'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nexport interface PersistTriggerAttributes {\n\t['data-dirty']?: ''\n\t['data-loading']?: ''\n}\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement> & PersistTriggerAttributes\n>\n\nexport interface PersistTriggerProps {\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that triggers persist when clicked.\n *\n * ## Props {@link PersistTriggerProps}\n * - children, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistTrigger>\n * <button>Save</button>\n * </PersistTrigger>\n * ```\n */\nexport const PersistTrigger = ({ onPersistError, onPersistSuccess, ...props }: PersistTriggerProps) => {\n\tconst isMutating = useMutationState()\n\tconst isDirty = useDirtinessState()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tconst isDisabled = isMutating || !isDirty\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isDisabled}\n\t\t\tdata-dirty={dataAttribute(isDirty)}\n\t\t\tdata-loading={dataAttribute(isMutating)}\n\t\t\tonClick={composeEventHandlers(triggerPersist, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":["Slot","useMutationState","useDirtinessState","useDecoratedPersist","jsx","dataAttribute","composeEventHandlers"],"mappings":";;;;;;;;;AAaA,MAAM,WAAWA,UAAAA;AAgCV,MAAM,iBAAiB,CAAC,EAAE,gBAAgB,kBAAkB,GAAG,YAAiC;AACtG,QAAM,aAAaC,iBAAAA,iBAAA;AACnB,QAAM,UAAUC,kBAAAA,kBAAA;AAChB,QAAM,iBAAiBC,oBAAAA,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE/E,QAAM,aAAa,cAAc,CAAC;AAElC,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAEnC,SACCC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU;AAAA,MACV,cAAYC,UAAAA,cAAc,OAAO;AAAA,MACjC,gBAAcA,UAAAA,cAAc,UAAU;AAAA,MACtC,SAASC,UAAAA,qBAAqB,gBAAgB,OAAO;AAAA,MACpD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersistTrigger.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistTrigger.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\nimport { useDecoratedPersist } from './useDecoratedPersist'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useDirtinessState, useMutationState } from '../../accessorTree'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nexport interface PersistTriggerAttributes {\n\t['data-dirty']?: ''\n\t['data-loading']?: ''\n}\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement> & PersistTriggerAttributes\n>\n\nexport interface PersistTriggerProps {\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that triggers persist when clicked.\n *\n * ## Props {@link PersistTriggerProps}\n * - children, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistTrigger>\n * <button>Save</button>\n * </PersistTrigger>\n * ```\n */\nexport const PersistTrigger = ({ onPersistError, onPersistSuccess, ...props }: PersistTriggerProps) => {\n\tconst isMutating = useMutationState()\n\tconst isDirty = useDirtinessState()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tconst isDisabled = isMutating || !isDirty\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isDisabled}\n\t\t\tdata-dirty={dataAttribute(isDirty)}\n\t\t\tdata-loading={dataAttribute(isMutating)}\n\t\t\tonClick={composeEventHandlers(triggerPersist, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;AAaA,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"PersistTrigger.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/PersistTrigger.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\nimport { useDecoratedPersist } from './useDecoratedPersist.js'\nimport { ErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useDirtinessState, useMutationState } from '../../accessorTree/index.js'\nimport { composeEventHandlers } from '@radix-ui/primitive'\n\nexport interface PersistTriggerAttributes {\n\t['data-dirty']?: ''\n\t['data-loading']?: ''\n}\n\nconst SlotType = Slot as React.ForwardRefExoticComponent<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement> & PersistTriggerAttributes\n>\n\nexport interface PersistTriggerProps {\n\t/**\n\t * The button element.\n\t */\n\tchildren: ReactElement\n\t/**\n\t * Callback that is called when persist is successful.\n\t */\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\t/**\n\t * Callback that is called when an error occurs during persist.\n\t */\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\n/**\n * A button that triggers persist when clicked.\n *\n * ## Props {@link PersistTriggerProps}\n * - children, ?onPersistError, ?onPersistSuccess\n *\n * ## Example\n * ```tsx\n * <PersistTrigger>\n * <button>Save</button>\n * </PersistTrigger>\n * ```\n */\nexport const PersistTrigger = ({ onPersistError, onPersistSuccess, ...props }: PersistTriggerProps) => {\n\tconst isMutating = useMutationState()\n\tconst isDirty = useDirtinessState()\n\tconst triggerPersist = useDecoratedPersist({ onPersistError, onPersistSuccess })\n\n\tconst isDisabled = isMutating || !isDirty\n\n\tconst { onClick, ...otherProps } = props as React.ButtonHTMLAttributes<HTMLButtonElement>\n\n\treturn (\n\t\t<SlotType\n\t\t\tdisabled={isDisabled}\n\t\t\tdata-dirty={dataAttribute(isDirty)}\n\t\t\tdata-loading={dataAttribute(isMutating)}\n\t\t\tonClick={composeEventHandlers(triggerPersist, onClick)}\n\t\t\t{...otherProps}\n\t\t/>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;AAaA,MAAM,WAAW;AAgCV,MAAM,iBAAiB,CAAC,EAAE,gBAAgB,kBAAkB,GAAG,YAAiC;AACtG,QAAM,aAAa,iBAAA;AACnB,QAAM,UAAU,kBAAA;AAChB,QAAM,iBAAiB,oBAAoB,EAAE,gBAAgB,kBAAkB;AAE/E,QAAM,aAAa,cAAc,CAAC;AAElC,QAAM,EAAE,SAAS,GAAG,WAAA,IAAe;AAEnC,SACC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,UAAU;AAAA,MACV,cAAY,cAAc,OAAO;AAAA,MACjC,gBAAc,cAAc,UAAU;AAAA,MACtC,SAAS,qBAAqB,gBAAgB,OAAO;AAAA,MACpD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDecoratedPersist.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/useDecoratedPersist.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport { usePersist } from '../../accessorPropagation'\nimport { ErrorPersistResult, isErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport interface UseDecoratedPersistOptions {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\nexport const useDecoratedPersist = ({ onPersistSuccess, onPersistError }: UseDecoratedPersistOptions = {}) => {\n\tconst triggerPersist = usePersist()\n\n\treturn useReferentiallyStableCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await triggerPersist()\n\t\t\tonPersistSuccess?.(result)\n\t\t} catch (e) {\n\t\t\tif (isErrorPersistResult(e)) {\n\t\t\t\tonPersistError?.(e)\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t})\n}\n"],"names":["usePersist","useReferentiallyStableCallback","isErrorPersistResult"],"mappings":";;;;;AAUO,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,eAAA,IAA+C,CAAA,MAAO;AAC7G,QAAM,iBAAiBA,WAAAA,WAAA;AAEvB,SAAOC,WAAAA,+BAA+B,YAAY;AACjD,QAAI;AACH,YAAM,SAAS,MAAM,eAAA;AACrB,yBAAmB,MAAM;AAAA,IAC1B,SAAS,GAAG;AACX,UAAIC,QAAAA,qBAAqB,CAAC,GAAG;AAC5B,yBAAiB,CAAC;AAAA,MACnB,OAAO;AACN,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD,CAAC;AACF;;"}
|
|
1
|
+
{"version":3,"file":"useDecoratedPersist.cjs","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/useDecoratedPersist.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport { usePersist } from '../../accessorPropagation/index.js'\nimport { ErrorPersistResult, isErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport interface UseDecoratedPersistOptions {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\nexport const useDecoratedPersist = ({ onPersistSuccess, onPersistError }: UseDecoratedPersistOptions = {}) => {\n\tconst triggerPersist = usePersist()\n\n\treturn useReferentiallyStableCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await triggerPersist()\n\t\t\tonPersistSuccess?.(result)\n\t\t} catch (e) {\n\t\t\tif (isErrorPersistResult(e)) {\n\t\t\t\tonPersistError?.(e)\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t})\n}\n"],"names":["usePersist","useReferentiallyStableCallback","isErrorPersistResult"],"mappings":";;;;;AAUO,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,eAAA,IAA+C,CAAA,MAAO;AAC7G,QAAM,iBAAiBA,WAAAA,WAAA;AAEvB,SAAOC,WAAAA,+BAA+B,YAAY;AACjD,QAAI;AACH,YAAM,SAAS,MAAM,eAAA;AACrB,yBAAmB,MAAM;AAAA,IAC1B,SAAS,GAAG;AACX,UAAIC,QAAAA,qBAAqB,CAAC,GAAG;AAC5B,yBAAiB,CAAC;AAAA,MACnB,OAAO;AACN,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD,CAAC;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDecoratedPersist.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/useDecoratedPersist.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport { usePersist } from '../../accessorPropagation'\nimport { ErrorPersistResult, isErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport interface UseDecoratedPersistOptions {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\nexport const useDecoratedPersist = ({ onPersistSuccess, onPersistError }: UseDecoratedPersistOptions = {}) => {\n\tconst triggerPersist = usePersist()\n\n\treturn useReferentiallyStableCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await triggerPersist()\n\t\t\tonPersistSuccess?.(result)\n\t\t} catch (e) {\n\t\t\tif (isErrorPersistResult(e)) {\n\t\t\t\tonPersistError?.(e)\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t})\n}\n"],"names":[],"mappings":";;;AAUO,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,eAAA,IAA+C,CAAA,MAAO;AAC7G,QAAM,iBAAiB,WAAA;AAEvB,SAAO,+BAA+B,YAAY;AACjD,QAAI;AACH,YAAM,SAAS,MAAM,eAAA;AACrB,yBAAmB,MAAM;AAAA,IAC1B,SAAS,GAAG;AACX,UAAI,qBAAqB,CAAC,GAAG;AAC5B,yBAAiB,CAAC;AAAA,MACnB,OAAO;AACN,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD,CAAC;AACF;"}
|
|
1
|
+
{"version":3,"file":"useDecoratedPersist.js","sources":["../../../../../../packages/react-binding/src/helperComponents/persist/useDecoratedPersist.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport { usePersist } from '../../accessorPropagation/index.js'\nimport { ErrorPersistResult, isErrorPersistResult, SuccessfulPersistResult } from '@contember/binding'\nimport { useReferentiallyStableCallback } from '@contember/react-utils'\n\nexport interface UseDecoratedPersistOptions {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}\n\nexport const useDecoratedPersist = ({ onPersistSuccess, onPersistError }: UseDecoratedPersistOptions = {}) => {\n\tconst triggerPersist = usePersist()\n\n\treturn useReferentiallyStableCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await triggerPersist()\n\t\t\tonPersistSuccess?.(result)\n\t\t} catch (e) {\n\t\t\tif (isErrorPersistResult(e)) {\n\t\t\t\tonPersistError?.(e)\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t})\n}\n"],"names":[],"mappings":";;;AAUO,MAAM,sBAAsB,CAAC,EAAE,kBAAkB,eAAA,IAA+C,CAAA,MAAO;AAC7G,QAAM,iBAAiB,WAAA;AAEvB,SAAO,+BAA+B,YAAY;AACjD,QAAI;AACH,YAAM,SAAS,MAAM,eAAA;AACrB,yBAAmB,MAAM;AAAA,IAC1B,SAAS,GAAG;AACX,UAAI,qBAAqB,CAAC,GAAG;AAC5B,yBAAiB,CAAC;AAAA,MACnB,OAAO;AACN,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD,CAAC;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerStaticAnalyzer.cjs","sources":["../../../../../packages/react-binding/src/markers/MarkerStaticAnalyzer.ts"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react'\nimport { BranchMarkerProvider, EnvironmentDeltaProvider, LeafMarkerProvider, StaticRenderProvider } from './MarkerProvider'\nimport {\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '@contember/binding'\nimport { IncrementalMarkerBuilder } from './IncrementalMarkerBuilder'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerStaticAnalyzer {\n\tpublic processChildren(\n\t\tchildren: ReactNode,\n\t\tenv: Environment,\n\t): EntityFieldsWithHoistablesMarker | EntityFieldMarkersContainer | undefined {\n\t\tconst markers = this.processNode(children, env, [])\n\t\tif (markers.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn IncrementalMarkerBuilder.build(markers)\n\t}\n\n\tprivate processNode(\n\t\tnode: ReactNode,\n\t\tenv: Environment,\n\t\tcomponentPath: ReactElement[],\n\t): Markers[] {\n\t\tif (node === false || node === undefined || node === null || typeof node === 'string' || typeof node === 'number' || typeof node === 'boolean') {\n\t\t\treturn []\n\t\t}\n\t\tif (typeof node === 'function') {\n\t\t\tthrow new ChildrenAnalyzerError(\n\t\t\t\t`Render props (functions as React component children) are not supported within the schema. `\n\t\t\t\t\t+ `You have likely used a bare custom component as opposed to wrapping in with \\`Component\\` `\n\t\t\t\t\t+ `from the \\`@contember/admin\\` package. Please refer to the documentation.`,\n\t\t\t)\n\t\t}\n\n\t\tif (Array.isArray(node)) {\n\t\t\treturn node.flatMap(subNode => this.processNode(subNode, env, componentPath))\n\t\t}\n\n\t\tif (typeof node !== 'object' || !('type' in node)) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst props = node.props as Record<string, any>\n\n\t\tif (typeof node.type === 'symbol' || typeof node.type === 'string') {\n\t\t\t// Fragment, Portal or other non-component\n\t\t\treturn this.processNode(props.children, env, componentPath)\n\t\t}\n\n\t\tconst nodeDisplayName = 'displayName' in node.type ? (node.type.displayName as string) : '???'\n\n\t\tcomponentPath = [...componentPath, node]\n\t\tif (componentPath.length > 1000) {\n\t\t\twrapError(new ChildrenAnalyzerError('Component path too long, likely a circular reference'), nodeDisplayName, '[NONE]', componentPath)\n\t\t}\n\n\t\ttry {\n\t\t\tif ('generateEnvironment' in node.type) {\n\t\t\t\tenv = (node.type as EnvironmentDeltaProvider).generateEnvironment(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static context factory', componentPath)\n\t\t}\n\t\tif ('generateLeafMarker' in node.type) {\n\t\t\treturn [(node.type as LeafMarkerProvider).generateLeafMarker(props, env)]\n\t\t}\n\t\tlet children: ReactNode = props.children\n\t\ttry {\n\t\t\tif ('staticRender' in node.type) {\n\t\t\t\tchildren = (node.type as StaticRenderProvider).staticRender(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static render', componentPath)\n\t\t}\n\t\tconst processedChildren = this.processNode(children, env, componentPath)\n\t\tif ('generateBranchMarker' in node.type) {\n\t\t\tconst marker = IncrementalMarkerBuilder.build(processedChildren)\n\t\t\treturn [(node.type as BranchMarkerProvider).generateBranchMarker(props, marker, env)]\n\t\t}\n\t\treturn processedChildren\n\t}\n}\n\nexport class ChildrenAnalyzerError extends Error {\n\tpublic details?: string\n\n\tconstructor(message: string, options?: { cause: Error; details?: string }) {\n\t\tsuper(message, options)\n\t\tthis.details = options?.details\n\t}\n}\n\nconst wrapError = (e: unknown, currentComponentName: string, methodName: string, path: ReactElement[]): never => {\n\tif (!(e instanceof Error)) {\n\t\tthrow e\n\t}\n\n\tconst componentPath = path.map((it, index) => {\n\t\tconst { children, ...props } = it.props as Record<string, any>\n\t\tconst printProps = (props: any) => {\n\t\t\tlet result = ''\n\t\t\tfor (const [key, value] of Object.entries(props)) {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst valuePrinted = JSON.stringify(value, (key, value) => {\n\t\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\t\treturn '(function)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (React.isValidElement(value)) {\n\t\t\t\t\t\t\treturn '(react element)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn value\n\t\t\t\t\t})\n\t\t\t\t\tresult += ` ${key}=${valuePrinted}`\n\t\t\t\t} catch {\n\t\t\t\t\tresult += ` ${key}=(failed to print a value)`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tconst componentName = typeof it.type === 'object' && 'displayName' in it.type ? (it.type as any).displayName : null\n\t\tconst propsPrinted = printProps(props)\n\t\tconst indent = ' '.repeat(index)\n\t\treturn `${indent}<${componentName ?? '???'}${propsPrinted}>`\n\t})\n\tconst errorMessage = `Error during static render of ${currentComponentName} in ${methodName}:\\n${e.message || 'unknown error'}`\n\n\tthrow new ChildrenAnalyzerError(errorMessage, {\n\t\tcause: e,\n\t\tdetails: `Component path:\\n${componentPath.join('\\n')}`,\n\t})\n}\n"],"names":["IncrementalMarkerBuilder","props","key","value"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"MarkerStaticAnalyzer.cjs","sources":["../../../../../packages/react-binding/src/markers/MarkerStaticAnalyzer.ts"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react'\nimport { BranchMarkerProvider, EnvironmentDeltaProvider, LeafMarkerProvider, StaticRenderProvider } from './MarkerProvider.js'\nimport {\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '@contember/binding'\nimport { IncrementalMarkerBuilder } from './IncrementalMarkerBuilder.js'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerStaticAnalyzer {\n\tpublic processChildren(\n\t\tchildren: ReactNode,\n\t\tenv: Environment,\n\t): EntityFieldsWithHoistablesMarker | EntityFieldMarkersContainer | undefined {\n\t\tconst markers = this.processNode(children, env, [])\n\t\tif (markers.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn IncrementalMarkerBuilder.build(markers)\n\t}\n\n\tprivate processNode(\n\t\tnode: ReactNode,\n\t\tenv: Environment,\n\t\tcomponentPath: ReactElement[],\n\t): Markers[] {\n\t\tif (node === false || node === undefined || node === null || typeof node === 'string' || typeof node === 'number' || typeof node === 'boolean') {\n\t\t\treturn []\n\t\t}\n\t\tif (typeof node === 'function') {\n\t\t\tthrow new ChildrenAnalyzerError(\n\t\t\t\t`Render props (functions as React component children) are not supported within the schema. `\n\t\t\t\t\t+ `You have likely used a bare custom component as opposed to wrapping in with \\`Component\\` `\n\t\t\t\t\t+ `from the \\`@contember/admin\\` package. Please refer to the documentation.`,\n\t\t\t)\n\t\t}\n\n\t\tif (Array.isArray(node)) {\n\t\t\treturn node.flatMap(subNode => this.processNode(subNode, env, componentPath))\n\t\t}\n\n\t\tif (typeof node !== 'object' || !('type' in node)) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst props = node.props as Record<string, any>\n\n\t\tif (typeof node.type === 'symbol' || typeof node.type === 'string') {\n\t\t\t// Fragment, Portal or other non-component\n\t\t\treturn this.processNode(props.children, env, componentPath)\n\t\t}\n\n\t\tconst nodeDisplayName = 'displayName' in node.type ? (node.type.displayName as string) : '???'\n\n\t\tcomponentPath = [...componentPath, node]\n\t\tif (componentPath.length > 1000) {\n\t\t\twrapError(new ChildrenAnalyzerError('Component path too long, likely a circular reference'), nodeDisplayName, '[NONE]', componentPath)\n\t\t}\n\n\t\ttry {\n\t\t\tif ('generateEnvironment' in node.type) {\n\t\t\t\tenv = (node.type as EnvironmentDeltaProvider).generateEnvironment(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static context factory', componentPath)\n\t\t}\n\t\tif ('generateLeafMarker' in node.type) {\n\t\t\treturn [(node.type as LeafMarkerProvider).generateLeafMarker(props, env)]\n\t\t}\n\t\tlet children: ReactNode = props.children\n\t\ttry {\n\t\t\tif ('staticRender' in node.type) {\n\t\t\t\tchildren = (node.type as StaticRenderProvider).staticRender(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static render', componentPath)\n\t\t}\n\t\tconst processedChildren = this.processNode(children, env, componentPath)\n\t\tif ('generateBranchMarker' in node.type) {\n\t\t\tconst marker = IncrementalMarkerBuilder.build(processedChildren)\n\t\t\treturn [(node.type as BranchMarkerProvider).generateBranchMarker(props, marker, env)]\n\t\t}\n\t\treturn processedChildren\n\t}\n}\n\nexport class ChildrenAnalyzerError extends Error {\n\tpublic details?: string\n\n\tconstructor(message: string, options?: { cause: Error; details?: string }) {\n\t\tsuper(message, options)\n\t\tthis.details = options?.details\n\t}\n}\n\nconst wrapError = (e: unknown, currentComponentName: string, methodName: string, path: ReactElement[]): never => {\n\tif (!(e instanceof Error)) {\n\t\tthrow e\n\t}\n\n\tconst componentPath = path.map((it, index) => {\n\t\tconst { children, ...props } = it.props as Record<string, any>\n\t\tconst printProps = (props: any) => {\n\t\t\tlet result = ''\n\t\t\tfor (const [key, value] of Object.entries(props)) {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst valuePrinted = JSON.stringify(value, (key, value) => {\n\t\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\t\treturn '(function)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (React.isValidElement(value)) {\n\t\t\t\t\t\t\treturn '(react element)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn value\n\t\t\t\t\t})\n\t\t\t\t\tresult += ` ${key}=${valuePrinted}`\n\t\t\t\t} catch {\n\t\t\t\t\tresult += ` ${key}=(failed to print a value)`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tconst componentName = typeof it.type === 'object' && 'displayName' in it.type ? (it.type as any).displayName : null\n\t\tconst propsPrinted = printProps(props)\n\t\tconst indent = ' '.repeat(index)\n\t\treturn `${indent}<${componentName ?? '???'}${propsPrinted}>`\n\t})\n\tconst errorMessage = `Error during static render of ${currentComponentName} in ${methodName}:\\n${e.message || 'unknown error'}`\n\n\tthrow new ChildrenAnalyzerError(errorMessage, {\n\t\tcause: e,\n\t\tdetails: `Component path:\\n${componentPath.join('\\n')}`,\n\t})\n}\n"],"names":["IncrementalMarkerBuilder","props","key","value"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerStaticAnalyzer.js","sources":["../../../../../packages/react-binding/src/markers/MarkerStaticAnalyzer.ts"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react'\nimport { BranchMarkerProvider, EnvironmentDeltaProvider, LeafMarkerProvider, StaticRenderProvider } from './MarkerProvider'\nimport {\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '@contember/binding'\nimport { IncrementalMarkerBuilder } from './IncrementalMarkerBuilder'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerStaticAnalyzer {\n\tpublic processChildren(\n\t\tchildren: ReactNode,\n\t\tenv: Environment,\n\t): EntityFieldsWithHoistablesMarker | EntityFieldMarkersContainer | undefined {\n\t\tconst markers = this.processNode(children, env, [])\n\t\tif (markers.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn IncrementalMarkerBuilder.build(markers)\n\t}\n\n\tprivate processNode(\n\t\tnode: ReactNode,\n\t\tenv: Environment,\n\t\tcomponentPath: ReactElement[],\n\t): Markers[] {\n\t\tif (node === false || node === undefined || node === null || typeof node === 'string' || typeof node === 'number' || typeof node === 'boolean') {\n\t\t\treturn []\n\t\t}\n\t\tif (typeof node === 'function') {\n\t\t\tthrow new ChildrenAnalyzerError(\n\t\t\t\t`Render props (functions as React component children) are not supported within the schema. `\n\t\t\t\t\t+ `You have likely used a bare custom component as opposed to wrapping in with \\`Component\\` `\n\t\t\t\t\t+ `from the \\`@contember/admin\\` package. Please refer to the documentation.`,\n\t\t\t)\n\t\t}\n\n\t\tif (Array.isArray(node)) {\n\t\t\treturn node.flatMap(subNode => this.processNode(subNode, env, componentPath))\n\t\t}\n\n\t\tif (typeof node !== 'object' || !('type' in node)) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst props = node.props as Record<string, any>\n\n\t\tif (typeof node.type === 'symbol' || typeof node.type === 'string') {\n\t\t\t// Fragment, Portal or other non-component\n\t\t\treturn this.processNode(props.children, env, componentPath)\n\t\t}\n\n\t\tconst nodeDisplayName = 'displayName' in node.type ? (node.type.displayName as string) : '???'\n\n\t\tcomponentPath = [...componentPath, node]\n\t\tif (componentPath.length > 1000) {\n\t\t\twrapError(new ChildrenAnalyzerError('Component path too long, likely a circular reference'), nodeDisplayName, '[NONE]', componentPath)\n\t\t}\n\n\t\ttry {\n\t\t\tif ('generateEnvironment' in node.type) {\n\t\t\t\tenv = (node.type as EnvironmentDeltaProvider).generateEnvironment(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static context factory', componentPath)\n\t\t}\n\t\tif ('generateLeafMarker' in node.type) {\n\t\t\treturn [(node.type as LeafMarkerProvider).generateLeafMarker(props, env)]\n\t\t}\n\t\tlet children: ReactNode = props.children\n\t\ttry {\n\t\t\tif ('staticRender' in node.type) {\n\t\t\t\tchildren = (node.type as StaticRenderProvider).staticRender(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static render', componentPath)\n\t\t}\n\t\tconst processedChildren = this.processNode(children, env, componentPath)\n\t\tif ('generateBranchMarker' in node.type) {\n\t\t\tconst marker = IncrementalMarkerBuilder.build(processedChildren)\n\t\t\treturn [(node.type as BranchMarkerProvider).generateBranchMarker(props, marker, env)]\n\t\t}\n\t\treturn processedChildren\n\t}\n}\n\nexport class ChildrenAnalyzerError extends Error {\n\tpublic details?: string\n\n\tconstructor(message: string, options?: { cause: Error; details?: string }) {\n\t\tsuper(message, options)\n\t\tthis.details = options?.details\n\t}\n}\n\nconst wrapError = (e: unknown, currentComponentName: string, methodName: string, path: ReactElement[]): never => {\n\tif (!(e instanceof Error)) {\n\t\tthrow e\n\t}\n\n\tconst componentPath = path.map((it, index) => {\n\t\tconst { children, ...props } = it.props as Record<string, any>\n\t\tconst printProps = (props: any) => {\n\t\t\tlet result = ''\n\t\t\tfor (const [key, value] of Object.entries(props)) {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst valuePrinted = JSON.stringify(value, (key, value) => {\n\t\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\t\treturn '(function)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (React.isValidElement(value)) {\n\t\t\t\t\t\t\treturn '(react element)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn value\n\t\t\t\t\t})\n\t\t\t\t\tresult += ` ${key}=${valuePrinted}`\n\t\t\t\t} catch {\n\t\t\t\t\tresult += ` ${key}=(failed to print a value)`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tconst componentName = typeof it.type === 'object' && 'displayName' in it.type ? (it.type as any).displayName : null\n\t\tconst propsPrinted = printProps(props)\n\t\tconst indent = ' '.repeat(index)\n\t\treturn `${indent}<${componentName ?? '???'}${propsPrinted}>`\n\t})\n\tconst errorMessage = `Error during static render of ${currentComponentName} in ${methodName}:\\n${e.message || 'unknown error'}`\n\n\tthrow new ChildrenAnalyzerError(errorMessage, {\n\t\tcause: e,\n\t\tdetails: `Component path:\\n${componentPath.join('\\n')}`,\n\t})\n}\n"],"names":["props","key","value","React"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"MarkerStaticAnalyzer.js","sources":["../../../../../packages/react-binding/src/markers/MarkerStaticAnalyzer.ts"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react'\nimport { BranchMarkerProvider, EnvironmentDeltaProvider, LeafMarkerProvider, StaticRenderProvider } from './MarkerProvider.js'\nimport {\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '@contember/binding'\nimport { IncrementalMarkerBuilder } from './IncrementalMarkerBuilder.js'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerStaticAnalyzer {\n\tpublic processChildren(\n\t\tchildren: ReactNode,\n\t\tenv: Environment,\n\t): EntityFieldsWithHoistablesMarker | EntityFieldMarkersContainer | undefined {\n\t\tconst markers = this.processNode(children, env, [])\n\t\tif (markers.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn IncrementalMarkerBuilder.build(markers)\n\t}\n\n\tprivate processNode(\n\t\tnode: ReactNode,\n\t\tenv: Environment,\n\t\tcomponentPath: ReactElement[],\n\t): Markers[] {\n\t\tif (node === false || node === undefined || node === null || typeof node === 'string' || typeof node === 'number' || typeof node === 'boolean') {\n\t\t\treturn []\n\t\t}\n\t\tif (typeof node === 'function') {\n\t\t\tthrow new ChildrenAnalyzerError(\n\t\t\t\t`Render props (functions as React component children) are not supported within the schema. `\n\t\t\t\t\t+ `You have likely used a bare custom component as opposed to wrapping in with \\`Component\\` `\n\t\t\t\t\t+ `from the \\`@contember/admin\\` package. Please refer to the documentation.`,\n\t\t\t)\n\t\t}\n\n\t\tif (Array.isArray(node)) {\n\t\t\treturn node.flatMap(subNode => this.processNode(subNode, env, componentPath))\n\t\t}\n\n\t\tif (typeof node !== 'object' || !('type' in node)) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst props = node.props as Record<string, any>\n\n\t\tif (typeof node.type === 'symbol' || typeof node.type === 'string') {\n\t\t\t// Fragment, Portal or other non-component\n\t\t\treturn this.processNode(props.children, env, componentPath)\n\t\t}\n\n\t\tconst nodeDisplayName = 'displayName' in node.type ? (node.type.displayName as string) : '???'\n\n\t\tcomponentPath = [...componentPath, node]\n\t\tif (componentPath.length > 1000) {\n\t\t\twrapError(new ChildrenAnalyzerError('Component path too long, likely a circular reference'), nodeDisplayName, '[NONE]', componentPath)\n\t\t}\n\n\t\ttry {\n\t\t\tif ('generateEnvironment' in node.type) {\n\t\t\t\tenv = (node.type as EnvironmentDeltaProvider).generateEnvironment(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static context factory', componentPath)\n\t\t}\n\t\tif ('generateLeafMarker' in node.type) {\n\t\t\treturn [(node.type as LeafMarkerProvider).generateLeafMarker(props, env)]\n\t\t}\n\t\tlet children: ReactNode = props.children\n\t\ttry {\n\t\t\tif ('staticRender' in node.type) {\n\t\t\t\tchildren = (node.type as StaticRenderProvider).staticRender(props, env)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twrapError(e, nodeDisplayName, 'static render', componentPath)\n\t\t}\n\t\tconst processedChildren = this.processNode(children, env, componentPath)\n\t\tif ('generateBranchMarker' in node.type) {\n\t\t\tconst marker = IncrementalMarkerBuilder.build(processedChildren)\n\t\t\treturn [(node.type as BranchMarkerProvider).generateBranchMarker(props, marker, env)]\n\t\t}\n\t\treturn processedChildren\n\t}\n}\n\nexport class ChildrenAnalyzerError extends Error {\n\tpublic details?: string\n\n\tconstructor(message: string, options?: { cause: Error; details?: string }) {\n\t\tsuper(message, options)\n\t\tthis.details = options?.details\n\t}\n}\n\nconst wrapError = (e: unknown, currentComponentName: string, methodName: string, path: ReactElement[]): never => {\n\tif (!(e instanceof Error)) {\n\t\tthrow e\n\t}\n\n\tconst componentPath = path.map((it, index) => {\n\t\tconst { children, ...props } = it.props as Record<string, any>\n\t\tconst printProps = (props: any) => {\n\t\t\tlet result = ''\n\t\t\tfor (const [key, value] of Object.entries(props)) {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst valuePrinted = JSON.stringify(value, (key, value) => {\n\t\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\t\treturn '(function)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (React.isValidElement(value)) {\n\t\t\t\t\t\t\treturn '(react element)'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn value\n\t\t\t\t\t})\n\t\t\t\t\tresult += ` ${key}=${valuePrinted}`\n\t\t\t\t} catch {\n\t\t\t\t\tresult += ` ${key}=(failed to print a value)`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tconst componentName = typeof it.type === 'object' && 'displayName' in it.type ? (it.type as any).displayName : null\n\t\tconst propsPrinted = printProps(props)\n\t\tconst indent = ' '.repeat(index)\n\t\treturn `${indent}<${componentName ?? '???'}${propsPrinted}>`\n\t})\n\tconst errorMessage = `Error during static render of ${currentComponentName} in ${methodName}:\\n${e.message || 'unknown error'}`\n\n\tthrow new ChildrenAnalyzerError(errorMessage, {\n\t\tcause: e,\n\t\tdetails: `Component path:\\n${componentPath.join('\\n')}`,\n\t})\n}\n"],"names":["props","key","value","React"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerTreeGenerator.cjs","sources":["../../../../../packages/react-binding/src/markers/MarkerTreeGenerator.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { Alias } from '@contember/binding'\nimport {\n\tBindingError,\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n\tMarkerTreeRoot,\n} from '@contember/binding'\nimport { MarkerStaticAnalyzer } from './MarkerStaticAnalyzer'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerTreeGenerator {\n\tpublic constructor(private sourceTree: ReactNode, private environment: Environment = Environment.create()) {}\n\n\tpublic generate(): MarkerTreeRoot {\n\t\tconst analyzer = new MarkerStaticAnalyzer()\n\t\tconst collectedMarkers = analyzer.processChildren(this.sourceTree, this.environment)\n\t\tif (collectedMarkers === undefined) {\n\t\t\treturn new MarkerTreeRoot(new Map(), new Map())\n\t\t}\n\n\t\tif (collectedMarkers instanceof EntityFieldMarkersContainer) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.fields.markers.size) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.parentReference !== undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.subTrees === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\n\t\tconst subTrees = collectedMarkers.subTrees\n\n\t\treturn new MarkerTreeRoot(subTrees, this.generatePlaceholdersByAliases(subTrees))\n\t}\n\n\tprivate generatePlaceholdersByAliases(\n\t\thoistedSubTrees: ReadonlyMap<string, EntitySubTreeMarker | EntityListSubTreeMarker>,\n\t): Map<Alias, string> {\n\t\tconst placeholders = new Map<Alias, string>()\n\n\t\tfor (const [placeholderName, subTree] of hoistedSubTrees) {\n\t\t\tconst aliases = subTree.parameters.alias\n\t\t\tif (aliases === undefined || aliases.size === 0) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const alias of aliases) {\n\t\t\t\tconst existingPlaceholder = placeholders.get(alias)\n\t\t\t\tif (existingPlaceholder !== undefined) {\n\t\t\t\t\tif (existingPlaceholder === placeholderName) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`Detected the same sub-tree alias '${alias}' referring to sub-trees with different parameters!`,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tplaceholders.set(alias, placeholderName)\n\t\t\t}\n\t\t}\n\n\t\treturn placeholders\n\t}\n}\n"],"names":["Environment","MarkerStaticAnalyzer","MarkerTreeRoot","EntityFieldMarkersContainer","BindingError"],"mappings":";;;;AAkBO,MAAM,oBAAoB;AAAA,EACzB,YAAoB,YAA+B,cAA2BA,QAAAA,YAAY,UAAU;AAAhF,SAAA,aAAA;AAA+B,SAAA,cAAA;AAAA,EAAkD;AAAA,EAErG,WAA2B;AACjC,UAAM,WAAW,IAAIC,0CAAA;AACrB,UAAM,mBAAmB,SAAS,gBAAgB,KAAK,YAAY,KAAK,WAAW;AACnF,QAAI,qBAAqB,QAAW;AACnC,aAAO,IAAIC,QAAAA,eAAe,oBAAI,OAAO,oBAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,4BAA4BC,QAAAA,6BAA6B;AAC5D,YAAM,IAAIC,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,OAAO,QAAQ,MAAM;AACzC,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,oBAAoB,QAAW;AACnD,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,aAAa,QAAW;AAC5C,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AAEA,UAAM,WAAW,iBAAiB;AAElC,WAAO,IAAIF,QAAAA,eAAe,UAAU,KAAK,8BAA8B,QAAQ,CAAC;AAAA,EACjF;AAAA,EAEQ,8BACP,iBACqB;AACrB,UAAM,mCAAmB,IAAA;AAEzB,eAAW,CAAC,iBAAiB,OAAO,KAAK,iBAAiB;AACzD,YAAM,UAAU,QAAQ,WAAW;AACnC,UAAI,YAAY,UAAa,QAAQ,SAAS,GAAG;AAChD;AAAA,MACD;AACA,iBAAW,SAAS,SAAS;AAC5B,cAAM,sBAAsB,aAAa,IAAI,KAAK;AAClD,YAAI,wBAAwB,QAAW;AACtC,cAAI,wBAAwB,iBAAiB;AAC5C;AAAA,UACD;AACA,gBAAM,IAAIE,QAAAA;AAAAA,YACT,qCAAqC,KAAK;AAAA,UAAA;AAAA,QAE5C;AACA,qBAAa,IAAI,OAAO,eAAe;AAAA,MACxC;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;"}
|
|
1
|
+
{"version":3,"file":"MarkerTreeGenerator.cjs","sources":["../../../../../packages/react-binding/src/markers/MarkerTreeGenerator.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { Alias } from '@contember/binding'\nimport {\n\tBindingError,\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n\tMarkerTreeRoot,\n} from '@contember/binding'\nimport { MarkerStaticAnalyzer } from './MarkerStaticAnalyzer.js'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerTreeGenerator {\n\tpublic constructor(private sourceTree: ReactNode, private environment: Environment = Environment.create()) {}\n\n\tpublic generate(): MarkerTreeRoot {\n\t\tconst analyzer = new MarkerStaticAnalyzer()\n\t\tconst collectedMarkers = analyzer.processChildren(this.sourceTree, this.environment)\n\t\tif (collectedMarkers === undefined) {\n\t\t\treturn new MarkerTreeRoot(new Map(), new Map())\n\t\t}\n\n\t\tif (collectedMarkers instanceof EntityFieldMarkersContainer) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.fields.markers.size) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.parentReference !== undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.subTrees === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\n\t\tconst subTrees = collectedMarkers.subTrees\n\n\t\treturn new MarkerTreeRoot(subTrees, this.generatePlaceholdersByAliases(subTrees))\n\t}\n\n\tprivate generatePlaceholdersByAliases(\n\t\thoistedSubTrees: ReadonlyMap<string, EntitySubTreeMarker | EntityListSubTreeMarker>,\n\t): Map<Alias, string> {\n\t\tconst placeholders = new Map<Alias, string>()\n\n\t\tfor (const [placeholderName, subTree] of hoistedSubTrees) {\n\t\t\tconst aliases = subTree.parameters.alias\n\t\t\tif (aliases === undefined || aliases.size === 0) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const alias of aliases) {\n\t\t\t\tconst existingPlaceholder = placeholders.get(alias)\n\t\t\t\tif (existingPlaceholder !== undefined) {\n\t\t\t\t\tif (existingPlaceholder === placeholderName) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`Detected the same sub-tree alias '${alias}' referring to sub-trees with different parameters!`,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tplaceholders.set(alias, placeholderName)\n\t\t\t}\n\t\t}\n\n\t\treturn placeholders\n\t}\n}\n"],"names":["Environment","MarkerStaticAnalyzer","MarkerTreeRoot","EntityFieldMarkersContainer","BindingError"],"mappings":";;;;AAkBO,MAAM,oBAAoB;AAAA,EACzB,YAAoB,YAA+B,cAA2BA,QAAAA,YAAY,UAAU;AAAhF,SAAA,aAAA;AAA+B,SAAA,cAAA;AAAA,EAAkD;AAAA,EAErG,WAA2B;AACjC,UAAM,WAAW,IAAIC,0CAAA;AACrB,UAAM,mBAAmB,SAAS,gBAAgB,KAAK,YAAY,KAAK,WAAW;AACnF,QAAI,qBAAqB,QAAW;AACnC,aAAO,IAAIC,QAAAA,eAAe,oBAAI,OAAO,oBAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,4BAA4BC,QAAAA,6BAA6B;AAC5D,YAAM,IAAIC,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,OAAO,QAAQ,MAAM;AACzC,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,oBAAoB,QAAW;AACnD,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,aAAa,QAAW;AAC5C,YAAM,IAAIA,QAAAA,aAAA;AAAA,IACX;AAEA,UAAM,WAAW,iBAAiB;AAElC,WAAO,IAAIF,QAAAA,eAAe,UAAU,KAAK,8BAA8B,QAAQ,CAAC;AAAA,EACjF;AAAA,EAEQ,8BACP,iBACqB;AACrB,UAAM,mCAAmB,IAAA;AAEzB,eAAW,CAAC,iBAAiB,OAAO,KAAK,iBAAiB;AACzD,YAAM,UAAU,QAAQ,WAAW;AACnC,UAAI,YAAY,UAAa,QAAQ,SAAS,GAAG;AAChD;AAAA,MACD;AACA,iBAAW,SAAS,SAAS;AAC5B,cAAM,sBAAsB,aAAa,IAAI,KAAK;AAClD,YAAI,wBAAwB,QAAW;AACtC,cAAI,wBAAwB,iBAAiB;AAC5C;AAAA,UACD;AACA,gBAAM,IAAIE,QAAAA;AAAAA,YACT,qCAAqC,KAAK;AAAA,UAAA;AAAA,QAE5C;AACA,qBAAa,IAAI,OAAO,eAAe;AAAA,MACxC;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerTreeGenerator.js","sources":["../../../../../packages/react-binding/src/markers/MarkerTreeGenerator.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { Alias } from '@contember/binding'\nimport {\n\tBindingError,\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n\tMarkerTreeRoot,\n} from '@contember/binding'\nimport { MarkerStaticAnalyzer } from './MarkerStaticAnalyzer'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerTreeGenerator {\n\tpublic constructor(private sourceTree: ReactNode, private environment: Environment = Environment.create()) {}\n\n\tpublic generate(): MarkerTreeRoot {\n\t\tconst analyzer = new MarkerStaticAnalyzer()\n\t\tconst collectedMarkers = analyzer.processChildren(this.sourceTree, this.environment)\n\t\tif (collectedMarkers === undefined) {\n\t\t\treturn new MarkerTreeRoot(new Map(), new Map())\n\t\t}\n\n\t\tif (collectedMarkers instanceof EntityFieldMarkersContainer) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.fields.markers.size) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.parentReference !== undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.subTrees === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\n\t\tconst subTrees = collectedMarkers.subTrees\n\n\t\treturn new MarkerTreeRoot(subTrees, this.generatePlaceholdersByAliases(subTrees))\n\t}\n\n\tprivate generatePlaceholdersByAliases(\n\t\thoistedSubTrees: ReadonlyMap<string, EntitySubTreeMarker | EntityListSubTreeMarker>,\n\t): Map<Alias, string> {\n\t\tconst placeholders = new Map<Alias, string>()\n\n\t\tfor (const [placeholderName, subTree] of hoistedSubTrees) {\n\t\t\tconst aliases = subTree.parameters.alias\n\t\t\tif (aliases === undefined || aliases.size === 0) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const alias of aliases) {\n\t\t\t\tconst existingPlaceholder = placeholders.get(alias)\n\t\t\t\tif (existingPlaceholder !== undefined) {\n\t\t\t\t\tif (existingPlaceholder === placeholderName) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`Detected the same sub-tree alias '${alias}' referring to sub-trees with different parameters!`,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tplaceholders.set(alias, placeholderName)\n\t\t\t}\n\t\t}\n\n\t\treturn placeholders\n\t}\n}\n"],"names":[],"mappings":";;AAkBO,MAAM,oBAAoB;AAAA,EACzB,YAAoB,YAA+B,cAA2B,YAAY,UAAU;AAAhF,SAAA,aAAA;AAA+B,SAAA,cAAA;AAAA,EAAkD;AAAA,EAErG,WAA2B;AACjC,UAAM,WAAW,IAAI,qBAAA;AACrB,UAAM,mBAAmB,SAAS,gBAAgB,KAAK,YAAY,KAAK,WAAW;AACnF,QAAI,qBAAqB,QAAW;AACnC,aAAO,IAAI,eAAe,oBAAI,OAAO,oBAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,4BAA4B,6BAA6B;AAC5D,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,OAAO,QAAQ,MAAM;AACzC,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,oBAAoB,QAAW;AACnD,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,aAAa,QAAW;AAC5C,YAAM,IAAI,aAAA;AAAA,IACX;AAEA,UAAM,WAAW,iBAAiB;AAElC,WAAO,IAAI,eAAe,UAAU,KAAK,8BAA8B,QAAQ,CAAC;AAAA,EACjF;AAAA,EAEQ,8BACP,iBACqB;AACrB,UAAM,mCAAmB,IAAA;AAEzB,eAAW,CAAC,iBAAiB,OAAO,KAAK,iBAAiB;AACzD,YAAM,UAAU,QAAQ,WAAW;AACnC,UAAI,YAAY,UAAa,QAAQ,SAAS,GAAG;AAChD;AAAA,MACD;AACA,iBAAW,SAAS,SAAS;AAC5B,cAAM,sBAAsB,aAAa,IAAI,KAAK;AAClD,YAAI,wBAAwB,QAAW;AACtC,cAAI,wBAAwB,iBAAiB;AAC5C;AAAA,UACD;AACA,gBAAM,IAAI;AAAA,YACT,qCAAqC,KAAK;AAAA,UAAA;AAAA,QAE5C;AACA,qBAAa,IAAI,OAAO,eAAe;AAAA,MACxC;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;"}
|
|
1
|
+
{"version":3,"file":"MarkerTreeGenerator.js","sources":["../../../../../packages/react-binding/src/markers/MarkerTreeGenerator.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { Alias } from '@contember/binding'\nimport {\n\tBindingError,\n\tEntityFieldMarkersContainer,\n\tEntityFieldsWithHoistablesMarker,\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tEnvironment,\n\tFieldMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n\tMarkerTreeRoot,\n} from '@contember/binding'\nimport { MarkerStaticAnalyzer } from './MarkerStaticAnalyzer.js'\n\ntype Markers = FieldMarker | HasOneRelationMarker | EntityFieldMarkersContainer | EntityFieldsWithHoistablesMarker | HasManyRelationMarker\n\nexport class MarkerTreeGenerator {\n\tpublic constructor(private sourceTree: ReactNode, private environment: Environment = Environment.create()) {}\n\n\tpublic generate(): MarkerTreeRoot {\n\t\tconst analyzer = new MarkerStaticAnalyzer()\n\t\tconst collectedMarkers = analyzer.processChildren(this.sourceTree, this.environment)\n\t\tif (collectedMarkers === undefined) {\n\t\t\treturn new MarkerTreeRoot(new Map(), new Map())\n\t\t}\n\n\t\tif (collectedMarkers instanceof EntityFieldMarkersContainer) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.fields.markers.size) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.parentReference !== undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tif (collectedMarkers.subTrees === undefined) {\n\t\t\tthrow new BindingError()\n\t\t}\n\n\t\tconst subTrees = collectedMarkers.subTrees\n\n\t\treturn new MarkerTreeRoot(subTrees, this.generatePlaceholdersByAliases(subTrees))\n\t}\n\n\tprivate generatePlaceholdersByAliases(\n\t\thoistedSubTrees: ReadonlyMap<string, EntitySubTreeMarker | EntityListSubTreeMarker>,\n\t): Map<Alias, string> {\n\t\tconst placeholders = new Map<Alias, string>()\n\n\t\tfor (const [placeholderName, subTree] of hoistedSubTrees) {\n\t\t\tconst aliases = subTree.parameters.alias\n\t\t\tif (aliases === undefined || aliases.size === 0) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const alias of aliases) {\n\t\t\t\tconst existingPlaceholder = placeholders.get(alias)\n\t\t\t\tif (existingPlaceholder !== undefined) {\n\t\t\t\t\tif (existingPlaceholder === placeholderName) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tthrow new BindingError(\n\t\t\t\t\t\t`Detected the same sub-tree alias '${alias}' referring to sub-trees with different parameters!`,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tplaceholders.set(alias, placeholderName)\n\t\t\t}\n\t\t}\n\n\t\treturn placeholders\n\t}\n}\n"],"names":[],"mappings":";;AAkBO,MAAM,oBAAoB;AAAA,EACzB,YAAoB,YAA+B,cAA2B,YAAY,UAAU;AAAhF,SAAA,aAAA;AAA+B,SAAA,cAAA;AAAA,EAAkD;AAAA,EAErG,WAA2B;AACjC,UAAM,WAAW,IAAI,qBAAA;AACrB,UAAM,mBAAmB,SAAS,gBAAgB,KAAK,YAAY,KAAK,WAAW;AACnF,QAAI,qBAAqB,QAAW;AACnC,aAAO,IAAI,eAAe,oBAAI,OAAO,oBAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,4BAA4B,6BAA6B;AAC5D,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,OAAO,QAAQ,MAAM;AACzC,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,oBAAoB,QAAW;AACnD,YAAM,IAAI,aAAA;AAAA,IACX;AACA,QAAI,iBAAiB,aAAa,QAAW;AAC5C,YAAM,IAAI,aAAA;AAAA,IACX;AAEA,UAAM,WAAW,iBAAiB;AAElC,WAAO,IAAI,eAAe,UAAU,KAAK,8BAA8B,QAAQ,CAAC;AAAA,EACjF;AAAA,EAEQ,8BACP,iBACqB;AACrB,UAAM,mCAAmB,IAAA;AAEzB,eAAW,CAAC,iBAAiB,OAAO,KAAK,iBAAiB;AACzD,YAAM,UAAU,QAAQ,WAAW;AACnC,UAAI,YAAY,UAAa,QAAQ,SAAS,GAAG;AAChD;AAAA,MACD;AACA,iBAAW,SAAS,SAAS;AAC5B,cAAM,sBAAsB,aAAa,IAAI,KAAK;AAClD,YAAI,wBAAwB,QAAW;AACtC,cAAI,wBAAwB,iBAAiB;AAC5C;AAAA,UACD;AACA,gBAAM,IAAI;AAAA,YACT,qCAAqC,KAAK;AAAA,UAAA;AAAA,QAE5C;AACA,qBAAa,IAAI,OAAO,eAAe;AAAA,MACxC;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export * from './AccessorProvider';
|
|
2
|
-
export * from './BindingOperationsProvider';
|
|
3
|
-
export * from './EntityKeyProvider';
|
|
4
|
-
export * from './EnvironmentContext';
|
|
5
|
-
export * from './TreeRootIdProvider';
|
|
6
|
-
export * from './useAccessorUpdateSubscription';
|
|
7
|
-
export * from './useBindingOperations';
|
|
8
|
-
export * from './useDesugaredRelativeEntityList';
|
|
9
|
-
export * from './useDesugaredRelativeSingleEntity';
|
|
10
|
-
export * from './useDesugaredRelativeSingleField';
|
|
11
|
-
export * from './useEntity';
|
|
12
|
-
export * from './useEntityKey';
|
|
13
|
-
export * from './useHasEntity';
|
|
14
|
-
export * from './useEntityList';
|
|
15
|
-
export * from './useEntityListSubTree';
|
|
16
|
-
export * from './useEntityListSubTreeParameters';
|
|
17
|
-
export * from './useEntityListSubTreeLoader';
|
|
18
|
-
export * from './useEntitySubTree';
|
|
19
|
-
export * from './useEntitySubTreeLoader';
|
|
20
|
-
export * from './useEntitySubTreeParameters';
|
|
21
|
-
export * from './useEnvironment';
|
|
22
|
-
export * from './useExtendTree';
|
|
23
|
-
export * from './useField';
|
|
24
|
-
export * from './useGetEntityByKey';
|
|
25
|
-
export * from './useGetEntityListSubTree';
|
|
26
|
-
export * from './useGetEntitySubTree';
|
|
27
|
-
export * from './usePersist';
|
|
28
|
-
export * from './useTreeRootId';
|
|
1
|
+
export * from './AccessorProvider.js';
|
|
2
|
+
export * from './BindingOperationsProvider.js';
|
|
3
|
+
export * from './EntityKeyProvider.js';
|
|
4
|
+
export * from './EnvironmentContext.js';
|
|
5
|
+
export * from './TreeRootIdProvider.js';
|
|
6
|
+
export * from './useAccessorUpdateSubscription.js';
|
|
7
|
+
export * from './useBindingOperations.js';
|
|
8
|
+
export * from './useDesugaredRelativeEntityList.js';
|
|
9
|
+
export * from './useDesugaredRelativeSingleEntity.js';
|
|
10
|
+
export * from './useDesugaredRelativeSingleField.js';
|
|
11
|
+
export * from './useEntity.js';
|
|
12
|
+
export * from './useEntityKey.js';
|
|
13
|
+
export * from './useHasEntity.js';
|
|
14
|
+
export * from './useEntityList.js';
|
|
15
|
+
export * from './useEntityListSubTree.js';
|
|
16
|
+
export * from './useEntityListSubTreeParameters.js';
|
|
17
|
+
export * from './useEntityListSubTreeLoader.js';
|
|
18
|
+
export * from './useEntitySubTree.js';
|
|
19
|
+
export * from './useEntitySubTreeLoader.js';
|
|
20
|
+
export * from './useEntitySubTreeParameters.js';
|
|
21
|
+
export * from './useEnvironment.js';
|
|
22
|
+
export * from './useExtendTree.js';
|
|
23
|
+
export * from './useField.js';
|
|
24
|
+
export * from './useGetEntityByKey.js';
|
|
25
|
+
export * from './useGetEntityListSubTree.js';
|
|
26
|
+
export * from './useGetEntitySubTree.js';
|
|
27
|
+
export * from './usePersist.js';
|
|
28
|
+
export * from './useTreeRootId.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/index.ts"],"names":[],"mappings":"AAGA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorPropagation/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oCAAoC,CAAA;AAClD,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './addEntityAtIndex';
|
|
2
|
-
export * from './repairEntitiesOrder';
|
|
3
|
-
export * from './SetOrderFieldOnCreate';
|
|
4
|
-
export * from './sortEntities';
|
|
5
|
-
export type { SortedEntities } from './SortedEntities';
|
|
1
|
+
export * from './addEntityAtIndex.js';
|
|
2
|
+
export * from './repairEntitiesOrder.js';
|
|
3
|
+
export * from './SetOrderFieldOnCreate.js';
|
|
4
|
+
export * from './sortEntities.js';
|
|
5
|
+
export type { SortedEntities } from './SortedEntities.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorSorting/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AAEjC,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorTree.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccessorTree.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM/D,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,iBAAiB,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;0BAAyB,iBAAiB;;CAuBlE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AccessorTreeState } from './AccessorTreeState';
|
|
1
|
+
import { AccessorTreeState } from './AccessorTreeState.js';
|
|
2
2
|
export declare const AccessorTreeStateContext: import("react").Context<AccessorTreeState | undefined>;
|
|
3
3
|
//# sourceMappingURL=AccessorTreeStateContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorTreeStateContext.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeStateContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccessorTreeStateContext.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/AccessorTreeStateContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,eAAO,MAAM,wBAAwB,wDAA0D,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from './AccessorTree';
|
|
2
|
-
export * from './AccessorTreeState';
|
|
3
|
-
export * from './AccessorTreeStateAction';
|
|
4
|
-
export * from './AccessorTreeStateMetadata';
|
|
5
|
-
export * from './AccessorTreeStateOptions';
|
|
6
|
-
export * from './DirtinessContext';
|
|
7
|
-
export * from './MutationStateContext';
|
|
8
|
-
export * from './useAccessorTreeState';
|
|
9
|
-
export * from './useDataBinding';
|
|
10
|
-
export * from './useDirtinessState';
|
|
11
|
-
export * from './useMutationState';
|
|
1
|
+
export * from './AccessorTree.js';
|
|
2
|
+
export * from './AccessorTreeState.js';
|
|
3
|
+
export * from './AccessorTreeStateAction.js';
|
|
4
|
+
export * from './AccessorTreeStateMetadata.js';
|
|
5
|
+
export * from './AccessorTreeStateOptions.js';
|
|
6
|
+
export * from './DirtinessContext.js';
|
|
7
|
+
export * from './MutationStateContext.js';
|
|
8
|
+
export * from './useAccessorTreeState.js';
|
|
9
|
+
export * from './useDataBinding.js';
|
|
10
|
+
export * from './useDirtinessState.js';
|
|
11
|
+
export * from './useMutationState.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useAccessorTreeState: () => import("./AccessorTreeState").AccessorTreeState;
|
|
1
|
+
export declare const useAccessorTreeState: () => import("./AccessorTreeState.js").AccessorTreeState;
|
|
2
2
|
//# sourceMappingURL=useAccessorTreeState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessorTreeState.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/useAccessorTreeState.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useAccessorTreeState.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/useAccessorTreeState.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,0DAMhC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import type { AccessorTreeState } from './AccessorTreeState';
|
|
2
|
+
import type { AccessorTreeState } from './AccessorTreeState.js';
|
|
3
3
|
export declare const useDataBinding: ({ children, refreshOnPersist, skipStateUpdateAfterPersist, }: {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
refreshOnPersist?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataBinding.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/useDataBinding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAG3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useDataBinding.d.ts","sourceRoot":"","sources":["../../../src/accessorTree/useDataBinding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAG3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAO/D,eAAO,MAAM,cAAc,GAAI,8DAI5B;IACF,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,2BAA2B,CAAC,EAAE,OAAO,CAAA;CACrC,KAAG,iBAqFH,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NamedExoticComponent, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import type { Environment } from '@contember/binding';
|
|
3
|
-
import type { MarkerProvider, StaticRenderProviderProps } from '../markers';
|
|
3
|
+
import type { MarkerProvider, StaticRenderProviderProps } from '../markers/index.js';
|
|
4
4
|
interface EnvironmentAwareFunctionComponent<P> {
|
|
5
5
|
(props: PropsWithChildren<P>, environment: Environment): ReactNode;
|
|
6
6
|
displayName?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/Component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAwB,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/Component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAwB,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAG1G,UAAU,iCAAiC,CAAC,CAAC;IAC5C,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IAClE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC;AAED,iBAAS,SAAS,CAAC,KAAK,SAAS,EAAE,EAClC,eAAe,EAAE,iCAAiC,CAAC,KAAK,CAAC,EACzD,WAAW,CAAC,EAAE,MAAM,GAClB,oBAAoB,CAAC,KAAK,CAAC,CAAA;AAE9B,iBAAS,SAAS,CAAC,KAAK,SAAS,EAAE,EAAE,kBAAkB,SAAS,MAAM,KAAK,GAAG,KAAK,EAClF,cAAc,EAAE,iCAAiC,CAAC,KAAK,CAAC,EACxD,YAAY,EAAE,CAAC,KAAK,EAAE,yBAAyB,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAE,WAAW,EAAE,WAAW,KAAK,SAAS,EAClH,WAAW,CAAC,EAAE,MAAM,GAClB,oBAAoB,CAAC,KAAK,CAAC,CAAA;AAE9B,iBAAS,SAAS,CAAC,KAAK,SAAS,EAAE,EAAE,kBAAkB,SAAS,MAAM,KAAK,GAAG,KAAK,EAClF,cAAc,EAAE,iCAAiC,CAAC,KAAK,CAAC,EACxD,gBAAgB,EAAE,cAAc,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAC3D,WAAW,CAAC,EAAE,MAAM,GAClB,oBAAoB,CAAC,KAAK,CAAC,CAAA;AA4C9B,YAAY,EAAE,iCAAiC,EAAE,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { AccessorTreeState } from '../accessorTree';
|
|
2
|
+
import { AccessorTreeState } from '../accessorTree/index.js';
|
|
3
3
|
export type DataBindingProviderStateComponent<StateProps> = {
|
|
4
4
|
stateComponent: ComponentType<StateProps & DataBindingStateComponentProps>;
|
|
5
5
|
stateProps?: StateProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBindingProvider.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/DataBindingProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACnF,OAAO,EAAgB,iBAAiB,EAAkB,MAAM,
|
|
1
|
+
{"version":3,"file":"DataBindingProvider.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/DataBindingProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACnF,OAAO,EAAgB,iBAAiB,EAAkB,MAAM,0BAA0B,CAAA;AAE1F,MAAM,MAAM,iCAAiC,CAAC,UAAU,IAAI;IAC3D,cAAc,EAAE,aAAa,CAAC,UAAU,GAAG,8BAA8B,CAAC,CAAA;IAC1E,UAAU,CAAC,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,WAAW,8BAA8B;IAC9C,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,MAAM,MAAM,wBAAwB,CAAC,UAAU,IAC5C;IACD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB,GACC,iCAAiC,CAAC,UAAU,CAAC,CAAA;AAEhD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAkB1B,CAAC,UAAU,EAAE,KAAK,EAAE,wBAAwB,CAAC,UAAU,CAAC,KAAK,YAAY,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { SugaredQualifiedEntityList, SugaredUnconstrainedQualifiedEntityList, TreeRootId } from '@contember/binding';
|
|
3
3
|
import { Environment } from '@contember/binding';
|
|
4
|
-
import { EntityListBaseProps } from './EntityList';
|
|
4
|
+
import { EntityListBaseProps } from './EntityList.js';
|
|
5
5
|
export interface EntityListSubTreeAdditionalProps {
|
|
6
6
|
variables?: Environment.ValuesMapWithFactory;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/EntityListSubTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACzH,OAAO,EAAE,WAAW,EAA+D,MAAM,oBAAoB,CAAA;AAE7G,OAAO,EAAc,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"EntityListSubTree.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/EntityListSubTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,uCAAuC,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACzH,OAAO,EAAE,WAAW,EAA+D,MAAM,oBAAoB,CAAA;AAE7G,OAAO,EAAc,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAGjE,MAAM,WAAW,gCAAgC;IAChD,SAAS,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAA;CAC5C;AAED,MAAM,MAAM,sBAAsB,CAAC,SAAS,EAAE,WAAW,IACtD;IACD,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB,GACC,gCAAgC,GAChC,CAAC,0BAA0B,GAAG,uCAAuC,CAAC,GACtE,CACC,EAAE,GACF;IACD,aAAa,EAAE,aAAa,CAAC,SAAS,GAAG,mBAAmB,CAAC,CAAA;IAC7D,SAAS,CAAC,EAAE,SAAS,CAAA;CACrB,CACD,CAAA;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAgCzB,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,sBAAsB,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,YAAY,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { SugaredQualifiedSingleEntity, SugaredUnconstrainedQualifiedSingleEntity, TreeRootId } from '@contember/binding';
|
|
3
3
|
import { Environment } from '@contember/binding';
|
|
4
|
-
import { SetOrderFieldOnCreateOwnProps } from '../accessorSorting';
|
|
4
|
+
import { SetOrderFieldOnCreateOwnProps } from '../accessorSorting/index.js';
|
|
5
5
|
export interface EntitySubTreeAdditionalProps {
|
|
6
6
|
variables?: Environment.ValuesMapWithFactory;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/EntitySubTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC7H,OAAO,EAAE,WAAW,EAA+D,MAAM,oBAAoB,CAAA;AAI7G,OAAO,EAAyB,6BAA6B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"EntitySubTree.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/EntitySubTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,yCAAyC,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC7H,OAAO,EAAE,WAAW,EAA+D,MAAM,oBAAoB,CAAA;AAI7G,OAAO,EAAyB,6BAA6B,EAAE,MAAM,6BAA6B,CAAA;AAElG,MAAM,WAAW,4BAA4B;IAC5C,SAAS,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAA;CAC5C;AAED,MAAM,MAAM,oCAAoC,GAAG,EAAE,GAAG,6BAA6B,CAAA;AAErF,MAAM,MAAM,kBAAkB,CAAC,WAAW,IACvC;IACD,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB,GACC,4BAA4B,GAC5B,CACC,4BAA4B,GAC5B,CAAC,yCAAyC,GAAG,oCAAoC,CAAC,CACpF,CAAA;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAwCrB,CAAC,WAAW,EAAE,IAAI,EAAE,kBAAkB,CAAC,WAAW,CAAC,KAAK,YAAY,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Environment } from '@contember/binding';
|
|
3
3
|
import type { SugaredRelativeEntityList } from '@contember/binding';
|
|
4
|
-
import { EntityListBaseProps } from './EntityList';
|
|
4
|
+
import { EntityListBaseProps } from './EntityList.js';
|
|
5
5
|
export type HasManyProps<ListProps = never, EntityProps = never> = SugaredRelativeEntityList & {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
variables?: Environment.ValuesMapWithFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasMany.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/HasMany.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,EAAc,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HasMany.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/HasMany.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,EAAc,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAIjE,MAAM,MAAM,YAAY,CAAC,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,IAC5D,yBAAyB,GACzB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAA;CAC5C,GACC,CACC,EAAE,GACF;IACD,aAAa,EAAE,aAAa,CAAC,SAAS,GAAG,mBAAmB,CAAC,CAAA;IAC7D,SAAS,CAAC,EAAE,SAAS,CAAA;CACrB,CACD,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAoBf,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,YAAY,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './Component';
|
|
2
|
-
export * from './DataBindingProvider';
|
|
3
|
-
export * from './Entity';
|
|
4
|
-
export * from './EntityList';
|
|
5
|
-
export * from './EntityListSubTree';
|
|
6
|
-
export * from './EntitySubTree';
|
|
7
|
-
export * from './Field';
|
|
8
|
-
export * from './HasMany';
|
|
9
|
-
export * from './HasOne';
|
|
10
|
-
export * from './ParentEntity';
|
|
1
|
+
export * from './Component.js';
|
|
2
|
+
export * from './DataBindingProvider.js';
|
|
3
|
+
export * from './Entity.js';
|
|
4
|
+
export * from './EntityList.js';
|
|
5
|
+
export * from './EntityListSubTree.js';
|
|
6
|
+
export * from './EntitySubTree.js';
|
|
7
|
+
export * from './Field.js';
|
|
8
|
+
export * from './HasMany.js';
|
|
9
|
+
export * from './HasOne.js';
|
|
10
|
+
export * from './ParentEntity.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coreComponents/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './useDataBindingEvent';
|
|
2
|
-
export * from './useDerivedField';
|
|
3
|
-
export * from './useEntityBeforePersist';
|
|
4
|
-
export * from './useEntityBeforeUpdate';
|
|
5
|
-
export * from './useEntityEvent';
|
|
6
|
-
export * from './useEntityPersistError';
|
|
7
|
-
export * from './useEntityPersistSuccess';
|
|
8
|
-
export * from './useOnConnectionUpdate';
|
|
1
|
+
export * from './useDataBindingEvent.js';
|
|
2
|
+
export * from './useDerivedField.js';
|
|
3
|
+
export * from './useEntityBeforePersist.js';
|
|
4
|
+
export * from './useEntityBeforeUpdate.js';
|
|
5
|
+
export * from './useEntityEvent.js';
|
|
6
|
+
export * from './useEntityPersistError.js';
|
|
7
|
+
export * from './useEntityPersistSuccess.js';
|
|
8
|
+
export * from './useOnConnectionUpdate.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entityEvents/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entityEvents/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RecursionTerminatorProps } from './RecursionTerminator';
|
|
1
|
+
import { RecursionTerminatorProps } from './RecursionTerminator.js';
|
|
2
2
|
export declare const RecursionTerminatorPortal: import("react").NamedExoticComponent<RecursionTerminatorProps>;
|
|
3
3
|
//# sourceMappingURL=RecursionTerminatorPortal.d.ts.map
|