diff --git a/blocks/labelled-picture/build/block.json b/blocks/labelled-picture/build/block.json
index 4363b65..8cefcbc 100644
--- a/blocks/labelled-picture/build/block.json
+++ b/blocks/labelled-picture/build/block.json
@@ -19,6 +19,10 @@
"type": "boolean",
"default": "true"
},
+ "hasRoundedShadow": {
+ "type": "boolean",
+ "default": "false"
+ },
"hasFixedHeight": {
"type": "boolean",
"default": "true"
diff --git a/blocks/labelled-picture/build/index.asset.php b/blocks/labelled-picture/build/index.asset.php
index b069c45..02da0c8 100644
--- a/blocks/labelled-picture/build/index.asset.php
+++ b/blocks/labelled-picture/build/index.asset.php
@@ -1 +1 @@
- array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '37f4daef8c6929a4d497');
+ array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '6de2664ba6b7abf8bd92');
diff --git a/blocks/labelled-picture/build/index.js b/blocks/labelled-picture/build/index.js
index 9c2b227..4b73d00 100644
--- a/blocks/labelled-picture/build/index.js
+++ b/blocks/labelled-picture/build/index.js
@@ -38,6 +38,7 @@ function Edit({
const {
hasStickyLegend,
hasFixedHeight,
+ hasRoundedShadow,
showTitle,
pictureUrl,
pictureAlt,
@@ -85,6 +86,11 @@ function Edit({
showTitle
});
}
+ function handleHasRoundedShadow(hasRoundedShadow) {
+ setAttributes({
+ hasRoundedShadow
+ });
+ }
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
title: "L\xE9gende",
className: "homegrade-blocks-components-image__panel-body "
@@ -102,6 +108,10 @@ function Edit({
label: "Afficher le titre",
checked: showTitle,
onChange: handleShowTitle
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
+ label: "Rounded & Shadow",
+ checked: hasRoundedShadow,
+ onChange: handleHasRoundedShadow
})), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
title: "Source de l'image",
className: "homegrade-blocks-components-image__panel-body "
@@ -127,7 +137,8 @@ function Edit({
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
className: `homegrade-blocks-labelled-picture homegrade-blocks-labelled-picture--legend-${hasStickyLegend ? "sticky" : "normal"}
${hasFixedHeight ? "homegrade-blocks-labelled-picture--fixed-height" : ""}
- ${showTitle && pictureTitle ? "homegrade-blocks-labelled-picture--legend-has-title" : ""}`
+ ${showTitle && pictureTitle ? "homegrade-blocks-labelled-picture--legend-has-title" : ""}
+ ${hasRoundedShadow ? "homegrade-blocks-labelled-picture--rounded-shadow" : ""}`
})
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: pictureUrl,
@@ -215,6 +226,7 @@ function save({
const {
hasFixedHeight,
hasStickyLegend,
+ hasRoundedShadow,
showTitle,
pictureUrl,
pictureAlt,
@@ -224,7 +236,8 @@ function save({
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, pictureUrl && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
className: `homegrade-blocks-labelled-picture homegrade-blocks-labelled-picture--legend-${hasStickyLegend ? "sticky" : "normal"} ${hasFixedHeight ? "homegrade-blocks-labelled-picture--fixed-height" : ""}
- ${showTitle && pictureTitle ? "homegrade-blocks-labelled-picture--legend-has-title" : ""}`
+ ${showTitle && pictureTitle ? "homegrade-blocks-labelled-picture--legend-has-title" : ""}
+ ${hasRoundedShadow ? "homegrade-blocks-labelled-picture--rounded-shadow" : ""} singleLightbox-link`
})
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: pictureUrl,
@@ -367,7 +380,7 @@ module.exports = window["wp"]["primitives"];
\************************/
/***/ ((module) => {
-module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/labelled-picture","version":"0.1.0","title":"Image + Légende","category":"homegrade-blocks","icon":"smiley","description":"Bloc image contenant une légende autocollante","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasStickyLegend":{"type":"boolean","default":"true"},"hasFixedHeight":{"type":"boolean","default":"true"},"showTitle":{"type":"boolean","default":"true"},"pictureUrl":{"type":"string"},"pictureTitle":{"type":"string"},"pictureAlt":{"type":"string"},"pictureId":{"type":"number"},"pictureCaption":{"type":"string"}}}');
+module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/labelled-picture","version":"0.1.0","title":"Image + Légende","category":"homegrade-blocks","icon":"smiley","description":"Bloc image contenant une légende autocollante","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasStickyLegend":{"type":"boolean","default":"true"},"hasRoundedShadow":{"type":"boolean","default":"false"},"hasFixedHeight":{"type":"boolean","default":"true"},"showTitle":{"type":"boolean","default":"true"},"pictureUrl":{"type":"string"},"pictureTitle":{"type":"string"},"pictureAlt":{"type":"string"},"pictureId":{"type":"number"},"pictureCaption":{"type":"string"}}}');
/***/ })
diff --git a/blocks/labelled-picture/build/index.js.map b/blocks/labelled-picture/build/index.js.map
index efe4ecd..761babb 100644
--- a/blocks/labelled-picture/build/index.js.map
+++ b/blocks/lab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AAe,KAAK,EAAC;AACrB;;;;;;;;;;ACbA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/edit.js","webpack://multiblocks/./src/index.js","webpack://multiblocks/./src/save.js","webpack://multiblocks/./src/editor.scss","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window \"React\"","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"element\"]","webpack://multiblocks/external window [\"wp\",\"i18n\"]","webpack://multiblocks/external window [\"wp\",\"primitives\"]","webpack://multiblocks/webpack/bootstrap","webpack://multiblocks/webpack/runtime/chunk loaded","webpack://multiblocks/webpack/runtime/compat get default export","webpack://multiblocks/webpack/runtime/define property getters","webpack://multiblocks/webpack/runtime/hasOwnProperty shorthand","webpack://multiblocks/webpack/runtime/make namespace object","webpack://multiblocks/webpack/runtime/jsonp chunk loading","webpack://multiblocks/webpack/before-startup","webpack://multiblocks/webpack/startup","webpack://multiblocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport {\n\tuseBlockProps,\n\tMediaPlaceholder,\n\tBlockControls,\n\tInspectorControls,\n\tMediaReplaceFlow,\n} from \"@wordpress/block-editor\";\n\nimport {\n\tButton,\n\tPanelBody,\n\tTip,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({\n\tattributes,\n\tsetAttributes,\n\tnoticeOperations,\n\tnoticeList,\n\tnoticeUI,\n}) {\n\tconst {\n\t\thasStickyLegend,\n\t\thasFixedHeight,\n\t\tshowTitle,\n\t\tpictureUrl,\n\t\tpictureAlt,\n\t\tpictureId,\n\t\tpictureTitle,\n\t\tpictureCaption,\n\t} = attributes;\n\n\tfunction removePictureImg() {\n\t\tsetAttributes({\n\t\t\tpictureUrl: undefined,\n\t\t\tpictureId: undefined,\n\t\t\tpictureCaption: undefined,\n\t\t\tpictureAlt: \"\",\n\t\t});\n\t}\n\n\tfunction updatePictureImg(image) {\n\t\tconsole.log(image);\n\t\tif (!image || !image.url) {\n\t\t\tremovePictureImg();\n\t\t}\n\t\tsetAttributes({\n\t\t\tpictureTitle: image.title,\n\t\t\tpictureUrl: image.url,\n\t\t\tpictureId: image.id,\n\t\t\tpictureAlt: image.alt,\n\t\t\tpictureCaption: image.caption,\n\t\t});\n\t}\n\tfunction onUploadError(message) {\n\t\tnoticeOperations.removeAllNotices();\n\t\tnoticeOperations.createErrorNotice(message);\n\t}\n\n\tfunction handleHasStickyLegend(hasStickyLegend) {\n\t\tsetAttributes({ hasStickyLegend });\n\t}\n\tfunction handleHasFixedHeight(hasFixedHeight) {\n\t\tsetAttributes({ hasFixedHeight });\n\t}\n\tfunction handleShowTitle(showTitle) {\n\t\tsetAttributes({ showTitle });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t{pictureUrl && }\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t{pictureUrl && (\n\t\t\t\t\t\t\t
\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\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLe texte de votre Légende est automatiquement attribué depuis le\n\t\t\t\t\t\t\tchamp \"Légende\" de votre image dans la gallerie des médias\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\t
\n\t\t\t\t{pictureUrl && (\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{showTitle && pictureTitle && (\n\t\t\t\t\t\t\t\t{pictureTitle} \n\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t{pictureCaption}\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t)}\n\n\t\t\t\t{!pictureUrl && (\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t
\n\t\t>\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t \n\t\t),\n\t\tforeground: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\thasFixedHeight,\n\t\thasStickyLegend,\n\t\tshowTitle,\n\t\tpictureUrl,\n\t\tpictureAlt,\n\t\tpictureTitle,\n\t\tpictureCaption,\n\t} = attributes;\n\n\treturn (\n\t\t<>\n\t\t\t{pictureUrl && (\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\t{showTitle && pictureTitle && (\n\t\t\t\t\t\t\t{pictureTitle} \n\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t{pictureCaption}\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t)}\n\t\t>\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst trash = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\"\n}));\nexport default trash;\n//# sourceMappingURL=trash.js.map","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkmultiblocks\"] = globalThis[\"webpackChunkmultiblocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","MediaPlaceholder","BlockControls","InspectorControls","MediaReplaceFlow","Button","PanelBody","Tip","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","trash","Edit","attributes","setAttributes","noticeOperations","noticeList","noticeUI","hasStickyLegend","hasFixedHeight","showTitle","pictureUrl","pictureAlt","pictureId","pictureTitle","pictureCaption","removePictureImg","undefined","updatePictureImg","image","console","log","url","title","id","alt","caption","onUploadError","message","removeAllNotices","createErrorNotice","handleHasStickyLegend","handleHasFixedHeight","handleShowTitle","createElement","Fragment","className","label","checked","onChange","help","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","disableMediaButtons","notices","onError","registerBlockType","save","metadata","xmlns","viewBox","class","d","foreground","edit"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AAOU;AASF;AACU;AAE1B,SAASe,IAAIA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,gBAAgB;EAChBC,UAAU;EACVC;AACD,CAAC,EAAE;EACF,MAAM;IACLC,eAAe;IACfC,cAAc;IACdC,gBAAgB;IAChBC,SAAS;IACTC,UA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ACA;AACA,CAAC,EAAE,iEAAa,CAAC,uDAAI;AACrB;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB;;;;;;;;;;ACbA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/edit.js","webpack://multiblocks/./src/index.js","webpack://multiblocks/./src/save.js","webpack://multiblocks/./src/editor.scss","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window \"React\"","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"element\"]","webpack://multiblocks/external window [\"wp\",\"i18n\"]","webpack://multiblocks/external window [\"wp\",\"primitives\"]","webpack://multiblocks/webpack/bootstrap","webpack://multiblocks/webpack/runtime/chunk loaded","webpack://multiblocks/webpack/runtime/compat get default export","webpack://multiblocks/webpack/runtime/define property getters","webpack://multiblocks/webpack/runtime/hasOwnProperty shorthand","webpack://multiblocks/webpack/runtime/make namespace object","webpack://multiblocks/webpack/runtime/jsonp chunk loading","webpack://multiblocks/webpack/before-startup","webpack://multiblocks/webpack/startup","webpack://multiblocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport {\n\tuseBlockProps,\n\tMediaPlaceholder,\n\tBlockControls,\n\tInspectorControls,\n\tMediaReplaceFlow,\n} from \"@wordpress/block-editor\";\n\nimport {\n\tButton,\n\tPanelBody,\n\tTip,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({\n\tattributes,\n\tsetAttributes,\n\tnoticeOperations,\n\tnoticeList,\n\tnoticeUI,\n}) {\n\tconst {\n\t\thasStickyLegend,\n\t\thasFixedHeight,\n\t\thasRoundedShadow,\n\t\tshowTitle,\n\t\tpictureUrl,\n\t\tpictureAlt,\n\t\tpictureId,\n\t\tpictureTitle,\n\t\tpictureCaption,\n\t} = attributes;\n\n\tfunction removePictureImg() {\n\t\tsetAttributes({\n\t\t\tpictureUrl: undefined,\n\t\t\tpictureId: undefined,\n\t\t\tpictureCaption: undefined,\n\t\t\tpictureAlt: \"\",\n\t\t});\n\t}\n\n\tfunction updatePictureImg(image) {\n\t\tconsole.log(image);\n\t\tif (!image || !image.url) {\n\t\t\tremovePictureImg();\n\t\t}\n\t\tsetAttributes({\n\t\t\tpictureTitle: image.title,\n\t\t\tpictureUrl: image.url,\n\t\t\tpictureId: image.id,\n\t\t\tpictureAlt: image.alt,\n\t\t\tpictureCaption: image.caption,\n\t\t});\n\t}\n\tfunction onUploadError(message) {\n\t\tnoticeOperations.removeAllNotices();\n\t\tnoticeOperations.createErrorNotice(message);\n\t}\n\n\tfunction handleHasStickyLegend(hasStickyLegend) {\n\t\tsetAttributes({ hasStickyLegend });\n\t}\n\tfunction handleHasFixedHeight(hasFixedHeight) {\n\t\tsetAttributes({ hasFixedHeight });\n\t}\n\tfunction handleShowTitle(showTitle) {\n\t\tsetAttributes({ showTitle });\n\t}\n\tfunction handleHasRoundedShadow(hasRoundedShadow) {\n\t\tsetAttributes({ hasRoundedShadow });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t{pictureUrl && }\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t{pictureUrl && (\n\t\t\t\t\t\t\t
\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\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLe texte de votre Légende est automatiquement attribué depuis le\n\t\t\t\t\t\t\tchamp \"Légende\" de votre image dans la gallerie des médias\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\t\n\t\t\t\t{pictureUrl && (\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{showTitle && pictureTitle && (\n\t\t\t\t\t\t\t\t{pictureTitle} \n\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t{pictureCaption}\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t)}\n\n\t\t\t\t{!pictureUrl && (\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t
\n\t\t>\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t \n\t\t),\n\t\tforeground: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\thasFixedHeight,\n\t\thasStickyLegend,\n\t\thasRoundedShadow,\n\t\tshowTitle,\n\t\tpictureUrl,\n\t\tpictureAlt,\n\t\tpictureTitle,\n\t\tpictureCaption,\n\t} = attributes;\n\n\treturn (\n\t\t<>\n\t\t\t{pictureUrl && (\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\t{showTitle && pictureTitle && (\n\t\t\t\t\t\t\t{pictureTitle} \n\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t{pictureCaption}\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t)}\n\t\t>\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst trash = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\"\n}));\nexport default trash;\n//# sourceMappingURL=trash.js.map","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkmultiblocks\"] = globalThis[\"webpackChunkmultiblocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","MediaPlaceholder","BlockControls","InspectorControls","MediaReplaceFlow","Button","PanelBody","Tip","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","trash","Edit","attributes","setAttributes","noticeOperations","noticeList","noticeUI","hasStickyLegend","hasFixedHeight","hasRoundedShadow","showTitle","pictureUrl","pictureAlt","pictureId","pictureTitle","pictureCaption","removePictureImg","undefined","updatePictureImg","image","console","log","url","title","id","alt","caption","onUploadError","message","removeAllNotices","createErrorNotice","handleHasStickyLegend","handleHasFixedHeight","handleShowTitle","handleHasRoundedShadow","createElement","Fragment","className","label","checked","onChange","help","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","disableMediaButtons","notices","onError","registerBlockType","save","metadata","xmlns","viewBox","class","d","foreground","edit"],"sourceRoot":""}
\ No newline at end of file
diff --git a/blocks/labelled-picture/src/block.json b/blocks/labelled-picture/src/block.json
index 5395d78..3964ceb 100644
--- a/blocks/labelled-picture/src/block.json
+++ b/blocks/labelled-picture/src/block.json
@@ -19,6 +19,10 @@
"type": "boolean",
"default": "true"
},
+ "hasRoundedShadow": {
+ "type": "boolean",
+ "default": "false"
+ },
"hasFixedHeight": {
"type": "boolean",
"default": "true"
diff --git a/blocks/labelled-picture/src/edit.js b/blocks/labelled-picture/src/edit.js
index f48e375..ddde88f 100644
--- a/blocks/labelled-picture/src/edit.js
+++ b/blocks/labelled-picture/src/edit.js
@@ -28,6 +28,7 @@ export default function Edit({
const {
hasStickyLegend,
hasFixedHeight,
+ hasRoundedShadow,
showTitle,
pictureUrl,
pictureAlt,
@@ -72,6 +73,9 @@ export default function Edit({
function handleShowTitle(showTitle) {
setAttributes({ showTitle });
}
+ function handleHasRoundedShadow(hasRoundedShadow) {
+ setAttributes({ hasRoundedShadow });
+ }
return (
<>
@@ -97,6 +101,11 @@ export default function Edit({
checked={showTitle}
onChange={handleShowTitle}
/>
+
diff --git a/blocks/labelled-picture/src/save.js b/blocks/labelled-picture/src/save.js
index 9ae640a..526f287 100644
--- a/blocks/labelled-picture/src/save.js
+++ b/blocks/labelled-picture/src/save.js
@@ -4,6 +4,7 @@ export default function save({ attributes }) {
const {
hasFixedHeight,
hasStickyLegend,
+ hasRoundedShadow,
showTitle,
pictureUrl,
pictureAlt,
@@ -27,7 +28,12 @@ export default function save({ attributes }) {
showTitle && pictureTitle
? "homegrade-blocks-labelled-picture--legend-has-title"
: ""
- }`,
+ }
+ ${
+ hasRoundedShadow
+ ? "homegrade-blocks-labelled-picture--rounded-shadow"
+ : ""
+ } singleLightbox-link`,
})}
>