diff --git a/blocks/labelled-picture/build/block.json b/blocks/labelled-picture/build/block.json
index d38d9d9..24f4ea6 100644
--- a/blocks/labelled-picture/build/block.json
+++ b/blocks/labelled-picture/build/block.json
@@ -15,9 +15,24 @@
"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"
},
diff --git a/blocks/labelled-picture/build/index.asset.php b/blocks/labelled-picture/build/index.asset.php
index f350f6d..f091a3d 100644
--- a/blocks/labelled-picture/build/index.asset.php
+++ b/blocks/labelled-picture/build/index.asset.php
@@ -1 +1 @@
- array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '49e83b88e7e47ccb671c');
+ array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'c833423239386f358bf7');
diff --git a/blocks/labelled-picture/build/index.css b/blocks/labelled-picture/build/index.css
index d6689e0..1793cd7 100644
--- a/blocks/labelled-picture/build/index.css
+++ b/blocks/labelled-picture/build/index.css
@@ -1,4 +1,4 @@
-/*!****************************************************************************************************************************************************************************************************************************************!*\
- !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
- \****************************************************************************************************************************************************************************************************************************************/
+/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** css ./node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.4.35_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@12.6.0_sass@1.71.1_webpack@5.90.3/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
+ \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
diff --git a/blocks/labelled-picture/build/index.css.map b/blocks/labelled-picture/build/index.css.map
deleted file mode 100644
index 8e53675..0000000
--- a/blocks/labelled-picture/build/index.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-multiblocks {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/blocks/labelled-picture/build/index.js b/blocks/labelled-picture/build/index.js
index e0c32bf..2400263 100644
--- a/blocks/labelled-picture/build/index.js
+++ b/blocks/labelled-picture/build/index.js
@@ -12,8 +12,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ Edit)
/* harmony export */ });
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
@@ -36,9 +36,13 @@ function Edit({
noticeUI
}) {
const {
+ hasStickyLegend,
+ hasFixedHeight,
+ showTitle,
pictureUrl,
pictureAlt,
pictureId,
+ pictureTitle,
pictureCaption
} = attributes;
function removePictureImg() {
@@ -50,10 +54,12 @@ function Edit({
});
}
function updatePictureImg(image) {
+ console.log(image);
if (!image || !image.url) {
removePictureImg();
}
setAttributes({
+ pictureTitle: image.title,
pictureUrl: image.url,
pictureId: image.id,
pictureAlt: image.alt,
@@ -64,35 +70,71 @@ function Edit({
noticeOperations.removeAllNotices();
noticeOperations.createErrorNotice(message);
}
- return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
+ function handleHasStickyLegend(hasStickyLegend) {
+ setAttributes({
+ hasStickyLegend
+ });
+ }
+ function handleHasFixedHeight(hasFixedHeight) {
+ setAttributes({
+ hasFixedHeight
+ });
+ }
+ function handleShowTitle(showTitle) {
+ setAttributes({
+ showTitle
+ });
+ }
+ 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 "
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
+ label: "L\xE9gende Autocollante",
+ checked: hasStickyLegend,
+ onChange: handleHasStickyLegend,
+ help: "Coch\xE9, la l\xE9gende sera ajout\xE9 sur un bandeau au dessus de l'image"
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
+ label: "Hauteur de l'image Fixed",
+ checked: hasFixedHeight,
+ onChange: handleHasFixedHeight,
+ help: "Coch\xE9, la hauteur de l'image est fixe"
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
+ label: "Afficher le titre",
+ checked: showTitle,
+ onChange: handleShowTitle
+ })), (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 "
- }, pictureUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ }, pictureUrl && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: pictureUrl,
alt: pictureAlt
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "media-replace-container"
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
mediaId: pictureId,
mediaUrl: pictureUrl,
allowedTypes: ["image"],
accept: "image/*",
onSelect: updatePictureImg,
name: !pictureUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice")
- }), pictureUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
+ }), pictureUrl && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
className: "custom-flow-button",
variant: "primary",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
label: "Supprimer",
onClick: removePictureImg
- }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Tip, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Le texte de votre L\xE9gende est automatiquement attribu\xE9 depuis le champ \"L\xE9gende\" de votre image dans la gallerie des m\xE9dias")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, pictureUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
+ }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Tip, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Le texte de votre L\xE9gende est automatiquement attribu\xE9 depuis le champ \"L\xE9gende\" de votre image dans la gallerie des m\xE9dias")))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, pictureUrl && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
- className: `homegrade-blocks-labelled-picture`
+ 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" : ""}`
})
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: pictureUrl,
alt: pictureAlt
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, pictureCaption)), !pictureUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaPlaceholder, {
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, showTitle && pictureTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
+ className: "figcaption-title"
+ }, pictureTitle), " ", pictureCaption)), !pictureUrl && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaPlaceholder, {
disableMediaButtons: pictureUrl,
icon: "admin-appearance",
onSelect: updatePictureImg,
@@ -115,8 +157,8 @@ function Edit({
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
@@ -131,15 +173,15 @@ __webpack_require__.r(__webpack_exports__);
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_5__.name, {
icon: {
- src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
+ src: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
id: "Calque_2",
"data-name": "Calque 2",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 28 28"
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
id: "Calque_1-2",
"data-name": "Calque 1"
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "cls-1",
d: "m1.56,27.15c.68.53,1.52.85,2.44.85h12.29l-7.79-7.79-6.94,6.94Zm12.65-2.65l3.5,3.5h2.29c1.18,0,2.23-.52,2.96-1.33l-5.46-5.46-3.29,3.29Zm-.21-7.5c-.55,0-1,.45-1,1s.45,1,1,1,1-.45,1-1-.45-1-1-1Zm6-5H4c-2.21,0-4,1.79-4,4v8c0,.92.33,1.76.85,2.44l7.29-7.29c.2-.2.51-.2.71,0l4.65,4.65,3.65-3.65c.2-.2.51-.2.71,0l5.68,5.68c.29-.55.46-1.17.46-1.83v-8c0-2.21-1.79-4-4-4Zm-6,8c-1.1,0-2-.9-2-2s.9-2,2-2,2,.9,2,2-.9,2-2,2ZM26,0h-8c-1.1,0-2,.9-2,2v4c0,1.1.9,2,2,2h1v2.5c0,.2.12.38.31.46.06.03.13.04.19.04.13,0,.26-.05.35-.15l2.85-2.85h3.29c1.1,0,2-.9,2-2V2c0-1.1-.9-2-2-2Z"
}))),
@@ -161,8 +203,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ save)
/* harmony export */ });
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
-/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
@@ -171,19 +213,25 @@ function save({
attributes
}) {
const {
+ hasFixedHeight,
+ hasStickyLegend,
+ showTitle,
pictureUrl,
pictureAlt,
- pictureId,
+ pictureTitle,
pictureCaption
} = attributes;
- return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, pictureUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
+ 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`
+ 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" : ""}`
})
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: pictureUrl,
alt: pictureAlt
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, pictureCaption)));
+ }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, showTitle && pictureTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
+ className: "figcaption-title"
+ }, pictureTitle), " ", pictureCaption)));
}
/***/ }),
@@ -243,6 +291,16 @@ const trash = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(
/***/ }),
+/***/ "react":
+/*!************************!*\
+ !*** external "React" ***!
+ \************************/
+/***/ ((module) => {
+
+module.exports = window["React"];
+
+/***/ }),
+
/***/ "@wordpress/block-editor":
/*!*************************************!*\
!*** external ["wp","blockEditor"] ***!
@@ -309,7 +367,7 @@ module.exports = window["wp"]["primitives"];
\************************/
/***/ ((module) => {
-module.exports = 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 Autocollante","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":{"pictureUrl":{"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 Autocollante","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"}}}');
/***/ })
@@ -355,9 +413,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
-/******/ var chunkIds = deferred[i][0];
-/******/ var fn = deferred[i][1];
-/******/ var priority = deferred[i][2];
+/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
@@ -443,9 +499,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
-/******/ var chunkIds = data[0];
-/******/ var moreModules = data[1];
-/******/ var runtime = data[2];
+/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
@@ -468,7 +522,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
/******/ return __webpack_require__.O(result);
/******/ }
/******/
-/******/ var chunkLoadingGlobal = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
+/******/ var chunkLoadingGlobal = globalThis["webpackChunkmultiblocks"] = globalThis["webpackChunkmultiblocks"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
diff --git a/blocks/labelled-picture/build/index.js.map b/blocks/labelled-picture/build/index.js.map
index d16186f..efe4ecd 100644
--- a/blocks/labelled-picture/build/index.js.map
+++ b/blocks/labelled-picture/build/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AAOU;AAcF;AACU;AAE1B,SAASoB,IAAIA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,gBAAgB;EAChBC,UAAU;EACVC;AACD,CAAC,EAAE;EACF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAGR,UAAU;EAExE,SAASS,gBAAgBA,CAAA,EAAG;IAC3BR,aAAa,CAAC;MACbI,UAAU,EAAEK,SAAS;MACrBH,SAAS,EAAEG,SAAS;MACpBF,cAAc,EAAEE,SAAS;MACzBJ,UAAU,EAAE;IACb,CAAC,CAAC;EACH;EAEA,SAASK,gBAAgBA,CAACC,KAAK,EAAE;IAChC,IAAI,CAACA,KAAK,IAAI,CAACA,KAAK,CAACC,GAAG,EAAE;MAC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A;WACA;WACA;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;;;;;UEnDA;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 [\"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\tToolbarGroup,\n\tToolbarButton,\n\tSpinner,\n\twithNotices,\n\tFocalPointPicker,\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 { pictureUrl, pictureAlt, pictureId, pictureCaption } = 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\tif (!image || !image.url) {\n\t\t\tremovePictureImg();\n\t\t}\n\t\tsetAttributes({\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\treturn (\n\t\t<>\n\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{pictureCaption} \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 { pictureUrl, pictureAlt, pictureId, pictureCaption } = 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{pictureCaption} \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[\"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 = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\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 = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\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 = self[\"webpackChunkmultiblocks\"] = self[\"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","ToolbarGroup","ToolbarButton","Spinner","withNotices","FocalPointPicker","PanelBody","Tip","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","trash","Edit","attributes","setAttributes","noticeOperations","noticeList","noticeUI","pictureUrl","pictureAlt","pictureId","pictureCaption","removePictureImg","undefined","updatePictureImg","image","url","id","alt","caption","onUploadError","message","removeAllNotices","createErrorNotice","createElement","Fragment","title","className","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","label","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,SAAS;IACTC,UAAU;IACVC,UAAU;IACVC,SAAS;IACTC,YAAY;IACZC;EACD,CAAC,GAAGZ,UAAU;EAEd,SAASa,gBAAgBA,CAAA,EAAG;IAC3BZ,aAAa,CAAC;MACbO,UAAU,EAAEM,SAAS;MACrBJ,SAAS,EAAEI,SAAS;MACpBF,cAAc,EAAEE,SAAS;MACzBL,UAAU,EAAE;IACb,CAAC,CAAC;EACH;EAEA,SAASM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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
diff --git a/blocks/labelled-picture/build/style-index.css b/blocks/labelled-picture/build/style-index.css
index 2488c9e..95046e2 100644
--- a/blocks/labelled-picture/build/style-index.css
+++ b/blocks/labelled-picture/build/style-index.css
@@ -1,4 +1,4 @@
-/*!***************************************************************************************************************************************************************************************************************************************!*\
- !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
- \***************************************************************************************************************************************************************************************************************************************/
+/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** css ./node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.4.35_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@12.6.0_sass@1.71.1_webpack@5.90.3/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
+ \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
diff --git a/blocks/labelled-picture/build/style-index.css.map b/blocks/labelled-picture/build/style-index.css.map
deleted file mode 100644
index 2872df5..0000000
--- a/blocks/labelled-picture/build/style-index.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://multiblocks/./src/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-multiblocks {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/blocks/labelled-picture/src/block.json b/blocks/labelled-picture/src/block.json
index 71f896d..14b77b4 100644
--- a/blocks/labelled-picture/src/block.json
+++ b/blocks/labelled-picture/src/block.json
@@ -15,9 +15,24 @@
"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"
},
diff --git a/blocks/labelled-picture/src/edit.js b/blocks/labelled-picture/src/edit.js
index c28f58a..f48e375 100644
--- a/blocks/labelled-picture/src/edit.js
+++ b/blocks/labelled-picture/src/edit.js
@@ -10,11 +10,6 @@ import {
import {
Button,
- ToolbarGroup,
- ToolbarButton,
- Spinner,
- withNotices,
- FocalPointPicker,
PanelBody,
Tip,
ToggleControl,
@@ -30,7 +25,16 @@ export default function Edit({
noticeList,
noticeUI,
}) {
- const { pictureUrl, pictureAlt, pictureId, pictureCaption } = attributes;
+ const {
+ hasStickyLegend,
+ hasFixedHeight,
+ showTitle,
+ pictureUrl,
+ pictureAlt,
+ pictureId,
+ pictureTitle,
+ pictureCaption,
+ } = attributes;
function removePictureImg() {
setAttributes({
@@ -42,10 +46,12 @@ export default function Edit({
}
function updatePictureImg(image) {
+ console.log(image);
if (!image || !image.url) {
removePictureImg();
}
setAttributes({
+ pictureTitle: image.title,
pictureUrl: image.url,
pictureId: image.id,
pictureAlt: image.alt,
@@ -56,9 +62,42 @@ export default function Edit({
noticeOperations.removeAllNotices();
noticeOperations.createErrorNotice(message);
}
+
+ function handleHasStickyLegend(hasStickyLegend) {
+ setAttributes({ hasStickyLegend });
+ }
+ function handleHasFixedHeight(hasFixedHeight) {
+ setAttributes({ hasFixedHeight });
+ }
+ function handleShowTitle(showTitle) {
+ setAttributes({ showTitle });
+ }
+
return (
<>
+
+
+
+
+
- {pictureCaption}
+
+ {showTitle && pictureTitle && (
+ {pictureTitle}
+ )}{" "}
+ {pictureCaption}
+
)}
diff --git a/blocks/labelled-picture/src/save.js b/blocks/labelled-picture/src/save.js
index a1f5ac1..9ae640a 100644
--- a/blocks/labelled-picture/src/save.js
+++ b/blocks/labelled-picture/src/save.js
@@ -1,18 +1,42 @@
import { useBlockProps } from "@wordpress/block-editor";
export default function save({ attributes }) {
- const { pictureUrl, pictureAlt, pictureId, pictureCaption } = attributes;
+ const {
+ hasFixedHeight,
+ hasStickyLegend,
+ showTitle,
+ pictureUrl,
+ pictureAlt,
+ pictureTitle,
+ pictureCaption,
+ } = attributes;
return (
<>
{pictureUrl && (
- {pictureCaption}
+
+ {showTitle && pictureTitle && (
+ {pictureTitle}
+ )}{" "}
+ {pictureCaption}
+
)}
>