@wordpress/block-directory 4.35.0 → 5.0.0
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/CHANGELOG.md +6 -0
- package/build/components/block-ratings/index.js +7 -6
- package/build/components/block-ratings/index.js.map +1 -1
- package/build/components/block-ratings/stars.js +23 -25
- package/build/components/block-ratings/stars.js.map +1 -1
- package/build/components/compact-list/index.js +26 -22
- package/build/components/compact-list/index.js.map +1 -1
- package/build/components/downloadable-block-icon/index.js +3 -3
- package/build/components/downloadable-block-icon/index.js.map +1 -1
- package/build/components/downloadable-block-list-item/index.js +37 -27
- package/build/components/downloadable-block-list-item/index.js.map +1 -1
- package/build/components/downloadable-block-notice/index.js +8 -6
- package/build/components/downloadable-block-notice/index.js.map +1 -1
- package/build/components/downloadable-blocks-list/index.js +26 -26
- package/build/components/downloadable-blocks-list/index.js.map +1 -1
- package/build/components/downloadable-blocks-panel/index.js +24 -17
- package/build/components/downloadable-blocks-panel/index.js.map +1 -1
- package/build/components/downloadable-blocks-panel/inserter-panel.js +21 -14
- package/build/components/downloadable-blocks-panel/inserter-panel.js.map +1 -1
- package/build/components/downloadable-blocks-panel/no-results.js +20 -11
- package/build/components/downloadable-blocks-panel/no-results.js.map +1 -1
- package/build/plugins/get-install-missing/index.js +18 -15
- package/build/plugins/get-install-missing/index.js.map +1 -1
- package/build/plugins/get-install-missing/install-button.js +6 -5
- package/build/plugins/get-install-missing/install-button.js.map +1 -1
- package/build/plugins/index.js +4 -2
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js +21 -19
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +1 -1
- package/build/plugins/installed-blocks-pre-publish-panel/index.js +10 -8
- package/build/plugins/installed-blocks-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/block-ratings/index.js +7 -6
- package/build-module/components/block-ratings/index.js.map +1 -1
- package/build-module/components/block-ratings/stars.js +24 -25
- package/build-module/components/block-ratings/stars.js.map +1 -1
- package/build-module/components/compact-list/index.js +27 -22
- package/build-module/components/compact-list/index.js.map +1 -1
- package/build-module/components/downloadable-block-icon/index.js +3 -3
- package/build-module/components/downloadable-block-icon/index.js.map +1 -1
- package/build-module/components/downloadable-block-list-item/index.js +39 -27
- package/build-module/components/downloadable-block-list-item/index.js.map +1 -1
- package/build-module/components/downloadable-block-notice/index.js +9 -6
- package/build-module/components/downloadable-block-notice/index.js.map +1 -1
- package/build-module/components/downloadable-blocks-list/index.js +26 -26
- package/build-module/components/downloadable-blocks-list/index.js.map +1 -1
- package/build-module/components/downloadable-blocks-panel/index.js +26 -17
- package/build-module/components/downloadable-blocks-panel/index.js.map +1 -1
- package/build-module/components/downloadable-blocks-panel/inserter-panel.js +23 -14
- package/build-module/components/downloadable-blocks-panel/inserter-panel.js.map +1 -1
- package/build-module/components/downloadable-blocks-panel/no-results.js +22 -11
- package/build-module/components/downloadable-blocks-panel/no-results.js.map +1 -1
- package/build-module/plugins/get-install-missing/index.js +19 -15
- package/build-module/plugins/get-install-missing/index.js.map +1 -1
- package/build-module/plugins/get-install-missing/install-button.js +6 -5
- package/build-module/plugins/get-install-missing/install-button.js.map +1 -1
- package/build-module/plugins/index.js +6 -2
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js +21 -19
- package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +1 -1
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.js +11 -8
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.js.map +1 -1
- package/package.json +23 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Spinner","store","coreStore","useSelect","getBlockType","DownloadableBlocksList","DownloadableBlocksInserterPanel","DownloadableBlocksNoResults","blockDirectoryStore","EMPTY_ARRAY","useDownloadableBlocks","filterValue","select","getDownloadableBlocks","isRequestingDownloadableBlocks","getInstalledBlockTypes","hasPermission","canUser","downloadableBlocks","installedBlockTypes","installableBlocks","filter","name","isJustInstalled","some","blockType","isPreviouslyInstalled","length","isLoading","DownloadableBlocksPanel","onSelect","onHover","hasLocalBlocks","isTyping","undefined","
|
|
1
|
+
{"version":3,"names":["__","Spinner","store","coreStore","useSelect","getBlockType","DownloadableBlocksList","DownloadableBlocksInserterPanel","DownloadableBlocksNoResults","blockDirectoryStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","EMPTY_ARRAY","useDownloadableBlocks","filterValue","select","getDownloadableBlocks","isRequestingDownloadableBlocks","getInstalledBlockTypes","hasPermission","canUser","downloadableBlocks","installedBlockTypes","installableBlocks","filter","name","isJustInstalled","some","blockType","isPreviouslyInstalled","length","isLoading","DownloadableBlocksPanel","onSelect","onHover","hasLocalBlocks","isTyping","undefined","children","className","downloadableItems","items"],"sources":["@wordpress/block-directory/src/components/downloadable-blocks-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,YAAY,QAAQ,mBAAmB;;AAEhD;AACA;AACA;AACA,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,OAAOC,+BAA+B,MAAM,kBAAkB;AAC9D,OAAOC,2BAA2B,MAAM,cAAc;AACtD,SAASN,KAAK,IAAIO,mBAAmB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;A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from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
5
4
|
import { __, _n, sprintf } from '@wordpress/i18n';
|
|
6
5
|
import { useEffect } from '@wordpress/element';
|
|
7
6
|
import { speak } from '@wordpress/a11y';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
10
|
function DownloadableBlocksInserterPanel({
|
|
9
11
|
children,
|
|
10
12
|
downloadableItems,
|
|
@@ -15,19 +17,26 @@ function DownloadableBlocksInserterPanel({
|
|
|
15
17
|
speak(sprintf( /* translators: %d: number of available blocks. */
|
|
16
18
|
_n('%d additional block is available to install.', '%d additional blocks are available to install.', count), count));
|
|
17
19
|
}, [count]);
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
21
|
+
children: [!hasLocalBlocks && /*#__PURE__*/_jsx("p", {
|
|
22
|
+
className: "block-directory-downloadable-blocks-panel__no-local",
|
|
23
|
+
children: __('No results available from your installed blocks.')
|
|
24
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
25
|
+
className: "block-editor-inserter__quick-inserter-separator"
|
|
26
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
className: "block-directory-downloadable-blocks-panel",
|
|
28
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
29
|
+
className: "block-directory-downloadable-blocks-panel__header",
|
|
30
|
+
children: [/*#__PURE__*/_jsx("h2", {
|
|
31
|
+
className: "block-directory-downloadable-blocks-panel__title",
|
|
32
|
+
children: __('Available to install')
|
|
33
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
34
|
+
className: "block-directory-downloadable-blocks-panel__description",
|
|
35
|
+
children: __('Select a block to install and add it to your post.')
|
|
36
|
+
})]
|
|
37
|
+
}), children]
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
31
40
|
}
|
|
32
41
|
export default DownloadableBlocksInserterPanel;
|
|
33
42
|
//# sourceMappingURL=inserter-panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_n","sprintf","useEffect","speak","DownloadableBlocksInserterPanel","children","downloadableItems","hasLocalBlocks","count","length","
|
|
1
|
+
{"version":3,"names":["__","_n","sprintf","useEffect","speak","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DownloadableBlocksInserterPanel","children","downloadableItems","hasLocalBlocks","count","length","className"],"sources":["@wordpress/block-directory/src/components/downloadable-blocks-panel/inserter-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAExC,SAASC,+BAA+BA,CAAE;EACzCC,QAAQ;EACRC,iBAAiB;EACjBC;AACD,CAAC,EAAG;EACH,MAAMC,KAAK,GAAGF,iBAAiB,CAACG,MAAM;EACtCb,SAAS,CAAE,MAAM;IAChBC,KAAK,CACJF,OAAO,EACN;IACAD,EAAE,CACD,8CAA8C,EAC9C,gDAAgD,EAChDc,KACD,CAAC,EACDA,KACD,CACD,CAAC;EACF,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EAEd,oBACCP,KAAA,CAAAE,SAAA;IAAAE,QAAA,GACG,CAAEE,cAAc,iBACjBR,IAAA;MAAGW,SAAS,EAAC,qDAAqD;MAAAL,QAAA,EAC/DZ,EAAE,CAAE,kDAAmD;IAAC,CACxD,CACH,eAEDM,IAAA;MAAKW,SAAS,EAAC;IAAiD,CAAE,CAAC,eAEnET,KAAA;MAAKS,SAAS,EAAC,2CAA2C;MAAAL,QAAA,gBACzDJ,KAAA;QAAKS,SAAS,EAAC,mDAAmD;QAAAL,QAAA,gBACjEN,IAAA;UAAIW,SAAS,EAAC,kDAAkD;UAAAL,QAAA,EAC7DZ,EAAE,CAAE,sBAAuB;QAAC,CAC3B,CAAC,eACLM,IAAA;UAAGW,SAAS,EAAC,wDAAwD;UAAAL,QAAA,EAClEZ,EAAE,CACH,oDACD;QAAC,CACC,CAAC;MAAA,CACA,CAAC,EACJY,QAAQ;IAAA,CACN,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeD,+BAA+B","ignoreList":[]}
|
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
5
4
|
import { __ } from '@wordpress/i18n';
|
|
6
5
|
import { Icon, blockDefault } from '@wordpress/icons';
|
|
7
6
|
import { Tip, ExternalLink } from '@wordpress/components';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
10
|
function DownloadableBlocksNoResults() {
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
12
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
13
|
+
className: "block-editor-inserter__no-results",
|
|
14
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
15
|
+
className: "block-editor-inserter__no-results-icon",
|
|
16
|
+
icon: blockDefault
|
|
17
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
18
|
+
children: __('No results found.')
|
|
19
|
+
})]
|
|
20
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
21
|
+
className: "block-editor-inserter__tips",
|
|
22
|
+
children: /*#__PURE__*/_jsxs(Tip, {
|
|
23
|
+
children: [__('Interested in creating your own block?'), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsxs(ExternalLink, {
|
|
24
|
+
href: "https://developer.wordpress.org/block-editor/",
|
|
25
|
+
children: [__('Get started here'), "."]
|
|
26
|
+
})]
|
|
27
|
+
})
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
19
30
|
}
|
|
20
31
|
export default DownloadableBlocksNoResults;
|
|
21
32
|
//# sourceMappingURL=no-results.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Icon","blockDefault","Tip","ExternalLink","
|
|
1
|
+
{"version":3,"names":["__","Icon","blockDefault","Tip","ExternalLink","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DownloadableBlocksNoResults","children","className","icon","href"],"sources":["@wordpress/block-directory/src/components/downloadable-blocks-panel/no-results.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, blockDefault } from '@wordpress/icons';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<Icon\n\t\t\t\t\tclassName=\"block-editor-inserter__no-results-icon\"\n\t\t\t\t\ticon={ blockDefault }\n\t\t\t\t/>\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,YAAY,QAAQ,kBAAkB;AACrD,SAASC,GAAG,EAAEC,YAAY,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE1D,SAASC,2BAA2BA,CAAA,EAAG;EACtC,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCJ,KAAA;MAAKK,SAAS,EAAC,mCAAmC;MAAAD,QAAA,gBACjDN,IAAA,CAACL,IAAI;QACJY,SAAS,EAAC,wCAAwC;QAClDC,IAAI,EAAGZ;MAAc,CACrB,CAAC,eACFI,IAAA;QAAAM,QAAA,EAAKZ,EAAE,CAAE,mBAAoB;MAAC,CAAK,CAAC;IAAA,CAChC,CAAC,eACNM,IAAA;MAAKO,SAAS,EAAC,6BAA6B;MAAAD,QAAA,eAC3CJ,KAAA,CAACL,GAAG;QAAAS,QAAA,GACDZ,EAAE,CAAE,wCAAyC,CAAC,eAChDM,IAAA,SAAK,CAAC,eACNE,KAAA,CAACJ,YAAY;UAACW,IAAI,EAAC,+CAA+C;UAAAH,QAAA,GAC/DZ,EAAE,CAAE,kBAAmB,CAAC,EAAE,GAC7B;QAAA,CAAc,CAAC;MAAA,CACX;IAAC,CACF,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeW,2BAA2B","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -15,6 +14,8 @@ import { Warning, useBlockProps, store as blockEditorStore } from '@wordpress/bl
|
|
|
15
14
|
*/
|
|
16
15
|
import InstallButton from './install-button';
|
|
17
16
|
import { store as blockDirectoryStore } from '../../store';
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
const getInstallMissing = OriginalComponent => props => {
|
|
19
20
|
const {
|
|
20
21
|
originalName
|
|
@@ -39,11 +40,11 @@ const getInstallMissing = OriginalComponent => props => {
|
|
|
39
40
|
|
|
40
41
|
// The user can't install blocks, or the block isn't available for download.
|
|
41
42
|
if (!hasPermission || !block) {
|
|
42
|
-
return
|
|
43
|
+
return /*#__PURE__*/_jsx(OriginalComponent, {
|
|
43
44
|
...props
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
return
|
|
47
|
+
return /*#__PURE__*/_jsx(ModifiedWarning, {
|
|
47
48
|
...props,
|
|
48
49
|
originalBlock: block
|
|
49
50
|
});
|
|
@@ -75,26 +76,29 @@ const ModifiedWarning = ({
|
|
|
75
76
|
}, [clientId]);
|
|
76
77
|
let messageHTML = sprintf( /* translators: %s: block name */
|
|
77
78
|
__('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'), originalBlock.title || originalName);
|
|
78
|
-
const actions = [
|
|
79
|
-
key: "install",
|
|
79
|
+
const actions = [/*#__PURE__*/_jsx(InstallButton, {
|
|
80
80
|
block: originalBlock,
|
|
81
81
|
attributes: props.attributes,
|
|
82
82
|
clientId: props.clientId
|
|
83
|
-
})];
|
|
83
|
+
}, "install")];
|
|
84
84
|
if (hasContent && hasHTMLBlock) {
|
|
85
85
|
messageHTML = sprintf( /* translators: %s: block name */
|
|
86
86
|
__('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName);
|
|
87
|
-
actions.push(
|
|
88
|
-
key: "convert",
|
|
87
|
+
actions.push( /*#__PURE__*/_jsx(Button, {
|
|
89
88
|
onClick: convertToHTML,
|
|
90
|
-
variant: "tertiary"
|
|
91
|
-
|
|
89
|
+
variant: "tertiary",
|
|
90
|
+
children: __('Keep as HTML')
|
|
91
|
+
}, "convert"));
|
|
92
92
|
}
|
|
93
|
-
return
|
|
94
|
-
...useBlockProps()
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
94
|
+
...useBlockProps(),
|
|
95
|
+
children: [/*#__PURE__*/_jsx(Warning, {
|
|
96
|
+
actions: actions,
|
|
97
|
+
children: messageHTML
|
|
98
|
+
}), /*#__PURE__*/_jsx(RawHTML, {
|
|
99
|
+
children: originalUndelimitedContent
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
98
102
|
};
|
|
99
103
|
export default getInstallMissing;
|
|
100
104
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","Button","createBlock","RawHTML","useDispatch","useSelect","store","coreStore","Warning","useBlockProps","blockEditorStore","InstallButton","blockDirectoryStore","getInstallMissing","OriginalComponent","props","originalName","attributes","block","hasPermission","select","getDownloadableBlocks","blocks","filter","name","canUser","length","
|
|
1
|
+
{"version":3,"names":["__","sprintf","Button","createBlock","RawHTML","useDispatch","useSelect","store","coreStore","Warning","useBlockProps","blockEditorStore","InstallButton","blockDirectoryStore","jsx","_jsx","jsxs","_jsxs","getInstallMissing","OriginalComponent","props","originalName","attributes","block","hasPermission","select","getDownloadableBlocks","blocks","filter","name","canUser","length","ModifiedWarning","originalBlock","originalUndelimitedContent","clientId","replaceBlock","convertToHTML","content","hasContent","hasHTMLBlock","canInsertBlockType","getBlockRootClientId","messageHTML","title","actions","push","onClick","variant","children"],"sources":["@wordpress/block-directory/src/plugins/get-install-missing/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { RawHTML } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tWarning,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport InstallButton from './install-button';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst getInstallMissing = ( OriginalComponent ) => ( props ) => {\n\tconst { originalName } = props.attributes;\n\t// Disable reason: This is a valid component, but it's mistaken for a callback.\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst { block, hasPermission } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getDownloadableBlocks } = select( blockDirectoryStore );\n\t\t\tconst blocks = getDownloadableBlocks(\n\t\t\t\t'block:' + originalName\n\t\t\t).filter( ( { name } ) => originalName === name );\n\t\t\treturn {\n\t\t\t\thasPermission: select( coreStore ).canUser(\n\t\t\t\t\t'read',\n\t\t\t\t\t'block-directory/search'\n\t\t\t\t),\n\t\t\t\tblock: blocks.length && blocks[ 0 ],\n\t\t\t};\n\t\t},\n\t\t[ originalName ]\n\t);\n\n\t// The user can't install blocks, or the block isn't available for download.\n\tif ( ! hasPermission || ! block ) {\n\t\treturn <OriginalComponent { ...props } />;\n\t}\n\n\treturn <ModifiedWarning { ...props } originalBlock={ block } />;\n};\n\nconst ModifiedWarning = ( { originalBlock, ...props } ) => {\n\tconst { originalName, originalUndelimitedContent, clientId } =\n\t\tprops.attributes;\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst convertToHTML = () => {\n\t\treplaceBlock(\n\t\t\tprops.clientId,\n\t\t\tcreateBlock( 'core/html', {\n\t\t\t\tcontent: originalUndelimitedContent,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst hasContent = !! originalUndelimitedContent;\n\tconst hasHTMLBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn canInsertBlockType(\n\t\t\t\t'core/html',\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tlet messageHTML = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__(\n\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'\n\t\t),\n\t\toriginalBlock.title || originalName\n\t);\n\tconst actions = [\n\t\t<InstallButton\n\t\t\tkey=\"install\"\n\t\t\tblock={ originalBlock }\n\t\t\tattributes={ props.attributes }\n\t\t\tclientId={ props.clientId }\n\t\t/>,\n\t];\n\n\tif ( hasContent && hasHTMLBlock ) {\n\t\tmessageHTML = sprintf(\n\t\t\t/* translators: %s: block name */\n\t\t\t__(\n\t\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'\n\t\t\t),\n\t\t\toriginalBlock.title || originalName\n\t\t);\n\t\tactions.push(\n\t\t\t<Button key=\"convert\" onClick={ convertToHTML } variant=\"tertiary\">\n\t\t\t\t{ __( 'Keep as HTML' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<Warning actions={ actions }>{ messageHTML }</Warning>\n\t\t\t<RawHTML>{ originalUndelimitedContent }</RawHTML>\n\t\t</div>\n\t);\n};\n\nexport default getInstallMissing;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,OAAO,EACPC,aAAa,EACbH,KAAK,IAAII,gBAAgB,QACnB,yBAAyB;;AAEhC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASL,KAAK,IAAIM,mBAAmB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3D,MAAMC,iBAAiB,GAAKC,iBAAiB,IAAQC,KAAK,IAAM;EAC/D,MAAM;IAAEC;EAAa,CAAC,GAAGD,K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ies
|
|
4
3
|
*/
|
|
@@ -12,6 +11,7 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
12
11
|
* Internal dependencies
|
|
13
12
|
*/
|
|
14
13
|
import { store as blockDirectoryStore } from '../../store';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
export default function InstallButton({
|
|
16
16
|
attributes,
|
|
17
17
|
block,
|
|
@@ -24,7 +24,7 @@ export default function InstallButton({
|
|
|
24
24
|
const {
|
|
25
25
|
replaceBlock
|
|
26
26
|
} = useDispatch(blockEditorStore);
|
|
27
|
-
return
|
|
27
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
28
28
|
onClick: () => installBlockType(block).then(success => {
|
|
29
29
|
if (success) {
|
|
30
30
|
const blockType = getBlockType(block.name);
|
|
@@ -36,8 +36,9 @@ export default function InstallButton({
|
|
|
36
36
|
}),
|
|
37
37
|
disabled: isInstallingBlock,
|
|
38
38
|
isBusy: isInstallingBlock,
|
|
39
|
-
variant: "primary"
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
variant: "primary",
|
|
40
|
+
children: sprintf( /* translators: %s: block name */
|
|
41
|
+
__('Install %s'), block.title)
|
|
42
|
+
});
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=install-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","Button","createBlock","getBlockType","parse","useSelect","useDispatch","store","blockEditorStore","blockDirectoryStore","InstallButton","attributes","block","clientId","isInstallingBlock","select","isInstalling","id","installBlockType","replaceBlock","
|
|
1
|
+
{"version":3,"names":["__","sprintf","Button","createBlock","getBlockType","parse","useSelect","useDispatch","store","blockEditorStore","blockDirectoryStore","jsx","_jsx","InstallButton","attributes","block","clientId","isInstallingBlock","select","isInstalling","id","installBlockType","replaceBlock","onClick","then","success","blockType","name","originalBlock","originalContent","innerBlocks","disabled","isBusy","variant","children","title"],"sources":["@wordpress/block-directory/src/plugins/get-install-missing/install-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock, getBlockType, parse } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstallButton( { attributes, block, clientId } ) {\n\tconst isInstallingBlock = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).isInstalling( block.id ),\n\t\t[ block.id ]\n\t);\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\tonClick={ () =>\n\t\t\t\tinstallBlockType( block ).then( ( success ) => {\n\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\t\t\tconst [ originalBlock ] = parse(\n\t\t\t\t\t\t\tattributes.originalContent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( originalBlock && blockType ) {\n\t\t\t\t\t\t\treplaceBlock(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\tblockType.name,\n\t\t\t\t\t\t\t\t\toriginalBlock.attributes,\n\t\t\t\t\t\t\t\t\toriginalBlock.innerBlocks\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t\tdisabled={ isInstallingBlock }\n\t\t\tisBusy={ isInstallingBlock }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: block name */\n\t\t\t\t__( 'Install %s' ),\n\t\t\t\tblock.title\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,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B;IAC5BgB,OAAO,EAAC,SAAS;IAAAC,QAAA,EAEfjC,OAAO,EACR;IACAD,EAAE,CAAE,YAAa,CAAC,EAClBe,KAAK,CAACoB,KACP;EAAC,CACM,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -12,9 +11,14 @@ import AutoBlockUninstaller from '../components/auto-block-uninstaller';
|
|
|
12
11
|
import InserterMenuDownloadableBlocksPanel from './inserter-menu-downloadable-blocks-panel';
|
|
13
12
|
import InstalledBlocksPrePublishPanel from './installed-blocks-pre-publish-panel';
|
|
14
13
|
import getInstallMissing from './get-install-missing';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
17
|
registerPlugin('block-directory', {
|
|
16
18
|
render() {
|
|
17
|
-
return
|
|
19
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx(AutoBlockUninstaller, {}), /*#__PURE__*/_jsx(InserterMenuDownloadableBlocksPanel, {}), /*#__PURE__*/_jsx(InstalledBlocksPrePublishPanel, {})]
|
|
21
|
+
});
|
|
18
22
|
}
|
|
19
23
|
});
|
|
20
24
|
addFilter('blocks.registerBlockType', 'block-directory/fallback', (settings, name) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerPlugin","addFilter","AutoBlockUninstaller","InserterMenuDownloadableBlocksPanel","InstalledBlocksPrePublishPanel","getInstallMissing","
|
|
1
|
+
{"version":3,"names":["registerPlugin","addFilter","AutoBlockUninstaller","InserterMenuDownloadableBlocksPanel","InstalledBlocksPrePublishPanel","getInstallMissing","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","render","children","settings","name","edit"],"sources":["@wordpress/block-directory/src/plugins/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { registerPlugin } from '@wordpress/plugins';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport AutoBlockUninstaller from '../components/auto-block-uninstaller';\nimport InserterMenuDownloadableBlocksPanel from './inserter-menu-downloadable-blocks-panel';\nimport InstalledBlocksPrePublishPanel from './installed-blocks-pre-publish-panel';\nimport getInstallMissing from './get-install-missing';\n\nregisterPlugin( 'block-directory', {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<AutoBlockUninstaller />\n\t\t\t\t<InserterMenuDownloadableBlocksPanel />\n\t\t\t\t<InstalledBlocksPrePublishPanel />\n\t\t\t</>\n\t\t);\n\t},\n} );\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'block-directory/fallback',\n\t( settings, name ) => {\n\t\tif ( name !== 'core/missing' ) {\n\t\t\treturn settings;\n\t\t}\n\t\tsettings.edit = getInstallMissing( settings.edit );\n\n\t\treturn settings;\n\t}\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,oBAAoB;AACnD,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,sCAAsC;AACvE,OAAOC,mCAAmC,MAAM,2CAA2C;AAC3F,OAAOC,8BAA8B,MAAM,sCAAsC;AACjF,OAAOC,iBAAiB,MAAM,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEtDX,cAAc,CAAE,iBAAiB,EAAE;EAClCY,MAAMA,CAAA,EAAG;IACR,oBACCD,KAAA,CAAAF,SAAA;MAAAI,QAAA,gBACCN,IAAA,CAACL,oBAAoB,IAAE,CAAC,eACxBK,IAAA,CAACJ,mCAAmC,IAAE,CAAC,eACvCI,IAAA,CAACH,8BAA8B,IAAE,CAAC;IAAA,CACjC,CAAC;EAEL;AACD,CAAE,CAAC;AAEHH,SAAS,CACR,0BAA0B,EAC1B,0BAA0B,EAC1B,CAAEa,QAAQ,EAAEC,IAAI,KAAM;EACrB,IAAKA,IAAI,KAAK,cAAc,EAAG;IAC9B,OAAOD,QAAQ;EAChB;EACAA,QAAQ,CAACE,IAAI,GAAGX,iBAAiB,CAAES,QAAQ,CAACE,IAAK,CAAC;EAElD,OAAOF,QAAQ;AAChB,CACD,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -10,28 +9,31 @@ import { useState } from '@wordpress/element';
|
|
|
10
9
|
* Internal dependencies
|
|
11
10
|
*/
|
|
12
11
|
import DownloadableBlocksPanel from '../../components/downloadable-blocks-panel';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
function InserterMenuDownloadableBlocksPanel() {
|
|
14
14
|
const [debouncedFilterValue, setFilterValue] = useState('');
|
|
15
15
|
const debouncedSetFilterValue = debounce(setFilterValue, 400);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
return /*#__PURE__*/_jsx(__unstableInserterMenuExtension, {
|
|
17
|
+
children: ({
|
|
18
|
+
onSelect,
|
|
19
|
+
onHover,
|
|
20
|
+
filterValue,
|
|
21
|
+
hasItems
|
|
22
|
+
}) => {
|
|
23
|
+
if (debouncedFilterValue !== filterValue) {
|
|
24
|
+
debouncedSetFilterValue(filterValue);
|
|
25
|
+
}
|
|
26
|
+
if (!debouncedFilterValue) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/_jsx(DownloadableBlocksPanel, {
|
|
30
|
+
onSelect: onSelect,
|
|
31
|
+
onHover: onHover,
|
|
32
|
+
filterValue: debouncedFilterValue,
|
|
33
|
+
hasLocalBlocks: hasItems,
|
|
34
|
+
isTyping: filterValue !== debouncedFilterValue
|
|
35
|
+
});
|
|
24
36
|
}
|
|
25
|
-
if (!debouncedFilterValue) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return createElement(DownloadableBlocksPanel, {
|
|
29
|
-
onSelect: onSelect,
|
|
30
|
-
onHover: onHover,
|
|
31
|
-
filterValue: debouncedFilterValue,
|
|
32
|
-
hasLocalBlocks: hasItems,
|
|
33
|
-
isTyping: filterValue !== debouncedFilterValue
|
|
34
|
-
});
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
export default InserterMenuDownloadableBlocksPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__unstableInserterMenuExtension","debounce","useState","DownloadableBlocksPanel","InserterMenuDownloadableBlocksPanel","debouncedFilterValue","setFilterValue","debouncedSetFilterValue","
|
|
1
|
+
{"version":3,"names":["__unstableInserterMenuExtension","debounce","useState","DownloadableBlocksPanel","jsx","_jsx","InserterMenuDownloadableBlocksPanel","debouncedFilterValue","setFilterValue","debouncedSetFilterValue","children","onSelect","onHover","filterValue","hasItems","hasLocalBlocks","isTyping"],"sources":["@wordpress/block-directory/src/plugins/inserter-menu-downloadable-blocks-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableInserterMenuExtension } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksPanel from '../../components/downloadable-blocks-panel';\n\nfunction InserterMenuDownloadableBlocksPanel() {\n\tconst [ debouncedFilterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSetFilterValue = debounce( setFilterValue, 400 );\n\n\treturn (\n\t\t<__unstableInserterMenuExtension>\n\t\t\t{ ( { onSelect, onHover, filterValue, hasItems } ) => {\n\t\t\t\tif ( debouncedFilterValue !== filterValue ) {\n\t\t\t\t\tdebouncedSetFilterValue( filterValue );\n\t\t\t\t}\n\n\t\t\t\tif ( ! debouncedFilterValue ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<DownloadableBlocksPanel\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\tfilterValue={ debouncedFilterValue }\n\t\t\t\t\t\thasLocalBlocks={ hasItems }\n\t\t\t\t\t\tisTyping={ filterValue !== debouncedFilterValue }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</__unstableInserterMenuExtension>\n\t);\n}\n\nexport default InserterMenuDownloadableBlocksPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,4CAA4C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjF,SAASC,mCAAmCA,CAAA,EAAG;EAC9C,MAAM,CAAEC,oBAAoB,EAAEC,cAAc,CAAE,GAAGN,QAAQ,CAAE,EAAG,CAAC;EAC/D,MAAMO,uBAAuB,GAAGR,QAAQ,CAAEO,cAAc,EAAE,GAAI,CAAC;EAE/D,oBACCH,IAAA,CAACL,+BAA+B;IAAAU,QAAA,EAC7BA,CAAE;MAAEC,QAAQ;MAAEC,OAAO;MAAEC,WAAW;MAAEC;IAAS,CAAC,KAAM;MACrD,IAAKP,oBAAoB,KAAKM,WAAW,EAAG;QAC3CJ,uBAAuB,CAAEI,WAAY,CAAC;MACvC;MAEA,IAAK,CAAEN,oBAAoB,EAAG;QAC7B,OAAO,IAAI;MACZ;MAEA,oBACCF,IAAA,CAACF,uBAAuB;QACvBQ,QAAQ,EAAGA,QAAU;QACrBC,OAAO,EAAGA,OAAS;QACnBC,WAAW,EAAGN,oBAAsB;QACpCQ,cAAc,EAAGD,QAAU;QAC3BE,QAAQ,EAAGH,WAAW,KAAKN;MAAsB,CACjD,CAAC;IAEJ;EAAC,CAC+B,CAAC;AAEpC;AAEA,eAAeD,mCAAmC","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _window$wp$editor;
|
|
2
|
-
import { createElement } from "react";
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -15,6 +14,8 @@ import { store as blockDirectoryStore } from '../../store';
|
|
|
15
14
|
|
|
16
15
|
// We shouldn't import the editor package directly
|
|
17
16
|
// because it would include the wp-editor in all pages loading the block-directory script.
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
const {
|
|
19
20
|
PluginPrePublishPanel
|
|
20
21
|
} = (_window$wp$editor = window?.wp?.editor) !== null && _window$wp$editor !== void 0 ? _window$wp$editor : {};
|
|
@@ -23,16 +24,18 @@ export default function InstalledBlocksPrePublishPanel() {
|
|
|
23
24
|
if (!newBlockTypes.length) {
|
|
24
25
|
return null;
|
|
25
26
|
}
|
|
26
|
-
return
|
|
27
|
+
return /*#__PURE__*/_jsxs(PluginPrePublishPanel, {
|
|
27
28
|
icon: blockDefault,
|
|
28
29
|
title: sprintf(
|
|
29
30
|
// translators: %d: number of blocks (number).
|
|
30
31
|
_n('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length),
|
|
31
|
-
initialOpen: true
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
initialOpen: true,
|
|
33
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
34
|
+
className: "installed-blocks-pre-publish-panel__copy",
|
|
35
|
+
children: _n('The following block has been added to your site.', 'The following blocks have been added to your site.', newBlockTypes.length)
|
|
36
|
+
}), /*#__PURE__*/_jsx(CompactList, {
|
|
37
|
+
items: newBlockTypes
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
37
40
|
}
|
|
38
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_n","sprintf","useSelect","blockDefault","CompactList","store","blockDirectoryStore","PluginPrePublishPanel","_window$wp$editor","window","wp","editor","InstalledBlocksPrePublishPanel","newBlockTypes","select","getNewBlockTypes","length","
|
|
1
|
+
{"version":3,"names":["_n","sprintf","useSelect","blockDefault","CompactList","store","blockDirectoryStore","jsx","_jsx","jsxs","_jsxs","PluginPrePublishPanel","_window$wp$editor","window","wp","editor","InstalledBlocksPrePublishPanel","newBlockTypes","select","getNewBlockTypes","length","icon","title","initialOpen","children","className","items"],"sources":["@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\n// We shouldn't import the editor package directly\n// because it would include the wp-editor in all pages loading the block-directory script.\nconst { PluginPrePublishPanel } = window?.wp?.editor ?? {};\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,+BAA+B;AACvD,SAASC,KAAK,IAAIC,mBAAmB,QAAQ,aAAa;;AAE1D;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AACA,MAAM;EAAEC;AAAsB,CAAC,IAAAC,iBAAA,GAAGC,MAAM,EAAEC,EAAE,EAAEC,MAAM,cAAAH,iBAAA,cAAAA,iBAAA,GAAI,CAAC,CAAC;AAE1D,eAAe,SAASI,8BAA8BA,CAAA,EAAG;EACxD,MAAMC,aAAa,GAAGf,SAAS,CAC5BgB,MAAM,IAAMA,MAAM,CAAEZ,mBAAoB,CAAC,CAACa,gBAAgB,CAAC,CAAC,EAC9D,EACD,CAAC;EAED,IAAK,CAAEF,aAAa,CAACG,MAAM,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,oBACCV,KAAA,CAACC,qBAAqB;IACrBU,IAAI,EAAGlB,YAAc;IACrBmB,KAAK,EAAGrB,OAAO;IACd;IACAD,EAAE,CACD,iBAAiB,EACjB,kBAAkB,EAClBiB,aAAa,CAACG,MACf,CAAC,EACDH,aAAa,CAACG,MACf,CAAG;IACHG,WAAW;IAAAC,QAAA,gBAEXhB,IAAA;MAAGiB,SAAS,EAAC,0CAA0C;MAAAD,QAAA,EACpDxB,EAAE,CACH,kDAAkD,EAClD,oDAAoD,EACpDiB,aAAa,CAACG,MACf;IAAC,CACC,CAAC,eACJZ,IAAA,CAACJ,WAAW;MAACsB,KAAK,EAAGT;IAAe,CAAE,CAAC;EAAA,CACjB,CAAC;AAE1B","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-directory",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Extend editor with block directory features to search, download and install blocks.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -19,32 +19,33 @@
|
|
|
19
19
|
"url": "https://github.com/WordPress/gutenberg/issues"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=12"
|
|
22
|
+
"node": ">=18.12.0",
|
|
23
|
+
"npm": ">=8.19.2"
|
|
23
24
|
},
|
|
24
25
|
"main": "build/index.js",
|
|
25
26
|
"module": "build-module/index.js",
|
|
26
27
|
"react-native": "src/index",
|
|
27
28
|
"dependencies": {
|
|
28
29
|
"@babel/runtime": "^7.16.0",
|
|
29
|
-
"@wordpress/a11y": "^
|
|
30
|
-
"@wordpress/api-fetch": "^
|
|
31
|
-
"@wordpress/block-editor": "^
|
|
32
|
-
"@wordpress/blocks": "^
|
|
33
|
-
"@wordpress/components": "^
|
|
34
|
-
"@wordpress/compose": "^
|
|
35
|
-
"@wordpress/core-data": "^
|
|
36
|
-
"@wordpress/data": "^
|
|
37
|
-
"@wordpress/edit-post": "^
|
|
38
|
-
"@wordpress/editor": "^
|
|
39
|
-
"@wordpress/element": "^
|
|
40
|
-
"@wordpress/hooks": "^
|
|
41
|
-
"@wordpress/html-entities": "^
|
|
42
|
-
"@wordpress/i18n": "^
|
|
43
|
-
"@wordpress/icons": "^
|
|
44
|
-
"@wordpress/notices": "^
|
|
45
|
-
"@wordpress/plugins": "^
|
|
46
|
-
"@wordpress/private-apis": "^0.
|
|
47
|
-
"@wordpress/url": "^
|
|
30
|
+
"@wordpress/a11y": "^4.0.0",
|
|
31
|
+
"@wordpress/api-fetch": "^7.0.0",
|
|
32
|
+
"@wordpress/block-editor": "^13.0.0",
|
|
33
|
+
"@wordpress/blocks": "^13.0.0",
|
|
34
|
+
"@wordpress/components": "^28.0.0",
|
|
35
|
+
"@wordpress/compose": "^7.0.0",
|
|
36
|
+
"@wordpress/core-data": "^7.0.0",
|
|
37
|
+
"@wordpress/data": "^10.0.0",
|
|
38
|
+
"@wordpress/edit-post": "^8.0.0",
|
|
39
|
+
"@wordpress/editor": "^14.0.0",
|
|
40
|
+
"@wordpress/element": "^6.0.0",
|
|
41
|
+
"@wordpress/hooks": "^4.0.0",
|
|
42
|
+
"@wordpress/html-entities": "^4.0.0",
|
|
43
|
+
"@wordpress/i18n": "^5.0.0",
|
|
44
|
+
"@wordpress/icons": "^10.0.0",
|
|
45
|
+
"@wordpress/notices": "^5.0.0",
|
|
46
|
+
"@wordpress/plugins": "^7.0.0",
|
|
47
|
+
"@wordpress/private-apis": "^1.0.0",
|
|
48
|
+
"@wordpress/url": "^4.0.0",
|
|
48
49
|
"change-case": "^4.1.2"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "2f30cddff15723ac7017fd009fc5913b7b419400"
|
|
58
59
|
}
|