@gechiui/block-editor
Version:
33 lines (28 loc) • 750 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useListViewClientIds;
var _data = require("@gechiui/data");
var _store = require("../../store");
/**
* GeChiUI dependencies
*/
/**
* Internal dependencies
*/
function useListViewClientIds(blocks) {
return (0, _data.useSelect)(select => {
const {
getDraggedBlockClientIds,
getSelectedBlockClientIds,
__unstableGetClientIdsTree
} = select(_store.store);
return {
selectedClientIds: getSelectedBlockClientIds(),
draggedClientIds: getDraggedBlockClientIds(),
clientIdsTree: blocks ? blocks : __unstableGetClientIdsTree()
};
}, [blocks]);
}
//# sourceMappingURL=use-list-view-client-ids.js.map