UNPKG

@wordpress/upload-media

Version:
29 lines (28 loc) 673 B
// packages/upload-media/src/store/selectors.ts function getItems(state) { return state.queue; } function isUploading(state) { return state.queue.length >= 1; } function isUploadingByUrl(state, url) { return state.queue.some( (item) => item.attachment?.url === url || item.sourceUrl === url ); } function isUploadingById(state, attachmentId) { return state.queue.some( (item) => item.attachment?.id === attachmentId || item.sourceAttachmentId === attachmentId ); } function getSettings(state) { return state.settings; } export { getItems, getSettings, isUploading, isUploadingById, isUploadingByUrl }; //# sourceMappingURL=selectors.mjs.map