@contember/react-binding 2.0.0-alpha.9 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/index.cjs +19 -11
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +18 -10
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.cjs +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.js +1 -1
- package/dist/development/src/accessorPropagation/AccessorProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsContext.cjs +3 -2
- package/dist/development/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/BindingOperationsContext.js +3 -2
- package/dist/development/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.js +1 -1
- package/dist/development/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.cjs +13 -8
- package/dist/development/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/EnvironmentContext.js +14 -9
- package/dist/development/src/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/development/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.cjs +14 -37
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.js +15 -38
- package/dist/development/src/accessorPropagation/useAccessorUpdateSubscription.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 +4 -4
- package/dist/development/src/accessorPropagation/useEntity.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntity.js +4 -4
- 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 +3 -3
- package/dist/development/src/accessorPropagation/useEntityList.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityList.js +3 -3
- package/dist/development/src/accessorPropagation/useEntityList.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.js +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs +54 -15
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js +55 -16
- package/dist/development/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.cjs +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.js +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs +54 -15
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js +55 -16
- package/dist/development/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
- package/dist/development/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useExtendTree.js.map +1 -1
- package/dist/development/src/accessorPropagation/useField.cjs +3 -3
- package/dist/development/src/accessorPropagation/useField.cjs.map +1 -1
- package/dist/development/src/accessorPropagation/useField.js +3 -3
- package/dist/development/src/accessorPropagation/useField.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/accessorSorting/SetOrderFieldOnCreate.cjs +2 -2
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js +2 -2
- package/dist/development/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.cjs +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.js +1 -1
- package/dist/development/src/accessorSorting/addEntityAtIndex.js.map +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.cjs +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.js +1 -1
- package/dist/development/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
- package/dist/development/src/accessorSorting/sortEntities.cjs +2 -2
- package/dist/development/src/accessorSorting/sortEntities.cjs.map +1 -1
- package/dist/development/src/accessorSorting/sortEntities.js +2 -2
- package/dist/development/src/accessorSorting/sortEntities.js.map +1 -1
- package/dist/development/src/accessorTree/AccessorTree.cjs +16 -6
- package/dist/development/src/accessorTree/AccessorTree.cjs.map +1 -1
- package/dist/development/src/accessorTree/AccessorTree.js +16 -6
- package/dist/development/src/accessorTree/AccessorTree.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 +23 -36
- package/dist/development/src/accessorTree/useDataBinding.cjs.map +1 -1
- package/dist/development/src/accessorTree/useDataBinding.js +26 -39
- package/dist/development/src/accessorTree/useDataBinding.js.map +1 -1
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.cjs +31 -0
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -0
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.js +31 -0
- package/dist/development/src/accessorTree/useEnvironmentWithSchema.js.map +1 -0
- 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 +4 -14
- package/dist/development/src/coreComponents/DataBindingProvider.cjs.map +1 -1
- package/dist/development/src/coreComponents/DataBindingProvider.js +4 -14
- 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 +5 -14
- package/dist/development/src/coreComponents/EntityListSubTree.cjs.map +1 -1
- package/dist/development/src/coreComponents/EntityListSubTree.js +5 -14
- package/dist/development/src/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/development/src/coreComponents/EntitySubTree.cjs +7 -16
- package/dist/development/src/coreComponents/EntitySubTree.cjs.map +1 -1
- package/dist/development/src/coreComponents/EntitySubTree.js +7 -16
- package/dist/development/src/coreComponents/EntitySubTree.js.map +1 -1
- package/dist/development/src/coreComponents/Field.cjs +3 -4
- package/dist/development/src/coreComponents/Field.cjs.map +1 -1
- package/dist/development/src/coreComponents/Field.js +3 -4
- 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/HasOne.cjs.map +1 -1
- package/dist/development/src/coreComponents/ParentEntity.cjs.map +1 -1
- package/dist/development/src/entityEvents/useDataBindingEvent.cjs +15 -0
- package/dist/development/src/entityEvents/useDataBindingEvent.cjs.map +1 -0
- package/dist/development/src/entityEvents/useDataBindingEvent.js +15 -0
- package/dist/development/src/entityEvents/useDataBindingEvent.js.map +1 -0
- package/dist/development/src/entityEvents/useDerivedField.cjs +3 -3
- package/dist/development/src/entityEvents/useDerivedField.cjs.map +1 -1
- package/dist/development/src/entityEvents/useDerivedField.js +3 -3
- 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/useEntityBeforeUpdate.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityEvent.cjs +11 -11
- package/dist/development/src/entityEvents/useEntityEvent.cjs.map +1 -1
- package/dist/development/src/entityEvents/useEntityEvent.js +11 -11
- 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/useEntityPersistSuccess.cjs.map +1 -1
- package/dist/development/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
- package/dist/development/src/helperComponents/DeferredSubTrees.cjs +3 -4
- package/dist/development/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
- package/dist/development/src/helperComponents/DeferredSubTrees.js +4 -5
- package/dist/development/src/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs +45 -0
- package/dist/development/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -0
- package/dist/development/src/helperComponents/DeleteEntityTrigger.js +45 -0
- package/dist/development/src/helperComponents/DeleteEntityTrigger.js.map +1 -0
- 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 +1 -1
- package/dist/development/src/helperComponents/FieldView.cjs.map +1 -1
- package/dist/development/src/helperComponents/FieldView.js +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 +55 -0
- package/dist/development/src/helperComponents/RecursionTerminator.cjs.map +1 -0
- package/dist/development/src/helperComponents/RecursionTerminator.js +55 -0
- package/dist/development/src/helperComponents/RecursionTerminator.js.map +1 -0
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs +36 -0
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -0
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.js +36 -0
- package/dist/development/src/helperComponents/RecursionTerminatorPortal.js.map +1 -0
- package/dist/development/src/helperComponents/SugaredField.cjs.map +1 -1
- package/dist/development/src/helperComponents/SugaredField.js.map +1 -1
- package/dist/development/src/helperComponents/Variable.cjs.map +1 -1
- package/dist/development/src/helperComponents/Variable.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
- package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs +14 -21
- package/dist/development/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/development/src/helperComponents/helpers/evaluateCondition.js +14 -21
- package/dist/development/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs +28 -0
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js +28 -0
- package/dist/development/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs +35 -0
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js +35 -0
- package/dist/development/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistOnKey.cjs +30 -0
- package/dist/development/src/helperComponents/persist/PersistOnKey.cjs.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistOnKey.js +30 -0
- package/dist/development/src/helperComponents/persist/PersistOnKey.js.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistTrigger.cjs +37 -0
- package/dist/development/src/helperComponents/persist/PersistTrigger.cjs.map +1 -0
- package/dist/development/src/helperComponents/persist/PersistTrigger.js +37 -0
- package/dist/development/src/helperComponents/persist/PersistTrigger.js.map +1 -0
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs +22 -0
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -0
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.js +22 -0
- package/dist/development/src/helperComponents/persist/useDecoratedPersist.js.map +1 -0
- package/dist/development/src/markers/IncrementalMarkerBuilder.cjs +56 -0
- package/dist/development/src/markers/IncrementalMarkerBuilder.cjs.map +1 -0
- package/dist/development/src/markers/IncrementalMarkerBuilder.js +56 -0
- package/dist/development/src/markers/IncrementalMarkerBuilder.js.map +1 -0
- package/dist/development/src/markers/MarkerStaticAnalyzer.cjs +117 -0
- package/dist/development/src/markers/MarkerStaticAnalyzer.cjs.map +1 -0
- package/dist/development/src/markers/MarkerStaticAnalyzer.js +117 -0
- package/dist/development/src/markers/MarkerStaticAnalyzer.js.map +1 -0
- package/dist/development/src/markers/MarkerTreeGenerator.cjs +55 -0
- package/dist/development/src/markers/MarkerTreeGenerator.cjs.map +1 -0
- package/dist/development/src/markers/MarkerTreeGenerator.js +55 -0
- package/dist/development/src/markers/MarkerTreeGenerator.js.map +1 -0
- package/dist/production/index.cjs +19 -11
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +18 -10
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.cjs +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.js +1 -1
- package/dist/production/src/accessorPropagation/AccessorProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsContext.cjs +3 -2
- package/dist/production/src/accessorPropagation/BindingOperationsContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsContext.js +3 -2
- package/dist/production/src/accessorPropagation/BindingOperationsContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/BindingOperationsProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EntityKeyProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.cjs +9 -4
- package/dist/production/src/accessorPropagation/EnvironmentContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/EnvironmentContext.js +10 -5
- package/dist/production/src/accessorPropagation/EnvironmentContext.js.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdContext.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdProvider.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/TreeRootIdProvider.js.map +1 -1
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.cjs +14 -37
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.js +15 -38
- package/dist/production/src/accessorPropagation/useAccessorUpdateSubscription.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 +4 -4
- package/dist/production/src/accessorPropagation/useEntity.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntity.js +4 -4
- 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 +3 -3
- package/dist/production/src/accessorPropagation/useEntityList.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityList.js +3 -3
- package/dist/production/src/accessorPropagation/useEntityList.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.js +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs +54 -15
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js +55 -16
- package/dist/production/src/accessorPropagation/useEntityListSubTreeLoader.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntityListSubTreeParameters.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.cjs +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.js +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs +54 -15
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js +55 -16
- package/dist/production/src/accessorPropagation/useEntitySubTreeLoader.js.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useEntitySubTreeParameters.js.map +1 -1
- package/dist/production/src/accessorPropagation/useExtendTree.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useExtendTree.js.map +1 -1
- package/dist/production/src/accessorPropagation/useField.cjs +3 -3
- package/dist/production/src/accessorPropagation/useField.cjs.map +1 -1
- package/dist/production/src/accessorPropagation/useField.js +3 -3
- package/dist/production/src/accessorPropagation/useField.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/accessorSorting/SetOrderFieldOnCreate.cjs +2 -2
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.cjs.map +1 -1
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js +2 -2
- package/dist/production/src/accessorSorting/SetOrderFieldOnCreate.js.map +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.cjs +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.cjs.map +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.js +1 -1
- package/dist/production/src/accessorSorting/addEntityAtIndex.js.map +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.cjs +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.cjs.map +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.js +1 -1
- package/dist/production/src/accessorSorting/repairEntitiesOrder.js.map +1 -1
- package/dist/production/src/accessorSorting/sortEntities.cjs +2 -2
- package/dist/production/src/accessorSorting/sortEntities.cjs.map +1 -1
- package/dist/production/src/accessorSorting/sortEntities.js +2 -2
- package/dist/production/src/accessorSorting/sortEntities.js.map +1 -1
- package/dist/production/src/accessorTree/AccessorTree.cjs +3 -1
- package/dist/production/src/accessorTree/AccessorTree.cjs.map +1 -1
- package/dist/production/src/accessorTree/AccessorTree.js +3 -1
- package/dist/production/src/accessorTree/AccessorTree.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 +23 -36
- package/dist/production/src/accessorTree/useDataBinding.cjs.map +1 -1
- package/dist/production/src/accessorTree/useDataBinding.js +26 -39
- package/dist/production/src/accessorTree/useDataBinding.js.map +1 -1
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.cjs +31 -0
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.cjs.map +1 -0
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.js +31 -0
- package/dist/production/src/accessorTree/useEnvironmentWithSchema.js.map +1 -0
- 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 +3 -5
- package/dist/production/src/coreComponents/DataBindingProvider.cjs.map +1 -1
- package/dist/production/src/coreComponents/DataBindingProvider.js +3 -5
- package/dist/production/src/coreComponents/DataBindingProvider.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 +2 -11
- package/dist/production/src/coreComponents/EntityListSubTree.cjs.map +1 -1
- package/dist/production/src/coreComponents/EntityListSubTree.js +2 -11
- package/dist/production/src/coreComponents/EntityListSubTree.js.map +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.cjs +2 -11
- package/dist/production/src/coreComponents/EntitySubTree.cjs.map +1 -1
- package/dist/production/src/coreComponents/EntitySubTree.js +2 -11
- package/dist/production/src/coreComponents/EntitySubTree.js.map +1 -1
- package/dist/production/src/coreComponents/Field.cjs +1 -2
- package/dist/production/src/coreComponents/Field.cjs.map +1 -1
- package/dist/production/src/coreComponents/Field.js +1 -2
- 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/entityEvents/useDataBindingEvent.cjs +15 -0
- package/dist/production/src/entityEvents/useDataBindingEvent.cjs.map +1 -0
- package/dist/production/src/entityEvents/useDataBindingEvent.js +15 -0
- package/dist/production/src/entityEvents/useDataBindingEvent.js.map +1 -0
- package/dist/production/src/entityEvents/useDerivedField.cjs +3 -3
- package/dist/production/src/entityEvents/useDerivedField.cjs.map +1 -1
- package/dist/production/src/entityEvents/useDerivedField.js +3 -3
- 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/useEntityBeforeUpdate.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityEvent.cjs +11 -11
- package/dist/production/src/entityEvents/useEntityEvent.cjs.map +1 -1
- package/dist/production/src/entityEvents/useEntityEvent.js +11 -11
- 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/useEntityPersistSuccess.cjs.map +1 -1
- package/dist/production/src/entityEvents/useOnConnectionUpdate.cjs.map +1 -1
- package/dist/production/src/helperComponents/DeferredSubTrees.cjs +3 -4
- package/dist/production/src/helperComponents/DeferredSubTrees.cjs.map +1 -1
- package/dist/production/src/helperComponents/DeferredSubTrees.js +4 -5
- package/dist/production/src/helperComponents/DeferredSubTrees.js.map +1 -1
- package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs +37 -0
- package/dist/production/src/helperComponents/DeleteEntityTrigger.cjs.map +1 -0
- package/dist/production/src/helperComponents/DeleteEntityTrigger.js +37 -0
- package/dist/production/src/helperComponents/DeleteEntityTrigger.js.map +1 -0
- 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 +1 -1
- package/dist/production/src/helperComponents/FieldView.cjs.map +1 -1
- package/dist/production/src/helperComponents/FieldView.js +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 +55 -0
- package/dist/production/src/helperComponents/RecursionTerminator.cjs.map +1 -0
- package/dist/production/src/helperComponents/RecursionTerminator.js +55 -0
- package/dist/production/src/helperComponents/RecursionTerminator.js.map +1 -0
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs +32 -0
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.cjs.map +1 -0
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.js +32 -0
- package/dist/production/src/helperComponents/RecursionTerminatorPortal.js.map +1 -0
- package/dist/production/src/helperComponents/SugaredField.cjs.map +1 -1
- package/dist/production/src/helperComponents/SugaredField.js.map +1 -1
- package/dist/production/src/helperComponents/Variable.cjs.map +1 -1
- package/dist/production/src/helperComponents/Variable.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterEvaluator.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterEvaluator.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/FilterFieldsCollector.js.map +1 -1
- package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs +14 -21
- package/dist/production/src/helperComponents/helpers/evaluateCondition.cjs.map +1 -1
- package/dist/production/src/helperComponents/helpers/evaluateCondition.js +14 -21
- package/dist/production/src/helperComponents/helpers/evaluateCondition.js.map +1 -1
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs +24 -0
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.cjs.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js +24 -0
- package/dist/production/src/helperComponents/persist/PersistOnFieldChange.js.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs +31 -0
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.cjs.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js +31 -0
- package/dist/production/src/helperComponents/persist/PersistOnHasOneChange.js.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistOnKey.cjs +30 -0
- package/dist/production/src/helperComponents/persist/PersistOnKey.cjs.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistOnKey.js +30 -0
- package/dist/production/src/helperComponents/persist/PersistOnKey.js.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistTrigger.cjs +29 -0
- package/dist/production/src/helperComponents/persist/PersistTrigger.cjs.map +1 -0
- package/dist/production/src/helperComponents/persist/PersistTrigger.js +29 -0
- package/dist/production/src/helperComponents/persist/PersistTrigger.js.map +1 -0
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs +22 -0
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.cjs.map +1 -0
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.js +22 -0
- package/dist/production/src/helperComponents/persist/useDecoratedPersist.js.map +1 -0
- package/dist/production/src/markers/IncrementalMarkerBuilder.cjs +56 -0
- package/dist/production/src/markers/IncrementalMarkerBuilder.cjs.map +1 -0
- package/dist/production/src/markers/IncrementalMarkerBuilder.js +56 -0
- package/dist/production/src/markers/IncrementalMarkerBuilder.js.map +1 -0
- package/dist/production/src/markers/MarkerStaticAnalyzer.cjs +117 -0
- package/dist/production/src/markers/MarkerStaticAnalyzer.cjs.map +1 -0
- package/dist/production/src/markers/MarkerStaticAnalyzer.js +117 -0
- package/dist/production/src/markers/MarkerStaticAnalyzer.js.map +1 -0
- package/dist/production/src/markers/MarkerTreeGenerator.cjs +55 -0
- package/dist/production/src/markers/MarkerTreeGenerator.cjs.map +1 -0
- package/dist/production/src/markers/MarkerTreeGenerator.js +55 -0
- package/dist/production/src/markers/MarkerTreeGenerator.js.map +1 -0
- package/dist/types/accessorPropagation/BindingOperationsContext.d.ts +1 -1
- package/dist/types/accessorPropagation/BindingOperationsContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/EntityKeyContext.d.ts +2 -1
- package/dist/types/accessorPropagation/EntityKeyContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/EntityKeyProvider.d.ts +2 -1
- package/dist/types/accessorPropagation/EntityKeyProvider.d.ts.map +1 -1
- package/dist/types/accessorPropagation/EnvironmentContext.d.ts +5 -4
- package/dist/types/accessorPropagation/EnvironmentContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/TreeRootIdContext.d.ts +1 -1
- package/dist/types/accessorPropagation/TreeRootIdContext.d.ts.map +1 -1
- package/dist/types/accessorPropagation/index.d.ts +0 -1
- package/dist/types/accessorPropagation/index.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts +7 -12
- package/dist/types/accessorPropagation/useAccessorUpdateSubscription.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntityKey.d.ts +2 -1
- package/dist/types/accessorPropagation/useEntityKey.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntityListSubTreeLoader.d.ts +39 -5
- package/dist/types/accessorPropagation/useEntityListSubTreeLoader.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntitySubTree.d.ts +1 -2
- package/dist/types/accessorPropagation/useEntitySubTree.d.ts.map +1 -1
- package/dist/types/accessorPropagation/useEntitySubTreeLoader.d.ts +40 -5
- package/dist/types/accessorPropagation/useEntitySubTreeLoader.d.ts.map +1 -1
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts +1 -1
- package/dist/types/accessorSorting/SetOrderFieldOnCreate.d.ts.map +1 -1
- package/dist/types/accessorSorting/index.d.ts +0 -2
- package/dist/types/accessorSorting/index.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTree.d.ts.map +1 -1
- package/dist/types/accessorTree/AccessorTreeState.d.ts +1 -4
- package/dist/types/accessorTree/AccessorTreeState.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/AccessorTreeStateOptions.d.ts +0 -2
- package/dist/types/accessorTree/AccessorTreeStateOptions.d.ts.map +1 -1
- package/dist/types/accessorTree/DirtinessContext.d.ts +1 -1
- package/dist/types/accessorTree/DirtinessContext.d.ts.map +1 -1
- package/dist/types/accessorTree/MutationStateContext.d.ts +1 -1
- package/dist/types/accessorTree/MutationStateContext.d.ts.map +1 -1
- package/dist/types/accessorTree/index.d.ts +0 -1
- package/dist/types/accessorTree/index.d.ts.map +1 -1
- package/dist/types/accessorTree/useDataBinding.d.ts +6 -2
- package/dist/types/accessorTree/useDataBinding.d.ts.map +1 -1
- package/dist/types/accessorTree/useEnvironmentWithSchema.d.ts +3 -0
- package/dist/types/accessorTree/useEnvironmentWithSchema.d.ts.map +1 -0
- 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 +8 -8
- package/dist/types/coreComponents/DataBindingProvider.d.ts.map +1 -1
- package/dist/types/coreComponents/Entity.d.ts +1 -1
- package/dist/types/coreComponents/Entity.d.ts.map +1 -1
- package/dist/types/coreComponents/EntityListSubTree.d.ts +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/Field.d.ts.map +1 -1
- package/dist/types/coreComponents/ParentEntity.d.ts +1 -1
- package/dist/types/coreComponents/ParentEntity.d.ts.map +1 -1
- package/dist/types/coreComponents/index.d.ts +0 -1
- package/dist/types/coreComponents/index.d.ts.map +1 -1
- package/dist/types/entityEvents/index.d.ts +1 -0
- package/dist/types/entityEvents/index.d.ts.map +1 -1
- package/dist/types/entityEvents/useDataBindingEvent.d.ts +3 -0
- package/dist/types/entityEvents/useDataBindingEvent.d.ts.map +1 -0
- package/dist/types/entityEvents/useEntityEvent.d.ts.map +1 -1
- package/dist/types/helperComponents/DeferredSubTrees.d.ts +1 -1
- package/dist/types/helperComponents/DeferredSubTrees.d.ts.map +1 -1
- package/dist/types/helperComponents/DeleteEntityTrigger.d.ts +39 -0
- package/dist/types/helperComponents/DeleteEntityTrigger.d.ts.map +1 -0
- package/dist/types/helperComponents/If.d.ts +1 -1
- package/dist/types/helperComponents/If.d.ts.map +1 -1
- package/dist/types/helperComponents/LabelMiddleware.d.ts +1 -1
- package/dist/types/helperComponents/LabelMiddleware.d.ts.map +1 -1
- package/dist/types/helperComponents/RecursionTerminator.d.ts +22 -0
- package/dist/types/helperComponents/RecursionTerminator.d.ts.map +1 -0
- package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts +3 -0
- package/dist/types/helperComponents/RecursionTerminatorPortal.d.ts.map +1 -0
- package/dist/types/helperComponents/StaticRender.d.ts +1 -1
- package/dist/types/helperComponents/StaticRender.d.ts.map +1 -1
- package/dist/types/helperComponents/Variable.d.ts +1 -1
- package/dist/types/helperComponents/Variable.d.ts.map +1 -1
- package/dist/types/helperComponents/helpers/evaluateCondition.d.ts +2 -2
- package/dist/types/helperComponents/helpers/evaluateCondition.d.ts.map +1 -1
- package/dist/types/helperComponents/index.d.ts +4 -0
- package/dist/types/helperComponents/index.d.ts.map +1 -1
- package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts +29 -0
- package/dist/types/helperComponents/persist/PersistOnFieldChange.d.ts.map +1 -0
- package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts +29 -0
- package/dist/types/helperComponents/persist/PersistOnHasOneChange.d.ts.map +1 -0
- package/dist/types/helperComponents/persist/PersistOnKey.d.ts +29 -0
- package/dist/types/helperComponents/persist/PersistOnKey.d.ts.map +1 -0
- package/dist/types/helperComponents/persist/PersistTrigger.d.ts +32 -0
- package/dist/types/helperComponents/persist/PersistTrigger.d.ts.map +1 -0
- package/dist/types/helperComponents/persist/index.d.ts +5 -0
- package/dist/types/helperComponents/persist/index.d.ts.map +1 -0
- package/dist/types/helperComponents/persist/useDecoratedPersist.d.ts +7 -0
- package/dist/types/helperComponents/persist/useDecoratedPersist.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markers/IncrementalMarkerBuilder.d.ts +5 -0
- package/dist/types/markers/IncrementalMarkerBuilder.d.ts.map +1 -0
- package/dist/types/{coreComponents → markers}/MarkerProvider.d.ts +1 -2
- package/dist/types/markers/MarkerProvider.d.ts.map +1 -0
- package/dist/types/markers/MarkerStaticAnalyzer.d.ts +14 -0
- package/dist/types/markers/MarkerStaticAnalyzer.d.ts.map +1 -0
- package/dist/types/markers/MarkerTreeGenerator.d.ts +10 -0
- package/dist/types/markers/MarkerTreeGenerator.d.ts.map +1 -0
- package/dist/types/markers/index.d.ts +3 -0
- package/dist/types/markers/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -9
- package/src/accessorPropagation/AccessorProvider.tsx +1 -1
- package/src/accessorPropagation/BindingOperationsContext.ts +2 -1
- package/src/accessorPropagation/EntityKeyContext.ts +2 -1
- package/src/accessorPropagation/EntityKeyProvider.tsx +2 -1
- package/src/accessorPropagation/EnvironmentContext.tsx +16 -9
- package/src/accessorPropagation/index.ts +0 -1
- package/src/accessorPropagation/useAccessorUpdateSubscription.ts +19 -87
- package/src/accessorPropagation/useEntity.ts +4 -4
- package/src/accessorPropagation/useEntityKey.ts +2 -2
- package/src/accessorPropagation/useEntityList.ts +3 -3
- package/src/accessorPropagation/useEntityListSubTree.ts +1 -1
- package/src/accessorPropagation/useEntityListSubTreeLoader.ts +111 -28
- package/src/accessorPropagation/useEntitySubTree.ts +3 -4
- package/src/accessorPropagation/useEntitySubTreeLoader.ts +113 -28
- package/src/accessorPropagation/useField.ts +3 -3
- package/src/accessorSorting/SetOrderFieldOnCreate.tsx +2 -2
- package/src/accessorSorting/addEntityAtIndex.ts +1 -1
- package/src/accessorSorting/index.ts +0 -2
- package/src/accessorSorting/repairEntitiesOrder.ts +1 -1
- package/src/accessorSorting/sortEntities.ts +2 -2
- package/src/accessorTree/AccessorTree.tsx +17 -12
- package/src/accessorTree/AccessorTreeState.ts +1 -4
- package/src/accessorTree/AccessorTreeStateOptions.ts +0 -2
- package/src/accessorTree/index.ts +0 -1
- package/src/accessorTree/useDataBinding.ts +35 -44
- package/src/accessorTree/useEnvironmentWithSchema.ts +31 -0
- package/src/coreComponents/Component.tsx +2 -2
- package/src/coreComponents/DataBindingProvider.tsx +22 -35
- package/src/coreComponents/EntityListSubTree.tsx +4 -18
- package/src/coreComponents/EntitySubTree.tsx +5 -20
- package/src/coreComponents/Field.tsx +0 -2
- package/src/coreComponents/index.ts +0 -1
- package/src/entityEvents/index.ts +1 -0
- package/src/entityEvents/useDataBindingEvent.ts +16 -0
- package/src/entityEvents/useDerivedField.ts +3 -3
- package/src/entityEvents/useEntityEvent.ts +17 -14
- package/src/helperComponents/DeferredSubTrees.tsx +1 -5
- package/src/helperComponents/DeleteEntityTrigger.tsx +80 -0
- package/src/helperComponents/FieldView.tsx +1 -1
- package/src/helperComponents/RecursionTerminator.tsx +73 -0
- package/src/helperComponents/RecursionTerminatorPortal.tsx +32 -0
- package/src/helperComponents/helpers/evaluateCondition.ts +16 -23
- package/src/helperComponents/index.ts +5 -0
- package/src/helperComponents/persist/PersistOnFieldChange.tsx +53 -0
- package/src/helperComponents/persist/PersistOnHasOneChange.tsx +59 -0
- package/src/helperComponents/persist/PersistOnKey.tsx +64 -0
- package/src/helperComponents/persist/PersistTrigger.tsx +59 -0
- package/src/helperComponents/persist/index.tsx +4 -0
- package/src/helperComponents/persist/useDecoratedPersist.ts +26 -0
- package/src/index.ts +1 -1
- package/src/markers/IncrementalMarkerBuilder.ts +60 -0
- package/src/{coreComponents → markers}/MarkerProvider.ts +2 -2
- package/src/markers/MarkerStaticAnalyzer.ts +140 -0
- package/src/markers/MarkerTreeGenerator.ts +75 -0
- package/src/markers/index.ts +2 -0
- package/src/tsconfig.json +1 -1
- package/src/typings/react-fix.d.ts +12 -0
- package/tests/cases/unit/core/entityOperations.test.tsx +4 -4
- package/tests/cases/unit/core/eventManager.test.tsx +11 -8
- package/tests/cases/unit/helperComponents/FilterEvaluator.spec.ts +1 -1
- package/tests/cases/unit/helperComponents/FilterFieldsCollector.spec.ts +1 -1
- package/tests/cases/unit/helperComponents/evaluateCondition.spec.ts +1 -5
- package/tests/cases/unit/model/markerTreeGenerator.spec.tsx +68 -14
- package/tests/lib/bindingFactory.ts +1 -1
- package/dist/development/src/MarkerTreeGenerator.cjs +0 -89
- package/dist/development/src/MarkerTreeGenerator.cjs.map +0 -1
- package/dist/development/src/MarkerTreeGenerator.js +0 -89
- package/dist/development/src/MarkerTreeGenerator.js.map +0 -1
- package/dist/development/src/accessorPropagation/useGetTreeFilters.cjs +0 -6
- package/dist/development/src/accessorPropagation/useGetTreeFilters.cjs.map +0 -1
- package/dist/development/src/accessorPropagation/useGetTreeFilters.js +0 -6
- package/dist/development/src/accessorPropagation/useGetTreeFilters.js.map +0 -1
- package/dist/development/src/accessorSorting/errors.cjs +0 -10
- package/dist/development/src/accessorSorting/errors.cjs.map +0 -1
- package/dist/development/src/accessorSorting/errors.js +0 -10
- package/dist/development/src/accessorSorting/errors.js.map +0 -1
- package/dist/development/src/accessorSorting/moveEntity.cjs +0 -42
- package/dist/development/src/accessorSorting/moveEntity.cjs.map +0 -1
- package/dist/development/src/accessorSorting/moveEntity.js +0 -42
- package/dist/development/src/accessorSorting/moveEntity.js.map +0 -1
- package/dist/development/src/accessorSorting/useSortedEntities.cjs +0 -80
- package/dist/development/src/accessorSorting/useSortedEntities.cjs.map +0 -1
- package/dist/development/src/accessorSorting/useSortedEntities.js +0 -80
- package/dist/development/src/accessorSorting/useSortedEntities.js.map +0 -1
- package/dist/development/src/accessorTree/accessorTreeStateReducer.cjs +0 -34
- package/dist/development/src/accessorTree/accessorTreeStateReducer.cjs.map +0 -1
- package/dist/development/src/accessorTree/accessorTreeStateReducer.js +0 -34
- package/dist/development/src/accessorTree/accessorTreeStateReducer.js.map +0 -1
- package/dist/development/src/core/IncrementalMarkerBuilder.cjs +0 -63
- package/dist/development/src/core/IncrementalMarkerBuilder.cjs.map +0 -1
- package/dist/development/src/core/IncrementalMarkerBuilder.js +0 -63
- package/dist/development/src/core/IncrementalMarkerBuilder.js.map +0 -1
- package/dist/production/src/MarkerTreeGenerator.cjs +0 -89
- package/dist/production/src/MarkerTreeGenerator.cjs.map +0 -1
- package/dist/production/src/MarkerTreeGenerator.js +0 -89
- package/dist/production/src/MarkerTreeGenerator.js.map +0 -1
- package/dist/production/src/accessorPropagation/useGetTreeFilters.cjs +0 -6
- package/dist/production/src/accessorPropagation/useGetTreeFilters.cjs.map +0 -1
- package/dist/production/src/accessorPropagation/useGetTreeFilters.js +0 -6
- package/dist/production/src/accessorPropagation/useGetTreeFilters.js.map +0 -1
- package/dist/production/src/accessorSorting/errors.cjs +0 -10
- package/dist/production/src/accessorSorting/errors.cjs.map +0 -1
- package/dist/production/src/accessorSorting/errors.js +0 -10
- package/dist/production/src/accessorSorting/errors.js.map +0 -1
- package/dist/production/src/accessorSorting/moveEntity.cjs +0 -42
- package/dist/production/src/accessorSorting/moveEntity.cjs.map +0 -1
- package/dist/production/src/accessorSorting/moveEntity.js +0 -42
- package/dist/production/src/accessorSorting/moveEntity.js.map +0 -1
- package/dist/production/src/accessorSorting/useSortedEntities.cjs +0 -80
- package/dist/production/src/accessorSorting/useSortedEntities.cjs.map +0 -1
- package/dist/production/src/accessorSorting/useSortedEntities.js +0 -80
- package/dist/production/src/accessorSorting/useSortedEntities.js.map +0 -1
- package/dist/production/src/accessorTree/accessorTreeStateReducer.cjs +0 -34
- package/dist/production/src/accessorTree/accessorTreeStateReducer.cjs.map +0 -1
- package/dist/production/src/accessorTree/accessorTreeStateReducer.js +0 -34
- package/dist/production/src/accessorTree/accessorTreeStateReducer.js.map +0 -1
- package/dist/production/src/core/IncrementalMarkerBuilder.cjs +0 -63
- package/dist/production/src/core/IncrementalMarkerBuilder.cjs.map +0 -1
- package/dist/production/src/core/IncrementalMarkerBuilder.js +0 -63
- package/dist/production/src/core/IncrementalMarkerBuilder.js.map +0 -1
- package/dist/types/MarkerTreeGenerator.d.ts +0 -14
- package/dist/types/MarkerTreeGenerator.d.ts.map +0 -1
- package/dist/types/accessorPropagation/useGetTreeFilters.d.ts +0 -3
- package/dist/types/accessorPropagation/useGetTreeFilters.d.ts.map +0 -1
- package/dist/types/accessorSorting/errors.d.ts +0 -3
- package/dist/types/accessorSorting/errors.d.ts.map +0 -1
- package/dist/types/accessorSorting/moveEntity.d.ts +0 -4
- package/dist/types/accessorSorting/moveEntity.d.ts.map +0 -1
- package/dist/types/accessorSorting/useSortedEntities.d.ts +0 -5
- package/dist/types/accessorSorting/useSortedEntities.d.ts.map +0 -1
- package/dist/types/accessorTree/accessorTreeStateReducer.d.ts +0 -4
- package/dist/types/accessorTree/accessorTreeStateReducer.d.ts.map +0 -1
- package/dist/types/core/IncrementalMarkerBuilder.d.ts +0 -7
- package/dist/types/core/IncrementalMarkerBuilder.d.ts.map +0 -1
- package/dist/types/coreComponents/MarkerProvider.d.ts.map +0 -1
- package/src/MarkerTreeGenerator.ts +0 -121
- package/src/accessorPropagation/useGetTreeFilters.ts +0 -4
- package/src/accessorSorting/errors.ts +0 -9
- package/src/accessorSorting/moveEntity.ts +0 -65
- package/src/accessorSorting/useSortedEntities.ts +0 -102
- package/src/accessorTree/accessorTreeStateReducer.ts +0 -36
- package/src/core/IncrementalMarkerBuilder.ts +0 -64
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityKeyProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"EntityKeyProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EntityKeyProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { EntityKeyContext } from './EntityKeyContext'\nimport { EntityAccessor } from '@contember/binding'\n\nexport interface EntityKeyProviderProps {\n\tentityKey: string | (() => EntityAccessor)\n\tchildren: ReactNode\n}\n\nexport function EntityKeyProvider(props: EntityKeyProviderProps) {\n\treturn <EntityKeyContext.Provider value={props.entityKey}>{props.children}</EntityKeyContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,kBAAkB,OAA+B;AACzD,SAAA,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAAM,WAAY,gBAAM,UAAS;AAC3E;"}
|
|
@@ -8,16 +8,21 @@ const Component = require("../coreComponents/Component.cjs");
|
|
|
8
8
|
const EnvironmentContext = React.createContext(binding.Environment.create());
|
|
9
9
|
EnvironmentContext.displayName = "EnvironmentContext";
|
|
10
10
|
const EnvironmentMiddleware = Component.Component(
|
|
11
|
-
({ children, create }) => {
|
|
11
|
+
({ children, create, args }) => {
|
|
12
12
|
const env = useEnvironment.useEnvironment();
|
|
13
|
-
|
|
13
|
+
const envWithExtension = React.useMemo(
|
|
14
|
+
() => create(env, args ?? []),
|
|
15
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16
|
+
[env, create, ...args ?? []]
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EnvironmentContext.Provider, { value: envWithExtension, children });
|
|
14
19
|
},
|
|
15
20
|
{
|
|
16
21
|
staticRender: ({ children }) => {
|
|
17
22
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
18
23
|
},
|
|
19
|
-
generateEnvironment: ({ create }, env) => {
|
|
20
|
-
return create(env);
|
|
24
|
+
generateEnvironment: ({ create, args }, env) => {
|
|
25
|
+
return create(env, args ?? []);
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { createContext, ReactNode, useCallback } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps {\n\tchildren: ReactNode\n\tcreate: (env: Environment) => Environment\n}\n\nexport const EnvironmentMiddleware = Component(\n\t({ children, create }
|
|
1
|
+
{"version":3,"file":"EnvironmentContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":["createContext","Environment","Component","useEnvironment","useMemo","useCallback","jsx"],"mappings":";;;;;;;AAKO,MAAM,qBAAqBA,MAAAA,cAA2BC,QAAY,YAAA,OAAQ,CAAA;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwBC,UAAA;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAMC,eAAAA,eAAe;AAC3B,UAAM,mBAAmBC,MAAA;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA;AAAA,MAE5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAG,CAAA;AAAA,IAC9B;AAEA,0CAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,UAAS;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,mEAAU,UAAS;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAAA;AAAA,EAC9B;AAEF;AAQO,MAAM,+BAAgGF,UAAA;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAASG,MAAAA,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACjG,WAAAC,2BAAA,IAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AAChE,WAAAA,2BAAA,IAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EAAA;AAE1D;;;;"}
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useCallback } from "react";
|
|
2
|
+
import { createContext, useMemo, useCallback } from "react";
|
|
3
3
|
import { Environment } from "@contember/binding";
|
|
4
4
|
import { useEnvironment } from "./useEnvironment.js";
|
|
5
5
|
import { Component } from "../coreComponents/Component.js";
|
|
6
6
|
const EnvironmentContext = createContext(Environment.create());
|
|
7
7
|
EnvironmentContext.displayName = "EnvironmentContext";
|
|
8
8
|
const EnvironmentMiddleware = Component(
|
|
9
|
-
({ children, create }) => {
|
|
9
|
+
({ children, create, args }) => {
|
|
10
10
|
const env = useEnvironment();
|
|
11
|
-
|
|
11
|
+
const envWithExtension = useMemo(
|
|
12
|
+
() => create(env, args ?? []),
|
|
13
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14
|
+
[env, create, ...args ?? []]
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ jsx(EnvironmentContext.Provider, { value: envWithExtension, children });
|
|
12
17
|
},
|
|
13
18
|
{
|
|
14
19
|
staticRender: ({ children }) => {
|
|
15
20
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
16
21
|
},
|
|
17
|
-
generateEnvironment: ({ create }, env) => {
|
|
18
|
-
return create(env);
|
|
22
|
+
generateEnvironment: ({ create, args }, env) => {
|
|
23
|
+
return create(env, args ?? []);
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { createContext, ReactNode, useCallback } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps {\n\tchildren: ReactNode\n\tcreate: (env: Environment) => Environment\n}\n\nexport const EnvironmentMiddleware = Component(\n\t({ children, create }
|
|
1
|
+
{"version":3,"file":"EnvironmentContext.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/EnvironmentContext.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useCallback, useMemo } from 'react'\nimport { Environment } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\nimport { Component } from '../coreComponents'\n\nexport const EnvironmentContext = createContext<Environment>(Environment.create())\nEnvironmentContext.displayName = 'EnvironmentContext'\n\nexport interface EnvironmentMiddlewareProps<T extends unknown[]> {\n\tchildren: ReactNode\n\tcreate: (env: Environment, args: T) => Environment\n\targs?: T\n}\n\nexport const EnvironmentMiddleware = Component<EnvironmentMiddlewareProps<unknown[]>>(\n\t({ children, create, args }) => {\n\t\tconst env = useEnvironment()\n\t\tconst envWithExtension = useMemo(\n\t\t\t() => create(env, args ?? []),\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[env, create, ...(args ?? [])],\n\t\t)\n\n\t\treturn <EnvironmentContext.Provider value={envWithExtension}>{children}</EnvironmentContext.Provider>\n\t},\n\t{\n\t\tstaticRender: ({ children }) => {\n\t\t\treturn <>{children}</>\n\t\t},\n\t\tgenerateEnvironment: ({ create, args }, env) => {\n\t\t\treturn create(env, args ?? [])\n\t\t},\n\t},\n) as <T extends unknown[]>(props: EnvironmentMiddlewareProps<T>) => ReactNode\n\nexport interface EnvironmentWithExtensionProps<S, R> {\n\tchildren: ReactNode\n\textension: Environment.Extension<S, R>\n\tstate: S\n}\n\nexport const EnvironmentExtensionProvider: <S, R>(props: EnvironmentWithExtensionProps<S, R>) => ReactNode = Component(\n\t({ children, extension, state }) => {\n\t\tconst create = useCallback((env: Environment) => env.withExtension(extension, state), [extension, state])\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n\t({ children, extension, state }) => {\n\t\tconst create = (env: Environment) => env.withExtension(extension, state)\n\t\treturn <EnvironmentMiddleware create={create}>{children}</EnvironmentMiddleware>\n\t},\n)\n"],"names":[],"mappings":";;;;;AAKO,MAAM,qBAAqB,cAA2B,YAAY,OAAQ,CAAA;AACjF,mBAAmB,cAAc;AAQ1B,MAAM,wBAAwB;AAAA,EACpC,CAAC,EAAE,UAAU,QAAQ,WAAW;AAC/B,UAAM,MAAM,eAAe;AAC3B,UAAM,mBAAmB;AAAA,MACxB,MAAM,OAAO,KAAK,QAAQ,EAAE;AAAA;AAAA,MAE5B,CAAC,KAAK,QAAQ,GAAI,QAAQ,CAAG,CAAA;AAAA,IAC9B;AAEA,+BAAQ,mBAAmB,UAAnB,EAA4B,OAAO,kBAAmB,UAAS;AAAA,EACxE;AAAA,EACA;AAAA,IACC,cAAc,CAAC,EAAE,eAAe;AAC/B,6CAAU,UAAS;AAAA,IACpB;AAAA,IACA,qBAAqB,CAAC,EAAE,QAAQ,KAAA,GAAQ,QAAQ;AAC/C,aAAO,OAAO,KAAK,QAAQ,EAAE;AAAA,IAAA;AAAA,EAC9B;AAEF;AAQO,MAAM,+BAAgG;AAAA,EAC5G,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,YAAY,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK,GAAG,CAAC,WAAW,KAAK,CAAC;AACjG,WAAA,oBAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EACzD;AAAA,EACA,CAAC,EAAE,UAAU,WAAW,YAAY;AACnC,UAAM,SAAS,CAAC,QAAqB,IAAI,cAAc,WAAW,KAAK;AAChE,WAAA,oBAAC,uBAAsB,EAAA,QAAiB,SAAS,CAAA;AAAA,EAAA;AAE1D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootIdContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":["createContext"],"mappings":";;;AAGa,MAAA,oBAAoBA,
|
|
1
|
+
{"version":3,"file":"TreeRootIdContext.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { TreeRootId } from '@contember/binding'\n\nexport const TreeRootIdContext = createContext<undefined | TreeRootId>(undefined)\nTreeRootIdContext.displayName = 'TreeRootIdContext'\n"],"names":["createContext"],"mappings":";;;AAGa,MAAA,oBAAoBA,oBAAsC,MAAS;AAChF,kBAAkB,cAAc;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsx","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAAA,+BAACC,kBAAAA,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,
|
|
1
|
+
{"version":3,"file":"TreeRootIdProvider.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":["jsx","TreeRootIdContext"],"mappings":";;;;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAAA,+BAACC,kBAAAA,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,UAAS;AAC7E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAA,oBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,
|
|
1
|
+
{"version":3,"file":"TreeRootIdProvider.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/TreeRootIdProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TreeRootId } from '@contember/binding'\nimport { TreeRootIdContext } from './TreeRootIdContext'\n\nexport interface TreeRootIdProviderProps {\n\ttreeRootId: TreeRootId | undefined\n\tchildren: ReactNode\n}\n\nexport function TreeRootIdProvider(props: TreeRootIdProviderProps) {\n\treturn <TreeRootIdContext.Provider value={props.treeRootId}>{props.children}</TreeRootIdContext.Provider>\n}\n"],"names":[],"mappings":";;AASO,SAAS,mBAAmB,OAAgC;AAC3D,SAAA,oBAAC,kBAAkB,UAAlB,EAA2B,OAAO,MAAM,YAAa,gBAAM,UAAS;AAC7E;"}
|
|
@@ -1,55 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const reactUtils = require("@contember/react-utils");
|
|
4
3
|
const React = require("react");
|
|
5
|
-
|
|
6
|
-
const [state, setState] = React.useState(() => (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
reactUtils.useConstantValueInvariant(withForceUpdate, "useAccessorUpdateSubscription: cannot change the withForceUpdate value!");
|
|
11
|
-
let accessor = state.accessor;
|
|
12
|
-
if (state.getAccessor !== getAccessor) {
|
|
13
|
-
setState({
|
|
14
|
-
accessor: getAccessor(),
|
|
15
|
-
getAccessor
|
|
16
|
-
});
|
|
4
|
+
const useAccessorUpdateSubscription = (getAccessor) => {
|
|
5
|
+
const [state, setState] = React.useState(() => getAccessor());
|
|
6
|
+
const getterRef = React.useRef(getAccessor);
|
|
7
|
+
let accessor = state;
|
|
8
|
+
if (getterRef.current !== getAccessor) {
|
|
17
9
|
accessor = getAccessor();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (withForceUpdate) {
|
|
21
|
-
forceUpdate = React.useCallback(() => {
|
|
22
|
-
setState({
|
|
23
|
-
accessor: getAccessor(),
|
|
24
|
-
getAccessor
|
|
25
|
-
});
|
|
26
|
-
}, [getAccessor]);
|
|
10
|
+
setState(accessor);
|
|
11
|
+
getterRef.current = getAccessor;
|
|
27
12
|
}
|
|
28
13
|
React.useEffect(() => {
|
|
29
14
|
let isStillSubscribed = true;
|
|
30
15
|
const unsubscribe = getAccessor().addEventListener({ type: "update" }, (newAccessor) => {
|
|
31
|
-
if (!isStillSubscribed) {
|
|
16
|
+
if (!isStillSubscribed || getterRef.current !== getAccessor) {
|
|
32
17
|
return;
|
|
33
18
|
}
|
|
34
|
-
setState(
|
|
35
|
-
if (prevState.getAccessor !== getAccessor || prevState.accessor === newAccessor) {
|
|
36
|
-
return prevState;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
accessor: newAccessor,
|
|
40
|
-
getAccessor
|
|
41
|
-
};
|
|
42
|
-
});
|
|
19
|
+
setState(newAccessor);
|
|
43
20
|
});
|
|
44
21
|
return () => {
|
|
45
22
|
isStillSubscribed = false;
|
|
46
23
|
unsubscribe();
|
|
47
24
|
};
|
|
48
25
|
}, [getAccessor]);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
return accessor;
|
|
53
|
-
}
|
|
26
|
+
const update = React.useCallback(() => {
|
|
27
|
+
setState(getAccessor());
|
|
28
|
+
}, [getAccessor]);
|
|
29
|
+
return [accessor, { update }];
|
|
30
|
+
};
|
|
54
31
|
exports.useAccessorUpdateSubscription = useAccessorUpdateSubscription;
|
|
55
32
|
//# sourceMappingURL=useAccessorUpdateSubscription.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessorUpdateSubscription.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useAccessorUpdateSubscription.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <Accessor extends {\n\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n}>(getAccessor: () => Accessor): [Accessor, {update: () => void}] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":["useState","useRef","useEffect","useCallback"],"mappings":";;;AAKa,MAAA,gCAAgC,CAE1C,gBAAkE;AACpE,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAmB,MAAM,aAAa;AAC1D,QAAA,YAAYC,aAAO,WAAW;AAEpC,MAAI,WAAW;AACX,MAAA,UAAU,YAAY,aAAa;AACtC,eAAW,YAAY;AACvB,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EAAA;AAGrBC,QAAAA,UAAU,MAAM;AACf,QAAI,oBAAoB;AAClB,UAAA,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAe,gBAAA;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MAAA;AAED,eAAS,WAAW;AAAA,IAAA,CACpB;AAED,WAAO,MAAM;AACQ,0BAAA;AACR,kBAAA;AAAA,IACb;AAAA,EAAA,GACE,CAAC,WAAW,CAAC;AAEV,QAAA,SAASC,MAAAA,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EAAA,GACpB,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;;"}
|
|
@@ -1,54 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}));
|
|
8
|
-
useConstantValueInvariant(withForceUpdate, "useAccessorUpdateSubscription: cannot change the withForceUpdate value!");
|
|
9
|
-
let accessor = state.accessor;
|
|
10
|
-
if (state.getAccessor !== getAccessor) {
|
|
11
|
-
setState({
|
|
12
|
-
accessor: getAccessor(),
|
|
13
|
-
getAccessor
|
|
14
|
-
});
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
2
|
+
const useAccessorUpdateSubscription = (getAccessor) => {
|
|
3
|
+
const [state, setState] = useState(() => getAccessor());
|
|
4
|
+
const getterRef = useRef(getAccessor);
|
|
5
|
+
let accessor = state;
|
|
6
|
+
if (getterRef.current !== getAccessor) {
|
|
15
7
|
accessor = getAccessor();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (withForceUpdate) {
|
|
19
|
-
forceUpdate = useCallback(() => {
|
|
20
|
-
setState({
|
|
21
|
-
accessor: getAccessor(),
|
|
22
|
-
getAccessor
|
|
23
|
-
});
|
|
24
|
-
}, [getAccessor]);
|
|
8
|
+
setState(accessor);
|
|
9
|
+
getterRef.current = getAccessor;
|
|
25
10
|
}
|
|
26
11
|
useEffect(() => {
|
|
27
12
|
let isStillSubscribed = true;
|
|
28
13
|
const unsubscribe = getAccessor().addEventListener({ type: "update" }, (newAccessor) => {
|
|
29
|
-
if (!isStillSubscribed) {
|
|
14
|
+
if (!isStillSubscribed || getterRef.current !== getAccessor) {
|
|
30
15
|
return;
|
|
31
16
|
}
|
|
32
|
-
setState(
|
|
33
|
-
if (prevState.getAccessor !== getAccessor || prevState.accessor === newAccessor) {
|
|
34
|
-
return prevState;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
accessor: newAccessor,
|
|
38
|
-
getAccessor
|
|
39
|
-
};
|
|
40
|
-
});
|
|
17
|
+
setState(newAccessor);
|
|
41
18
|
});
|
|
42
19
|
return () => {
|
|
43
20
|
isStillSubscribed = false;
|
|
44
21
|
unsubscribe();
|
|
45
22
|
};
|
|
46
23
|
}, [getAccessor]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
return accessor;
|
|
51
|
-
}
|
|
24
|
+
const update = useCallback(() => {
|
|
25
|
+
setState(getAccessor());
|
|
26
|
+
}, [getAccessor]);
|
|
27
|
+
return [accessor, { update }];
|
|
28
|
+
};
|
|
52
29
|
export {
|
|
53
30
|
useAccessorUpdateSubscription
|
|
54
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessorUpdateSubscription.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useAccessorUpdateSubscription.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useAccessorUpdateSubscription.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\n/**\n * It is VERY IMPORTANT for the parameter to be referentially stable!\n */\nexport const useAccessorUpdateSubscription = <Accessor extends {\n\taddEventListener: (event: { type: 'update' }, cb: (accessor: Accessor) => void) => () => void\n}>(getAccessor: () => Accessor): [Accessor, {update: () => void}] => {\n\tconst [state, setState] = useState<Accessor>(() => getAccessor())\n\tconst getterRef = useRef(getAccessor)\n\n\tlet accessor = state\n\tif (getterRef.current !== getAccessor) {\n\t\taccessor = getAccessor()\n\t\tsetState(accessor)\n\t\tgetterRef.current = getAccessor\n\t}\n\n\tuseEffect(() => {\n\t\tlet isStillSubscribed = true\n\t\tconst unsubscribe = getAccessor().addEventListener({ type: 'update' }, newAccessor => {\n\t\t\tif (!isStillSubscribed || getterRef.current !== getAccessor) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetState(newAccessor)\n\t\t})\n\n\t\treturn () => {\n\t\t\tisStillSubscribed = false\n\t\t\tunsubscribe()\n\t\t}\n\t}, [getAccessor])\n\n\tconst update = useCallback(() => {\n\t\tsetState(getAccessor())\n\t}, [getAccessor])\n\n\treturn [accessor, { update }]\n}\n"],"names":[],"mappings":";AAKa,MAAA,gCAAgC,CAE1C,gBAAkE;AACpE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAmB,MAAM,aAAa;AAC1D,QAAA,YAAY,OAAO,WAAW;AAEpC,MAAI,WAAW;AACX,MAAA,UAAU,YAAY,aAAa;AACtC,eAAW,YAAY;AACvB,aAAS,QAAQ;AACjB,cAAU,UAAU;AAAA,EAAA;AAGrB,YAAU,MAAM;AACf,QAAI,oBAAoB;AAClB,UAAA,cAAc,cAAc,iBAAiB,EAAE,MAAM,SAAA,GAAY,CAAe,gBAAA;AACrF,UAAI,CAAC,qBAAqB,UAAU,YAAY,aAAa;AAC5D;AAAA,MAAA;AAED,eAAS,WAAW;AAAA,IAAA,CACpB;AAED,WAAO,MAAM;AACQ,0BAAA;AACR,kBAAA;AAAA,IACb;AAAA,EAAA,GACE,CAAC,WAAW,CAAC;AAEV,QAAA,SAAS,YAAY,MAAM;AAChC,aAAS,aAAa;AAAA,EAAA,GACpB,CAAC,WAAW,CAAC;AAEhB,SAAO,CAAC,UAAU,EAAE,QAAQ;AAC7B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA2D;AAC3D,MAAA;AAEJ,MAAI,8BAA8B,QAAW;AAClC,cAAA;AAAA,EAAA,WACA,OAAO,8BAA8B,UAAU;AAC/C,cAAA;AACU,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,UACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAC7B;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EAEF;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeEntityList.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeEntityList.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeEntityList, SugaredRelativeEntityList } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList,\n): RelativeEntityList\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined\n/**\n * @deprecated Use useEntityList instead.\n */\nfunction useDesugaredRelativeEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): RelativeEntityList | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeEntityList | undefined = undefined\n\tlet hasList: boolean\n\n\tif (sugaredRelativeEntityList === undefined) {\n\t\thasList = false\n\t} else if (typeof sugaredRelativeEntityList === 'string') {\n\t\thasList = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeEntityList,\n\t\t}\n\t} else {\n\t\thasList = true\n\t\tnormalizedSugared = sugaredRelativeEntityList\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasList\n\t\t\t\t? QueryLanguage.desugarRelativeEntityList(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\toffset: normalizedSugared?.offset,\n\t\t\t\t\t\tlimit: normalizedSugared?.limit,\n\t\t\t\t\t\torderBy: normalizedSugared?.orderBy,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tnormalizedSugared?.field,\n\t\t\tnormalizedSugared?.setOnCreate,\n\t\t\tnormalizedSugared?.isNonbearing,\n\t\t\tnormalizedSugared?.offset,\n\t\t\tnormalizedSugared?.limit,\n\t\t\tnormalizedSugared?.orderBy,\n\t\t\thasList,\n\t\t\tenvironment,\n\t\t],\n\t)\n}\n\nexport { useDesugaredRelativeEntityList }\n"],"names":[],"mappings":";;;AAoBA,SAAS,+BACR,2BACiC;AACjC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA2D;AAC3D,MAAA;AAEJ,MAAI,8BAA8B,QAAW;AAClC,cAAA;AAAA,EAAA,WACA,OAAO,8BAA8B,UAAU;AAC/C,cAAA;AACU,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACI,cAAA;AACU,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,UACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,aAAa,mBAAmB;AAAA,QAChC,cAAc,mBAAmB;AAAA,QACjC,QAAQ,mBAAmB;AAAA,QAC3B,OAAO,mBAAmB;AAAA,QAC1B,SAAS,mBAAmB;AAAA,MAC7B;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ;AAAA,MACC,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,IAAA;AAAA,EAEF;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeSingleEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA6D;AAC7D,MAAA;AAEJ,MAAI,gCAAgC,QAAW;AAClC,gBAAA;AAAA,EAAA,WACF,OAAO,gCAAgC,UAAU;AAC/C,gBAAA;AACQ,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,YACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EACnH;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeSingleEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleEntity.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleEntity, SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity,\n): RelativeSingleEntity\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined\n/**\n * @deprecated Use useEntity instead.\n */\nfunction useDesugaredRelativeSingleEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): RelativeSingleEntity | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleEntity | undefined = undefined\n\tlet hasEntity: boolean\n\n\tif (sugaredRelativeSingleEntity === undefined) {\n\t\thasEntity = false\n\t} else if (typeof sugaredRelativeSingleEntity === 'string') {\n\t\thasEntity = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleEntity,\n\t\t}\n\t} else {\n\t\thasEntity = true\n\t\tnormalizedSugared = sugaredRelativeSingleEntity\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasEntity\n\t\t\t\t? QueryLanguage.desugarRelativeSingleEntity(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t\tsetOnCreate: normalizedSugared?.setOnCreate,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.isNonbearing, normalizedSugared?.setOnCreate, environment, hasEntity],\n\t)\n}\n\nexport { useDesugaredRelativeSingleEntity }\n"],"names":[],"mappings":";;;AAoBA,SAAS,iCACR,6BACmC;AACnC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA6D;AAC7D,MAAA;AAEJ,MAAI,gCAAgC,QAAW;AAClC,gBAAA;AAAA,EAAA,WACF,OAAO,gCAAgC,UAAU;AAC/C,gBAAA;AACQ,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACM,gBAAA;AACQ,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,YACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,aAAa,mBAAmB;AAAA,MACjC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,aAAa,aAAa,SAAS;AAAA,EACnH;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeSingleField.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":["useEnvironment","useMemo","QueryLanguage"],"mappings":";;;;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAcA,eAAAA,eAAe;AAEnC,MAAI,oBAA4D;AAC5D,MAAA;AAEJ,MAAI,+BAA+B,QAAW;AAClC,eAAA;AAAA,EAAA,WACD,OAAO,+BAA+B,UAAU;AAC/C,eAAA;AACS,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EAAA;AAGd,SAAAC,MAAA;AAAA,IACN,MACC,WACGC,QAAAA,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EACnH;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"useDesugaredRelativeSingleField.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useDesugaredRelativeSingleField.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { QueryLanguage } from '@contember/binding'\nimport type { RelativeSingleField, SugaredRelativeSingleField } from '@contember/binding'\nimport { useEnvironment } from './useEnvironment'\n\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField,\n): RelativeSingleField\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined\n/**\n * @deprecated Use useField instead.\n */\nfunction useDesugaredRelativeSingleField(\n\tsugaredRelativeSingleField: string | SugaredRelativeSingleField | undefined,\n): RelativeSingleField | undefined {\n\tconst environment = useEnvironment()\n\n\tlet normalizedSugared: SugaredRelativeSingleField | undefined = undefined\n\tlet hasField: boolean\n\n\tif (sugaredRelativeSingleField === undefined) {\n\t\thasField = false\n\t} else if (typeof sugaredRelativeSingleField === 'string') {\n\t\thasField = true\n\t\tnormalizedSugared = {\n\t\t\tfield: sugaredRelativeSingleField,\n\t\t}\n\t} else {\n\t\thasField = true\n\t\tnormalizedSugared = sugaredRelativeSingleField\n\t}\n\n\treturn useMemo(\n\t\t() =>\n\t\t\thasField\n\t\t\t\t? QueryLanguage.desugarRelativeSingleField(\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: normalizedSugared!.field,\n\t\t\t\t\t\tdefaultValue: normalizedSugared?.defaultValue,\n\t\t\t\t\t\tisNonbearing: normalizedSugared?.isNonbearing,\n\t\t\t\t\t},\n\t\t\t\t\tenvironment,\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[normalizedSugared?.field, normalizedSugared?.defaultValue, normalizedSugared?.isNonbearing, environment, hasField],\n\t)\n}\n\nexport { useDesugaredRelativeSingleField }\n"],"names":[],"mappings":";;;AAoBA,SAAS,gCACR,4BACkC;AAClC,QAAM,cAAc,eAAe;AAEnC,MAAI,oBAA4D;AAC5D,MAAA;AAEJ,MAAI,+BAA+B,QAAW;AAClC,eAAA;AAAA,EAAA,WACD,OAAO,+BAA+B,UAAU;AAC/C,eAAA;AACS,wBAAA;AAAA,MACnB,OAAO;AAAA,IACR;AAAA,EAAA,OACM;AACK,eAAA;AACS,wBAAA;AAAA,EAAA;AAGd,SAAA;AAAA,IACN,MACC,WACG,cAAc;AAAA,MACf;AAAA,QACC,OAAO,kBAAmB;AAAA,QAC1B,cAAc,mBAAmB;AAAA,QACjC,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA;AAAA,IAEC,IAAA;AAAA;AAAA,IAEJ,CAAC,mBAAmB,OAAO,mBAAmB,cAAc,mBAAmB,cAAc,aAAa,QAAQ;AAAA,EACnH;AACD;"}
|
|
@@ -13,22 +13,22 @@ function useEntity(...entity) {
|
|
|
13
13
|
const getEntityByKey = useGetEntityByKey.useGetEntityByKey();
|
|
14
14
|
if (entity.length === 0) {
|
|
15
15
|
const getEntityAccessor = React.useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey]);
|
|
16
|
-
return useAccessorUpdateSubscription.useAccessorUpdateSubscription(getEntityAccessor);
|
|
16
|
+
return useAccessorUpdateSubscription.useAccessorUpdateSubscription(getEntityAccessor)[0];
|
|
17
17
|
}
|
|
18
18
|
const sugaredRelativeSingleEntity = entity[0];
|
|
19
19
|
const relativeSingleEntity = useDesugaredRelativeSingleEntity.useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity);
|
|
20
20
|
const getEntity = React.useCallback(() => {
|
|
21
21
|
const parent = getEntityByKey(entityKey);
|
|
22
|
-
return parent.
|
|
22
|
+
return parent.getEntity(relativeSingleEntity);
|
|
23
23
|
}, [entityKey, getEntityByKey, relativeSingleEntity]);
|
|
24
24
|
if (relativeSingleEntity) {
|
|
25
25
|
reactUtils.useConstantLengthInvariant(
|
|
26
26
|
relativeSingleEntity.hasOneRelationPath,
|
|
27
27
|
"Cannot change the length of the hasOneRelation path!"
|
|
28
28
|
);
|
|
29
|
-
const [entity2,
|
|
29
|
+
const [entity2, { update }] = useAccessorUpdateSubscription.useAccessorUpdateSubscription(getEntity);
|
|
30
30
|
if (relativeSingleEntity.hasOneRelationPath.length) {
|
|
31
|
-
useOnConnectionUpdate.useOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field,
|
|
31
|
+
useOnConnectionUpdate.useOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update);
|
|
32
32
|
}
|
|
33
33
|
return entity2;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.
|
|
1
|
+
{"version":3,"file":"useEntity.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useAccessorUpdateSubscription","useDesugaredRelativeSingleEntity","useConstantLengthInvariant","entity","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAcA,SAAS,aAAa,QAA6F;AACxFA,uCAAA,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAYC,aAAAA,aAAa;AAC/B,QAAM,iBAAiBC,kBAAAA,kBAAkB;AAErC,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoBC,kBAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAE3F,WAAAC,8BAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAAA;AAEpD,QAAA,8BAA8B,OAAO,CAAC;AAGtC,QAAA,uBAAuBC,kEAAiC,2BAA2B;AAEnF,QAAA,YAAYF,MAAAA,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,UAAU,oBAAqB;AAAA,EAC3C,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzBG,eAAA;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IACD;AAEA,UAAM,CAACC,SAAQ,EAAE,OAAQ,CAAA,IAAIH,8BAAAA,8BAA8B,SAAS;AAEhE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnDI,4BAAA,sBAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGxED,WAAAA;AAAAA,EAAA;AAED,SAAA;AACR;;"}
|
|
@@ -11,22 +11,22 @@ function useEntity(...entity) {
|
|
|
11
11
|
const getEntityByKey = useGetEntityByKey();
|
|
12
12
|
if (entity.length === 0) {
|
|
13
13
|
const getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey]);
|
|
14
|
-
return useAccessorUpdateSubscription(getEntityAccessor);
|
|
14
|
+
return useAccessorUpdateSubscription(getEntityAccessor)[0];
|
|
15
15
|
}
|
|
16
16
|
const sugaredRelativeSingleEntity = entity[0];
|
|
17
17
|
const relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity);
|
|
18
18
|
const getEntity = useCallback(() => {
|
|
19
19
|
const parent = getEntityByKey(entityKey);
|
|
20
|
-
return parent.
|
|
20
|
+
return parent.getEntity(relativeSingleEntity);
|
|
21
21
|
}, [entityKey, getEntityByKey, relativeSingleEntity]);
|
|
22
22
|
if (relativeSingleEntity) {
|
|
23
23
|
useConstantLengthInvariant(
|
|
24
24
|
relativeSingleEntity.hasOneRelationPath,
|
|
25
25
|
"Cannot change the length of the hasOneRelation path!"
|
|
26
26
|
);
|
|
27
|
-
const [entity2,
|
|
27
|
+
const [entity2, { update }] = useAccessorUpdateSubscription(getEntity);
|
|
28
28
|
if (relativeSingleEntity.hasOneRelationPath.length) {
|
|
29
|
-
useOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field,
|
|
29
|
+
useOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update);
|
|
30
30
|
}
|
|
31
31
|
return entity2;
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.
|
|
1
|
+
{"version":3,"file":"useEntity.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntity.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeSingleEntity } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeSingleEntity } from './useDesugaredRelativeSingleEntity'\n\nfunction useEntity(): EntityAccessor\nfunction useEntity(sugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity): EntityAccessor\nfunction useEntity(\n\tsugaredRelativeSingleEntity: string | SugaredRelativeSingleEntity | undefined,\n): EntityAccessor | undefined\nfunction useEntity(...entity: [] | [string | SugaredRelativeSingleEntity | undefined]): EntityAccessor | undefined {\n\tuseConstantValueInvariant(entity.length, 'useEntity: cannot alternate between providing and omitting the argument.')\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\n\tif (entity.length === 0) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst getEntityAccessor = useCallback(() => getEntityByKey(entityKey), [entityKey, getEntityByKey])\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\treturn useAccessorUpdateSubscription(getEntityAccessor)[0]\n\t}\n\tconst sugaredRelativeSingleEntity = entity[0]\n\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst relativeSingleEntity = useDesugaredRelativeSingleEntity(sugaredRelativeSingleEntity)\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst getEntity = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntity(relativeSingleEntity!)\n\t}, [entityKey, getEntityByKey, relativeSingleEntity])\n\n\tif (relativeSingleEntity) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeSingleEntity.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entity, { update }] = useAccessorUpdateSubscription(getEntity)\n\n\t\tif (relativeSingleEntity.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeSingleEntity.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entity\n\t}\n\treturn undefined\n}\n\nexport { useEntity }\n"],"names":["entity"],"mappings":";;;;;;;AAcA,SAAS,aAAa,QAA6F;AACxF,4BAAA,OAAO,QAAQ,0EAA0E;AAEnH,QAAM,YAAY,aAAa;AAC/B,QAAM,iBAAiB,kBAAkB;AAErC,MAAA,OAAO,WAAW,GAAG;AAElB,UAAA,oBAAoB,YAAY,MAAM,eAAe,SAAS,GAAG,CAAC,WAAW,cAAc,CAAC;AAE3F,WAAA,8BAA8B,iBAAiB,EAAE,CAAC;AAAA,EAAA;AAEpD,QAAA,8BAA8B,OAAO,CAAC;AAGtC,QAAA,uBAAuB,iCAAiC,2BAA2B;AAEnF,QAAA,YAAY,YAAY,MAAM;AAC7B,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,UAAU,oBAAqB;AAAA,EAC3C,GAAA,CAAC,WAAW,gBAAgB,oBAAoB,CAAC;AAEpD,MAAI,sBAAsB;AAEzB;AAAA,MACC,qBAAqB;AAAA,MACrB;AAAA,IACD;AAEA,UAAM,CAACA,SAAQ,EAAE,OAAQ,CAAA,IAAI,8BAA8B,SAAS;AAEhE,QAAA,qBAAqB,mBAAmB,QAAQ;AAEnD,4BAAsB,qBAAqB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGxEA,WAAAA;AAAAA,EAAA;AAED,SAAA;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useEntityKey.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":["useContext","EntityKeyContext","BindingError"],"mappings":";;;;;AAIO,MAAM,eAAe,MAAuC;AAC5D,QAAA,YAAYA,iBAAWC,iCAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAIC,QAAA;AAAA,MACT;AAAA,IAED;AAAA,EAAA;AAEM,SAAA;AACR;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useEntityKey.js","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityKey.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { BindingError, EntityAccessor } from '@contember/binding'\nimport { EntityKeyContext } from './EntityKeyContext'\n\nexport const useEntityKey = (): string | (() => EntityAccessor) => {\n\tconst entityKey = useContext(EntityKeyContext)\n\n\tif (entityKey === undefined) {\n\t\tthrow new BindingError(\n\t\t\t`Trying to use a data bound component outside a correct parent. You likely forgot to use <DataBindingProvider /> ` +\n\t\t\t\t`or a SubTree.`,\n\t\t)\n\t}\n\treturn entityKey\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,eAAe,MAAuC;AAC5D,QAAA,YAAY,WAAW,gBAAgB;AAE7C,MAAI,cAAc,QAAW;AAC5B,UAAM,IAAI;AAAA,MACT;AAAA,IAED;AAAA,EAAA;AAEM,SAAA;AACR;"}
|
|
@@ -17,16 +17,16 @@ function useEntityList(sugaredRelativeEntityList) {
|
|
|
17
17
|
const getEntityByKey = useGetEntityByKey.useGetEntityByKey();
|
|
18
18
|
const getEntityList = React.useCallback(() => {
|
|
19
19
|
const parent = getEntityByKey(entityKey);
|
|
20
|
-
return parent.
|
|
20
|
+
return parent.getEntityList(relativeEntityList);
|
|
21
21
|
}, [entityKey, getEntityByKey, relativeEntityList]);
|
|
22
22
|
if (relativeEntityList) {
|
|
23
23
|
reactUtils.useConstantLengthInvariant(
|
|
24
24
|
relativeEntityList.hasOneRelationPath,
|
|
25
25
|
"Cannot change the length of the hasOneRelation path!"
|
|
26
26
|
);
|
|
27
|
-
const [entityList,
|
|
27
|
+
const [entityList, { update }] = useAccessorUpdateSubscription.useAccessorUpdateSubscription(getEntityList);
|
|
28
28
|
if (relativeEntityList.hasOneRelationPath.length) {
|
|
29
|
-
useOnConnectionUpdate.useOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field,
|
|
29
|
+
useOnConnectionUpdate.useOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update);
|
|
30
30
|
}
|
|
31
31
|
return entityList;
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.
|
|
1
|
+
{"version":3,"file":"useEntityList.cjs","sources":["../../../../../packages/react-binding/src/accessorPropagation/useEntityList.ts"],"sourcesContent":["import { useConstantLengthInvariant, useConstantValueInvariant } from '@contember/react-utils'\nimport { useCallback } from 'react'\nimport { useEntityKey, useGetEntityByKey } from './index'\nimport type { EntityListAccessor } from '@contember/binding'\nimport { useOnConnectionUpdate } from '../entityEvents'\nimport type { SugaredRelativeEntityList } from '@contember/binding'\nimport { useAccessorUpdateSubscription } from './useAccessorUpdateSubscription'\nimport { useDesugaredRelativeEntityList } from './useDesugaredRelativeEntityList'\n\nfunction useEntityList(sugaredRelativeEntityList: string | SugaredRelativeEntityList): EntityListAccessor\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined\nfunction useEntityList(\n\tsugaredRelativeEntityList: string | SugaredRelativeEntityList | undefined,\n): EntityListAccessor | undefined {\n\tconst relativeEntityList = useDesugaredRelativeEntityList(sugaredRelativeEntityList)\n\tuseConstantValueInvariant(\n\t\t!!relativeEntityList,\n\t\t'useEntityList: cannot alternate between providing and omitting the argument.',\n\t)\n\n\tconst entityKey = useEntityKey()\n\tconst getEntityByKey = useGetEntityByKey()\n\tconst getEntityList = useCallback(() => {\n\t\tconst parent = getEntityByKey(entityKey)\n\t\treturn parent.getEntityList(relativeEntityList!)\n\t}, [entityKey, getEntityByKey, relativeEntityList])\n\n\tif (relativeEntityList) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseConstantLengthInvariant(\n\t\t\trelativeEntityList.hasOneRelationPath,\n\t\t\t'Cannot change the length of the hasOneRelation path!',\n\t\t)\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst [entityList, { update }] = useAccessorUpdateSubscription(getEntityList)\n\n\t\tif (relativeEntityList.hasOneRelationPath.length) {\n\t\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\t\tuseOnConnectionUpdate(relativeEntityList.hasOneRelationPath[0].field, update)\n\t\t}\n\n\t\treturn entityList\n\t}\n\treturn undefined\n}\n\nexport { useEntityList }\n"],"names":["useDesugaredRelativeEntityList","useConstantValueInvariant","useEntityKey","useGetEntityByKey","useCallback","useConstantLengthInvariant","useAccessorUpdateSubscription","useOnConnectionUpdate"],"mappings":";;;;;;;;;AAaA,SAAS,cACR,2BACiC;AAC3B,QAAA,qBAAqBA,8DAA+B,yBAAyB;AACnFC,aAAA;AAAA,IACC,CAAC,CAAC;AAAA,IACF;AAAA,EACD;AAEA,QAAM,YAAYC,aAAAA,aAAa;AAC/B,QAAM,iBAAiBC,kBAAAA,kBAAkB;AACnC,QAAA,gBAAgBC,MAAAA,YAAY,MAAM;AACjC,UAAA,SAAS,eAAe,SAAS;AAChC,WAAA,OAAO,cAAc,kBAAmB;AAAA,EAC7C,GAAA,CAAC,WAAW,gBAAgB,kBAAkB,CAAC;AAElD,MAAI,oBAAoB;AAEvBC,eAAA;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,IACD;AAEA,UAAM,CAAC,YAAY,EAAE,OAAQ,CAAA,IAAIC,8BAAAA,8BAA8B,aAAa;AAExE,QAAA,mBAAmB,mBAAmB,QAAQ;AAEjDC,4BAAA,sBAAsB,mBAAmB,mBAAmB,CAAC,EAAE,OAAO,MAAM;AAAA,IAAA;AAGtE,WAAA;AAAA,EAAA;AAED,SAAA;AACR;;"}
|