@gechiui/block-editor
Version:
24 lines (23 loc) • 660 B
JavaScript
/**
* GeChiUI dependencies
*/
import { useSelect } from '@gechiui/data';
/**
* Internal dependencies
*/
import { store as blockEditorStore } from '../../store';
export default function useListViewClientIds(blocks) {
return useSelect(select => {
const {
getDraggedBlockClientIds,
getSelectedBlockClientIds,
__unstableGetClientIdsTree
} = select(blockEditorStore);
return {
selectedClientIds: getSelectedBlockClientIds(),
draggedClientIds: getDraggedBlockClientIds(),
clientIdsTree: blocks ? blocks : __unstableGetClientIdsTree()
};
}, [blocks]);
}
//# sourceMappingURL=use-list-view-client-ids.js.map